Digital television terminal and playing method, device, medium, program product and chip

By encrypting and decrypting only the intra-frame encoded frames of digital TV programs during recording and playback, the problem of skipping images during high-speed playback on low-cost terminals is solved, resulting in a smoother high-speed playback effect.

CN121397214BActive Publication Date: 2026-05-01JINGCHEN SEMICON SHENZHEN CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511924266.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-19
Publication Date
2026-05-01
Estimated Expiration
2045-12-19

AI Technical Summary

Technical Problem

Low-cost digital TV terminals suffer from poor display quality due to insufficient chip performance when playing content at high speeds, resulting in significant jumps in the displayed image.

Method used

When recording the target program, only the transport stream packets of the intra-coded frames are encrypted, and during playback, only the transport stream packets of the intra-coded frames are decrypted and decoded. This method maintains the continuity of the picture when playing at high speed and reduces the overhead of recording and playback.

Benefits of technology

It improves the smoothness of high-speed playback, avoids large screen jumps, enhances the display effect, and reduces the overhead of recording and playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121397214B_ABST
    Figure CN121397214B_ABST
Patent Text Reader

Abstract

The application discloses a digital television program playing method, an electronic device, a computer readable storage medium, a computer program product, a chip and a digital television terminal, wherein the playing method comprises the following steps: when recording a target program, filtering out a transport stream packet to which an intra-coded frame of the target program belongs, and encrypting the transport stream packet to which the intra-coded frame belongs to obtain an encrypted packet; when playing back the target program, obtaining a recording file of the target program, wherein the recording file comprises the encrypted packet; in a first speed playback mode, decrypting and decoding the encrypted packet in the recording file to obtain an audio and video original code stream of the intra-coded frame; and playing the audio and video original code stream of the intra-coded frame at a first speed, wherein the first speed is higher than a standard speed. The method of the application can avoid large jumps of displayed pictures in a high speed playback mode, and improve display quality.
Need to check novelty before this filing date? Find Prior Art

Description

Digital television terminals and playback methods, devices, media, software products and chips Technical Field

[0001] This invention relates to the field of digital television technology, and in particular to a method for playing digital television programs, as well as electronic devices, computer-readable storage media, computer program products, chips, and digital television terminals. Background Technology

[0002] Digital television terminals have program recording and playback functions. During the program recording process, all audio and video data of the target program are encrypted and saved to a designated directory. During the program playback process, the recording file is obtained from the designated directory, the transport stream packets of each frame in the recording file are decrypted, and the decrypted audio and video data is sent to the decoder for decoding. The decoded audio and video data is then played through the playback module.

[0003] However, for low-cost terminals, due to the limitations of chip performance, the decoder cannot achieve high-speed full decoding playback. Therefore, when playing at high speed, the displayed image will jump significantly, resulting in a very poor display effect. Summary of the Invention

[0004] The present invention aims to at least solve one of the technical problems existing in the prior art. Therefore, one object of the present invention is to provide a method for playing digital television programs that can avoid large jumps in the displayed image and improve display quality in high-speed playback mode.

[0005] The second objective of this invention is to provide an electronic device.

[0006] A third objective of this invention is to provide a computer-readable storage medium.

[0007] The fourth objective of this invention is to provide a computer program product.

[0008] The fifth objective of this invention is to provide a chip.

[0009] The sixth objective of this invention is to propose a digital television terminal.

[0010] To achieve the above objectives, a digital television program playback method according to a first aspect of the present invention includes: when recording a target program, filtering out the transport stream packets to which the intra-frame coded frames of the target program belong, and encrypting the transport stream packets to which the intra-frame coded frames belong to obtain an encrypted packet; when playing back the target program, acquiring a recording file of the target program, the recording file including the encrypted packet; in a first-speed playback mode, decrypting and decoding the transport stream packets of the encrypted frames in the recording file to obtain the decrypted audio and video raw bitstream of the intra-frame coded frames; and playing the audio and video raw bitstream of the intra-frame coded frames at a first-speed playback mode, wherein the first-speed playback mode is higher than the standard speed playback mode.

[0011] According to the digital television program playback method of the present invention, when recording a target program, only the transport stream packets of the intra-frame encoded frames of the target program are encrypted, and other frame data is not encrypted. During non-standard speed playback, only the transport stream packets of the intra-frame encoded frames need to be decrypted and only the transport stream packets of the intra-frame encoded frames need to be decoded for playback, without waiting for other frame data. This is equivalent to decoding and playing only the intra-frame encoded frames. Compared with the full decoding method of all frame data, more intra-frame encoded frame data can be decoded and obtained in the same amount of time, which improves the decoding speed of intra-frame encoded frames. Intra-frame encoded frames can reflect the picture at the beginning or key position in a data segment, and intra-frame encoded frames are evenly distributed in the data stream. Therefore, when playing at high speed, the picture display is more coherent, and the smoothness of high-speed playback can be maintained, avoiding large jumps in the picture and improving the playback display effect. Furthermore, encrypting and decrypting only the transport stream packets of the intra-frame encoded frames can reduce the overhead of recording and playback. Therefore, this application achieves a smoother speed playback effect with lower overhead.

[0012] In some embodiments, the recorded file further includes: transport stream packets belonging to other frames in the transport stream packets of the target program besides the intra-coded frames, and the playback method further includes: in a second speed playback mode, decrypting and decoding the encrypted packets in the recorded file, and decoding other transport stream packets in the recorded file besides the encrypted packets, to obtain a fully decoded audio and video raw bitstream of the target program, wherein the fully decoded audio and video raw bitstream includes the audio and video raw bitstream of the intra-coded frames and the audio and video raw bitstream of the other frames besides the intra-coded frames; playing the fully decoded audio and video raw bitstream at a second speed, wherein the second speed is less than a preset speed threshold, and the first speed is greater than or equal to the preset speed threshold.

[0013] Therefore, it can improve the display effect of high-speed playback while still retaining the ability to achieve standard or low-speed playback.

[0014] In some embodiments, the recorded file further includes transport stream packets belonging to frames other than the intra-coded frames in the transport stream packets of the target program. The playback method further includes: when recording the target program, after encrypting the transport stream packets to which the intra-coded frames belong, configuring the encryption flag bit in the header of the encrypted packet to the preset value; when playing back the target program, obtaining the headers of each packet in the recorded file, if the encryption flag bit in the header is the preset value, then determining that the packet is a transport stream packet to which the intra-coded frames belong; if the encryption flag bit in the header is not the preset value, then determining that the packet is a transport stream packet to which other frames belong belong. This achieves the distinction between encrypted and unencrypted packets, providing support for high-speed playback.

[0015] In some embodiments, filtering out the transport stream packets to which the intra-coded frames of the target program belong includes: obtaining the clear stream of the target program, the clear stream including a plurality of transport stream packets; and determining whether the transport stream packet is the transport stream packet to which the intra-coded frames belong based on the start code format and type identifier of each transport stream packet.

[0016] In some embodiments, obtaining the clear stream of the target program includes: obtaining the original transport stream of the target program; if the target program is a scrambled program, descrambling the original transport stream of the target program to obtain the clear stream; if the target program is a clear stream program, using the original transport stream as the clear stream.

[0017] In some embodiments, the playback method further includes: when recording the target program, generating a random number, encrypting the random number based on a root key to obtain a target key value, and saving the target key value; and decrypting the encrypted packet in the recorded file, including: obtaining the target key value, decrypting the target key value based on the root key to obtain the random number, and decrypting the encrypted packet based on the random number.

[0018] To achieve the above objectives, a second aspect of the present invention provides an electronic device comprising: a processor; a memory connected to the processor; and a computer program stored in the memory that can be executed by the processor, wherein the computer program, when executed, implements the method for playing digital television programs.

[0019] According to the electronic device of the present invention, by executing the above method, when recording a target program, only the transport stream packets of the intra-coded frames of the target program are encrypted, and other frame data is not encrypted. During non-standard speed playback, only the transport stream packets of the intra-coded frames need to be decrypted and only the transport stream packets of the intra-coded frames need to be decoded for playback, without waiting for other frame data. That is, it is equivalent to decoding and playing only the intra-coded frames. Compared with decrypting and decoding all frame data, more intra-coded frame data can be decoded and obtained in the same amount of time, which improves the decoding speed of intra-coded frames. Intra-coded frames can reflect the picture at the beginning or key position in a data segment, and intra-coded frames are evenly distributed in the data stream. Therefore, when playing at high speed, the picture display is more coherent, the high-speed playback is smooth, and large jumps in the picture are avoided, thus improving the playback display effect.

[0020] To achieve the above objectives, a third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for playing digital television programs.

[0021] To achieve the above objectives, a fourth aspect of the present invention provides a computer program product, the computer program product including a computer program stored on a computer-readable storage medium, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the digital television program playback method.

[0022] To achieve the above objectives, a fifth aspect of the present invention provides a chip for implementing the digital television program playback method described in the above embodiments.

[0023] According to the chip of the present invention, by implementing the digital television program playback method of the above embodiment, when recording the target program, only the transport stream packet of the intra-frame encoded frame of the target program is encrypted, and other frame data is not encrypted. During non-standard speed playback, only the transport stream packet of the intra-frame encoded frame needs to be decrypted and only the transport stream packet of the intra-frame encoded frame needs to be decoded for playback, without waiting for other frame data. That is, it is equivalent to decoding and playing only the intra-frame encoded frame. Compared with the decryption and decoding of all frame data, more intra-frame encoded frame data can be decoded and obtained in the same amount of time, which improves the decoding speed of intra-frame encoded frames. Intra-frame encoded frames can reflect the picture at the beginning or key position in a data segment, and the intra-frame encoded frames are evenly distributed in the data stream. Therefore, when playing at high speed, the picture display is more coherent, which can maintain the smoothness of high-speed playback, avoid large jumps in the picture, and improve the playback display effect.

[0024] To achieve the above objectives, a fifth aspect of the present invention provides a digital television terminal, which includes the electronic device described above, or the digital television terminal includes the chip described above, or the digital television terminal is used to implement the method for playing digital television programs described above.

[0025] According to the embodiments of the present invention, the digital television terminal, by executing the above method, encrypts only the transport stream packets of the intra-frame encoded frames of the target program when recording the target program, without encrypting other frame data. During non-standard speed playback, it only needs to decrypt the transport stream packets of the intra-frame encoded frames and decode only the transport stream packets of the intra-frame encoded frames for playback, without waiting for other frame data. This is equivalent to decoding and playing only the intra-frame encoded frames. Compared to decrypting and decoding all frame data, more intra-frame encoded frame data can be decoded and obtained in the same amount of time, improving the decoding speed of intra-frame encoded frames. Intra-frame encoded frames can reflect the beginning or key position of the picture in a data segment, and the intra-frame encoded frames are evenly distributed in the data stream. Therefore, during high-speed playback, the picture display is more coherent, maintaining smooth high-speed playback and avoiding large jumps in the picture, thus improving the playback display effect.

[0026] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0027] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0028] Figure 1 is a block diagram of a digital television system;

[0029] Figure 2 is a schematic diagram of a program recording process;

[0030] Figure 3 is a schematic diagram of a program playback process;

[0031] Figure 4 is a schematic diagram of the playback display effect of Scheme 1;

[0032] Figure 5 is a schematic diagram of the playback display effect of Scheme 2;

[0033] Figure 6 is a flowchart of a method for playing digital television programs according to an embodiment of the present invention;

[0034] Figure 7 is a schematic diagram of the display interval of I-frame in time when playing using the playback scheme of this embodiment of the invention;

[0035] Figure 8 is a flowchart of a method for playing digital television programs according to an embodiment of the present invention;

[0036] Figure 9 is a schematic diagram of a table containing the composition information of a transport stream packet header according to an embodiment of the present invention;

[0037] Figure 10 is a schematic diagram of a program recording process according to an embodiment of the present invention;

[0038] Figure 11 is a schematic diagram of a program playback process according to an embodiment of the present invention;

[0039] Figure 12 is a block diagram of an electronic device according to an embodiment of the present invention;

[0040] Figure 13 is a block diagram of a digital television terminal according to an embodiment of the present invention.

[0041] Figure label:

[0042] Digital TV terminal 100;

[0043] Electronic device 10;

[0044] Processor 101 and memory 12. Detailed Implementation

[0045] The embodiments of the present invention are described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. The embodiments of the present invention are described in detail below.

[0046] The digital television program playback method of this invention can be used in a digital television system, as shown in Figure 1. The digital television system includes a front-end system, a transmission network, and a receiving terminal.

[0047] The front-end system is the source of the digital television signal, responsible for processing the original audio and video content into a transmittable digital signal; the transmission network is responsible for transmitting the digital signal processed by the front-end system to the receiving terminal (i.e., the user end); the receiving terminal is responsible for receiving, decoding the signal and restoring it into a viewable picture. The receiving terminal can be a digital television set-top box, a smart TV, and auxiliary equipment, but is not limited to these.

[0048] In some embodiments of the present invention, the digital television terminal is equivalent to a receiving terminal in a digital television system, and may include a smart set-top box, a smart television, or other devices that can be used for receiving and processing digital television signals. The digital television program playback method of this application mainly addresses the problem of poor display quality when digital television terminals using low-end chips perform high-speed playback; this playback method can be implemented using the chip in the digital television terminal.

[0049] To compare the differences between the recording and playback processes of this application and existing programs, the recording and playback processes of existing digital television terminals will be described below with reference to Figures 2 and 3.

[0050] Figure 2 is a schematic diagram of the program recording process of a digital television terminal. The program recording process of the digital television terminal shown in Figure 2 mainly includes:

[0051] Step A1: Frequency Locking. Activate the CAS (Conditional Access System) function. The CAS function can be implemented using two descramblers (dsc), such as dsc1 and dsc2 in the diagram. Specifically, the raw transport stream of the program signal is obtained from the tuner / demodulator. If the program is scrambled, the CAS function filters the ECM (Entitlement Control Message) of the scrambled program, for example, by descrambling the raw transport stream using dsc1 to obtain the clean stream of the program. If the program is a clean stream, the step of descrambling the raw transport stream is skipped.

[0052] Step B1: Activate the CAS secondary encryption function. The chip's processor or dedicated hardware module generates a random number KEY1. The descrambler dsc2 uses KEY1 to perform secondary encryption on all frame data in the clear stream. The clear stream includes audio and video data (AV), program ID (PID), and packetized elementary streams (PES). Additionally, the chip can use a key generator, encryption coprocessor, or other modules to encrypt KEY1 using the chip's root key (rootkey) to obtain KEY2. KEY2 is then returned to the application, which saves it as a KEY file to a specified directory.

[0053] Step C1: The application starts the DVR (Digital Video Recorder) recording function to record programs. The DVR module sets up the demux1 (demultiplexer 1) node of the chip. The demux1 node obtains the encrypted TS (Transport Stream) data callback and sends it to the DVR module. The DVR module saves it to the specified directory in audio and video file format, thus realizing the recording function.

[0054] Figure 3 is a schematic diagram of the program playback process on a digital television terminal. As shown in Figure 3, the current program playback process for a digital television terminal mainly includes:

[0055] Step A2: The application reads the KEY file and the recording file from the specified directory. The recording file refers to the data obtained and stored in the specified directory in step C1. Further, the CAS function is activated to perform a second decryption of the recording file. Specifically, the CAS module configures AV and PID and sets KEY2 through descrambler 3 (dsc3). KEY2 is obtained from the KEY file. The chip's key generator / encryption coprocessor decrypts KEY2 based on the root key (rootkey) to obtain KEY1. dsc3 then uses KEY1 to perform a second decryption of the recording file.

[0056] Step B2: The application starts the DVR playback function. dsc3 sends the decrypted recording file to the demux2 (demultiplexer 2) node. The DVR module configures the filter (av filter). The filter callback sends all the data after dsc3's secondary decryption to the playback module for playback.

[0057] It is understandable that the above recording and playback functions are based on the general hardware resources of digital TV terminal chips, such as descramblers, decoders, and demultiplexers, combined with software and firmware to implement the core DVR functions such as video recording, playback, and management. In this embodiment, the DVR module is a software functional module responsible for coordinating hardware resources (such as demultiplexers and descramblers) to complete the control flow for program recording and playback, including setting hardware parameters, processing data flow logic (such as selecting the TS packet type for recording / playback), and interacting with the application layer. In some embodiments, the functions of the DVR module can also be implemented through a dedicated hardware module, where encoding / decoding and storage control functions are handled by dedicated circuits within the dedicated hardware module. For some low-end chips, a combination of chip hardware modules and software can be used to implement DVR functions.

[0058] As mentioned above, in some implementations, all frame data in the transport stream is encrypted during program recording and decrypted during playback. However, due to the low-cost nature of the terminals and their limited chip performance, full decoding playback cannot be achieved in high-speed playback modes. In high-speed playback modes such as 16x or 32x, which are higher than the standard playback speed, some solutions, such as solution 1, can only display the first intra-coded frame (I-frame) of a data segment at a time. Alternatively, some solutions, such as solution 2, can display the first I-frame of a data segment along with subsequent predictive coded frames (P-frames) and bidirectional predictive frames (B-frames). Therefore, the problem mentioned in the background section occurs: significant screen jumps and poor display quality during high-speed playback.

[0059] As shown in Figures 4 and 5, the playback display effects correspond to the high-speed playback effects of Scheme 1 and Scheme 2, respectively.

[0060] Figure 4 illustrates the high-speed playback effect of Scheme 1 described above. Every 1 second, the DVR module sends a data segment (including I-frames and other frames) to the demux node or decoder via seek playback. The decoder decodes the first I-frame of this data segment and sends it to the playback module. The playback module plays and transmits the data to the display device to display this I-frame. The next I-frame is displayed only after the next I-frame is decoded by the demux node, and this cycle repeats. That is, if a standard playback speed, such as 1x, displays one I-frame every 1 second, then at 32x playback speed, it's equivalent to displaying one I-frame every 32 seconds. As shown in Figure 4, this results in a large gap in the displayed content, leading to a drastically different and poor display quality.

[0061] Figure 5 illustrates the high-speed playback effect of Scheme 2 above: The DVR module sends a data segment (including I-frames and other frames) to the demux node / decoder every 1 second via seek playback. After decoding the I-frame, the decoder continues to decode subsequent frames such as P-frames and B-frames. The decoded data is sent to the playback module, which then plays the data and sends it to the display device. This means that consecutive I-frames, P-frames, and B-frames are displayed at once. In other words, at standard playback speed (e.g., 1x), one I-frame, P-frame, and B-frame are displayed every 1 second. However, at high playback speed (e.g., 32x), it's equivalent to displaying consecutive I-frames, P-frames, and B-frames every 32 seconds. As shown in Figure 5, this results in significant gaps in the displayed content, leading to a drastically different and poorly displayed image.

[0062] To address the aforementioned issues, the digital television program playback method of this application improves the recording and playback process of the target program.

[0063] The following describes a method for playing a digital television program according to an embodiment of the present invention, with reference to the accompanying drawings, including a target program recording process and a target program playback process.

[0064] In some embodiments, as shown in FIG6, a method for playing digital television programs according to an embodiment of the present invention includes at least steps S1-S4.

[0065] S1. When recording the target program, filter out the transport stream packets to which the intra-coded frames of the target program belong, and encrypt the transport stream packets to which the intra-coded frames belong to obtain encrypted packets.

[0066] Specifically, the audio and video files of the target program include data such as intra-frame coded frames (I-frames), predictive coded frames (P-frames), and bidirectional predictive frames (B-frames). I-frames, P-frames, and B-frames are three key frame types defined in three video compression technologies based on inter-frame prediction.

[0067] I-frames, in particular, are encoded using only the pixel information of the current frame itself, similar to JPEG compression for still images, without relying on data from other frames. Their main functions are: 1. As "anchor points" for video, ensuring a complete reference for the beginning or key positions of the frame; for example, I-frames are often inserted at the beginning of a video or during scene transitions. 2. During network transmission, if an I-frame is lost, subsequent frames that depend on it may not be decoded correctly; conversely, as long as the I-frame is intact, at least the image of that frame can be reconstructed.

[0068] For P-frames, the encoding method is as follows: predictive coding is performed based on the previous I-frame or P-frame (called the "reference frame"), only recording the differences between the current frame and the reference frame (such as motion vectors and pixel changes), without storing the complete picture. Its function is to reduce redundant data by reusing similar information from the previous frame, thereby improving compression efficiency while ensuring the continuity of the picture. It is the core frame type for smooth video playback.

[0069] For B-frames, the encoding method is as follows: bidirectional prediction is performed simultaneously based on the previous reference frame (I / P frame) and the next reference frame (I / P frame), and only the differences between the current frame and the two reference frames are recorded. Its purpose is to maximize the compression of video size without significantly sacrificing image quality, making it particularly suitable for scenes with many static scenes and regular motion patterns.

[0070] This application only encrypts the transport stream packets to which the intra-coded frames of the target program belong, and does not encrypt other frame data besides the intra-coded frames. That is, the encrypted packet only includes the transport stream packets to which the intra-coded frames belong.

[0071] As can be understood, as mentioned above, encrypting only the transport stream packets to which the intra-coded frames belong means that even if the program data is obtained, the complete program data cannot be obtained without decrypting the I-frames. Therefore, data protection can also be achieved.

[0072] S2, when playing back the target program, obtain the recorded file of the target program, which includes an encrypted packet.

[0073] In some embodiments, when there is a need for program recording, the target program can be recorded through a digital television terminal, and the recorded file is saved to a designated directory of the program. During playback, the recorded file in the designated directory can be read from the storage module through the chip's system file driver. In the scheme of this application embodiment, the recorded file includes an encrypted packet obtained through S1.

[0074] S3, in the first-speed playback mode, decrypts and decodes the encrypted packets in the recorded file to obtain the original audio and video bitstream of the intra-frame encoded frames.

[0075] The encrypted packet is the transport stream packet of the intra-coded frame. The transport stream packet to which this intra-coded frame belongs is decrypted and decoded to obtain the original audio and video bitstream of the intra-coded frame.

[0076] In the embodiment, the first speed playback mode can be a non-standard speed playback mode such as 2x speed, 4x speed, 8x speed, 16x speed, 32x speed, or 64x speed, that is, the first speed is higher than the standard speed, such as 1x speed, that is, the first speed can be a high speed playback mode.

[0077] In an embodiment of the present invention, in the first speed playback mode, the encrypted packet in the recorded file can be decrypted by the chip's descrambler and the decrypted encrypted packet can be decoded by the decoder. The encrypted packet only includes the transport stream packet of the intra-frame coded frame, i.e., I-frame, of the target program audio and video data. That is, in the first speed playback mode, only the transport stream packet to which the intra-frame coded frame belongs needs to be decrypted and decoded, and there is no need to decrypt and decode the transport stream packets to which other data frames belong. In short, the present application does not require decryption of all data.

[0078] S4 plays the original audio and video streams of the intra-coded frames at the first speed.

[0079] The first speed is higher than the standard speed. For example, if the standard speed is 1x, the first speed can be, but is not limited to, 2x, 4x or higher speeds, such as 12x, 32x or 64x. That is, the original audio and video bitstream of the intra-frame encoded frame is played at a low speed or a high speed higher than the standard speed.

[0080] That is, in the first speed playback mode higher than the standard speed, the method of the present invention only decrypts and decodes intra-frame encoded frames, i.e. I-frames, and performs high-speed playback.

[0081] Specifically, the descrambler injects only the TS packet of the decrypted I-frame into the demux node, the decoder decodes the TS packet of the I-frame to obtain the original audio and video bitstream of the I-frame, and the player plays the original audio and video bitstream of the I-frame at double speed.

[0082] The solution presented in this application represents a significant improvement over solutions 1 and 2 described above. Figure 7 illustrates the temporal display interval of I-frames during high-speed playback using the solution of this invention. Since I-frames are generally uniformly distributed in the bitstream, high-speed playback only plays I-frame data. For low-end chips, this means the decoder decodes all I-frames without needing to decode other frames, thus meeting performance requirements. In solution 1, only I-frames within a specific time period are decoded and played, while I-frames from other periods are discarded, resulting in screen jumps during high-speed playback. Unlike solution 1, the solution in this application decrypts and decodes all I-frames in the target program's transport stream. Because I-frames are uniformly distributed in the transport stream, the high-speed playback provided in this application also exhibits a uniform temporal speed, without significant screen jumps. This effectively improves the visual effect of high-speed playback on low-end chips and enhances playback quality. Furthermore, although this solution records and plays all I-frames, this application only encrypts and decrypts the transport stream packets containing the I-frames, which can reduce the overhead of recording and playback. Therefore, this application achieves a smoother playback speed with lower overhead.

[0083] According to the digital television program playback method of the present invention, when recording a target program, only the transport stream packets of the intra-frame encoded frames of the target program are encrypted, and other frame data is not encrypted. During non-standard speed playback, only the transport stream packets of the intra-frame encoded frames need to be decrypted and only the transport stream packets of the intra-frame encoded frames need to be decoded for playback, without waiting for other frame data. This is equivalent to decoding and playing only the intra-frame encoded frames. Compared with decrypting and decoding all frame data, more intra-frame encoded frame data can be decoded and obtained in the same amount of time, which improves the decoding speed of intra-frame encoded frames. Intra-frame encoded frames can reflect the picture at the beginning or key position in a data segment, and the intra-frame encoded frames are evenly distributed in the data stream. Therefore, when playing at high speed, the picture display is more coherent, the high-speed playback is smooth, and large jumps in the picture are avoided, thus improving the playback display effect.

[0084] For standard playback speed, in this embodiment of the application, full decoding playback can be performed directly.

[0085] Specifically, in some embodiments, as shown in FIG8, the process of playing back the target program in the second speed mode may include the following steps S5-S6. The second speed is less than a preset speed threshold, i.e., playing at a standard speed such as 1x or a low speed such as 2x, 3x, or 4x. The first speed can be greater than or equal to the preset speed threshold. For low-cost terminal chips, the above-described solution of this application can achieve low-speed playback in the second speed playback mode.

[0086] S5, in the second-speed playback mode, decrypts and decodes the encrypted packets in the recorded file, and decodes other transport stream packets in the recorded file except for the encrypted packets, to obtain the fully decoded audio and video raw bitstream of the target program. The fully decoded audio and video raw bitstream includes the audio and video raw bitstream of intra-coded frames and the audio and video raw bitstream of other frames except for intra-coded frames.

[0087] The second speed playback mode can be a standard speed playback mode, such as 1x speed mode, or a low speed playback mode, such as 2x speed playback mode or 4x speed playback mode.

[0088] In an embodiment, the recording file of this application includes an encrypted packet, which is a transport stream packet of an intra-coded frame, i.e., an I-frame. The recording file also includes transport stream packets of other frames in the transport stream packet of the target program, excluding intra-coded frames.

[0089] Specifically, the encrypted packets in the recorded file are sent to the descrambler, which decrypts the encrypted packets. The encrypted packets are transport stream packets of intra-coded frames; that is, the descrambler decrypts the transport stream packets of intra-coded frames. The decrypted transport stream packets of intra-coded frames and the transport stream packets of the target program, excluding intra-coded frames, are all sent to the decoder. For example, the transport stream packets of decrypted intra-coded frames and the transport stream packets of other frames are multiplexed and merged through a demux node. The merged transport stream packets are then sent to the decoder for decoding to obtain the fully decoded audio and video raw bitstream of the target program.

[0090] S6 plays the fully decoded audio and video raw stream at second speed.

[0091] Specifically, the playback module plays the fully decoded audio and video stream at a low speed, such as 1x, 2x, or 4x, thereby achieving a low-speed playback mode.

[0092] In the embodiments, the transport stream packets of encrypted packets (i.e., transport stream packets of intra-coded frames) and transport stream packets of target programs, other than intra-coded frames, can be identified by the encryption flag bit in the packet header of the transport stream packet.

[0093] Figure 9 shows a header structure for a transport stream packet. The header includes encryption flags, such as the transport_scrambling_control field. When the encryption flag is set to a specific value, the transport stream packet is encrypted; when the encryption flag is not set to a specific value, the transport stream packet is unencrypted.

[0094] For example, when the tsc (transport_scrambling_control) field is non-zero, the transport packet is encrypted; when the field is 0x00, the transport packet is unencrypted. This method allows for quick and accurate identification of encrypted and unencrypted packets in a recorded file, facilitating the subsequent decryption process.

[0095] Specifically, when recording a target program, after encrypting the transport stream packet to which the intra-coded frame belongs, the encryption flag bit in the packet header of the encrypted packet is configured to a set value to indicate that the packet is an encrypted packet.

[0096] For example, when recording a target program, the descrambler dsc2 filters out the transport stream packets belonging to the intra-coded frames of the target program and encrypts the transport stream packets of the intra-coded frames, while the transport stream packets belonging to other frames remain in a clear state. Furthermore, after encrypting the transport stream packets of the intra-coded frames, the encryption flag bit in the packet header of the transport stream packets containing the intra-coded frames is configured to a set value; for example, the tsc field bit in the packet header mentioned above is set to a non-zero value, providing support for the identification of encrypted packets during program playback.

[0097] Then, the encrypted packet and the transport stream packets of other frames besides the intra-frame encoded frames are saved in file format, that is, the recording file is saved.

[0098] In some embodiments, the transport stream packet to which the intra-coded frame belongs can be identified based on the attribute parameters of each packet. These attribute parameters may include the start code format and type identifier of the transport stream packet. Specifically, the descrambler dsc2 acquires the clear stream of the target program, which includes multiple transport stream packets. These packets include transport stream packets belonging to the intra-coded frame and transport stream packets belonging to other frames besides the intra-coded frame. It can determine whether a transport stream packet belongs to an intra-coded frame based on the start code format and type identifier of each transport stream packet.

[0099] For different types of transport stream packets, their attribute parameters, such as start code format and type identifier, can be configured differently. dsc2 compares the attribute parameters of each packet with those of transport stream packets of different types. If the attribute parameters of a transport stream packet match those of an intra-coded frame, then the transport stream packet is determined to belong to an intra-coded frame; otherwise, the transport stream packet belongs to a frame other than an intra-coded frame.

[0100] The target program can be either a scrambled program or a clean program.

[0101] Scrambled programs refer to television programs whose signals are encrypted and require specific conditions to be viewed normally. For example: 1. Paid content restrictions: Additional subscriptions or payments are required to unlock and watch. 2. License changes or expiration: Programs that were previously viewable become inaccessible due to changes in the TV station's license (such as changing the encryption method) or the user's failure to renew their subscription. 3. Technical issues: Such as the set-top box not receiving the new license, the smart card not being inserted, or equipment malfunction.

[0102] "Clear stream" programs refer to television programs whose signals are not encrypted and can be directly decoded and played by receiving devices. Clear stream programs are usually public service television programs, and users do not need to pay additional decryption fees. They can receive and watch the programs simply by using suitable receiving equipment, such as a television or set-top box with DTMB (Digital Terrestrial Multimedia Broadcast) decoding capabilities.

[0103] In this embodiment, the original transport stream of the target program is obtained; if the target program is a scrambled program, the original transport stream of the target program is descrambled to obtain a clean stream of the target program; if the target program is a clean stream program, the original transport stream is used as the clean stream of the target program. Furthermore, the transport stream packets of intra-coded frames can be identified based on the attribute parameters of each packet for encryption.

[0104] Specifically, when the target program is a scrambled program, the authorization control information of the scrambled program can be descrambled using the CAS function, and the transport stream after descrambling is the clear stream of the target program.

[0105] For example, as shown in Figure 10, the FM / demodulator obtains the raw transport stream of the target program. If the target program is a scrambled program, the CAS (Conditional Access System) function is activated to filter the authorization control information of the current target program. The CAS module sets the dsc (descrambler) and configures the descrambler hardware parameters to descramble the raw transport stream. If the target program is a clear stream program, there is no need to descramble the raw transport stream. After descrambling, the tsc field in the header of the TS packet of the raw transport stream or clear stream is 0x00, which is the frequency locking process.

[0106] After obtaining the clear stream, when performing secondary encryption on each transport stream packet, the descrambler identifies the intra-coded frame by the start code format and type identifier of each packet, encrypts only the transport stream packet to which the intra-coded frame belongs, and after encrypting the transport stream packet to which the intra-coded frame belongs, configures the encryption flag bit in its packet header to a set value, for example, the tsc field bit in the packet header is configured to the value 0x11.

[0107] Furthermore, in some embodiments, when recording a target program, a random number can be generated by the chip's key generator / encryption coprocessor or other modules. The chip encrypts the random number based on the root key to obtain the target key value and saves the target key value to a specified directory.

[0108] Specifically, as shown in Figure 10, after obtaining the clear stream of the target program, the DVR recording function is activated, and only intra-frame encoded frames are encrypted a second time. For example, the DVR module sets the parameters of the chip's demux1 (demultiplexer) node. The demux1 node obtains the callback of the transport stream packet data after CAS descrambling and sends it to the DVR module. If it is a clear stream program, no descrambling is required. The chip's key generator / encryption coprocessor generates a random number KEY1, encrypts KEY1 using the chip's root key to obtain the target key value KEY3, and returns KEY2 to the application. The application saves the KEY2 value as a file to a specified directory. The descrambler parses the video's Elementary Stream (ES) data, finds the transport stream packet containing the I-frame based on the start code format and type identifier (e.g., NAL unit type), and only performs secondary encryption on the data content of the transport stream packet containing the I-frame. For example, it can use KEY + a fixed encryption algorithm such as AES128, and sets the tsc field in the transport stream packet header to a non-zero value. The DVR module saves the encrypted I-frame transport stream packet and other transport stream packets as recording files to a specified directory, thus realizing the recording function.

[0109] During program recording, only the transport stream packets of I-frames are encrypted. The encrypted packets and the transport stream packets of other frames (excluding intra-coded frames) are used to generate recording files. The recording files and KEY files are stored in the storage directory for use when playing back the program.

[0110] When playing back the target program, the headers of each packet in the recorded file are obtained. If the encryption flag in the header is a set value, the packet is determined to be a transport stream packet belonging to an intra-coded frame. If the encryption flag in the header is not a set value, the packet is determined to be a transport stream packet belonging to a frame other than an intra-coded frame.

[0111] Furthermore, when playing back the target program, the target key value is obtained, for example, the target key value KEY3 is obtained from the KEY file. The target key value KEY3 is decrypted based on the root key to obtain the random number KEY1 used during encryption. Based on the random number KEY1, the encrypted packet, i.e. the transport stream packet to which the intra-encoded frame belongs, is decrypted. Then, the transport stream packet of the decrypted intra-encoded frame is decoded to obtain the original audio and video bitstream of the intra-encoded frame.

[0112] Figure 11 is a schematic diagram of a program playback process according to an embodiment of the present invention. As shown in Figure 11, the application reads a KEY file and a recording file from a specified directory. The KEY file includes a target key value KEY3, and the recording file includes the transport stream packets of the target program. The transport stream packets of the target program include encrypted packets and unencrypted packets, i.e., the transport streams of intra-coded frames and the transport stream packets of other frames besides intra-coded frames.

[0113] If playback is in the first-speed playback mode (i.e., a high-speed playback mode such as 16x or 32x), then only the I-frames are decrypted, decoded, and played at high speed. The DVR module reads the recorded file, decrypts only the I-frame transport stream packets, and the playback module only decodes and plays the I-frames.

[0114] Specifically, the DVR module reads the recording file and the KEY file and sends them to the demux11 (demultiplexer) node. The DVR module configures the demux11 node, which only outputs the encrypted packet and sends it to the CAS module. The CAS module initiates secondary decryption. The CAS module configures the audio and video program identifier and sets KEY3 through the descrambler (dsc3). The chip uses the rootkey to decrypt KEY3 to obtain KEY1. The CAS module sets KEY1 and the decryption algorithm on dsc3. dsc3 determines that the tsc field in the TS packet header is non-zero, indicating that the transport stream packet is an encrypted packet. Then, it uses KEY1 to perform secondary decryption of the encrypted packet to obtain the transport stream packet of the decrypted intra-coded frame. When the application starts the DVR playback function, the DVR module configures the filter (avfilter), and the filter callback receives the decrypted intra-coded frame transport stream packet. The decrypted intra-coded frame transport stream packet is sent to the playback module. The decoder of the playback module decodes the intra-coded frame transport stream packet to obtain the original audio and video bitstream of the intra-coded frame. The playback module plays the original audio and video bitstream of the intra-coded frame at high speed and transmits it to the display screen for display, thereby achieving high-speed playback.

[0115] Since I-frames are generally evenly distributed in the bitstream, the transmission stream packets with only the tsc field bit being non-zero during high-speed playback are all I-frame data. This means that the chip's decoder is decoding all I-frame data, which is sufficient for its performance. The playback module also provides a uniform playback speed at high speeds without any skipping, effectively improving the visual effect of high-speed playback on low-end chips.

[0116] If it is a second-speed playback mode, such as a low-speed playback mode like 1x, 2x, or 4x, then full decoding is used.

[0117] Specifically, the DVR module reads the recording file and KEY file and sends them to the demux11 node. Encrypted and unencrypted packets are demultiplexed by demux11. The encrypted packets are sent to the CAS module, and the unencrypted packets are sent to demux12. The CAS module initiates secondary decryption. It configures the audio / video program identifier and sets KEY3 through the descrambler (dsc3). The chip uses the rootkey to decrypt KEY3 to obtain KEY1. The CAS module sets KEY1 and the decryption algorithm on dsc3. dsc3 determines that if the tsc field in the TS packet header is non-zero, the transport stream packet is encrypted. It then uses KEY1 to perform secondary decryption, obtaining the decrypted intra-coded frame transport stream packet. The tsc field of the unencrypted packet is 0x00 and does not require decryption. The decrypted intra-coded frame transport stream and the unencrypted packets (i.e., the transport stream packets of other frames besides intra-coded frames) are multiplexed and merged at demux12 to obtain the transport stream packet of the target program. When the application initiates DVR playback, the DVR module configures an AV filter. This filter calls back the target program's transport stream packet, which is then sent to the playback module. The playback module's decoder decodes the transport stream packet to obtain the fully decoded audio and video raw bitstream of the target program. The playback module plays this fully decoded audio and video raw bitstream at standard or low speed and transmits it to the display screen for display, thus achieving low-speed playback. This low-speed playback mode is achievable even with low-end chips.

[0118] In the example, the digital television program playback method of this application takes data security into consideration. Since only intra-frame encoded frames are encrypted, even if the recorded file is illegally obtained, an attacker cannot obtain the complete program data, thus effectively protecting data security. At the same time, this encryption method also reduces the computational complexity of encryption and decryption, improving processing efficiency.

[0119] In practical applications, the digital television program playback method of this application can be widely used in various digital television terminal devices, such as smart set-top boxes and smart TVs. These devices typically use low-end chips with limited performance, making it difficult to achieve high-speed full decoding playback. However, the playback method of this application, by encrypting and decrypting only the intra-frame encoded frames and not other frame data, effectively improves the visual effect of high-speed playback on low-end chips, enhances playback quality, and provides users with a better viewing experience.

[0120] Based on the above methods, the second aspect of this application proposes an electronic device. As some examples, the electronic device may include a system-on-a-chip, a control unit, or a chip module, etc., and no specific limitations are made here.

[0121] As shown in Figure 12, the electronic device 10 includes a processor 101 and a memory 12.

[0122] The memory 12 is connected to the processor 101. The memory 12 stores a computer program that can be executed by the processor 101. When the computer program is executed, it implements the digital television program playback method of the above embodiment.

[0123] According to the electronic device 10 of the present invention, by executing the above method, when recording a target program, only the transport stream packets of the intra-frame encoded frames of the target program are encrypted, and other frame data is not encrypted. During non-standard speed playback, only the transport stream packets of the intra-frame encoded frames need to be decrypted and only the transport stream packets of the intra-frame encoded frames need to be decoded for playback, without waiting for other frame data. That is, it is equivalent to decoding and playing only the intra-frame encoded frames. Compared with decrypting and decoding all frame data, more intra-frame encoded frame data can be decoded and obtained in the same amount of time, which improves the decoding speed of intra-frame encoded frames. Intra-frame encoded frames can reflect the picture at the beginning or key position in a data segment, and the intra-frame encoded frames are evenly distributed in the data stream. Therefore, when playing at high speed, the picture display is more coherent, the high-speed playback is smooth, and large jumps in the picture are avoided, thus improving the playback display effect.

[0124] A third aspect of the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the digital television program playback method of the above embodiment.

[0125] A fourth aspect of the present invention also provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to perform the digital television program playback method described in the above embodiment.

[0126] Furthermore, the logic instructions in the aforementioned memory 12 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.

[0127] The memory 12, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor 101 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 12, thereby implementing the digital television program playback method in the above method embodiments.

[0128] The memory 12 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 12 may include high-speed random access memory and may also include non-volatile memory.

[0129] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this disclosure. The aforementioned computer-readable storage medium can be a non-transitory storage medium, including: a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media capable of storing program code; it can also be a transient storage medium.

[0130] A fifth aspect of the present invention also proposes a chip that can be used to implement the digital television program playback method of the above embodiments. The chip can integrate hardware modules such as a descrambler and a demultiplexer, as well as software programs that implement the digital television program playback method of the above embodiments, forming a CAS module and a DVR module to realize DVR recording and DVR playback functions. In this embodiment, the descrambler and demultiplexer can be bidirectional devices, meaning they can be used for both descrambling and scrambling, and for both demultiplexing and multiplexing.

[0131] In this embodiment, the chip may be, but is not limited to, a system-level system, such as a smart set-top box chip or a smart TV chip, etc., and no specific limitation is made here.

[0132] A sixth aspect of the present invention also proposes a digital television terminal. In this embodiment, the digital television terminal may include, but is not limited to, a smart set-top box, a smart television, etc.

[0133] As shown in Figure 13, the digital television terminal 100 includes the electronic device 10 of the above embodiment. Alternatively, the digital television terminal 100 includes the chip of the above embodiment. Alternatively, the digital television terminal 100 is used to implement the digital television program playback method of the above embodiment.

[0134] According to the embodiment of the present invention, the digital television terminal 100, by executing the above method, when recording a target program, only encrypts the transport stream packets to which the intra-frame encoded frames of the target program belong, without encrypting other frame data. During non-standard speed playback, only the transport stream packets of the intra-frame encoded frames need to be decrypted and only the transport stream packets of the intra-frame encoded frames need to be decoded for playback, without waiting for other frame data. This is equivalent to decoding and playing only the intra-frame encoded frames. Compared to decrypting and decoding all frame data, more intra-frame encoded frame data can be decoded and obtained in the same amount of time, improving the decoding speed of intra-frame encoded frames. Intra-frame encoded frames can reflect the picture at the beginning or key position in a data segment, and the intra-frame encoded frames are evenly distributed in the data stream. Therefore, during high-speed playback, the picture display is more coherent, maintaining smooth high-speed playback and avoiding large jumps in the picture, thus improving the playback display effect.

[0135] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example.

[0136] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A method for playing digital television programs, characterized in that, include: When recording a target program, the transport stream packets belonging to the intra-coded frames of the target program are filtered out. These transport stream packets are then encrypted to obtain an encrypted packet. After encryption, the encryption flag in the packet header of the encrypted packet is configured to a set value. The encrypted packet and the transport stream packets belonging to other frames in the target program's transport stream packets (excluding the intra-coded frames) are stored as a recording file of the target program. The transport stream packets belonging to these other frames are not encrypted. When playing back the target program, the recording file is obtained, and the packet headers of each packet in the recording file are acquired. If the encryption flag in the packet header is a set value, the packet is determined to be an encrypted packet belonging to the intra-coded frame. In the first-speed playback mode, the... The encrypted packets in the recorded file are decrypted and decoded to obtain the original audio and video stream of the intra-coded frames. The original audio and video stream of the intra-coded frames is played at a first speed, wherein the first speed is higher than the standard speed. In the second speed playback mode, the encrypted packets in the recorded file are decrypted and decoded, and other transport stream packets in the recorded file other than the encrypted packets are decoded to obtain the fully decoded original audio and video stream of the target program. The fully decoded original audio and video stream includes the original audio and video stream of the intra-coded frames and the original audio and video stream of other frames other than the intra-coded frames. The fully decoded original audio and video stream is played at a second speed, wherein the second speed is less than a preset speed threshold, and the first speed is greater than or equal to the preset speed threshold.

2. The playback method according to claim 1, characterized in that, The playback method further includes: when playing back the target program, obtaining the packet header of each packet in the recorded file; if the encryption flag bit of the packet header is not the set value, then determining that the packet belongs to a transport stream packet of a frame other than the intra-coded frame.

3. The method according to claim 1, characterized in that, Filtering out the transport stream packets to which the intra-coded frames of the target program belong includes: obtaining the clear stream of the target program, wherein the clear stream includes multiple transport stream packets; and determining whether the transport stream packet belongs to the transport stream packet of the intra-coded frames based on the start code format and type identifier of each transport stream packet.

4. The method according to claim 3, characterized in that, Obtaining the clear stream of the target program includes: obtaining the original transport stream of the target program; if the target program is a scrambled program, then descrambling the original transport stream of the target program to obtain the clear stream; if the target program is a clear stream program, then using the original transport stream as the clear stream.

5. The playback method according to claim 1, characterized in that, The playback method further includes: when recording the target program, generating a random number, encrypting the random number based on the root key to obtain a target key value, and saving the target key value; and decrypting the encrypted packet in the recorded file, including: obtaining the target key value, decrypting the target key value based on the root key to obtain the random number, and decrypting the encrypted packet based on the random number.

6. An electronic device, characterized in that, include: processor; Memory connected to the processor; The memory stores a computer program that can be executed by the processor, and when the computer program is executed, it implements the method for playing digital television programs according to any one of claims 1-5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for playing digital television programs according to any one of claims 1-5.

8. A computer program product, characterized in that, The computer program product includes a computer program stored on a computer-readable storage medium, the computer program including program instructions that, when executed by a computer, cause the computer to perform the digital television program playback method according to any one of claims 1-5.

9. A chip, characterized in that, The chip includes multiple descramblers, multiple demultiplexers, a decoder, and a software program for implementing the digital television program playback method according to any one of claims 1-5, so as to realize recording and playback functions.

10. A digital television terminal, characterized in that, The digital television terminal includes the electronic device of claim 6, or the digital television terminal includes the chip of claim 9.

Citation Information

Patent Citations

  • Content reproduction apparatus, recording apparatus, recording and reproduction apparatus, and reproduction method

    CN101610377A