A high-definition video stream adaptive coding method based on transmission state perception
By using a transmission status-aware high-definition video stream adaptive coding method, the stable data range of the bidding video file is dynamically identified and constrained, which solves the integrity problem caused by the incomplete stability of data during the transmission of bidding documents and improves the data reliability and accuracy of the electronic bidding system.
Patent Information
- Application Number
- CN202610611449.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-07
- Publication Date
- 2026-06-26
AI Technical Summary
In electronic bidding systems, existing technologies struggle to accurately characterize the range of stable data during the transmission of bidding video files. This leads to premature triggering of subsequent processing before the data is fully stable, affecting the accuracy of file integrity assessment. Furthermore, some systems fail to establish clear boundaries between confirmed and unconfirmed data, resulting in chaotic data dependencies and causing parsing failures or duplicate transmissions.
By using a transmission state-aware adaptive coding method for high-definition video streams, the range of data that can be stably obtained is dynamically identified, a reference reachable boundary is generated, and subsequent data processing behavior is constrained. Unconfirmed data is eliminated, reachable reference coding units consistent with the reference reachable boundary are generated, adaptive coding output is completed, and the reference reachable boundary for the next coding period is updated.
It effectively prevents data parsing errors and invalid references, improves the reliability of video and large-volume bid document submission processes in electronic bidding systems, ensures that data processing is always based on real and accessible data, avoids potential risks, and is suitable for scenarios with high requirements for data integrity and legality.
Smart Images

Figure CN122293850A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of video coding technology, and in particular to an adaptive coding method for high-definition video streams based on transmission status awareness. Background Technology
[0002] In electronic bidding systems, bid documents are sometimes submitted as video files, placing high demands on the stability and integrity of the transmission process. Existing systems generally employ transmission strategies based on segmented uploads, breakpoint resumption, and verification mechanisms to reduce the impact of network fluctuations on submission success rates. However, several unresolved issues remain in practical applications.
[0003] On the one hand, video files submitted for bidding are often affected by factors such as network latency fluctuations, packet loss, and path switching during transmission, resulting in some data fragments being in an unconfirmed or delayed state. Existing technologies mostly use the overall upload success or failure as the basis for judgment, lacking a fine-grained characterization of the range of data that has been stably arrived. This can easily trigger subsequent processing prematurely before the data is fully stable, thus affecting the accuracy of file integrity judgment.
[0004] On the other hand, during the submission of video or large file bidding materials, some systems adopt a continuous incremental upload method, but fail to establish a clear boundary between confirmed and unconfirmed data, resulting in chaotic subsequent data dependencies. For example, using data segments that have not yet arrived stably for verification or reassembly can lead to parsing failures or duplicate transmissions. Summary of the Invention
[0005] This invention provides a high-definition video stream adaptive coding method based on transmission state awareness, which can dynamically identify the range of data that can be stably obtained and constrain subsequent data processing behavior based on this range, thus establishing a reliability control mechanism.
[0006] A transmission state-aware adaptive coding method for high-definition video streams includes the following steps:
[0007] S1. Based on the transmission status feedback information corresponding to the current video stream, determine the range of historical images that the receiving end can stably obtain within the current encoding period, and generate the corresponding reference reachable boundary.
[0008] S2, based on the reference reachable boundary, constrain and reorganize the predicted reference relationship of the current image to be encoded, and generate a reachable reference coding unit consistent with the reference reachable boundary;
[0009] S3, based on the reachable reference coding unit, complete the adaptive coding output of the current video stream, and write back the reference result corresponding to this coding output to the subsequent coding period to update the reference reachable boundary of the next coding period.
[0010] Optionally, the transmission status feedback information is reported by the receiving end, and the transmission status feedback information includes at least the maximum consecutive sequence number of the image frames that have been successfully received, the current round-trip time, and the packet loss rate.
[0011] Optionally, based on the maximum consecutive sequence number and the retransmission tolerance window corresponding to the current round-trip delay, the ambiguous frame sequence number interval that is in the retransmission waiting state and has not been confirmed to have arrived is removed, and the set of image frame sequence numbers that have been stably cached by the receiver and can be immediately called by the decoder is defined as the stably obtainable historical image range; the end frame sequence number of the historical image range is determined as the reference reachable boundary, or the historical image range is mapped to the effective threshold boundary of the reference image list in the video coding standard as the reference reachable boundary.
[0012] Optionally, S2 includes parsing a preset initial prediction structure of the current image to be encoded and obtaining a list of candidate reference frame identifiers contained in the preset initial prediction structure.
[0013] Optionally, the candidate reference frame identifier list is used to compare with the reference reachability boundary. Candidate reference frames whose frame numbers exceed the reference reachability boundary are marked as invalid reference frames and removed from the available reference frame set. Only candidate reference frames whose frame numbers are within the reference reachability boundary are retained as valid reference frames.
[0014] Optionally, the valid reference frame is used to re-determine the coding tree unit or macroblock-level prediction mode of the current image to be encoded, and generate an inter-frame prediction reference relationship that is only associated with the coding unit of the valid reference frame, with the coding unit serving as the reachable reference coding unit.
[0015] Optionally, the preset initial prediction structure is a reference prediction framework pre-established by the encoder based on the hierarchical position of the current image to be encoded in the encoding sequence, the default reference image organization rules, and the initial prediction configuration of the encoding unit. The reference prediction framework is used to characterize the range of historical reference frames that the current image to be encoded is theoretically allowed to use before the reference reachable boundary constraint is applied, and the corresponding inter-frame prediction relationship.
[0016] Optionally, after inputting S3, the reachable reference coding unit performs entropy coding and bitstream encapsulation to generate and send an encoded output bitstream adapted to the current transmission state.
[0017] Optionally, the inter-frame reference frame identifier actually used by the reachable reference coding unit during the coding process is recorded to generate an actual reference relationship record table corresponding to the current coded image.
[0018] Optionally, the actual reference relationship record table is used for joint comparison with the transmission status feedback of the next coding period. If the receiver detects an acknowledgment signal for the current coded image, the frame number of the current coded image is included in the update calculation of the historical image range of the next coding period, and the reference reachable boundary is pushed towards the current coded image.
[0019] The beneficial effects of this invention are:
[0020] This invention introduces a reference reachable boundary, explicitly transforming the range of successfully received data at the receiving end into a reliably obtainable historical image range, thereby constraining the subsequent data citation and processing behavior. Compared to existing technologies that rely solely on the overall upload completion status or simple fragment confirmation mechanisms, this invention can dynamically identify the stable data boundaries during transmission, avoiding premature citation or processing of data still in a retransmission or delayed state. This effectively prevents data parsing errors, invalid citations, and inconsistent results, improving the reliability of video and large-volume bid document submission processes in electronic bidding systems.
[0021] This invention does not perform integrity verification after data transmission is complete. Instead, it performs it during data processing by constraining and reorganizing a pre-set initial prediction structure, allowing encoding or data organization to only rely on data already within the reference reachable boundary. This mechanism of constraint before processing avoids the error propagation problem caused by referencing unstable data from the outset. Compared to traditional solutions that remedy errors after they occur, this invention proactively avoids potential risks during the data generation stage, making it particularly suitable for scenarios in electronic bidding where data integrity and legality requirements are high.
[0022] This invention, by recording the actual reference relationship and combining it with the confirmation information from the receiving end, progressively updates the reference reachable boundary, so that the data processing process and the transmission status form a dynamic closed loop. Specifically, only after the data is confirmed to have been successfully received will it be included in the historical image range and the boundary be moved forward, thereby ensuring that subsequent processing is always based on the real reachable data. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only for this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a schematic diagram of the method execution logic in an embodiment of the present invention;
[0025] Figure 2This is a schematic diagram of the method flow according to an embodiment of the present invention. Detailed Implementation
[0026] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. For some well-known technologies, those skilled in the art may also use other alternative methods to implement the invention. Moreover, the accompanying drawings are only for more specific description of the embodiments and are not intended to specifically limit the present invention.
[0027] like Figures 1-2 As shown, a high-definition video stream adaptive coding method based on transmission state awareness includes the following steps:
[0028] S1. Based on the transmission status feedback information corresponding to the current video stream, determine the range of historical images that the receiving end can stably obtain within the current encoding period, and generate the corresponding reference reachable boundary.
[0029] S11, the encoding end obtains transmission status feedback information reported periodically or triggered by events by the receiving end. The transmission status feedback information includes at least:
[0030] The maximum consecutive sequence number of the image frames that have been successfully received;
[0031] Current round-trip time delay;
[0032] Packet loss rate metric.
[0033] For ease of subsequent calculations, the above information will be denoted as: ;in, This represents the set of transmission status feedback information. express, This indicates the current packet loss rate. This is the sequence number of the largest consecutive image frame that the receiving end has confirmed has been successfully received. This indicates the frame number with the largest sequence number among a segment of image frames that the receiver has successfully received in sequence without any omissions. Simply put, it's the number of the last frame received consecutively from frame 1 without any losses. For example, if frames 1, 2, 3, and 4 have been successfully received, but frame 5 is lost, then this value is 4. This sequence number is used to characterize the furthest continuously available historical location of the receiver and is an important basis for subsequently determining the reference reachability boundary.
[0034] The encoding end refers to the device or module that compresses the original video images and generates a video stream. This includes video encoders at the camera end, encoding units in streaming servers or terminal devices. Its main function is to compress continuously acquired image frames according to certain encoding rules and send them sequentially to the network for decoding by the receiving end. The receiving end refers to the device or module that receives the video stream from the network and decodes it. This includes players, monitoring terminals, or remote display devices. Its main function is to receive the video data sent by the encoding end, restore the stream to image frames according to the encoding rules for display or further processing, and simultaneously send reception status information back to the encoding end.
[0035] S12, the encoder checks each unacknowledged frame one by one, looking at the interval between the current time and the frame's transmission time. If the time interval does not exceed the retransmission tolerance window, it means that the frame may be being transmitted in the network, queued, or waiting for retransmission confirmation. In this case, it cannot be simply treated as a lost frame, but is marked as an ambiguous and uncertain state. If the time has obviously exceeded the window, it is considered that the frame is basically impossible to be successfully received again and can be excluded from the reference range. Through this mechanism, unacknowledged frames are divided into two categories: one is an ambiguous frame that may still arrive, and the other is a frame that is basically certain to not arrive, thereby avoiding the encoder from mistakenly including unstable frames in the reference.
[0036] Specifically, after obtaining the transmission status feedback information, the encoding end constructs a retransmission tolerance window based on the round-trip delay to determine unacknowledged frames that are still in the possible arrival state.
[0037] Constructing the retransmission tolerance window length: ;in, This indicates the retransmission tolerance window. This represents the delay amplification factor, used to cover retransmission and queuing delays. Its value ranges from 1.5 to 3. RTT itself only reflects the average delay of one round trip. However, in actual transmission, there are also uncertain factors such as queuing delay, retransmission waiting, and link jitter. Therefore, it is necessary to amplify RTT appropriately to cover the additional delays.
[0038] On the timeline, the current encoding moment is recorded as... For any unacknowledged frame If its sending time is Then determine whether it is in a fuzzy state and satisfies: ;in, Indicates the current encoding time. Represents an image frame The transmission time. When this formula is satisfied, the unacknowledged frame is considered to still be in a retransmission waiting state, and the corresponding frame sequence number belongs to the fuzzy frame sequence number range.
[0039] Furthermore, all frames that satisfy the following conditions are combined into a set of fuzzy intervals:
[0040] ;in, Indicates the range of fuzzy frame numbers. Indicates the image frame number.
[0041] The ambiguous intervals are then removed from the current set of historical frames to obtain a set of stable reachable frames:
[0042] And by combining time stability constraints, unstable frames at the boundary are eliminated:
[0043] ;in, This represents the set of historical image frames that are ultimately determined to be stable and reachable, i.e., the range of historical images that can be stably obtained.
[0044] S13 and S12 obtain a set of historical frames that have been confirmed to be stable and usable by the receiver. However, directly using the set as a coding constraint is too complex and not conducive to rapid judgment. Therefore, it is necessary to further transform this set of frames into a single boundary value, namely the reference reachable boundary. From the stable frames, the frame with the largest sequence number is found as the cutoff point. The cutoff point means that the frames before it are stable and reliable, while the frames after it are not yet confirmed or have uncertainty. This way, when the encoder makes subsequent predictions, it does not need to judge the usable frames one by one, but follows a simple rule: only historical frames with sequence numbers not exceeding this boundary are allowed to be used as references.
[0045] Specifically, after obtaining the reliably obtainable historical image range, the historical image range is transformed into a constraint boundary that can be directly used on the encoding side, that is, the boundary is directly defined based on the sequence number: ;in, Indicates the reachable boundary. This represents the maximum frame number in the set.
[0046] At this point, the reference reachability boundary means that the encoder is only allowed to reference frame numbers not greater than 1. Historical images are used as a reference for prediction.
[0047] S2, based on the reference reachable boundary, constrain and reorganize the predicted reference relationship of the current image to be encoded, and generate a reachable reference coding unit consistent with the reference reachable boundary.
[0048] S21. Before actually encoding the current image to be encoded, it is necessary to determine which historical frames can theoretically be used as references under the default encoding strategy. Specifically, when processing the current image to be encoded, the encoder does not start from scratch to determine the reference relationships. Instead, based on a preset initial prediction structure, such as a predetermined inter-frame prediction structure or reference list configuration, it first parses a set of candidate reference frames. These candidate reference frames represent all possible reference objects that the encoder originally planned to use for motion prediction and inter-frame compression without considering transmission state constraints. Subsequently, the encoder performs identifier parsing on this set of candidate reference frames, converting each reference frame identifier into a corresponding frame sequence number, thereby establishing a correspondence between reference frames and time positions. Through this conversion, the reference identifiers, which were originally only used for internal encoding indexing, are uniformly mapped into a frame sequence number expression with temporal significance, providing a basis for subsequent comparisons with the reachable boundary of the reference. Through the above processing, the encoder obtains a set of candidate reference frames with a clear structure and explicit sequence numbers, fully reflecting the entire potential reference range of the current image to be encoded under the default prediction structure, and serving as the input basis for subsequent reference constraint filtering and prediction relationship reorganization.
[0049] The specific plan is as follows:
[0050] S211, for the current image to be encoded, the encoder first parses its preset initial prediction structure to obtain the set of historical reference frames that the image to be encoded may reference under the default encoding strategy. The set of historical reference frames that may be referenced is the actual set of frames corresponding to the candidate reference frame identifier list. The set of historical reference frames represents all historical image frames that are prior to the current image to be encoded in time, but not all of them will be actually used by the encoder. In the above set of historical reference frames, the encoder selects the theoretically allowed frames to be referenced according to the preset prediction structure to form the candidate reference frame identifier list.
[0051] S212, let the candidate reference frame identifier list be represented as follows: ;in, The candidate reference frame identifier list represents the set of identifiers of all historical reference frames available for inter-frame prediction selection for the current image to be encoded, under the preset initial prediction structure. It describes the range of candidate reference frames for the encoder before the application of transmission state constraints. Indicates the first The identifier of each candidate reference frame. This indicates the number of candidate reference frames.
[0052] S213, further mapping each candidate reference frame identifier to its corresponding frame number: ;in, This indicates the mapping from the reference frame identifier to the frame sequence number. Indicates candidate reference frame Since the corresponding frame sequence number is merely an internal encoder index and lacks temporal meaning, a transformation is performed to map each candidate reference frame identifier to its corresponding frame sequence number. This allows these reference frames to be compared with the reference reachable boundaries defined by sequence number in S1. The output is a list of candidate reference frames with explicit frame sequence number information. Essentially, it is a sequence number version of the candidate reference frame identifier list, which serves as the basis for subsequent filtering.
[0053] During the encoding process of historical images, the encoding end maintains a reference frame management table to record the association between each reference frame identifier and its corresponding image frame, establishing a one-to-one correspondence between the encoding identifier and the actual image. For each frame in the reference frame management table, the encoding end has assigned a unique frame number when it is generated or stored, which is used to indicate the position of the image in the encoding sequence or display sequence, realizing the mapping from image frame to time position. Based on the association established above, the reference frame identifier is directly mapped to the corresponding frame number.
[0054] In this embodiment, the reference frame management table is used to establish the correspondence between reference frame identifiers and encoded image frames and their frame numbers. Its construction process is as follows:
[0055] 1. Initialize the reference frame management table structure at the encoding end, reserving fields for reference frame identifier, image frame instance, and frame sequence number for each record, for subsequent dynamic maintenance of reference relationships. This reference frame management table is updated in real time during the encoding process.
[0056] 2. After each frame of image is encoded, the encoding end assigns a unique frame number to the image frame and determines whether the image frame needs to be added to the reference system based on the current encoding strategy. If the image frame is selected as a reference frame that can be used for subsequent inter-frame prediction, the corresponding reference frame identifier is assigned to it, and the identifier, the image frame and its frame number are written into the reference frame management table.
[0057] 3. During the encoding process, when a reference frame is updated, the record in the reference frame management table is updated synchronously to ensure that each reference frame identifier can always uniquely correspond to the currently valid image frame and its frame number.
[0058] 4. When performing the mapping from reference frame identifier to frame sequence number, the encoding end locates the corresponding image frame record by looking up the reference frame management table and reads its frame sequence number, thereby completing the calculation of the mapping function.
[0059] Furthermore, it needs to be specifically explained that the so-called preset initial prediction structure is essentially the reference organization framework of the current image to be encoded under the default coding strategy. The initial prediction structure specifies which historical images can theoretically be selected as references for the current image, which prediction directions can be adopted, which reference lists are allowed to be used, and the prediction relationships that various coding units should preferentially follow in the initial state. The emphasis is on "initial" because it is not the prediction result that has been finally determined and actually executed, but rather a set of candidate prediction foundations established by the encoder before entering the formal coding decision, based on the established coding rules, image type, hierarchical position, and reference organization method. In other words, it is equivalent to the encoder's original default scheme. Subsequently, this invention applies constraints on the reachable boundaries of the references to this default scheme to obtain the truly executable scheme.
[0060] From an implementation perspective, the preset initial prediction structure consists of the following parts: The first part is the position of the current image to be encoded in the encoding sequence, including which frame it is in, whether it is a forward prediction image or a bidirectional prediction image, and its position in the display order and encoding order; the second part is the default reference image organization rules corresponding to this image, including which encoded historical frames are allowed to be selected as references, how the reference list is arranged, and which reference frames have higher priority; the third part is the initial prediction constraints at the coding unit level, including whether coding tree units, macroblocks, or other coding units prioritize inter-frame prediction or intra-frame prediction in the initial state, and which candidate reference frames can be accessed by default if inter-frame prediction is performed. All of the above information constitutes the initial structure of how the current frame was originally intended to be predicted.
[0061] This can be further understood as follows: In ordinary video coding, when the encoder processes the current image to be encoded, it does not face a completely blank selection space. Instead, it automatically generates a reference candidate pool and corresponding prediction paths based on rules such as GOP organization, reference list configuration, and frame type arrangement. The reference candidate pool and prediction path framework constitute the preset initial prediction structure of this invention. This invention treats the preset initial prediction structure as a starting structure to be corrected. Specifically, in S1, this invention first generates a reference reachability boundary based on feedback from the receiver, addressing the question of which historical frames the receiver can reliably obtain. In S2, the encoder first reads the preset initial prediction structure of the current image to be encoded, parsing out the historical reference frames that might be referenced by default, i.e., the candidate reference frame identifier list; then, it compares each candidate reference frame with the reference reachability boundary, discarding candidate reference frames that exceed the boundary and retaining only valid reference frames within the boundary. Finally, based on the valid reference frames, the encoder re-decides the coding tree unit or macroblock-level prediction mode, generating reachable reference coding units that depend only on valid reference frames.
[0062] The encoding end parses the preset initial prediction structure according to the following steps:
[0063] 1. Identify the image type, display order position, and encoding order position of the current image to be encoded in the encoding sequence, and determine the prediction level and default reference direction to which the image belongs;
[0064] 2. Based on the current encoder's preset reference image organization rules, read the reference list configuration relationship corresponding to the image to determine the historical reference positions that the image is allowed to call under the default encoding strategy;
[0065] 3. Map each reference position to the encoded historical image, extract the historical image frames that can be used as the basis for inter-frame prediction, and form a set of historical reference frames that the image may reference under the default coding strategy;
[0066] 4. Assign a corresponding reference frame identifier to each historical reference frame in the historical reference frame set to generate a candidate reference frame identifier list.
[0067] S22, after obtaining the candidate reference frame identifier list, the reference reachable boundary is generated based on S1. Validity determination of candidate reference frames:
[0068] Define the set of valid reference frames as follows: ;in, Represents the set of valid reference frames, condition This indicates that the reference frame is within the range that can be stably obtained at the receiving end;
[0069] At the same time, candidate reference frames that do not meet the conditions are defined as the set of invalid reference frames:
[0070] ;in, This indicates a set of invalid reference frames.
[0071] Subsequently, the invalid reference frames are removed from the original candidate reference frame identifier list, leaving only the set of valid reference frames. This serves as the sole usable reference for subsequent encoding and prediction. The output is the set of valid reference frames after applying the reachable boundary constraints. .
[0072] Table 1. Examples of Reference Frame Management
[0073] Reference frame identifier Image frame Frame number Timestamp R0 Frame_10 10 t10 R1 Frame_12 12 t12 R2 Frame_15 15 t15 R3 Frame_18 18 t18
[0074] When using Table 1:
[0075] When the candidate reference frame identifier list is: ;
[0076] The corresponding frame number is then obtained by looking up the table: ;
[0077] If the current reference reachable boundary is: ;
[0078] Then only reference frames with frame numbers not exceeding 15 are retained, that is: ;and The corresponding frame number is 18, which exceeds the reference reachability boundary and is therefore determined to be an invalid reference frame.
[0079] S23, after obtaining the set of valid reference frames, the encoder further re-decides the prediction mode at the coding unit level, ensuring that all inter-frame prediction relationships depend only on the valid reference frames. The prediction mode is the method chosen by the encoder to generate the current image content using existing information when compressing the current coding unit. Prediction modes include intra-frame prediction and inter-frame prediction. Intra-frame prediction uses the already coded regions within the current image for inference, while inter-frame prediction uses historical image frames for inference. The choice of prediction mode determines how the coding unit generates predicted values and is a core element of the coding decision-making process.
[0080] The term "re-decision" refers to the process by which the encoder, for each coding unit, re-determines the prediction mode and prediction method to be used after the reference frames have been filtered. Specifically, when some of the originally usable reference frames are removed, the original prediction method becomes inapplicable. In this case, the encoder needs to reselect the most suitable prediction method, such as reselecting reference frames, adjusting motion compensation methods, or changing the prediction type.
[0081] The specific plan is as follows:
[0082] S231, the current image to be encoded is divided into several sets of coding units: ;in, Represents a set of coding units. Indicates the first One coding unit, This indicates the total number of coding units.
[0083] S232, for each coding unit Its original prediction reference set is represented as: ;in, Represents coding unit The reference frame set under the preset initial prediction structure, the original prediction reference set is the set of reference frames that the encoder is allowed to use by default for a certain coding unit before the constraints of this invention are applied.
[0084] S233, based on the valid reference frame set, constrained reorganization is performed. Reference frames in the original prediction reference set that do not meet the constraint conditions, i.e., exceed the reference reachability boundary, are removed, and only the reference frames that meet the conditions are retained. The prediction relationship is then reorganized based on the remaining reference frames to obtain a new reference frame set, represented as: ;in, This represents the reassembled set of reference frames. This represents the intersection operation of sets.
[0085] S24, encoding end based on The prediction mode of the coding unit is re-determined, including reselecting the inter-frame prediction direction, motion compensation reference, and coding mode type, so that all inter-frame predictions of the coding unit depend only on the set of valid reference frames.
[0086] A coding unit is determined to be a reachable reference coding unit when it meets the following conditions:
[0087] ;in, This means for all, This represents the reference frame, and the formula represents the coding unit. All reference frames used are located within the reference reachable boundary.
[0088] Finally, all coding units that satisfy the above conditions are constituted: This set is the reachable reference coding unit output by S2.
[0089] S3, based on the reachable reference coding unit, complete the adaptive coding output of the current video stream, and write back the reference result corresponding to this coding output to the subsequent coding period to update the reference reachable boundary of the next coding period.
[0090] S31, the set of reachable reference coding units can be represented as: ;in, Represents the set of reachable reference coding units. Indicates the first After obtaining the reachable reference coding unit, the encoding end performs entropy coding processing on the coding unit and completes the bitstream encapsulation to generate an encoded output bitstream adapted to the current transmission state. The generated encoded output stream is sent to the receiving end via the network.
[0091] S311, the entropy coding process for the reachable reference coding unit is performed as follows:
[0092] The encoding end reads each reachable reference coding unit in the current encoded image one by one, extracting the coding description information corresponding to each reachable reference coding unit. The coding description information includes at least the division method of the coding unit, the prediction mode type, the inter-frame reference frame identifier, motion vector information, transform block structure information, and the transform quantization coefficients corresponding to the prediction residual. The original image compression result is then organized into a structured object to be encoded required for subsequent entropy coding.
[0093] The encoding end performs transformation and quantization scanning rearrangement processing on the prediction residual signal of each reachable reference coding unit. Specifically, the quantized residual coefficients are converted into a one-dimensional coefficient sequence according to a preset scanning order, so that the non-zero coefficients and zero coefficients form an arrangement suitable for probability coding in the sequence. The significance information, coefficient amplitude information and sign information are further extracted from the scanned coefficient sequence so as to form syntax elements that can be used for entropy coding.
[0094] The encoder symbolically represents the control information related to prediction in each reachable reference coding unit. The control information includes whether the coding unit is further divided, whether intra-frame prediction or inter-frame prediction is used, the corresponding reference frame identifier index if inter-frame prediction is used, motion vector difference, reference list selection information, and other parameters related to prediction and reconstruction. After these information are uniformly converted into discrete syntax elements, they are combined with the syntax elements related to the residual coefficients in a preset syntax order to form the entropy-determining coding symbol sequence of the current coding unit.
[0095] The encoding end performs probabilistic modeling and codeword allocation on the sequence of symbols to be encoded according to entropy coding rules. Specifically, for different types of syntax elements, the corresponding context model or probability model is invoked. The context model is used to adaptively estimate the occurrence probability of the syntax element based on the local prediction state and neighborhood statistical characteristics of the coding unit, realizing an entropy coding process that matches the current encoding content. The encoding probability of the syntax element is determined based on its statistical characteristics in the current encoding environment. Then, according to the principle that high-probability symbols correspond to short codewords and low-probability symbols correspond to long codewords, each syntax element is converted into a compressed binary bit representation. This achieves efficient compression of prediction mode information, reference frame index information, motion information, and residual coefficient information.
[0096] The encoding end sequentially concatenates the bit strings obtained by entropy encoding the same reachable reference coding unit to generate the local coded bit stream corresponding to the reachable reference coding unit. For all reachable reference coding units in the current coded image, the encoding end performs the above operations in sequence according to the preset encoding scanning order, and concatenates each local coded bit stream to form the main body of the coded bit stream corresponding to the main content of the current coded image.
[0097] After the entropy coding process is completed, the encoding end performs an integrity check on the generated encoded bitstream body to confirm that the syntax elements corresponding to each coding unit have been encoded and that the correspondence between the reference frame identifier, prediction mode and residual data has not been misaligned. After confirming that there are no errors, the encoded bitstream body is output to the subsequent bitstream encapsulation module as the input basis for bitstream encapsulation.
[0098] S312, the steps for performing bitstream encapsulation on the encoded result are as follows:
[0099] The encoding end receives the main body of the encoded bitstream output by the entropy encoding module and establishes a corresponding encapsulation unit for the current encoded image. The encapsulation unit is used to carry the structural information and content data required by the current encoded image during transmission and decoding. When establishing the encapsulation unit, the encoding end first writes the basic identification information of the current encoded image. The basic identification information includes at least the frame number of the current encoded image, the image type, the encoding order identifier, and a start marker used to distinguish the position of the current image in the bitstream.
[0100] The encoding end writes reference information related to the current encoded image into the encapsulation unit. The reference information includes at least the reference frame identifier corresponding to the current encoded image, the description information of the actual reference relationship, and the necessary prompt information for the receiving end to recover the prediction relationship. By writing this reference information, the receiving end can identify the reference basis on which the current image depends during decoding after receiving the bitstream, and maintain the consistency between the decoding-side reference relationship and the encoding-side reference relationship.
[0101] The encoding end writes the main body of the encoded bitstream formed by the aforementioned entropy encoding into the main load area of the encapsulation unit, making it the core data content of the current encoded image. During the writing process, the encoding end can perform boundary alignment, byte padding, or segmentation on the main load according to the preset bitstream format to ensure that the encapsulated data structure meets the parsing requirements of the standard decoder or transmission module.
[0102] The encoding end supplements necessary auxiliary control information into the encapsulation unit. This auxiliary control information includes data length information, fragmentation start and end information, check information, priority information, and a structure identifier indicating whether the current encapsulation unit can be independently parsed. If the current transmission status indicates that the link carrying capacity is weak, the encoding end can also fragment the bitstream corresponding to the currently encoded image at this stage, splitting the encoded data of an image into multiple smaller data segments to reduce the data load of a single transmission and improve the transmission adaptability under unstable link conditions.
[0103] The encoding end, following preset video stream organization rules, sequentially concatenates the encapsulation unit corresponding to the currently encoded image with the encapsulation units of adjacent images to form a continuous encoded output stream. During the concatenation process, the encoding end maintains the sequential consistency between each encapsulation unit, enabling the receiving end to reconstruct the entire video stream in order based on the frame sequence number and structure identifier. The encoding end submits the encapsulated continuous encoded output stream to the transmitting module, which then executes the corresponding transmission schedule based on the current transmission status. This completes the entire generation process from the reachable reference encoding unit to the final encoded output stream.
[0104] S32, after completing the encoding output of the current encoded image, records the reference relationships that actually occurred during the encoding process, without relying on preset or theoretically predicted structures, to provide a reliable basis for the subsequent update of the reachable boundary of the reference, so that the boundary update is based on the actual encoding dependency relationship.
[0105] Specifically, while completing the encoding output, the encoding end records the inter-frame reference relationships actually used by each encoding unit during the encoding process, and generates an actual reference relationship record table corresponding to the current encoded image.
[0106] The frame number of the currently encoded image is Then its actual reference relationship record table can be represented as:
[0107] ;in, Indicates frame number is The actual reference relationship record table corresponding to the image, Represents coding unit The set of reference frame identifiers used in the actual encoding process.
[0108] Further, for each reference frame identifier All satisfy: ;in, This represents the mapping function from reference frame identifier to frame sequence number. This indicates the reference reachable boundary for the current encoding period.
[0109] The actual reference relationship record table mainly includes the following:
[0110] The frame number of the currently encoded image;
[0111] Encoding unit identifier;
[0112] The set of actual reference frame identifiers corresponding to each coding unit;
[0113] The frame number corresponding to the reference frame is used for quick subsequent judgment.
[0114] Assuming the current encoded image frame number is 20, its actual reference relationship record table is as follows:
[0115] Table 2. Examples of Actual Reference Relationship Records
[0116] Current frame number Encoding unit Actual reference frame identifier set Corresponding frame sequence number set 20 U1 {R0, R1} {10, 12} 20 U2 {R1} {12} 20 U3 {R0, R2} {10, 15} 20 U4 {R2} {15}
[0117] In Table 2:
[0118] The current frame is frame 20;
[0119] Different coding units used different reference frames;
[0120] All reference frames are located within the reference reachable boundary, for example, boundary 15;
[0121] Therefore, all predictive dependencies for this frame are safe and reachable.
[0122] S33, In the next encoding period, the encoding end obtains new transmission status feedback information and parses the receiver's confirmation of reception status for the current encoded image from it.
[0123] The set of frame sequence numbers that the receiving end confirms as successfully received is: ;in, This represents the set of sequence numbers of frames that have been confirmed as received. This indicates the sequence number of the image frame that has been confirmed as received.
[0124] When the condition is met When the time is right, it means that the currently encoded image has been successfully received by the receiver, and it is then included in the historical image range update. ;in, This indicates the range of historical images that can be stably obtained. This indicates an update operation, which reassigns the updated set to... , This represents a set union operation, used to add the current frame number to the existing set.
[0125] The reference reachability boundary is then updated as follows: ;in, This represents the operation of finding the maximum value in the set. This represents the updated reference reachability boundary; through this update mechanism, the reference reachability boundary is progressively advanced along the time series.
[0126] S34. During the above update process, the encoding end can also verify the validity of the boundary update by combining the actual reference relationship record table, that is, ensure that the current encoded image is allowed to participate in the boundary advancement only when all the reference frames it depends on are in a stable and reachable state.
[0127] This constraint can be expressed as:
[0128] ;
[0129] in, This represents the actual reference relationship record table corresponding to the current encoded image, whose elements are combinations of coding units and their actual reference frame sets. Represents coding unit The set of reference frame identifiers used in the actual encoding process. Represents a set Any reference frame identifier in the [frame name].
[0130] This formula means that for each coding unit in the actual reference relationship record table of the current coded image, and for each reference frame actually used by the coding unit, the corresponding frame number does not exceed the current reference reachable boundary.
[0131] This invention encompasses any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of this invention. To provide the public with a thorough understanding of this invention, specific details are described in detail in the following preferred embodiments; however, those skilled in the art will fully understand the invention even without these details. Furthermore, to avoid unnecessary misunderstanding of the essence of this invention, well-known methods, processes, procedures, components, and circuits are not described in detail.
[0132] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A high-definition video stream adaptive coding method based on transmission state awareness, characterized in that, Includes the following steps: S1. Based on the transmission status feedback information corresponding to the current video stream, determine the range of historical images that the receiving end can stably obtain within the current encoding period, and generate the corresponding reference reachable boundary. S2, based on the reference reachable boundary, constrain and reorganize the predicted reference relationship of the current image to be encoded, and generate a reachable reference coding unit consistent with the reference reachable boundary; S3, based on the reachable reference coding unit, complete the adaptive coding output of the current video stream, and write back the reference result corresponding to this coding output to the subsequent coding period to update the reference reachable boundary of the next coding period.
2. The adaptive coding method for high-definition video streams based on transmission state awareness according to claim 1, characterized in that, The transmission status feedback information is reported by the receiving end, and the transmission status feedback information includes at least the maximum consecutive sequence number of the image frames that have been successfully received, the current round-trip time, and the packet loss rate.
3. The adaptive coding method for high-definition video streams based on transmission state awareness according to claim 2, characterized in that, Based on the maximum consecutive sequence number and the retransmission tolerance window corresponding to the current round-trip delay, the ambiguous frame sequence number interval that is in the retransmission waiting state and has not been confirmed to have arrived is removed, and the set of image frame sequence numbers that have been stably cached by the receiver and can be immediately called by the decoder is defined as the stably obtainable historical image range; the end frame sequence number of the historical image range is determined as the reference reachable boundary, or the historical image range is mapped to the effective threshold boundary of the reference image list in the video coding standard as the reference reachable boundary.
4. The adaptive coding method for high-definition video streams based on transmission state awareness according to claim 1, characterized in that, S2 includes parsing the preset initial prediction structure of the current image to be encoded and obtaining a list of candidate reference frame identifiers contained in the preset initial prediction structure.
5. The adaptive coding method for high-definition video streams based on transmission state awareness according to claim 4, characterized in that, The candidate reference frame identifier list is used to compare with the reference reachability boundary. Candidate reference frames whose frame numbers exceed the reference reachability boundary are marked as invalid reference frames and removed from the available reference frame set. Only candidate reference frames whose frame numbers are within the reference reachability boundary are retained as valid reference frames.
6. The adaptive coding method for high-definition video streams based on transmission state awareness according to claim 5, characterized in that, The effective reference frame is used to re-determine the coding tree unit or macroblock-level prediction mode of the current image to be encoded, and generate an inter-frame prediction reference relationship that is only associated with the coding unit of the effective reference frame, with the coding unit serving as the reachable reference coding unit.
7. The adaptive coding method for high-definition video streams based on transmission state awareness according to claim 4, characterized in that, The preset initial prediction structure is a reference prediction framework pre-established by the encoder based on the hierarchical position of the current image to be encoded in the encoding sequence, the default reference image organization rules, and the initial prediction configuration of the encoding unit. The reference prediction framework is used to characterize the range of historical reference frames that the current image to be encoded is theoretically allowed to use before the reference reachable boundary constraint is applied, and the corresponding inter-frame prediction relationship.
8. The adaptive coding method for high-definition video streams based on transmission state awareness according to claim 1, characterized in that, After the reachable reference coding unit receives input S3, it performs entropy coding and code stream encapsulation to generate and send an encoded output code stream adapted to the current transmission state.
9. The adaptive coding method for high-definition video streams based on transmission state awareness according to claim 8, characterized in that, Record the inter-frame reference frame identifier actually used by the reachable reference coding unit during the coding process, and generate an actual reference relationship record table corresponding to the current coded image.
10. The adaptive coding method for high-definition video streams based on transmission state awareness according to claim 9, characterized in that, The actual reference relationship record table is used for joint comparison with the transmission status feedback of the next coding period. If the receiving end detects an acknowledgment signal for the current coded image, the frame number of the current coded image is included in the update calculation of the historical image range of the next coding period, and the reference reachable boundary is pushed towards the current coded image.
