A method, device and terminal for detecting and recovering data damage in high-security partitions

By adding a backup partition to the set-top box and backing up the secure partition data, and using error codes to identify error types for data overwriting, the problem of high-security flash partition damage caused by frequent reading and writing is solved, enabling quick recovery of encrypted program playback and improving user experience.

CN114518977BActive Publication Date: 2024-08-23NAZHEN TECHNOLOGY (SINGAPORE) PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011300359.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-19
Publication Date
2024-08-23
Estimated Expiration
2040-11-19

AI Technical Summary

Technical Problem

Frequent read and write operations on the security partition cause damage to the high-security flash partition, resulting in the inability to play encrypted programs. Existing recovery methods require server-side coordination, are time-consuming, and affect the user experience.

Method used

Add a backup partition to the set-top box, generate a device certificate, and back up the secure partition data to the backup partition. When the encrypted program cannot be played, the error type is identified through the error code, and the data in the backup partition is overwritten into the secure partition to restore the damaged data. Quick resume play function.

Benefits of technology

The high-security playback function of the set-top box can be restored in a short time without server-side coordination, which greatly improves the user experience and avoids interruption of encrypted program playback caused by partition damage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114518977B
    Figure CN114518977B
Patent Text Reader

Abstract

The present application discloses a method, device and terminal for detecting and recovering data damage in a high-security partition. The method includes: saving and backing up the data in the security partition where the certificate burning and device certificate generation have been completed to the backup partition of the set-top box; when the encrypted program cannot be played, the set-top box distinguishes the error type through the returned error code; according to the error type, the corresponding high-security data in the backup partition overwrites the damaged high-security data in the security partition to restore the high-security data in the security partition and continue to play the encrypted program. The present application adds a device partition to the set-top box to store the data in the backup security partition. When the encrypted program cannot be played, the error type is distinguished through the error code, and the data in the backup partition is used to perform different recovery operations on the data in the security partition by parsing the error type, so as to restore the high-security playback function of the set-top box in a short time, which greatly improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of network set-top boxes, and in particular to a method, device and terminal for detecting and recovering data damage in a high-security partition. Background Art

[0002] Currently, network set-top boxes have introduced a variety of copyright protection standards, and servers also support a variety of copyright protection schemes.

[0003] In the current design, the set-top box stores multiple DRM encryption information in a separate partition. The box generates a device certificate based on the chip ID and random numbers. Some headend servers store this certificate. To decrypt content, the client sends a license request to the server; the license server authenticates the client and sends the license back to the client; the box saves the license returned by the server to the secure partition and uses the license returned by the server to decrypt the encrypted bitstream. In this process, there are frequent read and write operations on the secure partition. As the number of encrypted programs increases, the read and write operations on the flash will also become more frequent.

[0004] However, since the flash has a certain read and write life, frequent reading and writing of the same location will reduce the flash life or cause data loss. Once the key data is lost, such as the device certificate or key, when interacting with the server, the server will think that the box's security data has been tampered with and refuse to provide a license, resulting in the program not being able to play normally. Summary of the invention

[0005] The present application provides a method, device and terminal for detecting and recovering data damage in a high-security partition, so as to solve the problem that when high-security data is frequently written into a high-security flash partition, data or partition damage may occur, resulting in the inability to play encrypted programs.

[0006] In order to solve the above technical problems, the embodiments of the present application disclose the following technical solutions:

[0007] In a first aspect, an embodiment of the present application discloses a method for detecting and recovering data damage in a high-security partition, the method comprising:

[0008] Save and back up the data in the secure partition where the certificate burning and device certificate generation have been completed to the backup partition of the set-top box;

[0009] When the encrypted program cannot be played, the set-top box identifies the error type through the returned error code;

[0010] According to the error type, the damaged high-security data in the security partition is overwritten by the corresponding high-security data in the backup partition to restore the high-security data in the security partition and continue to play the encrypted program.

[0011] In a second aspect, the embodiment of the present application further discloses a device for detecting and recovering data damage in a high-security partition, comprising:

[0012] A memory for storing program codes;

[0013] The processor is used to read the program code stored in the memory and execute the method described in the first aspect.

[0014] In a third aspect, an embodiment of the present application further provides a terminal, comprising a device for detecting and recovering data damage in a high-security partition as described in the second aspect.

[0015] The method for detecting and recovering damaged high-security partition data provided in the present application includes: saving and backing up the data in the security partition where the certificate burning and device certificate generation have been completed to the backup partition of the set-top box; when the encrypted program cannot be played, the set-top box distinguishes the error type through the returned error code; according to the error type, the corresponding high-security data in the backup partition is used to overwrite the damaged high-security data in the security partition to restore the high-security data in the security partition and continue to play the encrypted program. The present application adds a device backup partition in the set-top box. The data in the backup partition is the same as the data in the security partition where the certificate has been burned and the device certificate has been generated. When high-security data is frequently written to the security partition of the set-top box, it may cause the high-security data or the high-security partition to be damaged, resulting in the inability to play encrypted programs. At this time, an error code will be returned to the set-top box. There are currently two types of error codes related to certificate damage. One is the certificate error returned by the server, and the other is that the security partition is damaged and the certificate cannot be read. The set-top box can distinguish the error type based on the error code; after identifying the error type, the set-top box can overwrite the damaged high-security data in the security partition with the corresponding high-security data in the backup partition to restore the high-security data in the security partition. The high-security playback function of the set-top box can be restored in a short time without the need for server-side coordination, which is time-saving and can greatly improve the user experience.

[0016] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0018] Figure 1 A schematic diagram of a scenario provided by an embodiment of the present invention;

[0019] Figure 2A flowchart of a method for detecting and recovering data damage in a high-security partition provided in an embodiment of the present application;

[0020] Figure 3 A detailed flow chart between S100 and S200 in a method for detecting and recovering data damage in a high-security partition provided in an embodiment of the present application;

[0021] Figure 4 A detailed flowchart of S300 in a method for detecting and recovering data corruption in a high-security partition provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0023] Figure 1 A schematic diagram of a scenario provided by an embodiment of the present invention, Figure 1 The system includes a TV set 101 and a set-top box 102. The TV set 101 and the set-top box 102 can be connected by wire or wirelessly. The set-top box 102 is used to transmit network resources and wired resources to the TV set 101, so that users can browse the web or watch online TV or live broadcast programs through the TV set 101. Figure 1 The figure is only a schematic diagram of a scenario of the present invention, and the specific types and corresponding relationships of the set-top box 102 and the TV 101 in the figure are not limited to Figure 1 The specific form disclosed in .

[0024] At present, the set-top box 102 has introduced a variety of copyright protection specifications, that is, the set-top box stores the encryption information of various DRMs in an independent partition, and the set-top box generates a device certificate according to the chip ID and the random number. The server of some headends will store this certificate. To decrypt the content, the client (set-top box 102) will send a license request to the server, and the license server will authenticate the client and send the license back to the client; the set-top box saves the license returned by the server in the security partition, and uses the license returned by the server to decrypt the encrypted code stream. In this process, there are frequent read and write operations on the security partition. As the number of encrypted programs increases, the read and write operations on the flash will also be more frequent. Since the flash has a certain read and write life, frequent read and write operations on the same position will reduce the flash life or cause data loss. Once the data of the key part is lost, such as the device certificate or data key, when interacting with the server, the server will think that the security data of the set-top box has been tampered with, and refuse to provide the license, resulting in the program being unable to play normally.

[0025] Currently, when the data in the security partition is damaged, most of the time, high-security playback is restored by burning the certificate. However, since the server records the device certificate of the original set-top box, when interacting, the server will think that the device has been tampered with and will refuse to provide a decoding license. In this case, the only way is to delete the device certificate of the original set-top box recorded by the server and use the device certificate in the set-top box for backup. The entire process requires coordination work on the server side, which is time-consuming and affects the user experience.

[0026] In order to solve the above problems, an embodiment of the present application provides a method for detecting and recovering data damage in a high-security partition. After generating a device certificate, the data in the security partition is stored in the backup partition of the set-top box. When the DRM program cannot be played, the player will return an error code to prompt the user why the program cannot be played. The set-top box can distinguish the error type based on the error code, and refresh the corresponding data in the backup partition back to the security partition according to the error type to overwrite the damaged data, so that the high-security playback function of the set-top box can be restored in a short time.

[0027] Figure 2 A flowchart of a method for detecting and recovering data damage in a high-security partition provided in an embodiment of the present application. Figure 2 As shown, the method for detecting and recovering high-security partition damage provided by the embodiment of the present application includes:

[0028] S100: The data in the security partition where the certificate burning and device certificate generation have been completed are saved and backed up to the backup partition of the set-top box.

[0029] The generation of device certificates in the set-top box is completed during the initialization phase of the factory. In order to add a device partition in the set-top box, a step is added at the factory. After the device certificate generation is completed, the set-top box has completed the burning of various digital certificates and the generation of the local device certificate. At this time, the set-top box needs to add another step to store the partition data that has completed the certificate burning and device certificate generation to the backup partition of the set-top box. At present, all products have backup partitions to store user private data. This partition exists to avoid the problem of re-authentication when the user loses the username or password after restoring the factory. The space occupied is not large, but it is enough to store the complete high-security partition.

[0030] When the player plays encrypted programs, the playback process of high-security programs is as follows: Figure 3 As shown:

[0031] S110: The set-top box carries the device certificate to request a license from the server.

[0032] S120: The server determines whether it is the first authentication.

[0033] S130: If the server determines that it is the first authentication, the server determines whether the high-security data is legal.

[0034] S140: If the server determines that the high-security data is legal, the server saves the device certificate and provides a decoding license to the set-top box to play the encrypted program normally.

[0035] S150: If the server determines that it is not the first authentication, it verifies whether the high-security data and the device certificate are correct.

[0036] S160: If the high-security data and the device certificate are incorrect, the decoding license is refused to be provided to the set-top box, and the set-top box cannot play encrypted programs.

[0037] When the set-top box plays encrypted programs through a player, it needs to interact with the server to decrypt the encrypted code stream. Specifically, the set-top box sends a license request to the server with its device certificate. The server authenticates the set-top box, that is, verifies whether the license request is the first authentication. If it is the first authentication, it means that the connection between the set-top box and the server has not been established. The server needs to save the device certificate of the set-top box under the premise that the high-security data is legal to realize the interaction between the set-top box and the server; then the server provides the set-top box with a decoding license based on the license request. The set-top box saves the decoding license to the secure partition and uses the decoding license to decrypt the encrypted code stream to play the encrypted program normally.

[0038] If the license request sent by the set-top box to the server is not the first authentication, it means that a connection has been established between the set-top box and the server. The server will verify whether the high-security data and the device certificate are correct, that is, detect whether the high-security data or the device certificate is damaged. If the high-security data or the device certificate is damaged, the server will consider that the device has been tampered with and will refuse to provide a decoding license to the set-top box. In this way, the encrypted code stream in the secure partition of the set-top box cannot be decrypted and the encrypted program cannot be played. If the high-security data or the device certificate is not damaged, the server can provide a decoding license to the set-top box based on the license request. The set-top box saves the decoding license to the secure partition and uses the decoding license to decrypt the encrypted code stream to play the encrypted program normally.

[0039] S200: When the encrypted program cannot be played, the set-top box identifies the error type through the returned error code.

[0040] When the player encounters the problem of being unable to play encrypted programs, it will return an error code, and the error code can be used to distinguish the error type. There are currently two types of error codes related to certificate damage, one is the certificate error returned by the server, and the other is the prompt that the certificate cannot be read. When playing a DRM program and the error code given by the player is a certificate error or the certificate cannot be read, the set-top box starts different recovery processes according to the type of error code. At this time, the set-top box pops up a prompt to remind the user not to turn off the set-top box. The set-top box is initializing high-security data. After the data recovery is completed, the user can use it normally.

[0041] S300: Overwriting the damaged high-security data in the security partition with the corresponding high-security data in the backup partition according to the error type, so as to restore the high-security data in the security partition and continue to play the encrypted program.

[0042] When the set-top box receives the returned error code, it can identify the error type based on the error code, such as certificate error or inability to read the certificate; after obtaining the error type, the set-top box starts different recovery processes based on the error type. The specific recovery methods are as follows: Figure 4 As shown:

[0043] S310: When the encrypted program cannot be played, an error code is returned to the set-top box.

[0044] S320: The set-top box determines whether it is a certificate error according to the error code.

[0045] S330: If it is a certificate error, determine whether the certificate in the secure partition is the same as the certificate in the backup partition.

[0046] S340: If the certificate in the secure partition is different from the certificate in the backup partition, the certificate in the backup partition is written back to the secure partition to cover the damaged certificate in the secure partition.

[0047] When the set-top box carries the device certificate to request a license from the server, the server compares the previously saved device certificate with the certificate sent in this request. If the device certificates are found to be unequal, the server sends a certificate error error code to the set-top box.

[0048] After receiving the certificate error code, the set-top box identifies the certificate error returned by the server, and the secure partition can be read and written normally. At this time, the set-top box compares the certificate in the secure partition with the certificate in the backup partition to determine whether the certificate in the secure partition is damaged. If the certificate in the secure partition is different from the certificate in the backup partition, it means that the certificate in the secure partition is damaged. At this time, the certificate in the backup partition can be written back to the secure partition to cover the damaged certificate in the secure partition, thereby restoring the certificate in the secure partition.

[0049] After restoring the certificate of the security partition, the restored security partition interacts normally with the server, and the security partition of the set-top box can decrypt the encrypted code stream according to the restored certificate to play the encrypted program normally.

[0050] S350: If the error code is not a certificate error, determine whether the error code is that the certificate cannot be read.

[0051] S360: If the error code is that the certificate cannot be read, the set-top box checks whether the security partition is damaged.

[0052] S370: If the security partition is damaged, format the security partition to complete the initialization of the security partition.

[0053] S380: Flash the data in the backup partition back to the initialized secure partition to reset the data in the secure partition.

[0054] When the set-top box carries the device certificate to request a license from the server, the server returns a decoding license to the set-top box, and the set-top box saves the returned decoding license to the secure partition. However, the decoding license fails to be read from the secure partition, making it impossible to decrypt the encrypted bitstream, resulting in the player being unable to play encrypted programs. At this time, the server returns an unreadable certificate to the set-top box.

[0055] After the set-top box receives the error code that the certificate cannot be read, the set-top box checks the status of the security partition to detect whether the inability to read the decoding license in the security partition is due to damage to the security partition; if the inability to read the certificate is due to damage to the security partition, the user is prompted to reformat the security partition and reset the data in the security partition. After initializing the security partition, the data in the backup partition is written back to the initialized security partition to reset the data in the security partition. After restoring the security partition of the set-top box to its initial state, it interacts normally with the server. The initialized security partition can read the certificate to encrypt the encrypted bitstream to play the encrypted program normally.

[0056] In the method for detecting and recovering data damage in a high-security partition provided in an embodiment of the present application, a device backup partition is added to the set-top box, and the data in the backup partition is the same as the data in the secure partition where the certificate burning and device certificate generation have been completed. When high-security data is frequently written to the secure partition of the set-top box, it may cause the high-security data or the high-security partition to be damaged, resulting in an inability to play encrypted programs. At this time, an error code will be returned to the set-top box. Currently, there are two types of error codes related to certificate damage. One is a certificate error returned by the server, and the other is that the secure partition is damaged and the certificate cannot be read. The set-top box can distinguish the error type based on the error code; after distinguishing it as a certificate error, the set-top box can write the certificate in the backup partition back to the secure partition to overwrite the damaged certificate in the secure partition, and restore the certificate in the secure partition; after distinguishing it as a damaged security partition and the certificate cannot be read, the set-top box can format the secure partition, and then write all the data in the backup partition back to the secure partition to reset the data in the secure partition, thereby restoring the state of the secure partition. By restoring the data in the security partition accordingly through the data in the backup partition, the high-security playback function of the set-top box can be restored in a short time without the need for server-side coordination, which greatly improves the user experience.

[0057] Corresponding to the above-mentioned method for detecting and recovering data damage in a high-security partition, an embodiment of the present application further provides a device for detecting and recovering data damage in a high-security partition. The structure of the device for detecting and recovering data damage in a high-security partition may include: a processor and a memory, the memory being used to store program code, i.e., software code for detecting and recovering data damage in a high-security partition; the processor being used to read the program code stored in the memory, and execute the software code for detecting and recovering data damage in a high-security partition, which acts on a terminal, and the terminal executes the device for detecting and recovering data damage in the high-security partition according to the software code, so that when the player cannot play an encrypted program, the error type is determined by the returned error code, and the corresponding data in the backup partition in the set-top box is used to perform different data recovery on the data in the security partition by parsing the error type, so as to restore the high-security playback function of the set-top box in a short time.

[0058] When the execution instructions in the memory are executed by the processor, the detection and recovery device for data damage in the high-security partition can be executed: after the device certificate is generated, the data storage in the security partition is backed up to the backup partition of the set-top box. When the player cannot play the encrypted program, the set-top box determines whether it is a certificate error or the certificate cannot be read based on the returned error code. When it is determined to be a certificate error, the set-top box writes the certificate in the backup partition back to the security partition to cover the damaged certificate in the security partition and restores the certificate in the security partition; when it is determined that the security partition is damaged and the certificate cannot be read, the set-top box formats the security partition, and then writes all the data in the backup partition back to the security partition to reset the data in the security partition, thereby restoring the state of the security partition. The data in the backup partition is used to restore the data in the security partition accordingly, and the high-security playback function of the set-top box is restored in a short time. No coordination work is required on the server side, which is time-saving and greatly improves the user experience.

[0059] Based on the above-mentioned high-security partition data damage detection and recovery device, an embodiment of the present application also provides a terminal, which includes the high-security partition data damage detection and recovery device described in the above-mentioned embodiment. The terminal adds a backup partition in the set-top box, distinguishes the error type through the returned error code, and uses the corresponding data in the backup partition in the set-top box to restore the damaged data in the security partition by parsing the error type. There is no need for server-side coordination, and the high-security playback function of the set-top box is restored in a short time, which greatly improves the user experience.

[0060] It should be noted that, in this specification, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a circuit structure, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such circuit structure, article or device. In the absence of further restrictions, an element defined by the phrase "includes a ..." does not exclude the existence of other identical elements in the circuit structure, article or device including the element.

[0061] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the disclosure of the invention herein. The present application is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present application and include common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the content of the claims.

[0062] The above-described embodiments of the present application do not constitute a limitation on the protection scope of the present application.

Claims

1. A method for detecting and recovering data damage in a high-security partition. It is characterized in that The method comprises: Save and back up the data in the secure partition where the certificate burning and device certificate generation have been completed to the backup partition of the set-top box; When the encrypted program cannot be played, the set-top box identifies the error type through the error code returned by the player; The set-top box determines whether it is a certificate error according to the error code; If the error code is the certificate error, the certificate of the secure partition is restored according to the backup partition content to restore the high-security data in the secure partition and continue to play the encrypted program; When the error code is not the certificate error, determining whether the error code is that the certificate cannot be read; If the error code is that the certificate cannot be read, the set-top box checks whether the security partition is damaged; If the security partition is damaged, the security partition of the set-top box is initialized and the data is reset to restore the high-security data in the security partition and continue to play the encrypted program.

2. The method for detecting and recovering data damage in a high-security partition according to claim 1, It is characterized in that Back up the data in the secure partition where the certificate has been burned and the device certificate has been generated to the backup partition of the set-top box, including: Burning high-security data into the security partition of the set-top box to generate a device certificate; The data in the secure partition is stored in the backup partition of the set-top box.

3. The method for detecting and recovering data damage in a high-security partition according to claim 1, It is characterized in that When encrypted programs cannot be played, previously included: The set-top box carries the device certificate to request a license from the server; The server determines whether it is the first authentication; If it is the first authentication, the server determines whether the high-security data is legal; If the high-security data is legitimate, the server saves the device certificate and provides a decoding license to the set-top box to play the encrypted program normally; If it is not the first authentication, verify whether the high-security data and the device certificate are correct; If the high security data and the device certificate are incorrect, the decoding license is refused to be provided to the set-top box, and the set-top box cannot play the encrypted program.

4. The method for detecting and recovering data damage in a high-security partition according to claim 1, It is characterized in that Overwriting the damaged high-security data in the security partition with the corresponding high-security data in the backup partition according to the error type includes: When the error code is a certificate error, determining whether the certificate in the secure partition is the same as the certificate in the backup partition; If the certificate in the secure partition is different from the certificate in the backup partition, the certificate in the backup partition is written back to the secure partition to cover the damaged certificate in the secure partition.

5. The method for detecting and recovering data damage in a high-security partition according to claim 4, It is characterized in that Overwriting the damaged high-security data in the security partition with the corresponding high-security data in the backup partition according to the error type, further comprising: When the error code is that the certificate cannot be read and the security partition is damaged, formatting the security partition to complete the initialization of the security partition; The data in the backup partition is written back to the initialized secure partition to reset the data in the secure partition.

6. A device for detecting and recovering data damage in a high-security partition, It is characterized in that include: A memory for storing program codes; A processor, configured to read the program code stored in the memory and execute the method according to any one of claims 1 to 5.

7. A terminal, It is characterized in that It includes a high-security partition data damage detection and recovery device as described in claim 6.