Video transmission method, apparatus, device, and medium

CN117676239BActive Publication Date: 2026-07-07ZHEJIANG UNIVIEW TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIVIEW TECH CO LTD
Filing Date
2022-08-30
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing technologies cannot effectively save network bandwidth and storage space while ensuring video quality.

Method used

By adjusting the keyframe interval, the similarity between the current keyframe and the local keyframe is determined, and the target frame for transmission is selected based on the similarity threshold. The local keyframe and the keyframe interval are then updated to reduce the number of keyframes.

Benefits of technology

While ensuring video quality, bandwidth and storage space are saved, and video transmission efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117676239B_ABST
    Figure CN117676239B_ABST
Patent Text Reader

Abstract

Embodiments of the application disclose a video transmission method, device, equipment and medium. The method comprises: determining a current key frame in a current key frame position of a to-be-transmitted video according to a preset key frame interval, and determining the similarity of the current key frame and a local key frame; determining a target frame transmitted to a decoding end at the current key frame position according to a comparison result of the similarity and a similarity threshold value; wherein the similarity threshold value is determined according to a target key frame proportion; updating the local key frame according to the comparison result, and updating the preset key frame interval, so as to determine a subsequent key frame position of the to-be-transmitted video according to the updated preset key frame interval. The technical scheme can reduce the number of transmitted key frames by adjusting the key frame interval under the premise of ensuring the quality of video pictures, thereby saving bandwidth and storage space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more particularly to a video transmission method, apparatus, device, and medium. Background Technology

[0002] With societal development, people have increasingly higher demands for daily safety, leading to a greater need for various surveillance equipment and higher standards for the clarity of these devices. These factors result in surveillance video transmission requiring higher bandwidth and larger storage space. Therefore, how to conserve network bandwidth while ensuring video quality and reducing storage space is one of the most pressing issues to be addressed in video transmission.

[0003] In related technologies, video segmentation is used to obtain video encoding features to adjust bitrate parameters, thereby reducing network bandwidth and storage space. However, this approach cannot guarantee video quality; low bitrates lead to reduced video quality, making it difficult to meet the demands for video clarity in practical applications. Summary of the Invention

[0004] This invention provides a video transmission method, apparatus, device, and medium that can reduce the number of keyframes transmitted by adjusting the keyframe interval while ensuring video quality, thereby saving bandwidth and storage space.

[0005] According to one aspect of the present invention, a video transmission method is provided, the method being executed by an encoding end, comprising:

[0006] The current keyframe in the video to be transmitted is determined according to the preset keyframe interval, and the similarity between the current keyframe and the local keyframe is determined.

[0007] The target frame to be transmitted to the decoding end at the current keyframe position is determined based on the comparison result between the similarity and the similarity threshold; wherein, the similarity threshold is determined based on the proportion of the target keyframe.

[0008] The local keyframes are updated based on the comparison results, and the preset keyframe interval is updated, so as to determine the subsequent keyframe positions of the video to be transmitted based on the updated preset keyframe interval.

[0009] Optionally, the similarity threshold includes a first similarity threshold and a second similarity threshold, wherein the first similarity threshold is less than the second similarity threshold;

[0010] Accordingly, determining the target frame to be transmitted to the decoding end at the current keyframe position based on the comparison result of the similarity and the similarity threshold includes:

[0011] If the similarity is less than the first similarity threshold, then the current keyframe is determined to be the target frame;

[0012] If the similarity is greater than or equal to the first similarity threshold and less than the second similarity threshold, then a forward reference frame is determined as the target frame based on the local keyframe, and a first identifier is added to the target frame;

[0013] If the similarity is greater than or equal to the second similarity threshold, then the forward reference frame is determined as the target frame based on the local keyframe, and a second identifier is added to the target frame.

[0014] Optionally, updating the local keyframe and the preset keyframe interval based on the comparison result includes:

[0015] If the similarity is less than the first similarity threshold, the local keyframe is updated to the current keyframe, and the preset keyframe interval remains unchanged.

[0016] If the similarity is greater than or equal to the first similarity threshold and less than the second similarity threshold, then the local keyframe is updated to the current keyframe, and the preset keyframe interval is extended based on the preset postponement interval;

[0017] If the similarity is greater than or equal to the second similarity threshold, the preset keyframe interval is extended based on the preset postponement interval, while the local keyframe remains unchanged.

[0018] Optionally, the process for determining the similarity threshold is as follows:

[0019] The sample video is encoded and transmitted according to the initial similarity threshold, and the similarity between the current keyframe in the encoding end and the local keyframe in the encoding end is determined as the encoding end similarity.

[0020] The similarity between the restored frame of the target frame in the decoding end and the local keyframe in the decoding end is determined as the decoding end similarity.

[0021] The similarity threshold is updated based on the similarity difference between the encoding end similarity and the decoding end similarity, and the similarity threshold is also updated based on the comparison result of the proportion of sample keyframes and the proportion of target keyframes in the sample video received by the decoding end.

[0022] Other sample videos are encoded and transmitted based on the updated similarity threshold. The similarity threshold is then updated based on the encoding and transmission results until the proportion of sample keyframes received by the decoding end meets the target keyframe proportion condition.

[0023] Optionally, after updating the local keyframe based on the comparison result and updating the preset keyframe interval, the method further includes:

[0024] Determine the similarity between the encoding end and the decoding end;

[0025] If the difference between the similarity between the encoding end and the decoding end is less than a preset condition, then the preset postponement interval is increased.

[0026] Otherwise, reduce the preset postponement interval.

[0027] According to another aspect of the present invention, a video transmission method is provided, the method being executed by a decoding end, comprising:

[0028] If the received target frame is a keyframe, then the keyframe is updated to a local keyframe at the decoding end;

[0029] If the received target frame is a forward reference frame carrying a first identifier, then the restored frame is determined based on the forward reference frame and the local key frame at the decoding end, and the restored frame is updated to the local key frame at the decoding end.

[0030] If the received target frame is a forward reference frame carrying a second identifier, the restored frame is determined based on the forward reference frame and the local key frame at the decoding end.

[0031] According to another aspect of the present invention, a video transmission apparatus is provided, the apparatus being configured at an encoding end, comprising:

[0032] The current keyframe determination module is used to determine the current keyframe in the video to be transmitted, which is located at the current keyframe position, according to a preset keyframe interval, and to determine the similarity between the current keyframe and the local keyframe.

[0033] The target frame determination module is used to determine the target frame to be transmitted to the decoding end at the current key frame position based on the comparison result of the similarity and the similarity threshold; wherein, the similarity threshold is determined based on the proportion of the target key frame;

[0034] An update module is used to update the local keyframes based on the comparison results and to update the preset keyframe interval, so as to determine the subsequent keyframe positions of the video to be transmitted based on the updated preset keyframe interval.

[0035] According to another aspect of the present invention, a video transmission apparatus is provided, the apparatus being configured at a decoding end, comprising:

[0036] The first decoding end local keyframe determination module is used to update the keyframe to a local keyframe of the decoding end if the received target frame is a keyframe.

[0037] The second decoding end local keyframe determination module is used to determine the restored frame based on the forward reference frame and the decoding end local keyframe if the received target frame is a forward reference frame carrying a first identifier, and update the restored frame to the decoding end local keyframe.

[0038] The frame restoration determination module is used to determine the restored frame based on the forward reference frame and the local key frame of the decoding end if the received target frame is a forward reference frame carrying a second identifier.

[0039] According to another aspect of the present invention, a video transmission electronic device is provided, the electronic device comprising:

[0040] At least one processor; and

[0041] A memory communicatively connected to the at least one processor; wherein,

[0042] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the video transmission method according to any embodiment of the present invention.

[0043] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the video transmission method according to any embodiment of the present invention.

[0044] The technical solution of this invention determines the current keyframe in the video to be transmitted, which is at the current keyframe position, according to a preset keyframe interval, and determines the similarity between the current keyframe and local keyframes; determines the target frame to be transmitted to the decoding end at the current keyframe position based on the comparison result of the similarity and a similarity threshold; wherein, the similarity threshold is determined based on the proportion of the target keyframe; updates the local keyframes and the preset keyframe interval based on the comparison result, so as to determine the subsequent keyframe positions of the video to be transmitted based on the updated preset keyframe interval. This technical solution can reduce the number of keyframes transmitted by adjusting the keyframe interval while ensuring video picture quality, thus saving bandwidth and storage space.

[0045] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 This is a flowchart of a video transmission method provided according to Embodiment 1 of the present invention;

[0048] Figure 2 This is a flowchart of a video transmission method provided according to Embodiment 2 of the present invention;

[0049] Figure 3 This is a flowchart of a video transmission method provided according to Embodiment 3 of the present invention;

[0050] Figure 4 This is a schematic diagram of the structure of a video transmission device according to Embodiment 4 of the present invention;

[0051] Figure 5 This is a schematic diagram of the structure of a video transmission device according to Embodiment 5 of the present invention;

[0052] Figure 6 This is a schematic diagram of the structure of an electronic device that implements a video transmission method according to an embodiment of the present invention. Detailed Implementation

[0053] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0054] It should be noted that the terms "first," "second," "target," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0055] Example 1

[0056] Figure 1 This is a flowchart of a video transmission method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where video is transmitted from an encoding end. The method can be executed by a video transmission device configured at the encoding end. This video transmission device can be implemented in hardware and / or software, and can be configured in an electronic device with data processing capabilities. Figure 1 As shown, the method includes:

[0057] S110, determine the current key frame in the video to be transmitted that is at the current key frame position according to the preset key frame interval, and determine the similarity between the current key frame and the local key frame.

[0058] Here, a keyframe can refer to an image frame containing all crucial information. A preset keyframe interval can refer to a pre-defined interval between adjacent keyframes. Video to be transmitted can refer to video waiting to be transmitted. The current keyframe position can refer to the current keyframe location. The current keyframe can refer to the current key image frame. Local keyframes can refer to key image frames stored locally at the encoding end.

[0059] In this embodiment, preset keyframe positions in the video to be transmitted can be determined according to preset keyframe intervals, and the current keyframe at the current keyframe position can be determined. For example, firstly, each keyframe position in the video to be transmitted is determined according to a preset keyframe interval N, i.e., every Nth frame is a keyframe position. Then, the current keyframe position can be determined from each keyframe position, and the keyframe to be transmitted at the current keyframe position is the current keyframe. Then, the similarity between the current keyframe and the local keyframe is determined. Specifically, when the current keyframe at the current keyframe position in the video to be transmitted is about to be transmitted, the encoding end obtains the local keyframe. If the local keyframe does not exist, it indicates that the current keyframe is the first frame of the video to be transmitted. At this time, the current keyframe is directly sent to the decoding end, and the current keyframe is stored locally at the encoding end as a local keyframe. If the local keyframe exists, a similarity comparison method is used to determine the similarity between the current keyframe and the local keyframe. It should be noted that this embodiment does not limit the similarity comparison method in any way, and it can be flexibly set according to actual applications. For example, similarity can be determined based on methods such as structural similarity metrics, cosine similarity, histograms, or mutual information.

[0060] S120, determine the target frame to be transmitted to the decoding end at the current key frame position based on the comparison result of similarity and similarity threshold; wherein, the similarity threshold is determined according to the proportion of the target key frame.

[0061] In this context, the target frame refers to the image frame actually transmitted to the decoding end at the current keyframe position. Specifically, the target frame can be a keyframe or a forward reference frame. A forward reference frame can be an image frame that only contains the difference information between the current keyframe and the previous keyframe. The previous keyframe can be the adjacent keyframe preceding the current keyframe. It's understandable that since keyframes contain all key information, while forward reference frames only contain the difference information between the current keyframe and the previous keyframe, the storage space and transmission bandwidth required by forward reference frames will be less than those of keyframes. The similarity threshold can be a pre-set similarity reference value. Specifically, the similarity threshold can be determined based on the target keyframe ratio. The target keyframe ratio can be the ratio of the number of keyframes planned to be transmitted in the video to the total number of transmitted frames. For example, assuming the video to be transmitted contains 10 images, and the target keyframe ratio is 60%, it indicates that 6 keyframes are planned to be transmitted, along with 4 forward reference frames. Knowing the target keyframe ratio, the number of keyframes and forward reference frames in the video to be transmitted can be determined, thus allowing the similarity threshold to be established. The percentage of target keyframes can be determined based on actual needs.

[0062] In this embodiment, after determining the similarity between the current keyframe and the local keyframe, the target frame to be transmitted to the decoding end can be determined based on the comparison result of the similarity and a similarity threshold. For example, if the similarity is less than or equal to the similarity threshold, it indicates that the similarity between the current keyframe and the local keyframe is low. In this case, to ensure the picture quality of the video to be transmitted, the current keyframe can be determined as the target frame. If the similarity between the current keyframe and the local keyframe is greater than the similarity threshold, it indicates that the similarity is high. In this case, to save transmission bandwidth and storage space, the forward reference frame can be determined as the target frame. The forward reference frame can be determined based on the difference between the current keyframe and the local keyframe.

[0063] S130, update the local keyframes and the preset keyframe interval based on the comparison results, so as to determine the subsequent keyframe positions of the video to be transmitted based on the updated preset keyframe interval.

[0064] In this embodiment, subsequent keyframe positions refer to keyframe positions located after the current keyframe position. After the target frame is transmitted to the decoding end from the current keyframe position, the local keyframe can be updated based on the comparison result of the similarity between the current keyframe and the local keyframe and the similarity threshold, and the preset keyframe interval can also be updated. This allows the subsequent keyframe positions of the video to be transmitted to be determined based on the updated preset keyframe interval. For example, if the similarity is less than or equal to the similarity threshold, it indicates a low similarity. In this case, to ensure the picture quality of the video to be transmitted, the current keyframe can still be sent according to the preset keyframe interval to prevent delays or screen tearing caused by sudden changes in the picture. Simultaneously, the current keyframe is used as a local keyframe to update the local keyframe. If the similarity is greater than the similarity threshold, it indicates a high similarity. In this case, to save transmission bandwidth and storage space, the preset keyframe interval can be increased, and forward reference frames can be sent according to the increased keyframe interval. Simultaneously, the previously stored local keyframe can be retained.

[0065] The technical solution of this invention determines the current keyframe in the video to be transmitted, which is at the current keyframe position, according to a preset keyframe interval, and determines the similarity between the current keyframe and local keyframes; determines the target frame to be transmitted to the decoding end at the current keyframe position based on the comparison result of the similarity and a similarity threshold; wherein, the similarity threshold is determined based on the proportion of the target keyframe; updates the local keyframes and the preset keyframe interval based on the comparison result, so as to determine the subsequent keyframe positions of the video to be transmitted based on the updated preset keyframe interval. This technical solution can reduce the number of keyframes transmitted by adjusting the keyframe interval while ensuring video picture quality, thus saving bandwidth and storage space.

[0066] Example 2

[0067] Figure 2 This is a flowchart of a video transmission method provided in Embodiment 2 of the present invention. This embodiment is based on the above embodiment and optimized. Specifically, the optimization is as follows: the similarity threshold includes a first similarity threshold and a second similarity threshold, wherein the first similarity threshold is less than the second similarity threshold; correspondingly, the target frame to be transmitted to the decoding end at the current keyframe is determined according to the comparison result of the similarity between the current keyframe and the local keyframe and the similarity threshold, including: if the similarity is less than the first similarity threshold, then the current keyframe is determined as the target frame; if the similarity is greater than or equal to the first similarity threshold and less than the second similarity threshold, then a forward reference frame is determined as the target frame according to the local keyframe, and a first identifier is added to the target frame; if the similarity is greater than or equal to the second similarity threshold, then a forward reference frame is determined as the target frame according to the local keyframe, and a second identifier is added to the target frame.

[0068] like Figure 2As shown, the method in this embodiment specifically includes the following steps:

[0069] S210, determine the current key frame in the video to be transmitted that is at the current key frame position according to the preset key frame interval, and determine the similarity between the current key frame and the local key frame.

[0070] S220, if the similarity is less than the first similarity threshold, then the current keyframe is determined to be the target frame.

[0071] The first similarity threshold serves as the basis for determining whether to send a forward reference frame to the decoding end. Specifically, if the similarity is less than the first similarity threshold, no forward reference frame is sent to the decoding end; if the similarity is greater than or equal to the first similarity threshold, a forward reference frame is sent to the decoding end. In this embodiment, if the similarity is less than the first similarity threshold, it indicates a low similarity. In this case, to ensure the image quality of the video to be transmitted, the current keyframe can be directly determined as the target frame.

[0072] S230, if the similarity is greater than or equal to the first similarity threshold and less than the second similarity threshold, then the forward reference frame is determined as the target frame based on the local keyframe, and a first identifier is added to the target frame; wherein, the first similarity threshold is less than the second similarity threshold; the first similarity threshold and the second similarity threshold are determined based on the proportion of the target keyframe.

[0073] The second similarity threshold serves as the basis for determining whether a local keyframe needs to be updated. Specifically, if the similarity is less than the second similarity threshold, the local keyframe needs to be updated; if the similarity is greater than or equal to the second similarity threshold, the local keyframe does not need to be updated. The second similarity threshold is greater than the first similarity threshold, and the first and second similarity thresholds can be determined based on the proportion of the target keyframe. The first identifier can be used to indicate that a local keyframe update is required.

[0074] In this embodiment, if the similarity is greater than or equal to the first similarity threshold and less than the second similarity threshold, it indicates that there is a certain degree of similarity. At this time, the forward reference frame can be determined based on the difference between the current keyframe and the local keyframe, and the forward reference frame is used as the target frame. At the same time, the encoding end adds a first identifier to the target frame, and the encoding end needs to update the local keyframe so that the next target frame can be determined based on the updated local keyframe.

[0075] S240, if the similarity is greater than or equal to the second similarity threshold, then determine the forward reference frame as the target frame based on the local keyframe, and add a second identifier to the target frame.

[0076] The second identifier can be used to indicate that no update to the local keyframe is required. In this embodiment, if the similarity is greater than or equal to the second similarity threshold, it indicates that the similarity is high. In this case, in order to reduce transmission bandwidth and storage space, the forward reference frame determined by the difference between the current keyframe and the local keyframe can be used as the target frame, and the encoding end adds the second identifier to the target frame. At this time, the encoding end does not need to update the local keyframe, that is, the next target frame is still determined based on the previously saved local keyframe.

[0077] S250, update the local keyframes and the preset keyframe interval based on the comparison result of similarity and similarity threshold, so as to determine the subsequent keyframe positions of the video to be transmitted based on the updated preset keyframe interval; wherein, the similarity threshold includes a first similarity threshold and a second similarity threshold.

[0078] In this embodiment, after determining the keyframe, the local keyframe can be updated based on the comparison result of the similarity between the current keyframe and the local keyframe and a first similarity threshold and a second similarity threshold, and the preset keyframe interval can be updated to determine the subsequent keyframe positions of the video to be transmitted based on the updated preset keyframe interval. Optionally, updating the local keyframe and updating the preset keyframe interval based on the comparison result includes: if the similarity is less than the first similarity threshold, the local keyframe is updated to the current keyframe, and the preset keyframe interval remains unchanged; if the similarity is greater than or equal to the first similarity threshold and less than the second similarity threshold, the local keyframe is updated to the current keyframe, and the preset keyframe interval is extended based on a preset postponement interval; if the similarity is greater than or equal to the second similarity threshold, the preset keyframe interval is extended based on the preset postponement interval, and the local keyframe remains unchanged.

[0079] The preset delay interval can refer to the delay interval of a pre-set preset keyframe interval. For example, suppose the preset keyframe interval is N and the preset delay interval is ΔN. In this embodiment, if the similarity is less than the first similarity threshold, it indicates a low similarity. In this case, to ensure the image quality of the video to be transmitted, the local keyframe can be updated to the current keyframe, and the preset keyframe interval remains unchanged at N. If the similarity is greater than or equal to the first similarity threshold and less than the second similarity threshold, it indicates a certain degree of similarity. In this case, the local keyframe can be updated to the current keyframe, and the preset keyframe interval is extended to N+ΔN. If the similarity is greater than or equal to the second similarity threshold, it indicates a high similarity. In this case, to reduce transmission bandwidth and storage space, the preset keyframe interval can be extended to N+ΔN, and the local keyframe remains unchanged.

[0080] This solution, through such a setting, can update local keyframes and preset keyframe intervals in an appropriate manner according to different comparison results of similarity and similarity threshold, thereby improving the adaptability of video transmission methods to different application scenarios.

[0081] The technical solution of this invention determines the current keyframe as the target frame if the similarity is less than a first similarity threshold; if the similarity is greater than or equal to the first similarity threshold and less than a second similarity threshold, a forward reference frame is determined as the target frame based on the local keyframe, and a first identifier is added to the target frame; if the similarity is greater than or equal to the second similarity threshold, a forward reference frame is determined as the target frame based on the local keyframe, and a second identifier is added to the target frame. This technical solution can determine the target frame in different ways based on the comparison results of the similarity with the first and second similarity thresholds, so that the local keyframe and the preset keyframe interval can be updated subsequently based on the target frame. While ensuring video quality and saving bandwidth and storage space, it can further improve the adaptability of the video transmission method to different application scenarios.

[0082] In this embodiment, optionally, the process for determining the similarity threshold is as follows: The sample video is encoded and transmitted according to the initial similarity threshold; the similarity between the current keyframe in the encoding end and the local keyframe in the encoding end is determined as the encoding end similarity; the similarity between the restored frame of the target frame in the decoding end and the local keyframe in the decoding end is determined as the decoding end similarity; the similarity threshold is updated based on the similarity difference between the encoding end similarity and the decoding end similarity, and the similarity threshold is updated based on the comparison result between the proportion of sample keyframes and the proportion of target keyframes in the sample video received by the decoding end; other sample videos are encoded and transmitted based on the updated similarity threshold, and the similarity threshold is updated based on the encoding and transmission results, until the proportion of sample keyframes received by the decoding end meets the target keyframe proportion condition.

[0083] The initial similarity threshold can refer to the initial value of the similarity threshold. Specifically, the initial similarity threshold can include a first initial similarity threshold and a second initial similarity threshold. For example, the first initial similarity threshold can be set to 60, and the second initial similarity threshold can be set to 90. The sample video can refer to the video selected as the training sample. Encoding-end similarity can refer to the similarity between the current keyframe and local keyframes in the encoding end. Decoding-end similarity can refer to the similarity between the restored frame of the target frame in the decoding end and the local keyframes in the decoding end. The sample keyframe ratio can refer to the ratio of the number of keyframes in the sample video to the total number of transmitted frames. The target keyframe ratio condition can be used as the basis for ending the similarity threshold training; the target keyframe ratio condition can be determined according to actual needs and is not limited here. Specifically, if the proportion of keyframes in the sample meets the target keyframe proportion condition, the training process for the similarity threshold ends; if the proportion of keyframes in the sample does not meet the target keyframe proportion condition, the training process for the similarity threshold continues until the target keyframe proportion condition is met.

[0084] In this embodiment, the sample video is first encoded and transmitted according to an initial similarity threshold. The similarity between the current keyframe and the local keyframe in the encoding end is determined as the encoding end similarity. Then, the similarity between the restored frame of the target frame in the decoding end and the local keyframe in the decoding end is determined as the decoding end similarity. Specifically, if the target frame received by the decoding end is a keyframe, the similarity between the current keyframe and the local keyframe in the decoding end is determined as the decoding end similarity; if the target frame received by the decoding end is a forward reference frame, the similarity between the restored frame of the forward reference frame and the local keyframe in the decoding end is determined as the decoding end similarity. It should be noted that this embodiment does not limit the method of determining similarity in any way, and it can be set according to actual needs. For example, similarity can be determined based on structural similarity measurement, cosine similarity, histogram, or mutual information, etc.

[0085] After determining the similarity at the encoding and decoding ends, the similarity threshold can be updated based on the difference between the encoding and decoding similarities, and also based on the comparison between the proportion of sample keyframes and the proportion of target keyframes in the sample video received at the decoding end. Specifically, the maximum percentage of similarity difference can be pre-set as e, the similarity threshold update gradient as ε (e.g., ε = 0.01), and the proportion of target keyframes as r. Assume the encoding similarity is S. E And the similarity at the decoding end is S′ E First, calculate the results for all image frames in the sample video. And count the total number of image frames T in the sample video.N and the number of keyframes T I Then, for each image frame, it is checked whether the condition is met. If this condition is met, it indicates a significant difference in similarity between the encoding and decoding ends. In this case, the similarity threshold needs to be increased according to the update gradient ε. After all image frames have been evaluated, then... Calculate the percentage of keyframes in the sample, where N is the preset keyframe interval, and then set the percentage of keyframes in the sample. Compare with the target keyframe percentage r. If Then, the similarity threshold needs to be increased according to the update gradient ε, thus obtaining the updated similarity threshold. Subsequently, other sample videos can be encoded and transmitted based on the updated similarity threshold, and the similarity threshold can be updated according to the above similarity threshold update process based on the encoding and transmission results, until the proportion of keyframes received by the decoding end meets the target keyframe proportion condition. This allows us to determine the final similarity threshold.

[0086] This solution uses sample videos to train the similarity threshold, ensuring that the final similarity threshold meets the target keyframe ratio requirement, thus effectively guaranteeing the image quality of subsequent videos to be transmitted.

[0087] In this embodiment, optionally, after updating the local keyframes based on the comparison results of similarity and similarity threshold, and updating the preset keyframe interval, the method further includes: determining the encoding end similarity and the decoding end similarity; if the similarity difference between the encoding end similarity and the decoding end similarity is less than a preset condition, then increasing the preset postponement interval; otherwise, decreasing the preset postponement interval.

[0088] The preset condition can refer to a pre-defined similarity difference condition between the encoding end and the decoding end. In this embodiment, there may be a situation where the video frame content quality is misjudged due to network transmission problems. In this case, it may lead to errors in the transmission or restoration of keyframes, resulting in severe video delay, distortion, or screen tearing. Therefore, to avoid the above situation, an error correction mechanism can be introduced to correct the keyframe interval. Specifically, after updating the local keyframes and the preset keyframe interval based on the comparison results of similarity and similarity threshold, the encoding end similarity and decoding end similarity of the video to be transmitted are first determined. The method for determining the encoding end similarity and decoding end similarity can be found in the above process for determining the encoding end similarity and decoding end similarity of the sample video, and will not be repeated here. Assume the preset condition is a, and the encoding end similarity is S. E The similarity at the decoding end is S′ EHere, the preset condition 'a' can be the same as or different from the maximum percentage difference in similarity e; this is not limited here. If satisfied... If the difference between the similarity at the encoding end and the similarity at the decoding end is less than a preset condition, it indicates that the similarity difference between the encoding end and the decoding end is small, and the video transmission quality is good. In this case, the preset postponement interval can be increased to increase the keyframe interval. If this condition is not met... If the difference between the similarity at the encoding end and the similarity at the decoding end is greater than or equal to a preset condition, it indicates that the difference between the similarity at the encoding end and the similarity at the decoding end is large. At this time, the video transmission quality is poor. The preset postponement interval can be reduced or the preset postponement interval can be set to zero to reduce the keyframe interval and thus ensure the video quality.

[0089] This solution, through this setting, can determine whether there are unreasonable video frame settings based on the similarity between the encoding and decoding ends, and then correct unreasonable keyframe intervals, thereby ensuring video quality.

[0090] The technical solution of this embodiment can be executed by an encoding end, which can be deployed in an image acquisition device that acquires the video to be transmitted, such as a surveillance camera. The encoding end can encode the raw video acquired by the surveillance device and send the encoded video to a decoding end or a storage end. The decoding end decodes the video for real-time playback, and the storage end decodes and saves the video for playback.

[0091] The system incorporates a built-in keyframe reconstruction processing module on the storage side. This module determines and saves local keyframes based on the received encoded video, and also determines the decoding similarity of each keyframe bit. By integrating this module, the storage and decoding ends are essentially combined. When playing back the video from the storage side, there's no need to re-determine local keyframes and similarity; the video can be reconstructed and played back directly from the processed local keyframes, thus improving playback efficiency.

[0092] In this embodiment, optionally, the sample video includes sample videos under different network environments, and a similarity threshold corresponding to each network environment is determined respectively; accordingly, before determining the target frame to be transmitted to the decoding end based on the comparison result of similarity and similarity threshold, the method further includes: determining the network environment of the encoding end; and determining the corresponding similarity threshold based on the network environment.

[0093] Different network environments are used to characterize different network bandwidths and packet loss rates. Network bandwidth can be used to characterize video transmission speed; network packet loss rate can be used to characterize video transmission accuracy. It is understandable that video transmission speed and accuracy differ under different network environments. Therefore, to adapt to the video transmission requirements under different network environments, when determining the similarity threshold, a similarity threshold corresponding to each network environment can be determined for sample videos under different network environments. In this embodiment, before determining the target frame to be transmitted to the decoding end based on the comparison result of similarity and similarity threshold, the network environment of the encoding end can be determined first. Then, the similarity threshold of the sample video with the same network environment as the encoding end can be determined, and the similarity threshold of the sample video can be used as the similarity threshold of the video to be transmitted, thus adapting to the current network environment of the encoding end.

[0094] This scheme, through such a setting, can determine the corresponding similarity threshold according to the network environment of the encoding end, so as to adapt to the current network environment of the encoding end and improve the universality of the video transmission method.

[0095] Example 3

[0096] Figure 3 This is a flowchart of a video transmission method provided in Embodiment 3 of the present invention. This embodiment is applicable to situations where video is transmitted to a decoding end. The method can be executed by a video transmission device configured at the decoding end. This video transmission device can be implemented in hardware and / or software, and can be configured in an electronic device with data processing capabilities. Figure 3 As shown, the method includes:

[0097] S310, if the received target frame is a keyframe, then update the keyframe to the local keyframe at the decoding end.

[0098] In this context, a local keyframe at the decoding end can refer to a keyframe stored locally at the decoding end. In this embodiment, if the target frame received by the decoding end from the encoding end is a keyframe, the keyframe can be directly identified as a local keyframe at the decoding end and saved locally at the decoding end.

[0099] S320, if the received target frame is a forward reference frame carrying the first identifier, then the restored frame is determined based on the forward reference frame and the local key frame of the decoding end, and the restored frame is updated to the local key frame of the decoding end.

[0100] In this embodiment, the restored frame refers to the image frame after restoring the target frame. If the target frame received by the decoding end from the encoding end is a forward reference frame carrying a first identifier, it indicates that the local keyframe of the decoding end needs to be updated. At this time, the restored frame can be determined based on the superposition result of the forward reference frame and the local keyframe of the decoding end to restore the current keyframe. At the same time, the restored frame is determined as the local keyframe of the decoding end and saved to the local decoding end to realize the update of the local keyframe of the decoding end. The restored frame (i.e., the updated local keyframe of the decoding end) will serve as the basis for processing subsequent target frames.

[0101] S330, if the received target frame is a forward reference frame carrying a second identifier, then the restored frame is determined based on the forward reference frame and the local key frame at the decoding end.

[0102] In this embodiment, if the target frame received by the decoding end from the encoding end is a forward reference frame carrying a second identifier, it indicates that there is no need to update the local keyframe of the decoding end. At this time, it is only necessary to determine the restoration frame based on the sum of the forward reference frame and the local keyframe of the decoding end to restore the current keyframe, without updating the local keyframe of the decoding end. That is, the subsequent target frames are still processed based on the previously saved local keyframe of the decoding end.

[0103] The technical solution of this invention, if the received target frame is a keyframe, then the keyframe is determined as a local keyframe at the decoding end; if the received target frame is a forward reference frame carrying a first identifier, then a restored frame is determined based on the forward reference frame and the local keyframe at the decoding end, and the restored frame is determined as a local keyframe at the decoding end; if the received target frame is a forward reference frame carrying a second identifier, then a restored frame is determined based on the forward reference frame and the local keyframe at the decoding end. This technical solution can reduce the number of keyframes transmitted by adjusting the keyframe interval while ensuring video picture quality, thus saving bandwidth and storage space.

[0104] Example 4

[0105] Figure 4 This is a schematic diagram of a video transmission device according to Embodiment 4 of the present invention. The device is configured at the encoding end and can execute the video transmission methods provided in Embodiments 1 and 2 of the present invention, possessing the corresponding functional modules and beneficial effects for executing the methods. Figure 4 As shown, the device includes:

[0106] The current keyframe determination module 410 is used to determine the current keyframe in the video to be transmitted, which is located at the current keyframe position, according to a preset keyframe interval, and to determine the similarity between the current keyframe and the local keyframe.

[0107] The target frame determination module 420 is used to determine the target frame to be transmitted to the decoding end at the current key frame position based on the comparison result of the similarity and the similarity threshold; wherein, the similarity threshold is determined based on the proportion of the target key frame.

[0108] The update module 430 is used to update the local keyframes according to the comparison results and to update the preset keyframe interval, so as to determine the subsequent keyframe positions of the video to be transmitted according to the updated preset keyframe interval.

[0109] Optionally, the similarity threshold includes a first similarity threshold and a second similarity threshold, wherein the first similarity threshold is less than the second similarity threshold;

[0110] Accordingly, the target frame determination module 420 includes:

[0111] If the similarity is less than the first similarity threshold, then the current keyframe is determined to be the target frame;

[0112] If the similarity is greater than or equal to the first similarity threshold and less than the second similarity threshold, then a forward reference frame is determined as the target frame based on the local keyframe, and a first identifier is added to the target frame;

[0113] If the similarity is greater than or equal to the second similarity threshold, then the forward reference frame is determined as the target frame based on the local keyframe, and a second identifier is added to the target frame.

[0114] Optionally, the update module 430 is used for:

[0115] If the similarity is less than the first similarity threshold, the local keyframe is updated to the current keyframe, and the preset keyframe interval remains unchanged.

[0116] If the similarity is greater than or equal to the first similarity threshold and less than the second similarity threshold, then the local keyframe is updated to the current keyframe, and the preset keyframe interval is extended based on the preset postponement interval;

[0117] If the similarity is greater than or equal to the second similarity threshold, the preset keyframe interval is extended based on the preset postponement interval, while the local keyframe remains unchanged.

[0118] Optionally, the process for determining the similarity threshold is as follows:

[0119] The sample video is encoded and transmitted according to the initial similarity threshold, and the similarity between the current keyframe in the encoding end and the local keyframe in the encoding end is determined as the encoding end similarity.

[0120] The similarity between the restored frame of the target frame in the decoding end and the local keyframe in the decoding end is determined as the decoding end similarity.

[0121] The similarity threshold is updated based on the similarity difference between the encoding end similarity and the decoding end similarity, and the similarity threshold is also updated based on the comparison result of the proportion of sample keyframes and the proportion of target keyframes in the sample video received by the decoding end.

[0122] Other sample videos are encoded and transmitted based on the updated similarity threshold. The similarity threshold is then updated based on the encoding and transmission results until the proportion of sample keyframes received by the decoding end meets the target keyframe proportion condition.

[0123] Optionally, the device further includes:

[0124] A similarity determination module is used to determine the encoding end similarity and the decoding end similarity after updating the local keyframes and the preset keyframe interval based on the comparison results.

[0125] The preset postponement interval update module is used to increase the preset postponement interval if the similarity difference between the encoding end similarity and the decoding end similarity is less than a preset condition.

[0126] Otherwise, reduce the preset postponement interval.

[0127] The video transmission device provided in this embodiment of the invention can execute the video transmission method provided in Embodiments 1 and 2 of the invention, and has the corresponding functional modules and beneficial effects of executing the method.

[0128] Example 5

[0129] Figure 5 This is a schematic diagram of a video transmission device according to Embodiment 5 of the present invention. The device is configured at the decoding end and can execute the video transmission method provided in Embodiment 3 of the present invention, possessing the corresponding functional modules and beneficial effects of the method. For example... Figure 5 As shown, the device includes:

[0130] The first decoding end local keyframe determination module 510 is used to update the keyframe to a local keyframe if the received target frame is a keyframe.

[0131] The second decoding end local key frame determination module 520 is used to determine the restored frame based on the forward reference frame and the decoding end local key frame if the received target frame is a forward reference frame carrying a first identifier, and update the restored frame to the decoding end local key frame.

[0132] The frame restoration determination module 530 is used to determine the restored frame based on the forward reference frame and the local key frame of the decoding end if the received target frame is a forward reference frame carrying a second identifier.

[0133] The video transmission device provided in this embodiment of the invention can execute the video transmission method provided in Embodiment 3 of the invention, and has the corresponding functional modules and beneficial effects of executing the method.

[0134] Example 6

[0135] Figure 6 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0136] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0137] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0138] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as video transmission methods.

[0139] In some embodiments, the video transmission method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the video transmission method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the video transmission method by any other suitable means (e.g., by means of firmware).

[0140] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0141] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0142] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0143] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0144] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0145] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0146] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0147] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A video transmission method, characterized in that, Executed by the encoding end, including: The current keyframe in the video to be transmitted is determined according to the preset keyframe interval, and the similarity between the current keyframe and the local keyframe is determined. The target frame to be transmitted to the decoding end at the current keyframe position is determined based on the comparison result between the similarity and the similarity threshold; wherein, the similarity threshold is determined based on the proportion of the target keyframe. The local keyframe is updated based on the comparison result, and the preset keyframe interval is updated, so as to determine the subsequent keyframe position of the video to be transmitted based on the updated preset keyframe interval. The similarity threshold includes a first similarity threshold and a second similarity threshold, wherein the first similarity threshold is less than the second similarity threshold; Accordingly, determining the target frame to be transmitted to the decoding end at the current keyframe position based on the comparison result of the similarity and the similarity threshold includes: If the similarity is less than the first similarity threshold, then the current keyframe is determined to be the target frame; If the similarity is greater than or equal to the first similarity threshold and less than the second similarity threshold, then a forward reference frame is determined as the target frame based on the local keyframe, and a first identifier is added to the target frame; wherein, the forward reference frame refers to an image frame that only contains the difference information between the current keyframe and the previous keyframe, and the first identifier is used to indicate that the local keyframe needs to be updated; If the similarity is greater than or equal to the second similarity threshold, then a forward reference frame is determined as the target frame based on the local keyframe, and a second identifier is added to the target frame; wherein, the second identifier is used to indicate that the local keyframe does not need to be updated.

2. The method according to claim 1, characterized in that, Updating the local keyframe and the preset keyframe interval based on the comparison result includes: If the similarity is less than the first similarity threshold, the local keyframe is updated to the current keyframe, and the preset keyframe interval remains unchanged. If the similarity is greater than or equal to the first similarity threshold and less than the second similarity threshold, then the local keyframe is updated to the current keyframe, and the preset keyframe interval is extended based on the preset postponement interval; If the similarity is greater than or equal to the second similarity threshold, the preset keyframe interval is extended based on the preset postponement interval, while the local keyframe remains unchanged.

3. The method according to claim 2, characterized in that, The process for determining the similarity threshold is as follows: The sample video is encoded and transmitted according to the initial similarity threshold, and the similarity between the current keyframe in the encoding end and the local keyframe in the encoding end is determined as the encoding end similarity. The similarity between the restored frame of the target frame in the decoding end and the local keyframe in the decoding end is determined as the decoding end similarity. The similarity threshold is updated based on the similarity difference between the encoding end similarity and the decoding end similarity, and the similarity threshold is also updated based on the comparison result of the proportion of sample keyframes and the proportion of target keyframes in the sample video received by the decoding end. Other sample videos are encoded and transmitted based on the updated similarity threshold. The similarity threshold is then updated based on the encoding and transmission results until the proportion of sample keyframes received by the decoding end meets the target keyframe proportion condition.

4. The method according to claim 3, characterized in that, After updating the local keyframe based on the comparison result and updating the preset keyframe interval, the method further includes: Determine the similarity between the encoding end and the decoding end; If the difference between the similarity between the encoding end and the decoding end is less than a preset condition, then the preset postponement interval is increased. Otherwise, reduce the preset postponement interval.

5. A video transmission method, characterized in that, Executed by the decoding end, including: If the received target frame is a keyframe, then the keyframe is updated to a local keyframe at the decoding end; If the received target frame is a forward reference frame carrying a first identifier, then the restored frame is determined based on the forward reference frame and the local key frame at the decoding end, and the restored frame is updated to the local key frame at the decoding end; wherein, the forward reference frame refers to an image frame that only contains the difference information between the current key frame and the previous key frame, and the first identifier is used to indicate that the local key frame needs to be updated. If the received target frame is a forward reference frame carrying a second identifier, then the restored frame is determined based on the forward reference frame and the local key frame at the decoding end; wherein, the second identifier is used to indicate that the local key frame does not need to be updated.

6. A video transmission device, characterized in that, The device is configured at the encoding end and includes: The current keyframe determination module is used to determine the current keyframe in the video to be transmitted, which is located at the current keyframe position, according to a preset keyframe interval, and to determine the similarity between the current keyframe and the local keyframe. The target frame determination module is used to determine the target frame to be transmitted to the decoding end at the current key frame position based on the comparison result of the similarity and the similarity threshold; wherein, the similarity threshold is determined based on the proportion of the target key frame; An update module is used to update the local keyframes based on the comparison results and to update the preset keyframe interval, so as to determine the subsequent keyframe positions of the video to be transmitted based on the updated preset keyframe interval. The similarity threshold includes a first similarity threshold and a second similarity threshold, wherein the first similarity threshold is less than the second similarity threshold; Accordingly, the target frame determination module is used for: If the similarity is less than the first similarity threshold, then the current keyframe is determined to be the target frame; If the similarity is greater than or equal to the first similarity threshold and less than the second similarity threshold, then a forward reference frame is determined as the target frame based on the local keyframe, and a first identifier is added to the target frame; wherein, the forward reference frame refers to an image frame that only contains the difference information between the current keyframe and the previous keyframe, and the first identifier is used to indicate that the local keyframe needs to be updated; If the similarity is greater than or equal to the second similarity threshold, then a forward reference frame is determined as the target frame based on the local keyframe, and a second identifier is added to the target frame; wherein, the second identifier is used to indicate that the local keyframe does not need to be updated.

7. A video transmission device, characterized in that, The device is configured at the decoding end and includes: The first decoding end local keyframe determination module is used to update the keyframe to a local keyframe of the decoding end if the received target frame is a keyframe. The second decoding end local keyframe determination module is used to determine a restored frame based on the forward reference frame and the decoding end local keyframe if the received target frame is a forward reference frame carrying a first identifier, and update the restored frame to the decoding end local keyframe; wherein, the forward reference frame refers to an image frame that only contains the difference information between the current keyframe and the previous keyframe, and the first identifier is used to indicate that the local keyframe needs to be updated. The restored frame determination module is used to determine the restored frame based on the forward reference frame and the local key frame of the decoding end if the received target frame is a forward reference frame carrying a second identifier; wherein, the second identifier is used to indicate that the local key frame does not need to be updated.

8. A video transmission electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the video transmission method according to any one of claims 1-4 or 5.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the video transmission method according to any one of claims 1-4 or 5.