A method and system for protecting the copyright of digital content based on encryption algorithm
Patent Information
- Application Number
- CN202611202822.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]现有方案多将内容解密、密钥失效、明文缓冲区释放和防回滚状态更新分别执行,当前内容完成解密后,解密状态与下一内容单元密钥之间缺少严格接续关系,容易因状态回滚、重复请求或处理顺序异常造成密钥重复启用或越序解密
本发明通过将数字内容划分为连续内容单元,并对各内容单元独立加密和封装单元密钥,建立明确的单元接续链,使解密过程按照内容单元的连续顺序受控执行。相比整体解密或仅依赖访问授权的现有方式,本发明能够缩小单次密钥暴露范围,并为每次密钥接续提供明确的前序状态和唯一接续对象。
Smart Images

Figure CN123013055A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital content security technology, and in particular to a method and system for protecting digital content copyright based on encryption algorithms. Background Technology
[0002] Existing digital content copyright protection methods typically employ overall encryption, segmented encryption, or access authorization, decrypting and outputting digital content only after the terminal completes authentication. Some solutions store decryption keys and process plaintext data within a trusted execution environment to reduce the risk of key leakage and unauthorized copying.
[0003] Existing solutions often execute content decryption, key expiration, plaintext buffer release, and anti-rollback state update separately. After the current content is decrypted, there is no strict succession relationship between the decryption state and the key of the next content unit. This can easily lead to repeated key activation or out-of-order decryption due to state rollback, duplicate requests, or abnormal processing order.
[0004] Furthermore, existing methods typically rely on fixed rules to determine whether content units can be continued, making it difficult to identify the correspondence between the current closed state and the subsequent established state by combining state changes during continuous decryption. This leads to a disconnect between key continuation control and the actual decryption state, affecting the reliability of copyright protection during continuous digital content processing.
[0005] Therefore, how to provide a digital content copyright protection method and system based on encryption algorithms is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose a digital content copyright protection method and system based on encryption algorithms. This invention employs a method combining unit-independent encryption, an improved Koopa model, and the INFO algorithm. It identifies the unidirectional continuation relationship between the current decryption state and the subsequent state through a closed continuation Koopman layer. Within a trusted execution environment, key expiration, plaintext buffer release, and anti-rollback state forwarding are committed as a single closed transaction, generating a state transition value that binds a unique subsequent content unit. Based on this, the subsequent content unit key is only unsealed after the state transition value verification is successful, effectively preventing duplicate decryption, state rollback, and out-of-order continuation. This method offers advantages such as strict key control, continuous decryption process, and high reliability of copyright protection.
[0007] A digital content copyright protection method based on an encryption algorithm according to an embodiment of the present invention includes the following steps: S1. Divide the digital content according to the sequential processing order, encrypt each content unit independently and encapsulate the unit key, and establish a unit continuation chain. S2. Establish a decryption session in the trusted execution environment based on the unit continuation chain, decrypt the first content unit key and generate a trusted decryption state; S3. Authenticate and decrypt the current content unit according to the trusted decryption status, submit the decrypted data to the protected output path, and form the current unit decryption status sequence; S4. Input the current unit decryption state sequence into the improved Koopa model. Control the current state to advance in a limited way and write it to the successor state in one direction through the closed continuation Koopman layer. Block the successor state from writing back to the current state. After separation and decoding, the state continuation result is formed. S5 and INFO algorithms optimize the parameters of the closed continuation Koopman layer based on the state continuation results and write back the improved Koopa model. The updated parameters are then used to reprocess the current unit decryption state sequence to form the continuation verification result. S6. After the continuation verification is passed, in the trusted execution environment, the trusted decryption state closing and the anti-rollback state moving forward are committed as the same closing transaction, forming a state transition value that binds a unique successor content unit. S7. Verify the status transition value. If the verification is successful, the unique subsequent content unit key will be unsealed and the trusted decryption status will be updated. If the verification fails, the key continuation will be blocked. S8. Process content units cyclically based on the updated trusted decryption status. The decryption session is terminated after the last content unit is closed, resulting in digital content copyright protection.
[0008] Optionally, S1 specifically includes: S11. Divide the content into units according to the sequential processing order of the digital content, record the order of each content unit, and form a content unit sequence. S12. Configure a unit key for each content unit, encrypt the content unit independently using the corresponding unit key and encapsulate the unit key to form a ciphertext sequence of the content unit. S13. Associate each non-terminal content unit with a unique successor content unit according to the content unit sequence, and mark the terminal content unit as the termination unit to form a unit continuation chain.
[0009] Optionally, S2 specifically includes: S21. Establish a decryption session in the trusted execution environment, determine the first content unit along the unit continuation chain and initialize the anti-rollback state to form the initial trusted decryption state; S22. Unseal the unit key corresponding to the first content unit, set the first content unit as the current content unit, set the unsealted unit key as the valid decryption key, and form a trusted decryption state.
[0010] Optionally, S3 specifically includes: S31. Read the ciphertext of the current content unit according to the trusted decryption status, perform integrity verification on the ciphertext of the current content unit, and form an integrity verification result; S32. When the integrity verification passes, the valid decryption key in the trusted decryption state is called to decrypt the ciphertext of the current content unit in the trusted execution environment, forming the decrypted data of the current unit. S33. Submit the decrypted data of the current unit to the protected output path, and record the changes in the trusted decryption status during the processing of the current content unit in the order of occurrence to form the decryption status sequence of the current unit.
[0011] Optionally, the improved Koopa model is composed of multiple stacked Koopa blocks. The first Koopa block receives the current unit decryption state sequence. Each Koopa block includes a frequency domain decomposition layer, a dual-path coding layer, a closed continuation Koopman layer, a separate decoding layer, and a residual accumulation layer. The frequency domain decomposition layer performs a Fourier transform on the input sequence of the current Koopa block to separate the time-varying components and the time-invariant components; The dual-channel coding layer encodes time-varying components in segments along the processing order to form time-varying Koopman embeddings, and encodes time-invariant components to form time-invariant Koopman embeddings. The closed continuation of the Koopman layer maps the time-varying Koopman embedding to the current state embedding, constructs the time-varying Koopman operator as a block upper triangular matrix, and the current state embedding is recursively processed along the strict upper triangular matrix block and returns to zero after a finite recursion. The closed continuation Koupman layer generates the successor state embedding through the transition matrix block from the current state to the successor state. The successor state embedding is recursively carried out along the successor state matrix block, and the matrix block from the successor state embedding to the current state embedding is set to zero. The time-invariant Koupman embedding is advanced along the time-invariant Koupman operator. The separate decoding layer decodes the current state embedding, the subsequent state embedding, and the advanced time-invariant Koupman embedding respectively, forming the current state reconstruction result, the subsequent state prediction result, and the time-invariant prediction result; The residual accumulation layer subtracts the current state reconstruction result from the input sequence of the current Koopa block to form inter-block residuals, which are then passed along the stacking order of Koopa blocks. The subsequent state prediction results and time-invariant prediction results are accumulated to form the state succession result.
[0012] Optionally, S5 specifically includes: S51. Extract the parameters of the transition matrix block and the parameters of the successor state matrix block, concatenate them to form the initial parameter vector, and fix the strict upper triangular matrix block and the zero matrix block of the successor state embedding into the current state embedding. S52. Generate a candidate parameter vector group, write the candidate parameter vector into the transition matrix block and the successor state matrix block, process the current unit decryption state sequence, and calculate the mean square error between the successor state prediction result and the corresponding next state. The S53 and INFO algorithms calculate the weighted mean of the candidate parameter vectors based on the mean square error, update the candidate parameter vectors based on the weighted mean, and perform vector combination and local search on the updated results to obtain the optimized parameter vector with the minimum mean square error. S54. Write the optimized parameter vector back to the transition matrix block and the successor state matrix block, reprocess the current unit decryption state sequence, and form a verification pass result when the mean square error after writing back is less than the mean square error corresponding to the initial parameter vector; otherwise, form a verification fail result, and form a continuation verification result.
[0013] Optionally, S6 specifically includes: S61. When the continuation verification result is a verification pass result, determine the unique successor content unit corresponding to the current content unit along the unit continuation chain, and start the closing transaction in the trusted execution environment. S62. In the closed transaction, cancel the valid decryption key, revoke the access permission of the plaintext buffer corresponding to the decrypted data of the current unit and release the plaintext buffer, update the trusted decryption status to the closed status, and move the anti-rollback status forward. S63. Commit and close the transaction. After successful submission, calculate the message authentication code based on the decrypted session, the current content unit, the unique successor content unit, and the anti-rollback state after the shift, and form the state transition value. S64. Disable the output of state transition values when a transaction commit fails.
[0014] Optionally, S7 specifically includes: S71. Perform message authentication and verification on the state transition value to generate an authentication and verification result; S72. When the authentication verification is successful, the decryption session and the current content unit bound to the state transition value are checked against the trusted decryption state, the unique successor content unit is checked against the unit continuation chain, and the anti-rollback state is checked against the anti-rollback state saved in the trusted execution environment. S73. When all checks pass, the unique successor content unit key is unsealed, the unique successor content unit is set as the current content unit, the unsealed key is set as the valid decryption key, the trusted decryption state is restored to the valid state, and the updated trusted decryption state is formed. S74. If authentication verification or any verification fails, the blocking unit key is unsealed and kept in a trusted decryption state.
[0015] Optionally, S8 specifically includes: S81. Read the current content unit in the trusted decryption state, and confirm whether the current content unit is a terminating unit based on the unit continuation chain. S82. When the current content unit is not the termination unit, the authentication, decryption, protected output, status continuation, continuation verification, transaction closure and key continuation are completed according to the trusted decryption status to form the updated trusted decryption status, and the current content unit is reconfirmed as the termination unit. S83. When the current content unit is the termination unit, perform an integrity check on the ciphertext of the termination unit. After the check passes, decrypt the ciphertext of the termination unit and submit the decrypted data of the termination unit to the protected output path. S84. After the decrypted data of the termination unit is submitted, a closing transaction is started in the trusted execution environment. In the closing transaction, the valid decryption key is cancelled, the plaintext buffer access permission is revoked and the plaintext buffer is released. The trusted decryption status is updated to the closed status and the anti-rollback status is moved forward. S85. Submit the closed transaction. Upon successful submission, the decryption session is terminated, resulting in digital content copyright protection.
[0016] A digital content copyright protection system based on an encryption algorithm according to an embodiment of the present invention includes the following modules: The content encryption module is used to divide digital content according to the sequential processing order, encrypt each content unit independently, and establish a unit connection chain. The session establishment module is used to establish a decryption session in the trusted execution environment based on the unit continuation chain, load the first content unit key and generate a trusted decryption state; The trusted decryption module is used to authenticate and decrypt the current content unit according to the trusted decryption status, submit the decrypted data to the protected output path, and form the current unit decryption status sequence. The state continuation module is used to input the decrypted state sequence of the current unit into the improved Koopa model. It completes the one-way writing of the current state to the successor state through the closed continuation Koopman layer and blocks the reverse writing back. The state continuation result is formed by separation decoding. The parameter optimization module is used to optimize the parameters of the closed connection Koopman layer based on the state connection result using the INFO algorithm and write back to the improved Koopa model to form the connection verification result. The status closure module is used to submit the current unit closure transaction after the continuation verification passes, close the trusted decryption status and move the anti-rollback status forward, forming a status transition value that binds a unique successor content unit. The key continuation module is used to verify the state transition value. If the verification is successful, the unique successor content unit key is decrypted and the trusted decryption status is updated. If the verification fails, the key continuation is blocked. The session control module is used to process content units cyclically based on the updated trusted decryption status. The decryption session is terminated after the last content unit is closed, resulting in a digital content copyright protection outcome.
[0017] The beneficial effects of this invention are: This invention divides digital content into continuous content units and independently encrypts and encapsulates each content unit with a unit key, establishing a clear unit continuation chain. This allows the decryption process to be executed in a controlled manner according to the sequential order of the content units. Compared to existing methods that rely on overall decryption or simply access authorization, this invention can reduce the scope of a single key exposure and provide a clear preceding state and a unique continuation target for each key continuation.
[0018] This invention processes the current unit decryption state sequence by improving the Koopa model, using a closed continuation Koopman layer to limit the current state's limited advancement, and writing the current state unidirectionally to the subsequent state while blocking the subsequent state from writing back to the current state. Then, the continuation parameters are optimized by the INFO algorithm to form a continuation verification result, thereby improving the matching accuracy between the current decryption state closing and the subsequent state establishment, and reducing the state continuation deviation caused by fixed rule judgment.
[0019] This invention also incorporates the cancellation of valid decryption keys, the revocation of plaintext buffer access, the release of plaintext buffers, and the forward shift of anti-rollback states into the same closing transaction within the trusted execution environment, and generates a state transition value that binds a unique successor content unit. The successor content unit key is only unsealed after message authentication and state verification are passed. This can block duplicate requests, state rollback, out-of-order decryption, and erroneous key continuation, thereby improving the key control strength and copyright protection reliability in the continuous decryption process of digital content. Attached Figure Description
[0020] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a digital content copyright protection method and system based on encryption algorithms proposed in this invention; Figure 2 This is a schematic diagram of the structure of the improved Koopa model in the digital content copyright protection method and system based on encryption algorithm proposed in this invention; Figure 3 This is a schematic diagram of the system structure of a digital content copyright protection method and system based on encryption algorithms proposed in this invention. Detailed Implementation
[0021] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0022] refer to Figure 1 and Figure 2A digital content copyright protection method based on encryption algorithms includes the following steps: S1. Divide the digital content according to the sequential processing order, encrypt each content unit independently and encapsulate the unit key, and establish a unit continuation chain. S2. Establish a decryption session in the trusted execution environment based on the unit continuation chain, decrypt the first content unit key and generate a trusted decryption state; S3. Authenticate and decrypt the current content unit according to the trusted decryption status, submit the decrypted data to the protected output path, and form the current unit decryption status sequence; S4. Input the current unit decryption state sequence into the improved Koopa model. Control the current state to advance in a limited way and write it to the successor state in one direction through the closed continuation Koopman layer. Block the successor state from writing back to the current state. After separation and decoding, the state continuation result is formed. S5 and INFO algorithms optimize the parameters of the closed continuation Koopman layer based on the state continuation results and write back the improved Koopa model. The updated parameters are then used to reprocess the current unit decryption state sequence to form the continuation verification result. S6. After the continuation verification is passed, in the trusted execution environment, the trusted decryption state closing and the anti-rollback state moving forward are committed as the same closing transaction, forming a state transition value that binds a unique successor content unit. S7. Verify the status transition value. If the verification is successful, the unique subsequent content unit key will be unsealed and the trusted decryption status will be updated. If the verification fails, the key continuation will be blocked. S8. Process content units cyclically based on the updated trusted decryption status. The decryption session is terminated after the last content unit is closed, resulting in digital content copyright protection.
[0023] In this embodiment, S1 specifically includes: Before digital content enters the encryption process, the timestamps and frame boundaries in the media container are parsed along the original playback or reading order to divide the continuous data into interconnected content units. In one embodiment, each content unit corresponds to 2 seconds of continuous media data. The division position is preferentially located at the boundary of a complete frame. If the 2-second position is located inside the frame, it is extended to the next adjacent complete frame boundary, so that any frame belongs to only one content unit. After the division is completed, the content units are arranged in ascending order of the original timestamps, and a content unit identifier consisting of a content identifier, a sequence position, and a data digest is generated for each content unit, forming a content unit sequence that maintains the original continuous processing order.
[0024] The unit key is generated independently by a cryptographically secure random number generator. A new random number is generated for each content unit, and the key of the previous content unit is not reused. In one embodiment, the unit key can be 256 bits. The content units are encrypted using AES-GCM. During encryption, a 96-bit initialization vector is generated for each content unit. The content unit identifier is used as additional authentication data in the authentication tag calculation. The output is the ciphertext of the content unit, the initialization vector, and the 128-bit authentication tag. The unit key is not stored in plaintext with the ciphertext of the content unit. Instead, it is encrypted and encapsulated using a key encapsulation key stored within the trusted execution environment. The encapsulation input includes the unit key and the content unit identifier. The encapsulation result is stored in association with the corresponding content unit ciphertext, so that the encapsulation result can only be decapsulated within the trusted execution environment using the same content unit identifier.
[0025] The unit continuation chain establishes a unidirectional association based on adjacent positions in the content unit sequence. Each non-terminating content unit is written with only one direct successor content unit identifier, and the last content unit is written with a termination marker and no successor content unit is configured. The content unit sequence, content unit ciphertext, unit key encapsulation result, and unit continuation chain all use the same content unit identifier for correspondence. When establishing the continuation chain, the current position and the next position are compared one by one to see if they are consecutive, and the content unit identifier is verified to be unique. If a content unit is found to be missing, the generation of the link after that position is stopped. If a content unit identifier is found to be duplicated, the content unit that passes the digest verification for the first time is retained and the duplicate is rejected. If a sequence position conflict is found, the conflicting item is removed from the valid content unit sequence. Only content units with consecutive positions, unique identifiers, and consistent ciphertext digests are written into the valid unit continuation chain, forming a unit continuation relationship that can be read by the decryption session.
[0026] In this embodiment, S2 specifically includes: After receiving a valid unit connection chain, the trusted execution environment first verifies the terminal startup metric, the trusted execution environment signature, and the security version number. Only when these three pieces of data match the trusted values registered in the protected storage area will an isolated execution context be created. The isolated execution context uses different memory access permissions than the external application process. The external application can only submit encrypted content units and receive protected output, but cannot read unit keys, decrypt intermediate data, or access the state storage area. In one embodiment, the trusted execution environment uses a 128-bit secure random number, a digital content identifier, and a terminal session count to calculate a message digest. The first 128 bits of the digest are used as the decryption session identifier, and a protected state storage area is allocated for this decryption session. The state storage area records the decryption session identifier, the current content unit identifier, the key validity status, the session running status, and the anti-rollback status. The decryption session establishment is terminated when the terminal trust verification fails or the state storage area allocation fails.
[0027] The anti-rollback state is stored using a monotonically increasing counter within the trusted execution environment. When a decryption session is established, the current value of the counter is read and written to the protected state storage area. External applications cannot modify or roll back this value. The first content unit is determined by the content unit with the smallest sequential position in the unit continuation chain that has no predecessor association. If multiple content units without predecessors or no content units without predecessors appear simultaneously, the unit continuation chain is considered abnormal, and key decryption is stopped. The trusted execution environment reads the unit key encapsulation result corresponding to the identifier of the first content unit, calls the internal key encapsulation key to decrypt the encapsulated data, and compares the decrypted content unit identifier with the identifier of the first content unit byte by byte. If they match, the first content unit is written to the current content unit position, the decrypted unit key is loaded as a valid decryption key, the session running state is set to a valid state, and together with the anti-rollback state, they form the trusted decryption state. If the key encapsulation data authentication fails, the content unit identifier is inconsistent, or the key length does not meet the requirements of the encryption algorithm, the intermediate decryption data is cleared, a valid decryption key is not generated, the trusted decryption state remains inactive, and the current decryption session is terminated.
[0028] In this embodiment, S3 specifically includes: The current content unit ciphertext is located by the current content unit identifier in the trusted decryption state. The trusted execution environment retrieves the content unit ciphertext, initialization vector, and authentication tag using the current content unit identifier, and calls the valid decryption key to perform AES-GCM authentication and decryption. Authentication and decryption takes the content unit ciphertext and initialization vector as input, uses the current content unit identifier as additional authentication data, calculates the authentication tag and compares it byte by byte with the authentication tag saved in the encryption stage. When all bytes match, the current unit decryption data is output and an integrity verification result is formed. If any byte is inconsistent, the input buffer and decryption intermediate data are cleared, the current key handle is prohibited from continuing to process the content unit, and the continuation of the key for subsequent content units is blocked.
[0029] The decrypted data of the current unit is directly written to the protected plaintext buffer. The protected plaintext buffer can only be read by the protected output interface. External applications cannot obtain the buffer address or read permission. In one embodiment, the protected output interface submits plaintext data to the isolated decoding path in units of complete media frames. After each submission, the number of submitted bytes and the number of bytes occupied by the buffer are returned. When the output submission is interrupted, the buffer read permission is revoked, the unsubmitted plaintext data is cleared, and the processing of the current content unit is stopped.
[0030] The current unit decryption state sequence is formed within the trusted decryption state change recording channel. A state position is generated when key invocation, integrity verification, decryption completion, protected output submission, plaintext buffer permissions, or anti-rollback state changes. In one embodiment, each state position is encoded as an 8-dimensional state vector. The first 5 dimensions record whether the valid decryption key has been invoked, whether the integrity verification has passed, whether decryption has been completed, whether the protected output has been completed, and whether the plaintext buffer is in a state where the protected output interface can be read. Completed or valid is written as 1, and incomplete or invalid is written as 0. The 6th dimension is the number of submitted bytes divided by the total number of plaintext bytes in the current content unit. The 7th dimension is the number of bytes occupied by the buffer divided by the buffer capacity. The 8th dimension is the current anti-rollback count value minus the initial session count value divided by the total number of content units in the unit continuation chain. Each ratio value is written as 0 when it is lower than 0 and as 1 when it is higher than 1. The state positions are arranged in ascending order of occurrence time. When any dimension has not changed, the value of the previous state position is used. The first state position is written with the initial state when the decryption session is established. If the 8-dimensional vectors calculated twice are exactly the same, they are not written repeatedly, thus forming the current unit decryption state sequence.
[0031] In this embodiment, the improved Koopa model consists of multiple stacked Koopa blocks. The first Koopa block receives the current unit decryption state sequence. Each Koopa block includes a frequency domain decomposition layer, a dual-path coding layer, a closed continuation Koopman layer, a separate decoding layer, and a residual accumulation layer. The ordinary Koopa model uses multiple Koopa blocks to process non-stationary time series data layer by layer. Each Koopa block uses a Fourier filter to separate time-varying and time-invariant components. The time-varying Koopman predictor calculates the time-varying Koopman operator from local sequence segments and advances the time-varying embedding. The time-invariant Koopman predictor uses the trained global operator to advance the time-invariant embedding. The current Koopa block subtracts the time-varying component from the input to reconstruct the result and sends the residual to the next Koopa block. The ordinary time-varying Koopman operator adopts a dense linear mapping for general time series prediction. The states in the same embedding space can continuously write to each other. In the state of digital content decryption, it is impossible to limit the current state to decay after a finite number of rounds, nor can it prevent the features that have entered the successor state from reverting to the current state. Therefore, it cannot directly express the irreversible succession process that only allows the establishment of a unique successor state after the current unit is closed.
[0032] The improved Koopa model consists of three cascaded Koopa blocks. The first Koopa block receives the current unit's decryption state sequence. The second and third Koopa blocks receive the inter-block residuals formed by the previous Koopa block, respectively. Each Koopa block is sequentially connected to a frequency domain decomposition layer, a dual-path coding layer, a closed continuation Koopman layer, a separate decoding layer, and a residual accumulation layer. The transition matrix blocks from the current state to the subsequent state and the subsequent state matrix blocks of the three Koopa blocks share the same set of 16×16 parameters. The frequency domain decomposition parameters, coding parameters, current state mapping parameters, and strict upper triangular matrix of each Koopa block are as follows: The blocks, time-invariant Koopman operators, and decoding parameters are independent of each other. Inside the closed continuation Koopman layer, the current state mapping unit, operator assembly unit, current state finite recursion unit, forward transition unit, and successor state recursion unit are set up in sequence. The current state mapping unit receives the time-varying Koopman embedding. The operator assembly unit establishes a matrix connection between the current state subspace and the successor state subspace. The current state finite recursion unit makes the current state decay round by round. The forward transition unit writes the current state before each round of decay into the successor state. The successor state recursion unit saves and advances the writing result to form the current state embedding and the successor state embedding.
[0033] The input tensor of the first Koopa block consists of the current unit's decryption state sequence. The tensor dimension is written as B×T×C, where B represents the number of decryption state sequences in the same training batch, T represents the number of state positions retained in each sequence along the processing order, and C represents the number of feature channels for each state position. In one implementation, T can be 32 and C can be 8. The 8 channels correspond to the key call state, integrity check state, decryption completion state, protected output submission state, plaintext buffer access state, output progress, buffer occupancy ratio, and anti-rollback state change, respectively. When the sequence has fewer than 32 state positions, a zero vector is padded at the end to generate an effective position mask. When there are more than 32 state positions, the most recent 32 state positions are retained. The training loss, spectrum statistics, and residual calculation all skip the padded positions marked by the mask, so that the padded data does not participate in parameter updates.
[0034] The frequency domain decomposition layer performs a Fast Fourier Transform (FFT) on each feature channel along the T dimension of the input tensor. Before training, the arithmetic mean of the amplitudes at the same frequency positions of all training sequences is taken. Then, the average amplitudes of each channel are sorted from largest to smallest. The frequency positions ranked in the top 20% and their corresponding conjugate frequency positions are written into the time-invariant frequency mask, and the remaining positions are written into the time-varying frequency mask. During each forward processing, the input spectrum is multiplied position by position with the time-invariant frequency mask and an inverse Fourier transform is performed to obtain the time-invariant component with the same dimension as the input tensor. The time-varying component is obtained by subtracting the time-invariant component from the input tensor. The imaginary part generated by the inverse Fourier transform is close to zero because the conjugate positions are also preserved. Only the real part is retained in the calculation. The imaginary part with an absolute amplitude value lower than 10⁻⁶ is directly set to zero.
[0035] The dual-path coding layer divides the time-varying components into eight consecutive sequence segments along the T dimension. Each sequence segment contains four adjacent state positions and eight feature channels. The sequence segments are expanded into 32-dimensional row vectors in order of priority for time position and then for feature channels. The 32-dimensional row vectors are multiplied by a 32×32 time-varying coding weight matrix and superimposed with a 32-dimensional bias vector. Then, nonlinear compression is performed through the GELU function to form a 32-dimensional time-varying Koopman embedding. The time-invariant components are expanded into 256-dimensional row vectors in the same order. They are first multiplied by a 256×64 first time-invariant coding weight matrix and superimposed with a 64-dimensional bias vector. After processing by the GELU function, they are multiplied by a 64×32 second time-invariant coding weight matrix and superimposed with a 32-dimensional bias vector to form a 32-dimensional time-invariant Koopman embedding. The positions to be filled by the effective position mask are kept at zero before expansion so that the insufficient length of the sequence does not change the effective embedding.
[0036] The closed continuation Koopman layer multiplies each 32-dimensional time-varying Koopman embedding by a 32×16 current state mapping matrix and superimposes a 16-dimensional bias vector. After processing by the GELU function, a 16-dimensional current state embedding is formed. The 16-dimensional successor state embedding is initialized as a row vector of all zeros. The operator assembly unit constructs a 32×32 block-shaped upper triangular time-varying Koopman operator. The first 16 rows and columns correspond to the current state subspace, and the last 16 rows and columns correspond to the successor state subspace. The upper left matrix block is a 16×16 strictly upper triangular matrix, the upper right matrix block is a 16×16 transition matrix from the current state to the successor state, the lower left matrix block is a fixed all-zero matrix, and the lower right matrix block is a 16×16 successor state matrix. The row index represents the input state dimension participating in the multiplication, and the column index represents the output state dimension receiving the written amount. The diagonal and lower triangular positions of the strictly upper triangular matrix are forcibly written to zero after initialization and each parameter update. Only the upper triangular position retains the training parameters.
[0037] The closed continuation Koopman layer performs 16 rounds of recursion by multiplying row vectors by time-varying Koopman operators. In each round, the current state embedding is first multiplied by a strict upper triangular matrix to form a new current state embedding. Then, the result of multiplying the current state embedding before the recursion by the transition matrix is added dimension by dimension to the result of multiplying the successor state embedding before the recursion by the successor state matrix to form a new successor state embedding. The strict upper triangular matrix is multiplied by itself 16 times to form a zero matrix. Therefore, the current state embedding is zeroed at the end of the 16th round. The amount of writing generated by the current state in each round is accumulated to the successor state through the transition matrix. The zero matrix in the lower left corner ensures that no dimension of the successor state can be written back to the current state. The successor state matrix calculates the maximum singular value before each forward processing. When the maximum singular value exceeds 1, all matrix elements are divided by the maximum singular value to keep the successor state recursion bounded. When a non-numerical or infinite value appears in the recursion, the current sequence processing is stopped and an invalid state continuation result is formed. The abnormal embedding is not passed to the separation decoding layer.
[0038] The time-invariant Koopman embedding is right-multiplied by a 32×32 time-invariant Koopman operator to form the advanced time-invariant embedding. The time-invariant Koopman operator is shared among decryption sessions as offline training parameters and does not enter the current state subspace or the successor state subspace. The separate decoding layer sets up independent current state decoding branches, successor state decoding branches, and time-invariant decoding branches. The current state decoding branch right-multiplies the 16-dimensional initial current state embeddings corresponding to the eight consecutive sequence segments by a 16×32 decoding weight matrix and superimposes them with a 32-dimensional bias vector. The resulting 32-dimensional vectors are rearranged into 4×8 state segments and then concatenated along the time position to form a 32×8 current state. The reconstruction results are as follows: The successor state decoding branch maps the 16-dimensional successor state embeddings formed after 16 rounds of recursion of 8 consecutive sequence segments into 4×8 state fragments, and splices them together in the original sequence segment order to form a 32×8 successor state prediction result; The time-invariant decoding branch maps the 32-dimensional time-invariant embeddings after advancement into 64-dimensional and 256-dimensional vectors, and then rearranges them into a 32×8 time-invariant prediction result; The current state decoding branch and the time-invariant decoding branch use linear outputs so that the second and third Koopa blocks can represent inter-block residuals containing negative values. The successor state decoding branch uses the Sigmoid function to limit the predicted values to the range of 0 to 1.
[0039] The residual accumulation layer subtracts the current state reconstruction result from the 32×8 input sequence of the current Koopa block position by position. The positions covered by the effective position mask are reset to zero after subtraction, forming a 32×8 inter-block residual that is fed into the next Koopa block. The subsequent state prediction results and time-invariant prediction results formed by each Koopa block are accumulated position by position. The last Koopa block performs channel correction on the accumulated result through an 8×8 output mapping matrix and forms the state continuation result through a Sigmoid function. During offline model training, the state sequences that have completed decryption and protection are used as training samples. The current state reconstruction result and the input sequence... The mean squared error weight between columns is set to 0.3, the mean squared error weight between the subsequent state prediction result and the target sequence formed by shifting the input sequence forward by one state position is set to 0.5, and the mean squared error weight between the time-invariant prediction result and the target sequence formed by shifting the time-invariant component forward by one state position is set to 0.2. The AdamW optimizer is used to train for 80 rounds with an initial learning rate of 0.001 and a batch size of 64 sequences. Training stops when the validation error does not decrease for 8 consecutive rounds, and the model parameters with the smallest validation error are retained. The transition matrix and subsequent state matrix after training are used as the initial parameters before the INFO algorithm is optimized.
[0040] Compared to the ordinary Koopa model, the improvement lies in the state transition topology of the time-varying Koopman operator. The ordinary Koopa model utilizes dense local operators to continuously advance within the same time-varying embedding space, allowing bidirectional mixing of various state dimensions. This invention splits the time-varying embedding space into a current state subspace and a successor state subspace, and changes the internal advancement path of the current state to a strictly upper triangular matrix block with its diagonal and lower triangular elements fixed at zero. This ensures that the 16-dimensional current state embedding returns to zero within the current state branch after 16 rounds of recursion. The cross-state propagation path is limited to the transition matrix block from the current state to the successor state, and the reverse write-back channel is permanently severed through the all-zero matrix block from the successor state to the current state. This modification directly changes the connection direction and recursion termination method of the internal operators of the model, enabling the state continuation result to represent the correspondence between the finite decay of the current state and the unidirectional establishment of the successor state. The identity binding of the unique successor content unit is still completed by the state transition value generated by the closing transaction. The model does not replace the trusted execution environment in performing key deregistration, state closure, or key desealing.
[0041] In this embodiment, S5 specifically includes: The initial parameter vector is generated from the transition matrix block from the current state to the successor state and the successor state matrix in the closed continuation Koopman layer. Both matrices are 16×16. They are first expanded into 256-dimensional vectors in row-major order, and then the vectors corresponding to the transition matrix are placed at the beginning and the vectors corresponding to the successor state matrix are placed at the end, concatenating them to form a 512-dimensional initial parameter vector. The zero element positions of the strict upper triangular matrix, the all-zero matrix from the successor state to the current state, the current state mapping unit, and the parameters of the separation decoding layer and the residual accumulation layer are kept locked during optimization. When the 512-dimensional vector is split and written back, only the transition matrix is written for the first 256 dimensions and only the successor state matrix is written for the last 256 dimensions, avoiding parameter position crossover that changes the fixed forward topology of the closed continuation Koopman layer.
[0042] The candidate parameter vector group is generated centered on the initial parameter vector. In one implementation, 12 candidate parameter vectors can be selected. The first candidate parameter vector retains the initial parameter, and the remaining candidate parameter vectors are superimposed with independent perturbations. The upper limit of the perturbation for each dimension is 10% of the absolute value of the corresponding initial parameter. When the initial parameter is 0, it is 10% of the median of the absolute values of all non-zero initial parameters. The initial parameter minus the upper limit of the perturbation forms the lower limit of the search for that dimension, and the initial parameter plus the upper limit of the perturbation forms the upper limit of the search for that dimension. When the new parameters generated by the INFO algorithm exceed the search range, they are truncated to the corresponding boundary. After each candidate parameter vector is split, it is simultaneously written into the transition matrix block and the successor state matrix block shared by the three Koopa blocks. The current unit decryption state sequence is processed in parallel using batch tensors. When the maximum singular value of the successor state matrix block exceeds 1, all matrix elements are divided by the maximum singular value. Candidate parameter vectors that are not numerical, have infinite values, or have inconsistent dimensions are directly assigned the maximum evaluation error in the current candidate group.
[0043] The successor state prediction error is calculated within the successor state decoding branch of the improved Koopa model. After each candidate parameter vector is written into the shared matrix block, the complete 32×8 current unit decryption state sequence is input into three cascaded Koopa blocks to obtain the 32×8 successor state prediction result. When the current unit decryption state sequence contains m valid state positions, the first to the (m-1)th rows of the successor state prediction result are aligned with the second to the (m-1)th rows of the current unit decryption state sequence, respectively. The eight channels at each position are subtracted dimension by dimension and squared. All squared differences are summed, divided by 8, and multiplied by m-1 to obtain the mean square error corresponding to the candidate parameter vector. The m-th row does not have an adjacent state and is not included in the error calculation. The positions of the tail padding position and the effective position mask mark are also not included in the calculation. When m is less than 2, parameter optimization is stopped and a verification failure result is generated.
[0044] The INFO algorithm uses the mean squared error of the candidate parameter vectors as the evaluation value. In each round, it first determines the optimal candidate parameter vector with the smallest mean squared error, a relatively good candidate parameter vector ranked 2nd to 5th, and the worst candidate parameter vector with the largest mean squared error. Then, it randomly selects 3 different candidate parameter vectors for the current candidate parameter vector. In the update rule phase, it calculates the mean squared error difference between the 3 random candidates. The cosine of the error difference plus π is multiplied by the negative exponent of the absolute value of the error difference to form the difference weight. The 3 sets of candidate parameter difference vectors are multiplied by the corresponding difference weights, summed, divided by the weight sum, and then 1 is added to form the first weighted difference vector. The optimal candidate, relatively good candidate, and worst candidate are processed in the same way to form the second weighted difference vector. Then, a mixing coefficient is generated from the interval of 0.1 to 0.5. The first weighted difference vector is multiplied by the mixing coefficient and the result of the second weighted difference vector multiplied by 1 and minus the mixing coefficient is added to form the weighted mean update amount.
[0045] The convergence control variable in the r-th round of optimization is 2 multiplied by e raised to the power of -4r / R, where R is the maximum number of optimization rounds. Using random coefficients within the interval between negative and positive convergence control variables, the weighted mean update variable is combined with the difference vectors between the current candidate, the best candidate, the better candidate, and the random candidate to generate two intermediate parameter vectors. In the vector combination stage, the two intermediate parameter vectors are processed dimension by dimension. In each dimension, the current candidate parameter is retained with a 50% probability, and any intermediate parameter is selected proportionally with the remaining probability. The product of a Gaussian random number with a standard deviation of 0.05 and the absolute value of the difference between the corresponding dimensions of the two intermediate parameters is superimposed. In the local search stage, the arithmetic mean of the three random candidate parameter vectors is calculated with a 50% trigger probability. This is then combined with the best candidate and the better candidate to form a local search center. The local search parameter vector is generated using the weighted mean update variable and the candidate difference vector. Parameters exceeding the upper and lower limits of each dimension are truncated to the corresponding boundaries. Replacement is only completed when the mean square error of the new parameter vector is less than that of the original candidate parameter vector.
[0046] In one implementation, the INFO algorithm executes a maximum of 8 rounds. After each round, the candidate parameter vector with the smallest mean square error is retained. If the optimal mean square error decreases by less than 10⁻⁵ for two consecutive rounds, the algorithm stops early. After optimization, the first 256 dimensions of the optimal candidate parameter vector are written back to the transition matrix block from the current state to the successor state shared by the three Koopa blocks, and the last 256 dimensions are written back to the shared successor state matrix block. The improved Koopa model after writing back is then used to reprocess the same current unit decryption state sequence. If the mean square error after writing back is less than the mean square error corresponding to the initial parameter vector, a verification pass result is formed. If the mean square error does not decrease, the calculation is interrupted, or the output dimension is abnormal, a verification fail result is formed. The INFO algorithm does not change the strict upper triangular matrix block, the reverse all-zero matrix block, the valid decryption key, the plaintext buffer, the trusted decryption state, and the unit key encapsulation result. The verification result is then used to enter the transaction start judgment.
[0047] In this embodiment, S6 specifically includes: After the verification result enters the trusted execution environment, the transaction controller reads the verification flag. Only when the verification flag is in a passed state is the creation of a closing transaction allowed. If the verification flag is in a failed state, a missing state, or an abnormal format, the processing of the current content unit is stopped immediately, and no state transition value is created. The transaction controller reads the current content unit record from the unit continuation chain, obtains the successor content unit identifier along the unique successor association, and checks whether the current content unit identifier is consistent with the value stored in the trusted decryption state. If it finds that there is no successor association, there are multiple successor associations, or the identifier is inconsistent, the decryption session is transferred to an abnormal closing state, and successor content unit identifiers submitted by external applications are not accepted.
[0048] Closing a transaction involves creating a transaction record in the protected temporary storage area of the trusted execution environment. The transaction record stores the decryption session identifier, the current content unit identifier, the unique successor content unit identifier, the anti-rollback status at the start of the transaction, and the completion flags corresponding to key deregistration, buffer permission revocation, buffer release, status closure, and anti-rollback shift. The transaction controller executes the transaction in the order of key deregistration, permission revocation, data clearing, buffer release, status closure, and anti-rollback shift. The corresponding completion flag is written from 0 to 1 only after each action returns a successful status. If any action returns a failure status, the remaining processing is stopped, the cached status transition values are cleared, and the key connection channel is kept closed.
[0049] The effective decryption key cancellation is completed within the key management unit. The key management unit first revokes the current key handle's access permission, then overwrites the protected storage location occupied by the key cache and key object to zero, and finally deletes the mapping relationship between the key handle and the current content unit identifier. After cancellation, when the key handle is called again, it returns an invalid key status. The transaction controller only writes the key cancellation completion flag when the access permission has been revoked, the key storage location has been cleared, and the mapping relationship has been deleted. The transaction commit is not allowed to be closed if any check fails.
[0050] Plaintext buffer processing is performed by the protected memory control unit. The memory control unit first revokes the read and execute permissions of the plaintext buffer simultaneously, preventing the protected output interface and external applications from accessing the buffer. Then, it overwrites all valid bytes according to the buffer address from low to high. After the overwrite is completed, it verifies that the buffer digest is no longer consistent with the digest before closing. Subsequently, it unmaps the address of the buffer from the current content unit and releases the corresponding memory page. The trusted decryption state is changed from a valid state to a closed state after the buffer is successfully released. The anti-rollback counter is incremented by 1 based on the original count value and written to the protected state storage area. When the written value is consistent with the counter read value, an anti-rollback forward shift completion flag is formed. From this moment on, the old count value is no longer considered a valid continuation state.
[0051] After the transaction controller checks that all completion flags are 1, it commits and closes the transaction. The commit operation replaces the original state record with the new trusted decryption state, anti-rollback state, and closure result in the protected temporary storage area at once. If not all are completed, no replacement is performed and no state transition value is output. After successful commit, the decryption session identifier, current content unit identifier, unique successor content unit identifier, and the shifted anti-rollback state are concatenated into authentication data according to a fixed order of field length and field content. In one embodiment, the 256-bit authentication key stored in the trusted execution environment is used to perform HMAC-SHA-256 calculation. The authentication data and the 256-bit message authentication code are encapsulated together into a state transition value, so that the state transition value corresponds to only one current content unit and one unique successor content unit in the current decryption session. The state transition value is then sent to the key continuation verification process.
[0052] In this embodiment, S7 specifically includes: After the state transition value enters the trusted execution environment, the authentication and verification unit sequentially parses and decrypts the session identifier, current content unit identifier, unique successor content unit identifier, anti-rollback state, and message authentication code. If the field length, arrangement, or data type is inconsistent with the generation stage, the parsing terminates and an authentication and verification failure result is generated. After the field parsing is completed, the fields other than the message authentication code are reassembled into authentication data in the same order as in the generation stage. The 256-bit authentication key stored inside the trusted execution environment is called to perform HMAC-SHA-256 calculation. The recalculated 256-bit message authentication code is compared byte by byte with the message authentication code carried by the state transition value. The comparison process traverses all bytes and does not exit prematurely due to inconsistencies in intermediate bytes. If all bytes are consistent, an authentication and verification success result is generated. If any byte difference exists, the parsing cache is cleared and the trusted decryption state is kept closed.
[0053] After successful authentication and verification, the consistency verification unit reads the closed state record in the protected state storage area. It first compares the decryption session identifier carried by the state transition value with the decryption session identifier in the closed state record, and then compares the current content unit identifier carried by the state transition value with the current content unit identifier saved when the closed transaction was committed. Both comparisons are performed bit by bit using an equal-length byte sequence. If any identifier is inconsistent, it means that the state transition value does not belong to the current closed state, and the verification process ends immediately. The subsequent content unit key encapsulation result is not read, nor is the current content unit position modified.
[0054] The unit continuation verification unit retrieves the unit continuation chain using the current content unit identifier in the closed state record, reads the unique direct successor content unit identifier, and compares it byte-by-byte with the unique successor content unit identifier carried in the state transition value. The anti-rollback verification unit simultaneously reads the latest anti-rollback count value in the protected storage area and compares it with the anti-rollback status carried in the state transition value. Only when the unique successor content unit identifier matches and the two anti-rollback values are completely equal will a complete verification result be formed. If the old state transition value is submitted repeatedly, the old anti-rollback value is less than the latest count value, the unique successor content unit identifier is inconsistent with the unit continuation chain record during out-of-order requests, or the decryption session identifier is inconsistent during cross-session submissions, the unit key decryption will be blocked and the trusted decryption state will remain closed.
[0055] After all verifications are successful, the key continuation unit acquires the exclusive access lock for the current decryption session. While locked, it rereads the protected state storage area to confirm that the trusted decryption state is still closed, the current content unit identifier is still consistent with the state transition value, and the anti-rollback count value has not changed. Then, it locates the unit key encapsulation result corresponding to the unique successor content unit. The trusted execution environment internally calls the key encapsulation key to perform decapsulation and verifies the content unit identifier, key length, and authentication tag carried in the decapsulated data. If they match, the unique successor content unit is written to the current content unit position in the protected temporary storage area, and the decapsulated data is then processed. The unit key is loaded as a valid decryption key, the key validity state and session running state are updated to the valid state, and then a state replacement operation is performed to overwrite the closed state record. After the first state replacement is completed, the exclusive access lock is released. When the same state transition value is submitted concurrently or again, the trusted decryption state that is reread is no longer the closed state corresponding to the state transition value, and the key continuation is immediately blocked. If the key decryption fails, the identifier is inconsistent, the authentication tag is wrong, or the state replacement fails, the intermediate decryption data is overwritten and the temporary key object is deleted. No part of the update result is retained. The trusted decryption state remains closed and the current key continuation is stopped.
[0056] In this embodiment, S8 specifically includes: After key continuation is completed, the trusted execution environment reads the current content unit identifier from the updated trusted decryption state and retrieves the corresponding record in the unit continuation chain. The termination flag in the record is compared bit by bit with the valid termination value. If the termination flag is not matched, the current content unit continues to go through integrity verification, trusted decryption, protected output, state continuation, continuation verification, transaction closure and key continuation processing. The results of each processing are written to the trusted decryption state in sequence and the reading position of the next content unit is changed. If any processing fails, the current loop stops and remains in an incomplete state. The failed content unit is not skipped and other content units in the chain are read.
[0057] When the termination flag is hit, the trusted execution environment reads the ciphertext of the termination unit, the initialization vector, and the authentication tag. It uses a valid decryption key to complete the integrity verification and decryption, and writes the decrypted data of the termination unit into the protected plaintext buffer. Then, it submits the data to the isolated decoding path through the protected output interface. The termination unit does not have a direct successor in the unit continuation chain. After the output is submitted, it does not generate a state transition value for binding the successor content unit, nor does it read or decrypt a new unit key. If the integrity verification fails, the decryption fails, or the protected output is incomplete, the termination process stops and the decryption session remains incomplete.
[0058] After the termination unit output is completed, the transaction controller creates a termination and closure transaction within the trusted execution environment. This transaction sequentially revokes the valid decryption key access permission, clears the key object, revokes plaintext buffer access permission, overwrites and releases the plaintext buffer, writes the trusted decryption status to the closed state, and increments the anti-rollback counter value by 1. After all actions return to the successful state, the termination and closure transaction is committed at once. Upon successful commit, the temporary state, state sequence cache, and uncommitted transaction records in the decryption session are cleared. The decryption session is written to the terminated state, and a digital content copyright protection result is formed. If any action fails or the transaction commit fails, no normal termination flag is written, and the key continuation channel remains closed.
[0059] refer to Figure 3 A digital content copyright protection system based on encryption algorithms includes the following modules: The content encryption module is used to divide digital content in a sequential processing order, configure an independent unit key for each content unit and perform encryption and key encapsulation, and establish a unit continuation chain in an adjacent order. The session establishment module is used to determine the first content unit based on the unit continuation chain, establish a decryption session in the trusted execution environment, load the key of the first content unit and initialize the anti-rollback state, and generate a trusted decryption state. The trusted decryption module is used to locate and authenticate the current content unit according to the trusted decryption status, complete the decryption within the trusted execution environment, submit the decrypted data to the protected output path, record the status changes during the decryption process, and form the current unit decryption status sequence. The state continuation module is used to input the decrypted state sequence of the current unit into the improved Koopa model. It controls the current state to be recursively pushed in a limited way and written to the successor state in a one-way direction through the closed continuation Koopman layer, while blocking the successor state from writing back to the current state. The state continuation result is formed by separation and decoding. The parameter optimization module is used to optimize the parameters of the transition matrix block and the successor state matrix block based on the prediction error of the successor state using the INFO algorithm. The optimized parameters are then written back to improve the Koopa model and the current unit decryption state sequence is reprocessed to form the continuation verification result. The state closure module is used to submit the current unit closure transaction after the continuation verification is passed, cancel the valid decryption key, release the plaintext buffer, close the trusted decryption state and move the anti-rollback state forward, forming a state transition value that binds a unique successor content unit; The key continuation module is used to verify the decryption session, content unit continuation relationship and anti-rollback status in the status transition value. After successful verification, the unique successor content unit key is unsealed and the trusted decryption status is updated. If the verification fails, the key continuation is blocked. The session control module is used to process content units cyclically based on the updated trusted decryption status. The decryption session is terminated after the last content unit completes decryption and closes the transaction, thus forming the digital content copyright protection result.
[0060] Example 1: To verify the feasibility of this invention in practice, it was applied to a network audiovisual content distribution platform. The platform provides encrypted film and television content and digital courses to authorized terminals, with each digital content playback duration ranging from 25 to 90 minutes. Existing segmented encryption methods continuously load multiple segment keys after terminal authentication. There is a lack of mandatory correlation between the completion of current segment decryption, the release of the plaintext buffer, and the loading of the next segment key. When the terminal abnormally exits, repeatedly submits key requests, or reverts to an old state, problems arise such as repeated decryption of the same segment, skipping intermediate segments to request subsequent key segments, and reactivation of old session states, affecting the controlled dissemination of copyrighted content.
[0061] In application, each piece of digital content is divided into 2-second content units according to the continuous playback sequence. Each content unit is assigned an independent unit key. After encryption, the corresponding unit key is encapsulated, and a unit continuation chain is established according to the playback sequence. Authorized terminals establish a decryption session within a trusted execution environment, decapsulate the first unit key, and perform integrity verification, decryption, and protected output unit by unit. The key state, plaintext buffer state, output commit state, and anti-rollback state during the decryption process form the current unit's decryption state sequence in the order of occurrence. The improved Koopa model uses a closed continuation Koopman layer to perform finite recursion and unidirectional continuation of the state sequence. The INFO algorithm optimizes the parameters of the transition matrix block and the subsequent state matrix block based on the subsequent state prediction error, forming the continuation verification result.
[0062] After successful continuation verification, the trusted execution environment cancels the currently valid decryption key, revokes and releases the plaintext buffer, closes the current trusted decryption state, and moves the anti-rollback state forward within the same closing transaction. Then, it generates state transition values binding the current content unit, the unique subsequent content unit, and the decryption session. The terminal can only unseal the subsequent content unit key when message authentication, content unit order, and anti-rollback state verification all pass. Reusing the state transition value, restoring the old anti-rollback state, or requesting the content unit key out of order all block key continuation. Continuous decryption tests were conducted on 300 digital content items, and 48,000 unit continuation events were extracted from normal playback records. Simultaneously, 2,400 abnormal continuation requests were constructed, including duplicate decryption requests, out-of-order key requests, and state rollback requests, with 800 of each type. The traditional session authorization decryption method, the ordinary segmented independent encryption method, and the method of this invention were compared, and the statistical results are shown in Table 1 below.
[0063] Table 1 Comparison of Digital Content Unit Key Continuation and Abnormal Request Blocking Effects
[0064] As can be seen from the data in Table 1 above, the method of the present invention exhibits good overall performance in terms of normal connection success rate, duplicate decryption blocking rate, out-of-order request blocking rate, and state rollback blocking rate. The traditional session authorization decryption method has a normal connection success rate of 99.72%, but its duplicate decryption blocking rate, out-of-order request blocking rate, and state rollback blocking rate are only 64.50%, 71.25%, and 58.63%, respectively, indicating that relying solely on session authorization is insufficient to constrain the continuous connection relationship between content units. The ordinary segmented independent encryption method increases the blocking rates for the three types of anomalies to 86.88%, 89.75%, and 82.38%, respectively, but lacks a unique connection credential triggered by the current state closure between segments, meaning there is still a risk that abnormal requests will be accepted. The method of the present invention achieves duplicate decryption blocking rates of 99.88%, 99.75%, and 99.63%, respectively, while maintaining a normal connection success rate of 99.54%, indicating that strengthening the interception of abnormal requests does not significantly affect normal content processing. The average unit connection delay is 11.4ms, which is higher than the traditional method's 6.8ms and the ordinary segmentation method's 8.6ms, but it is still within the millisecond range that is acceptable for continuous audiovisual content processing, reflecting the balance between security control strength and processing continuity.
[0065] This embodiment encrypts digital content in units and encapsulates unit keys. Within a trusted execution environment, integrity verification, decryption, and protected output are completed unit by unit. The changes in the trusted decryption state during processing are organized into a sequence of current unit decryption states. The improved Koopa model utilizes a closed continuation Koopman layer to restrict the finite recursion of the current state, writing the current state unidirectionally to the subsequent state and blocking reverse write-back. The INFO algorithm optimizes the parameters of the transition matrix block and the subsequent state matrix block based on the prediction error of the subsequent state, so that the continuation verification reflects the correspondence between the closure of the current state and the establishment of the subsequent state. After the continuation verification passes, the trusted execution environment cancels the currently valid decryption key, revokes and releases the plaintext buffer, closes the trusted decryption state and moves the anti-rollback state forward within the same closing transaction, and then generates a state transition value that binds the current content unit and the unique subsequent content unit. The subsequent unit key is unsealed only when message authentication, continuation order, and anti-rollback state verification pass, thereby blocking duplicate decryption, out-of-order requests, and state rollback, improving the reliability of key control and copyright protection capabilities in the continuous distribution of digital content.
[0066] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for protecting digital content copyright based on encryption algorithms, characterized in that, Includes the following steps: S1. Divide the digital content according to the sequential processing order, encrypt each content unit independently and encapsulate the unit key, and establish a unit continuation chain. S2. Establish a decryption session in the trusted execution environment based on the unit continuation chain, decrypt the first content unit key and generate a trusted decryption state; S3. Authenticate and decrypt the current content unit according to the trusted decryption status, submit the decrypted data to the protected output path, and form the current unit decryption status sequence; S4. Input the current unit decryption state sequence into the improved Koopa model. Control the current state to advance in a limited way and write it to the successor state in one direction through the closed continuation Koopman layer. Block the successor state from writing back to the current state. After separation and decoding, the state continuation result is formed. S5 and INFO algorithms optimize the parameters of the closed continuation Koopman layer based on the state continuation results and write back the improved Koopa model. The updated parameters are then used to reprocess the current unit decryption state sequence to form the continuation verification result. S6. After the continuation verification is passed, in the trusted execution environment, the trusted decryption state closing and the anti-rollback state moving forward are committed as the same closing transaction, forming a state transition value that binds a unique successor content unit. S7. Verify the status transition value. If the verification is successful, the unique subsequent content unit key will be unsealed and the trusted decryption status will be updated. If the verification fails, the key continuation will be blocked. S8. Process content units cyclically based on the updated trusted decryption status. The decryption session is terminated after the last content unit is closed, resulting in digital content copyright protection.
2. The digital content copyright protection method based on encryption algorithm according to claim 1, characterized in that, S1 specifically includes: S11. Divide the content into units according to the sequential processing order of the digital content, record the order of each content unit, and form a content unit sequence. S12. Configure a unit key for each content unit, encrypt the content unit independently using the corresponding unit key and encapsulate the unit key to form a ciphertext sequence of the content unit. S13. Associate each non-terminal content unit with a unique successor content unit according to the content unit sequence, and mark the terminal content unit as the termination unit to form a unit continuation chain.
3. The digital content copyright protection method based on encryption algorithm according to claim 1, characterized in that, S2 specifically includes: S21. Establish a decryption session in the trusted execution environment, determine the first content unit along the unit continuation chain and initialize the anti-rollback state to form the initial trusted decryption state; S22. Unseal the unit key corresponding to the first content unit, set the first content unit as the current content unit, set the unsealted unit key as the valid decryption key, and form a trusted decryption state.
4. The digital content copyright protection method based on encryption algorithm according to claim 1, characterized in that, S3 specifically includes: S31. Read the ciphertext of the current content unit according to the trusted decryption status, perform integrity verification on the ciphertext of the current content unit, and form an integrity verification result; S32. When the integrity verification passes, the valid decryption key in the trusted decryption state is called to decrypt the ciphertext of the current content unit in the trusted execution environment, forming the decrypted data of the current unit. S33. Submit the decrypted data of the current unit to the protected output path, and record the changes in the trusted decryption status during the processing of the current content unit in the order of occurrence to form the decryption status sequence of the current unit.
5. The digital content copyright protection method based on encryption algorithm according to claim 1, characterized in that, The improved Koopa model is composed of multiple stacked Koopa blocks. The first Koopa block receives the current unit decryption state sequence. Each Koopa block includes a frequency domain decomposition layer, a dual-path coding layer, a closed continuation Koopman layer, a separate decoding layer, and a residual accumulation layer. The frequency domain decomposition layer performs a Fourier transform on the input sequence of the current Koopa block to separate the time-varying components and the time-invariant components; The dual-channel coding layer encodes time-varying components in segments along the processing order to form time-varying Koopman embeddings, and encodes time-invariant components to form time-invariant Koopman embeddings. The closed continuation of the Koopman layer maps the time-varying Koopman embedding to the current state embedding, constructs the time-varying Koopman operator as a block upper triangular matrix, and the current state embedding is recursively processed along the strict upper triangular matrix block and returns to zero after a finite recursion. The closed continuation Koupman layer generates the successor state embedding through the transition matrix block from the current state to the successor state. The successor state embedding is recursively carried out along the successor state matrix block, and the matrix block from the successor state embedding to the current state embedding is set to zero. The time-invariant Koupman embedding is advanced along the time-invariant Koupman operator. The separate decoding layer decodes the current state embedding, the subsequent state embedding, and the advanced time-invariant Koupman embedding respectively, forming the current state reconstruction result, the subsequent state prediction result, and the time-invariant prediction result; The residual accumulation layer subtracts the current state reconstruction result from the input sequence of the current Koopa block to form inter-block residuals, which are then passed along the stacking order of Koopa blocks. The subsequent state prediction results and time-invariant prediction results are accumulated to form the state succession result.
6. The digital content copyright protection method based on encryption algorithm according to claim 1, characterized in that, S5 specifically includes: S51. Extract the parameters of the transition matrix block and the parameters of the successor state matrix block, concatenate them to form the initial parameter vector, and fix the strict upper triangular matrix block and the zero matrix block of the successor state embedding into the current state embedding. S52. Generate a candidate parameter vector group, write the candidate parameter vector into the transition matrix block and the successor state matrix block, process the current unit decryption state sequence, and calculate the mean square error between the successor state prediction result and the corresponding next state. The S53 and INFO algorithms calculate the weighted mean of the candidate parameter vectors based on the mean square error, update the candidate parameter vectors based on the weighted mean, and perform vector combination and local search on the updated results to obtain the optimized parameter vector with the minimum mean square error. S54. Write the optimized parameter vector back to the transition matrix block and the successor state matrix block, reprocess the current unit decryption state sequence, and form a verification pass result when the mean square error after writing back is less than the mean square error corresponding to the initial parameter vector; otherwise, form a verification fail result, and form a continuation verification result.
7. The digital content copyright protection method based on encryption algorithm according to claim 1, characterized in that, S6 specifically includes: S61. When the continuation verification result is a verification pass result, determine the unique successor content unit corresponding to the current content unit along the unit continuation chain, and start the closing transaction in the trusted execution environment. S62. In the closed transaction, cancel the valid decryption key, revoke the access permission of the plaintext buffer corresponding to the decrypted data of the current unit and release the plaintext buffer, update the trusted decryption status to the closed status, and move the anti-rollback status forward. S63. Commit and close the transaction. After successful submission, calculate the message authentication code based on the decrypted session, the current content unit, the unique successor content unit, and the anti-rollback state after the shift, and form the state transition value. S64. Disable the output of state transition values when a transaction commit fails.
8. The digital content copyright protection method based on encryption algorithm according to claim 1, characterized in that, Specifically, S7 includes: S71. Perform message authentication and verification on the state transition value to generate an authentication and verification result; S72. When the authentication verification is successful, the decryption session and the current content unit bound to the state transition value are checked against the trusted decryption state, the unique successor content unit is checked against the unit continuation chain, and the anti-rollback state is checked against the anti-rollback state saved in the trusted execution environment. S73. When all checks pass, the unique successor content unit key is unsealed, the unique successor content unit is set as the current content unit, the unsealed key is set as the valid decryption key, the trusted decryption state is restored to the valid state, and the updated trusted decryption state is formed. S74. If authentication verification or any verification fails, the blocking unit key is unsealed and kept in a trusted decryption state.
9. A digital content copyright protection method based on an encryption algorithm according to claim 1, characterized in that, S8 specifically includes: S81. Read the current content unit in the trusted decryption state, and confirm whether the current content unit is a terminating unit based on the unit continuation chain. S82. When the current content unit is not the termination unit, the authentication, decryption, protected output, status continuation, continuation verification, transaction closure and key continuation are completed according to the trusted decryption status to form the updated trusted decryption status, and the current content unit is reconfirmed as the termination unit. S83. When the current content unit is the termination unit, perform an integrity check on the ciphertext of the termination unit. After the check passes, decrypt the ciphertext of the termination unit and submit the decrypted data of the termination unit to the protected output path. S84. After the decrypted data of the termination unit is submitted, a closing transaction is started in the trusted execution environment. In the closing transaction, the valid decryption key is cancelled, the plaintext buffer access permission is revoked and the plaintext buffer is released. The trusted decryption status is updated to the closed status and the anti-rollback status is moved forward. S85. Submit the closed transaction. Upon successful submission, the decryption session is terminated, resulting in digital content copyright protection.
10. A digital content copyright protection system based on an encryption algorithm, comprising implementing the digital content copyright protection method based on an encryption algorithm as described in any one of claims 1 to 9, characterized in that, Includes the following modules: The content encryption module is used to divide digital content according to the sequential processing order, encrypt each content unit independently, and establish a unit connection chain. The session establishment module is used to establish a decryption session in the trusted execution environment based on the unit continuation chain, load the first content unit key and generate a trusted decryption state; The trusted decryption module is used to authenticate and decrypt the current content unit according to the trusted decryption status, submit the decrypted data to the protected output path, and form the current unit decryption status sequence. The state continuation module is used to input the decrypted state sequence of the current unit into the improved Koopa model. It completes the one-way writing of the current state to the successor state through the closed continuation Koopman layer and blocks the reverse writing back. The state continuation result is formed by separation decoding. The parameter optimization module is used to optimize the parameters of the closed connection Koopman layer based on the state connection result using the INFO algorithm and write back to the improved Koopa model to form the connection verification result. The status closure module is used to submit the current unit closure transaction after the continuation verification passes, close the trusted decryption status and move the anti-rollback status forward, forming a status transition value that binds a unique successor content unit. The key continuation module is used to verify the state transition value. If the verification is successful, the unique successor content unit key is decrypted and the trusted decryption status is updated. If the verification fails, the key continuation is blocked. The session control module is used to process content units cyclically based on the updated trusted decryption status. The decryption session is terminated after the last content unit is closed, resulting in a digital content copyright protection outcome.
