A data encryption method for video communication

By assigning frame sequence identifiers and frame type identifiers to video frames, and combining a chaotic sequence generator and synchronization markers, the problem of encryption synchronization failure caused by sudden packet loss and out-of-order delivery in low-Earth orbit satellite video communication is solved, achieving efficient decryption recovery and real-time performance, while reducing computational and bandwidth overhead.

CN121509711BActive Publication Date: 2026-05-19BEIJING RUIXUN YITONG INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING RUIXUN YITONG INFORMATION TECH CO LTD
Filing Date
2025-11-11
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In low-Earth orbit satellite video communication, sudden packet loss and out-of-order delivery can cause encryption to lose synchronization. Existing technologies struggle to effectively restore decryption continuity while ensuring real-time performance and security, and also incur high computational and bandwidth overhead.

Method used

Each video frame is assigned a Frame Sequence Identifier (FSN) and a Frame Type Identifier (FT). A chaotic sequence generator is used to generate a subkey stream, and a synchronization marker (SM) is embedded in the video data to ensure that the decryption end can independently calculate the subkey stream of the frame. The adaptive encryption strategy adjusts the key stream length and encryption range according to the frame type, supports interleaving and redundancy configuration, and enhances the independence and recoverability of decryption.

Benefits of technology

Under conditions of sudden packet loss and out-of-order delivery, the system achieves continuous and real-time decryption of video communication, reduces resynchronization signaling and computational overhead, and improves the engineering deployability of video communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121509711B_ABST
    Figure CN121509711B_ABST
Patent Text Reader

Abstract

The application discloses a data encryption method for video communication and relates to the technical field of communication and information security. The application allocates a monotonically increasing FSN for each frame at the sending side, introduces anchor numbering AID and anchor digest AD, embeds a resolvable synchronization mark SM in the encrypted data, enables the receiving side to independently reconstruct the frame sub-key stream at any reachable frame, does not need to depend on the state of the last frame, fundamentally alleviates the decryption out-of-sync and long-time mosaic caused by burst packet loss, ensures the independent decryptability and integrity verification of the slice under disordering and rearrangement based on the packet-level unique counter formed by the FSN and the slice number, avoids the problem that the subsequent packet cannot be decrypted, repeatedly carries the SM across frames and supports interleaving / redundancy configuration, improves the recoverability of the synchronization information in the continuous frame loss scene, and reduces the additional resynchronization signaling and time delay jitter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication and information security technology, and in particular to a data encryption method for video communication. Background Technology

[0002] In low-Earth orbit satellite video communication scenarios, the channel is prone to sudden packet loss, packet rearrangement, and short-term interruptions due to factors such as rain attenuation, satellite-to-ground link switching, and obstruction. Although the link layer can reduce the bit error rate through FEC / ARQ and other means, in real-time video services with limited end-to-end latency (e.g., hundreds of milliseconds), the above means are difficult to completely mask the continuous packet loss and latency jitter caused by channel fluctuations, thus affecting decoding continuity and interactive experience.

[0003] To ensure content security and meet real-time requirements, engineering practice commonly employs block cipher-based AEAD (such as AES-GCM, ChaCha20-Poly1305) to independently encrypt and protect the integrity of each data packet on protocols such as SRTP / QUIC / SFrame. Some studies have proposed various lightweight or chaotic mapping-based real-time video encryption schemes. For synchronous stream ciphers / chaotic sequences that rely on state recursion, if independent nonce / counter anchors or periodic reset mechanisms are not designed, encryption and decryption states are prone to out-of-sync during continuous packet loss or long-term interruptions, resulting in the inability to decrypt subsequently correctly received data, requiring additional resynchronization signaling and computational overhead. Even with independent encryption of each packet, the implementation still requires careful handling of details such as sequence number wrapping, out-of-order delivery, and retransmission / FEC recovery to ensure nonce uniqueness and key derivation consistency, resulting in high engineering complexity.

[0004] To reduce computational or bandwidth overhead, some solutions employ selective encryption (encrypting only key elements of the bitstream, such as I-frames, some NAL / VCL headers, or reference blocks). However, under sudden packet loss conditions, if the encrypted key packets are lost, it may lead to an expansion of the decoding failure range of the entire GOP, weakening the inherent fault tolerance of video coding (such as periodic refresh, time-scalable coding, etc.). At the same time, the partial plaintext exposure of metadata and structural information also needs to be balanced in terms of security.

[0005] Therefore, there is an urgent need for a video communication encryption method that can self-recover and decrypt after sudden packet loss / out-of-order delivery, has weak dependence on cross-packet status, and takes into account both computational and bandwidth overhead. Ideally, it should also be able to work well with existing transmission protocols and link-layer FEC / retransmission mechanisms to reduce resynchronization and signaling overhead, and improve continuity and real-time performance in complex satellite-to-ground channels. Summary of the Invention

[0006] In view of the aforementioned existing problems, the present invention is proposed.

[0007] This invention provides a data encryption method for video communication to solve the problem of encryption synchronization failure caused by sudden packet loss in low-Earth orbit links, and selective encryption to amplify the impact of a single packet loss.

[0008] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0009] This invention provides a data encryption method for video communication, comprising:

[0010] Step S1: Assign a frame sequence identifier (FSN) and a frame type identifier (FT) to each video frame;

[0011] Step S2: Based on the initial key and FSN, initialize and iterate a chaotic sequence generator to obtain the basic sequence;

[0012] Step S3: Obtain an anchor digest AD, and derive the subkey stream of this frame by mixing the base sequence and AD using a mixing function;

[0013] Step S4: Determine the encryption strength and encryption range based on the FT, and perform encryption and integrity protection on the encoded data within the encryption range using the sub-key stream;

[0014] Step S5: Embed a synchronization tag SM into the encrypted video data. The SM contains at least FSN, FT, anchor number AID, and AD truncation value.

[0015] Step S6: When the decryption end receives any frame, it can independently calculate the subkey stream of the frame and complete the decryption based on SM, without needing to obtain the key state of the previous frame.

[0016] As a preferred embodiment of the data encryption method for video communication described in this invention, the basic sequence is obtained by: setting a chaotic initial state with an initial key and an FSN, performing a predetermined number of iterations to obtain an initial sequence, and expanding the initial sequence to obtain a basic sequence of the length required to satisfy the encryption range of this frame.

[0017] In a preferred embodiment of the data encryption method for video communication described in this invention, the AD is a cryptographic digest of an anchor frame, and the anchor frame is:

[0018] The frame that has been confirmed as available in the most recent anchoring period, or the starting frame specified at startup / resynchronization;

[0019] The mixing function combines the base sequence with the AD to generate a subkey stream and ensures that the subkey streams under different FSNs or different ADs are independent of each other.

[0020] As a preferred embodiment of the data encryption method for video communication described in this invention, when the decryption end is missing the target AD, the AID in the synchronization tag is used to locate the previous valid anchor frame, and the derivation is completed using its AD;

[0021] If it is still not obtained, the epoch seed ES is used as a substitute AD to generate the transition subkey stream until a new anchor frame is obtained.

[0022] As a preferred embodiment of the data encryption method for video communication described in this invention, each fragment / data packet within a frame has a unique counter for encryption. The counter consists of the FSN and the sequence number within the packet, so that under conditions of packet loss or out-of-order delivery, any correctly received fragment can be independently decrypted and verified.

[0023] As a preferred embodiment of the data encryption method for video communication described in this invention, the SM is repeatedly carried in N consecutive subsequent frames and may be redundantly encoded or interleaved.

[0024] As a preferred embodiment of the data encryption method for video communication described in this invention, when the FSN is detected to be discontinuous, the decryption end reads its SM from the next reachable frame, reconstructs the basic sequence based on the FSN, AID and AD truncation value and derives the subkey stream of that frame, and resumes decryption from that frame.

[0025] As a preferred embodiment of the data encryption method for video communication described in this invention, the adaptive strategy is as follows: full-range encryption is performed on key frames; motion information and structure header fields are encrypted first for predicted frames, and residual sampling is encrypted; only necessary header fields are encrypted for bidirectional predicted frames; and the adaptive strategy is combined with independent decryption to limit the impact range of a single packet loss.

[0026] As a preferred embodiment of the data encryption method for video communication described in this invention, the SM is placed in the extensible header field of the transmission protocol or the resolvable extension area of ​​the bitstream and aligned with the fragment boundary, so that the receiving end can extract the SM and prepare for decryption even before the entire frame is reassembled.

[0027] As a preferred embodiment of the data encryption method for video communication described in this invention, the decryption end maintains the AID and AD buffers of the most recent M anchor frames and updates them by window to handle out-of-order and replay.

[0028] When the anchor update is triggered by EID or window sliding, the sender repeatedly broadcasts the new AID and AD truncation values ​​over several subsequent frames.

[0029] The beneficial effects of this invention are as follows: By assigning a monotonically increasing FSN to each frame on the transmitting side and introducing an anchor number (AID) and an anchor digest (AD), and embedding a resolvable synchronization marker (SM) in the encrypted data, the receiving side can independently reconstruct the subkey stream of the current frame at any reachable frame, without relying on the state of the previous frame. This fundamentally alleviates the decryption synchronization failure and prolonged mosaic caused by sudden packet loss. Based on a packet-level unique counter composed of the FSN and fragment sequence number, it ensures independent decryptability and integrity verification of fragments under out-of-order and rearranged conditions, avoiding the problem of subsequent packets arriving but being undecryptable.

[0030] This invention's SM (Synchronization Message) is repeatedly carried across frames and supports interleaving / redundancy configuration, improving the recoverability of synchronization information in scenarios of continuous frame loss and reducing additional resynchronization signaling and latency jitter. The adaptive encryption strategy differentiates the keystream length and encryption range based on frame type, controlling computational and bandwidth overhead while ensuring structural and content security, and avoiding the side effects of selective encryption amplifying the impact of a single packet loss. Synchronization markers are aligned with fragment boundaries and can be placed in the transport protocol extension header, allowing the receiver to prepare for decryption before reassembling the entire frame, improving the availability of the first packet and startup speed; the anchor buffer and window management at the decryption end suppress replay and smoothly update the anchor.

[0031] This invention balances security, real-time performance, and recoverability in complex satellite channels, significantly improving the continuity and engineering deployability of video communication. Attached Figure Description

[0032] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation on the scope of this application.

[0033] Figure 1 This is a flowchart illustrating the data encryption method for video communication in this embodiment. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0035] All terms used in this application (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0036] For example, the terms “first” and “second” used in this application are only used to distinguish and describe similar objects, to differentiate the first object from another object, and are not used to describe a specific order or sequence, nor should they be interpreted as indicating or implying relative importance.

[0037] This application proposes a data encryption method for video communication, combining... Figure 1 As shown, the method includes:

[0038] Step S1: Assign a frame sequence identifier (FSN) (monotonically increasing according to the transmission sequence) and a frame type identifier (FT) to each video frame;

[0039] Step S2: Based on the initial key and FSN, initialize and iterate a chaotic sequence generator to obtain the basic sequence;

[0040] Step S3: Obtain an anchor digest AD (used to break anchor information that depends on cross-frame state), and derive the subkey stream of this frame by mixing the base sequence and AD with a mixing function;

[0041] Step S4: Determine the encryption strength and encryption range based on the FT, and perform encryption and integrity protection on the encoded data within the encryption range using a subkey stream;

[0042] Step S5: Embed a synchronization tag SM into the encrypted video data. The SM contains at least the FSN, FT, anchor number AID, and AD truncation value.

[0043] Step S6: When the decryption end receives any frame, it can independently calculate the subkey stream of the frame and complete the decryption based on SM, without needing to obtain the key state of the previous frame.

[0044] In this embodiment, the broad terms appearing for the first time are given an engineering definition: the frame sequence identifier is taken from the frame count incremented sequentially by the sending side; the frame type identifier is given by the encoder when generating the bitstream; the synchronization tag is extracted before whole frame reassembly during the fragment parsing stage; and the integrity protection output is a verifiable authentication tag for each fragment. The frame sequence identifier starts from zero by default and increments monotonically by one; the frame type identifier uses single-byte encoding; the anchor digest truncation bit count in the synchronization tag is 128 bits by default, which can be adjusted from 64 to 128 bits; and the error check within the synchronization tag is 16 bits by default. The above bit length parameters take values ​​between satisfying the given false positive probability target and implementing resource constraints. The field separation constant is fixed at several bytes in length and is determined when the session is established. Optionally, the authentication tag can be placed either at the beginning of the fragment or at the end of the encrypted payload of that fragment, with the parsing order based on the fragment header field. If the synchronization tag error check fails or is missing, the decryption end does not attempt to recover the keystream of this frame, but switches to the recovery path using the anchor number or epoch information and records a failure count.

[0045] In one embodiment, the basic sequence is obtained by: setting a chaotic initial state with an initial key and an FSN, performing a predetermined number of iterations to obtain an initial sequence, and expanding the initial sequence to obtain a basic sequence of the length required to satisfy the encryption range of this frame;

[0046] Specifically, the initial state of the chaotic sequence generator is obtained by mapping the initial key and frame sequence identifier through an implementation-defined process. Iterative outputs are provided as a byte stream for subsequent hashing and derivation. The expansion operation is performed locally and does not negatively affect the initial state. The default number of iterations is sixteen, but can be adjusted between eight and sixty-four depending on processor load and target randomness. The minimum length of the expanded result is not less than the number of bytes in the current frame's encryption range; if a fragmentation strategy is used, it is the sum of the lengths of each encrypted fragment. The length of the byte string used as the hash input for the base sequence is the longest continuous output segment available at the time of generation. If the generated length is insufficient, the expanded output is appended without backfeeding until the requirement is met. Optionally, the expansion can be implemented using either repeated concatenation or fetching based on an expandable output function. When the generator is detected to enter a degenerate loop or output a repeated segment, it is immediately reinitialized with the frame sequence identifier and field-separated constant as perturbations, and this only applies to the current frame.

[0047] In one embodiment, AD is a cryptographic digest of an anchor frame, and the anchor frame is:

[0048] The frame that has been confirmed as available in the most recent anchoring period, or the starting frame specified at startup / resynchronization;

[0049] The mixing function combines the base sequence with the AD to generate a subkey stream and ensures that the subkey streams under different FSNs or different ADs are independent of each other;

[0050] The steps by which the mixing function combines the AD with the base sequence include:

[0051] Step C1, determine the context required for hybrid derivation: the base sequence Anchored Abstract and three index information , , Separate constant byte strings with a fixed field. The input side employs fixed-length encoding and byte-level field separation to serve the distinction and uniqueness boundaries across frames and anchors.

[0052] Step C2, the output is the byte string of the subkey stream for this frame, denoted as the total length as... ; The actual number of bytes within the encryption range of this frame is taken, in the case of intra-frame fragmentation. The sum of the lengths of the encrypted fragments;

[0053] Step C3 employs a two-stage derivation structure of extraction and expansion, with built-in domain separation as the context:

[0054]

[0055] in, Indicates the byte prefix of the subkey stream in this frame, subscript Indicates from offset arrive slices, The output length should be consistent with the setting in step C2. To extract the operator, the first parameter The source of pseudo-randomness, the second parameter For salt / context, To expand the operator to accept the input pseudo-random key Output length is byte stream, For the basic sequence The compressed hash has an output bit length of 1000. , The base sequence obtained in step S2, For the byte string of the anchor digest, For fixed-endian encoding functions, where Encoded as Bit, Encoded as Bit, Encoded as Bit, This indicates a byte-level join operation. Separate constant byte strings for fixed fields. For bit length parameter, This represents another set of frame sequence identifiers and anchor summaries. Indicates input The corresponding byte prefix generated below, This is the upper bound of the collision probability;

[0056] Step C4, under the extraction-expansion structure, from arrive The mapping has anti-collision and anti-pre-mapping properties, and the field separation constant and fixed-length encoding eliminate ambiguous concatenation paths at the byte level;

[0057] Step C5, to ensure that key segments from different fragments within the same frame cannot be reused, adopts a derivation-based local expansion method, without feeding back to the mixing function input:

[0058] ,

[0059] in, For fragmentation Local key segment, subscript Indicates a sharded index With offset arrive slices, To expand the output function, This is the prefix of the subkey stream of this frame obtained in step C3. A 64-bit encoded frame sequence identifier. The sequence number within the packet is a fixed-length encoded sequence (the bit width can be set to 16 or 32 depending on the implementation). Indicates taking the first part of the extended output byte, For fragmentation The number of encrypted bytes;

[0060] Step C6: Step C3 is called once per frame to generate the data. When the encryption range leads to When changes occur, the same context is reused only during the extension phase, when an anchor update triggers... or When changes occur, the function is re-derived according to step C3, and the corresponding truncation value is carried in the synchronization tag to serve independent decryption; fragment-level extension (step C5) is only used locally and cross-frame or cross-protocol function reuse is prohibited;

[0061] Specifically, the basic sequence and anchor information are integrated into a single extraction-expansion derived structure. Ambiguous concatenation is avoided at the byte level through field separation of constants and fixed-length encoding. The input contains the frame sequence, frame type, and anchor number, satisfying the need for differentiation between cross-frame and cross-anchor operations. The output length is directly determined by the encryption range, facilitating the on-demand generation of keystreams under an adaptive encryption strategy. Collisions and irreversibility are determined by the properties of hashing and derived functions, achieving a reasonable balance between security and implementation complexity. For fragmentation and out-of-order issues, fragment-level key segments are obtained locally by combining frame-level subkeys with sequence numbers, without introducing additional cross-frame states, thus maintaining independent decryption targets. Simultaneously, calling constraints limit the purpose and scope of the key, preventing reuse paths and facilitating collaboration with the synchronization tag broadcasting mechanism.

[0062] For example, the anchor digest is taken from the combined digest of the encrypted payload and structure fields of the anchor frame to avoid different frames generating the same derived context under the same anchor number. The anchor digest truncation bit count is 128 bits by default, which can be reduced to 96 or 64 bits when the session duration is short or bandwidth is limited; the field separator constant is 8 bytes by default; the anchor number uses a 16-bit circular count. The encoding width of the fragment index is selected between 16 and 32 bits, determined by the upper bound of the maximum number of fragments per frame; the output byte count is equal to the actual byte count of the encryption range, and when the encryption range changes, only the extension stage is re-executed without modifying the extraction stage. Optionally, the encoding uses a uniform big-endian fixed-length format or a signed unambiguous variable-length format, both of which remain equivalent at the parsing layer. When the anchor digest is unavailable or determined to be untrusted, the derivation process is not initiated and a recovery subprocess request is reported.

[0063] In one embodiment, when the decryption end is missing the target AD, the AID in the synchronization tag is used to locate the previous valid anchor frame, and the derivation is completed using its AD.

[0064] If it is still not obtained, the epoch seed ES (determined by the initial key and the epoch number EID) is used as a substitute AD to generate a transition subkey stream until a new anchor frame is obtained;

[0065] Similarly, the epoch number monotonically increments during anchor updates or session renegotiations. The epoch seed is obtained by mapping the initial key to this number according to an implementation definition, and is only enabled when an anchor digest is missing and does not take effect across new anchors. The encoding width of the epoch number can be 16 bits or higher; the transition subkey stream is used for no more than one anchor cycle and is immediately discontinued upon receiving a valid anchor digest. Optionally, the synchronization flag during the transition can repeatedly carry epoch-related fields to improve the recovery probability. When the decryption end is missing both the anchor number and the epoch number, derivation stops and waits for the next frame's synchronization flag. If the waiting time exceeds the implementation-preset maximum inter-frame waiting time, a reinitialization of the session layer is triggered.

[0066] In one embodiment, each fragment / data packet within a frame is encrypted with a unique counter, which consists of the FSN and the sequence number within the packet. Thus, under conditions of packet loss or out-of-order delivery, any correctly received fragment can be independently decrypted and verified.

[0067] Optionally, the intra-packet sequence number is reset to zero at the first fragment of each frame and then incremented thereafter. The receiving side considers fragments with the same sequence identifier and intra-packet sequence number as duplicates and discards them. The default encoding width of the intra-packet sequence number is 16 bits, which is increased to 32 bits when the upper limit of a single frame fragment might exceed this range. The encoding of the unique counter uses big-endian concatenation to ensure sequential consistency. When intra-packet sequence number wrapping or a mismatch between the unique counter and the authentication tag is detected, the current fragment is marked as unverifiable and discarded. Simultaneously, the replay statistics are updated, but this does not affect the decryption of other fragments.

[0068] In one embodiment, the SM is carried repeatedly in N consecutive subsequent frames and may be redundantly coded or interleaved to improve recoverability in the event of sudden packet loss.

[0069] The redundant / interleaved bit mapping or repetition strategy is configured as follows:

[0070] Step D1: First, perform a fixed-length mapping on the synchronization tag field and calculate its total bit count for subsequent channel coding and fragment alignment; for this purpose, during framing, use:

[0071] ,

[0072] in, This indicates the number of bits in a single synchronization tag. The number of bits for identifying the frame sequence. The number of bits used to identify the frame type. To anchor the number of digits, To anchor the number of bits truncated in the abstract ( (by implementation choice) To synchronize the internal error check bits;

[0073] Step D2, in the continuous The coded segments carrying synchronization markers in subsequent frames, and employing time-interleaving depth The round-robin mapping, where each parallel stream is mapped according to... Block code redundancy is implemented, and the transmission order is rotated according to the frame sequence, so that the symbols of the same codeword are distributed across different frames; when there is a burst loss of length equal to the number of consecutive lost frames, the following formula can be satisfied to recover from the received symbols:

[0074] ,

[0075] in, Indicates the number of repetitions (the number of consecutive frames carried). The time interleaving depth (parallel round-robin stream count). The symbol length is 1 byte or Byte's Reed-Solomon class block code, For code character count, For information symbol number, For the number of redundant symbols, The length of consecutive data loss is measured in frames. To round up; to map specific frames to parallel streams, the first frame within the window... Participating frames ( Assigned to the parallel stream index Each parallel stream forms one or more complete streams within the window. Typing and in accordance with Selected redundancy rate relative to the target;

[0076] Step D3: In the extensible header field or bitstream extension area of ​​the transport protocol, align the coded symbols of the synchronization markers with the fragment boundaries: In each frame, place the coded symbol to be sent at the beginning of the first available fragment of that frame. If intra-packet repetition is used, set the intra-packet replication factor. Copy the same symbol to the spaces between them within the same frame. Each fragment location is assigned a placeholder index in the fragment header to avoid ambiguity in parsing before reassembly. This in-packet mechanism does not change the temporal recoverability condition of the above formula, but can reduce the impact of fragment-level bursts on single-frame symbols.

[0077] Step D4, when When fixed, increase Or increase It can improve tolerance to continuous frame drops in the time dimension, and increase the tolerance when bursts are predominant at the fragmentation level. Increasing the index spacing of duplicate fragments can improve the probability of symbols being observed within a single frame. Together with the symbol size, they determine the minimum. ;

[0078] Specifically, the method of carrying synchronization markers in consecutive frames is configured in a structured manner. First, the total number of bits is given by a fixed field mapping to determine the size relationship between subsequent coding and interleaving. Then, with time interleaving as the core, consecutive frames are divided into several round-robin streams, and block code redundancy is applied to each stream so that the symbols of the same marker are distributed across multiple frames. For the burst situation of consecutive frame loss, sufficient conditions consisting of frame loss length, interleaving depth and number of redundant symbols are given. These conditions are easy to verify in implementation and facilitate the selection of parameters based on link quality. The alignment strategy enables the coding symbols to be extracted quickly at the fragment level, and the intra-packet replication factor is used as an additional means to alleviate the single-frame observation failure caused by fragment-level bursts, without changing the recovery threshold of the time dimension.

[0079] Furthermore, parameter selection follows a measurement-then-configure approach: when fewer consecutive frame loss events are observed, a smaller repetition count and shallower time interleaving are used; when frequent consecutive frame loss events are observed, the time interleaving depth is increased and the number of redundant symbols is moderately increased, with the intra-packet replication factor only activated when fragment-level bursts are significant. The repetition count can be set to 3-8, the time interleaving depth to 2-4, and the redundancy ratio is typically maintained at several percentage points to control header overhead. The intra-packet replication factor is selected between 1 and 2, ensuring that the index spacing of the replication positions is not less than several fragments. Optionally, when the implementation environment does not have block code capability, the repetition and time interleaving mechanisms are retained to degrade the distributed carrying of synchronization markers. When the encoding buffer is insufficient to carry a complete codeword, adding redundancy is paused in the current window, only the minimum necessary synchronization marker symbols are sent, and the remaining symbols are supplemented in the next window.

[0080] In one embodiment, when an FSN discontinuity is detected, the decryption end reads its SM from the next reachable frame, reconstructs the base sequence based on the FSN, AID, and AD truncation value, and derives the subkey stream of that frame, resuming decryption from that frame without waiting for retransmission.

[0081] In this embodiment, the detection of frame sequence discontinuity is completed by comparing the expected next frame sequence identifier with the actual observed value. The decryption end does not determine it as a loss within a limited out-of-order range. The out-of-order tolerance can be set to several frames. If no missing frame is found after exceeding this threshold, it is considered a loss and the recovery process is initiated. The timeout duration for waiting for the next reachable frame is set according to the jitter distribution on the access side, generally not exceeding several hundred milliseconds. Optionally, after entering the recovery process, the decryption end increases the priority of synchronization mark extraction for the subsequent frames to shorten the recovery time. If a valid synchronization mark cannot be obtained for several consecutive frames, derivation stops and a session quality event is reported to the upper layer.

[0082] In one embodiment, the adaptive strategy is as follows: full-range encryption is performed on keyframes; motion information and structural header fields are encrypted first for prediction frames, and residual sampling is encrypted; only necessary header fields are encrypted for bidirectional prediction frames; and the adaptive strategy is combined with independent decryption to limit the impact of a single packet loss.

[0083] Specifically, the structure header field refers to the control field that can influence the selection of decoding paths at the frame and fragment levels. Motion information refers to the vectors and related control bits used for prediction. Residual sampling encryption is performed at byte alignment to avoid breaking syntax boundaries. The residual sampling ratio defaults to 1 / 10 and can be adjusted from 1 / 20 to 1 / 7. When full-range encryption is enabled for keyframes, batch execution at the fragment or fragment granularity is allowed to reduce peak computing power. Optionally, when low-complexity content or low-motion scenes are detected, the residual sampling ratio of the predicted frame can be reduced while the structure header field encryption remains unchanged. When adaptive decision-making conflicts with available computing power, the encryption of the structure header field and motion information takes priority, and the residual sampling encryption is downgraded proportionally until real-time requirements are met.

[0084] In one embodiment, the SM is placed in the extensible header field of the transport protocol or the resolvable extension area of ​​the bitstream and aligned with the fragmentation boundary, so that the receiver can extract the SM and prepare for decryption even before the whole frame is reassembled.

[0085] Optionally, the synchronization tag is encoded in a type-length-value format and carried in the extension area of ​​the fragment header. The length field is in bytes and aligned with subsequent symbols, ensuring that the parser can obtain the complete synchronization tag after reading the first fragment. The total length of the synchronization tag does not exceed several tens of bytes, and the field alignment uses multiples of two or four bytes to balance parsing efficiency and space utilization. When the extension header space is insufficient to carry the complete synchronization tag, the frame sequence identifier, frame type identifier, and anchor number are carried first, and the truncated portion of the anchor digest is retransmitted in the next frame.

[0086] In one embodiment, the decryption end maintains the AID and AD caches of the most recent M anchor frames and updates them by window to handle out-of-order and replay.

[0087] When the anchor update is triggered by EID or window sliding, the sender repeatedly broadcasts the new AID and AD truncation values ​​over several subsequent frames.

[0088] Furthermore, the anchor entries cached at the decryption end are maintained according to the least recently used strategy. Each entry includes an anchor number, an anchor digest, and the range of frame sequences in which it is effective. The oldest entry is evicted when the window slides. The default number of cached entries is eight, which can be adjusted from four to thirty-two. The frame sequence acceptance window width is configured according to the service latency and out-of-order magnitude, typically ranging from several hundred to several thousand frames. Optionally, frame sequence identifiers exceeding the acceptance window are directly rejected and included in the replay statistics. When memory is insufficient to maintain the target number of entries, the window width is immediately reduced while maintaining the consistency of anchor entries until resources are restored, at which point it is increased back to the original configuration.

[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0090] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of this application and form different embodiments. For example, all the embodiments above can be used in any combination. The information disclosed in this background section is intended only to enhance the understanding of the general background of this application and should not be construed as an admission or in any way implying that such information constitutes prior art known to those skilled in the art.

Claims

1. A data encryption method for video communication, characterized in that, include: Step S1: Assign a frame sequence identifier (FSN) and a frame type identifier (FT) to each video frame; Step S2: Based on the initial key and FSN, initialize and iterate a chaotic sequence generator to obtain the basic sequence; Step S3: Obtain an anchor digest AD, and derive the subkey stream of this frame by mixing the base sequence and AD using a mixing function; Step S4: Determine the encryption strength and encryption range based on the FT, and perform encryption and integrity protection on the encoded data within the encryption range using the sub-key stream; Step S5: Embed a synchronization tag SM into the encrypted video data. The SM contains at least FSN, FT, anchor number AID, and AD truncation value. Step S6: When the decryption end receives any frame, it can independently calculate the subkey stream of the frame and complete the decryption based on SM, without needing to obtain the key state of the previous frame. The AD is a cryptographic digest of an anchor frame, and the anchor frame is: The frame that has been confirmed as available in the most recent anchoring period, or the starting frame specified at startup / resynchronization; The mixing function combines the base sequence with the AD to generate a subkey stream and ensures that the subkey streams under different FSNs or different ADs are independent of each other.

2. The data encryption method for video communication as described in claim 1, characterized in that, The basic sequence is obtained by setting a chaotic initial state with the initial key and FSN, performing a predetermined number of iterations, and then expanding the initial sequence to obtain a basic sequence of the length required to satisfy the encryption range of this frame.

3. The data encryption method for video communication as described in claim 1, characterized in that, When the decryption end is missing the target AD, the AID in the synchronization tag is used to locate the previous valid anchor frame, and the derivation is completed using its AD; If it is still not obtained, the epoch seed ES is used as a substitute AD to generate the transition subkey stream until a new anchor frame is obtained.

4. The data encryption method for video communication as described in claim 1, characterized in that, Each fragment / data packet within a frame has a unique counter for encryption. The counter consists of the FSN and the sequence number within the packet, so that any correctly received fragment can be independently decrypted and verified under conditions of packet loss or out-of-order delivery.

5. A data encryption method for video communication as described in claim 1, characterized in that, The SM is carried repeatedly in N consecutive subsequent frames and can be optionally redundantly encoded or interleaved.

6. A data encryption method for video communication as described in claim 1, characterized in that, When an FSN discontinuity is detected, the decryption end reads the SM from the next reachable frame, reconstructs the basic sequence based on the FSN, AID, and AD truncation value, and derives the subkey stream of that frame, resuming decryption from that frame onwards.

7. A data encryption method for video communication as described in claim 1, characterized in that, The adaptive strategy is as follows: full-range encryption is performed on keyframes; motion information and structure header fields are encrypted first for prediction frames, and residual sampling is encrypted; only necessary header fields are encrypted for bidirectional prediction frames; and the adaptive strategy is combined with independent decryption to limit the impact range of a single packet loss.

8. A data encryption method for video communication as described in claim 1, characterized in that, The SM is placed in the extensible header field of the transmission protocol or the resolvable extension area of ​​the bitstream and aligned with the fragment boundary, so that the receiving end can extract the SM and prepare for decryption even before the whole frame is reassembled.

9. A data encryption method for video communication as described in claim 1, characterized in that, The decryption end maintains the AID and AD buffers of the most recent M anchor frames and updates them by window to handle out-of-order and replay issues; When the anchor update is triggered by EID or window sliding, the sender repeatedly broadcasts the new AID and AD truncation values ​​over several subsequent frames.