Semantic video coding and decoding method, security video system and storage medium

Through the layered coding technology of the semantic video encoding and decoding method, using target detection and quality of experience parameters, the problems of poor coding flexibility and low compression rate in the existing technology are solved, and more efficient video data transmission is achieved.

CN118803263AActive Publication Date: 2024-10-18CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1

Patent Information

Application Number
CN202410010515.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-02
Publication Date
2024-10-18
Estimated Expiration
2044-01-02

AI Technical Summary

Technical Problem

Existing semantic video coding and decoding methods have shortcomings in coding flexibility and compression rate improvement. In particular, they fail to effectively utilize the temporal redundancy information between video frames, resulting in poor coding flexibility and low compression rate.

Method used

Using the semantic video encoding and decoding method, through target detection on the original video data, the basic semantic layer, target enhancement layer and background layer are obtained, semantic key frames and background key frames are sent regularly, and ordinary semantic frames are generated according to the quality of experience parameters to achieve the goal and Hierarchical coding of background reduces temporal redundant information and improves compression rate.

Benefits of technology

It improves coding flexibility, facilitates adjustment according to the quality of experience, enhances compression rate, reduces the bandwidth occupied by the sender's upload, and achieves more efficient video data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118803263A_ABST
    Figure CN118803263A_ABST
Patent Text Reader

Abstract

The invention provides a semantic video coding and decoding method and system and a storage medium, and relates to the technical field of video coding and decoding, and the method comprises the steps: collecting original video data, carrying out the target detection, and obtaining a first basic semantic layer, a target enhancement layer and a background layer; generating a semantic key frame based on the original video frame and the first basic semantic layer every preset time value; obtaining a quality of experience parameter, and generating a common semantic frame based on the first basic semantic layer and the target enhancement layer; generating a background key frame according to the difference degree of the adjacent background layers; generating a semantic video stream according to the semantic key frame, the common semantic frame and the background key frame; and sending the semantic video stream. On the basis of semantic analysis, the target and the background are used as different layers, coding is carried out in different modes, the layered transmission effect is achieved, the coding flexibility can be improved, coding is carried out by considering the change between the target and the background at the same time, time sequence redundant information can be removed, the compression ratio can be improved, and bandwidth occupation during uploading of a sending end can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video coding and decoding technology, and in particular to a semantic video coding and decoding method, system and storage medium. Background Art

[0002] With the growth of urban construction and family security needs, security surveillance cameras have been deployed on a large scale, producing massive amounts of video data. Traditional encoding and decoding methods based on standards such as H.264 or H.265 face performance bottlenecks, and require a large computational cost to improve a small amount of compression rate. With the development of technology, video encoding and decoding systems based on artificial intelligence have gradually emerged, bringing new opportunities. There are two main video encoding and decoding methods based on artificial intelligence. One is to combine artificial intelligence technology with traditional encoding to replace some of the modules. However, this type of method does not completely break away from the traditional encoding framework, and the compression rate improvement is not obvious. Another method is to completely replace the traditional encoding and decoding framework with artificial intelligence technology.

[0003] In the prior art, the video encoding and decoding method based on artificial intelligence performs semantic analysis on video frame images, divides the images into target images and background images, realizes compression based on the corresponding content of the video image, and can improve the compression rate.

[0004] However, the existing semantic coding and decoding is still based on encoding the target and background of the same video frame, that is, the target and background are associated, the coding flexibility is poor, and it is not conducive to adjusting according to the feedback experience quality. At the same time, it does not consider the temporal redundancy information between video frames, which is not conducive to further improving the compression rate. Summary of the invention

[0005] The present invention provides a semantic video coding and decoding method, system and storage medium, which are used to solve the defects of semantic coding and decoding in the prior art, such as poor coding flexibility and inability to further improve the compression rate.

[0006] The present invention provides a semantic video encoding and decoding method, which is applied to a sending end and includes:

[0007] Collect raw video data;

[0008] Performing semantic encoding on the original video data to obtain a semantic video stream;

[0009] Sending the semantic video stream to a cloud platform;

[0010] The step of performing semantic encoding on the original video data to obtain a semantic video stream includes:

[0011] According to the original video data, target detection is performed on each original video frame to obtain a corresponding first basic semantic layer, a target enhancement layer and a background layer, wherein the first basic semantic layer represents the category, position and key points of the target, and the target enhancement layer represents the edge details of the target;

[0012] At every preset time value, the corresponding original video frame and the first basic semantic layer are combined as a semantic key frame;

[0013] Acquire an experience quality parameter, and generate a common semantic frame based on the first basic semantic layer and the target enhancement layer or generate a common semantic frame based on the first basic semantic layer according to the experience quality parameter;

[0014] Generate a background key frame according to the difference degree of the background layers corresponding to adjacent original video frames;

[0015] A semantic video stream is generated according to the semantic key frame, the common semantic frame and the background key frame.

[0016] The semantic video encoding and decoding method provided by the present invention also includes:

[0017] Acquiring experience quality feedback information, and updating the experience quality parameter according to the experience quality feedback information;

[0018] The experience quality feedback information is generated by a result obtained by a cloud platform or a receiving end performing semantic decoding on the semantic video stream.

[0019] The present invention also provides a semantic video encoding and decoding method, which is applied to a cloud platform and includes:

[0020] Get semantic video stream;

[0021] Performing semantic decoding on the semantic video stream to obtain first decoded video data and first experience quality feedback information;

[0022] Sending the first experience quality feedback information to the sending end, where the first experience quality feedback information is used to update the experience quality parameter for semantic coding performed by the sending end;

[0023] Performing normal encoding on the first decoded video data to obtain a normal video stream;

[0024] Sending the normal video stream to a receiving end, or sending the semantic video stream to the receiving end;

[0025] The semantic video stream includes semantic key frames, common semantic frames, and background key frames, and the semantic decoding of the semantic video stream to obtain first decoded video data includes:

[0026] According to the semantic key frame, a target image is obtained, and according to the original video frame and the first basic semantic layer, a target image is obtained;

[0027] According to the common semantic frame, acquiring and updating the target image according to a first basic semantic layer and a target enhancement layer;

[0028] According to the background key frame, obtaining a background image;

[0029] The target image and the background image are combined to generate the first decoded video data.

[0030] According to the semantic video encoding and decoding method provided by the present invention, in the semantic decoding of the semantic video stream to obtain the first decoded video data and the first experience quality feedback information, the step of obtaining the first experience quality feedback information includes:

[0031] Performing target detection on the first decoded video data to obtain a second basic semantic layer;

[0032] According to the first basic semantic layer and the corresponding second basic semantic layer, a first semantic evaluation value is obtained, where the first semantic evaluation value is determined by a category confidence difference value, an average position deviation distance value, and an average key point distance value of the target;

[0033] Obtaining a first experience evaluation value, where the first experience evaluation value represents the quality of a frame rate, a resolution, and a bit rate;

[0034] The first experience quality feedback information is generated according to the first semantic evaluation value and the first experience evaluation value.

[0035] According to the semantic video encoding and decoding method provided by the present invention, after obtaining the semantic video stream, the method further includes:

[0036] Acquire semantic tags according to the semantic video stream, where the semantic tags are used as retrieval indexes;

[0037] Associating and storing the semantic video stream with the semantic tag;

[0038] In response to a video-on-demand instruction from a receiving end, the semantic tag is retrieved according to the video-on-demand instruction to confirm the corresponding semantic video stream, the semantic video stream is semantically decoded to obtain first decoded video data, the first decoded video data is normally encoded to obtain a normal video stream, and the normal video stream is sent to the receiving end;

[0039] Alternatively, in response to a video-on-demand instruction from a receiving end, the semantic tag is retrieved according to the video-on-demand instruction to confirm the corresponding semantic video stream, and the semantic video stream is sent to the receiving end.

[0040] The present invention also provides a semantic video encoding and decoding method, which is applied to a receiving end and includes:

[0041] Get semantic video stream;

[0042] Performing semantic decoding on the semantic video stream to obtain second decoded video data and second experience quality feedback information;

[0043] Sending the second experience quality feedback information to the sending end, where the second experience quality feedback information is used to update the experience quality parameter used by the sending end for semantic coding;

[0044] Playing the second decoded video data;

[0045] Alternatively, a normal video stream is obtained, the normal video stream is decoded normally, the third decoded video data and normal feedback information of experience quality are obtained, the normal feedback information of experience quality is sent to the sending end, and the third decoded video data is played;

[0046] The semantic video stream includes semantic key frames, common semantic frames and background key frames, and the semantic decoding of the semantic video stream to obtain second decoded video data includes:

[0047] According to the semantic key frame, a target image is obtained, and according to the original video frame and the first basic semantic layer, a target image is obtained;

[0048] According to the common semantic frame, acquiring and updating the target image according to a first basic semantic layer and a target enhancement layer;

[0049] According to the background key frame, obtaining a background image;

[0050] The target image and the background image are combined to generate the second decoded video data.

[0051] According to the semantic video encoding and decoding method provided by the present invention, in the semantically decoding the semantic video stream to obtain the second decoded video data and the second experience quality feedback information, the step of obtaining the second experience quality feedback information includes:

[0052] Performing target detection on the second decoded video data to obtain a third basic semantic layer;

[0053] According to the first basic semantic layer and the corresponding third basic semantic layer, a second semantic evaluation value is obtained, where the second semantic evaluation value is determined by a category confidence difference value, an average position deviation distance value, and an average key point distance value of the target;

[0054] Obtaining a second experience evaluation value, where the second experience evaluation value represents the quality of the frame rate, resolution, and bit rate;

[0055] The second experience quality feedback information is generated according to the second semantic evaluation value and the second experience evaluation value.

[0056] The present invention also provides a security video system, comprising: a transmitting end device, a cloud platform and a receiving end device, wherein the cloud platform is communicatively connected with the transmitting end device and the receiving end device respectively;

[0057] The transmitting end device is used to implement the semantic video encoding and decoding method applied to the transmitting end;

[0058] The cloud platform is used to implement the semantic video encoding and decoding method applied to the cloud platform;

[0059] The receiving end device is used to implement the above-mentioned semantic video encoding and decoding method applied to the receiving end.

[0060] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the semantic video encoding and decoding methods described above is implemented.

[0061] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the semantic video encoding and decoding method as described above is implemented.

[0062] The semantic video encoding and decoding method, system and storage medium provided by the present invention have at least the following beneficial effects: the original video data collected by the sending end, such as security video data, is semantically encoded, specifically, the original video frame is subjected to target detection, and the first basic semantic layer, target enhancement layer and background layer outside the target related to the target are obtained based on the preset time value. The original video frame and the first basic semantic layer are combined as semantic key frames at each interval preset time value, and the semantic key frames provide complete information as reference frames. For ordinary semantic frames that do not meet the interval preset time value conditions, ordinary semantic frames are generated based on the first semantic basic layer and the target enhancement layer according to the experience quality parameters, or ordinary semantic frames are generated based on the first semantic basic layer. According to the time sequence changes of the original video frame, when the difference between adjacent background layers exceeds the preset range, that is, the background layer changes greatly, a background key frame is generated. A semantic video stream is generated according to the semantic key frames, the ordinary semantic frames and the background key frames. By sending semantic key frames at preset time intervals as the basic reference frames of the video, between the semantic key frames, the video changes of the target are updated through ordinary semantic frames, and the video changes of the background are updated through background key frames when the background changes greatly. In this way, based on semantic analysis, the target and the background are treated as different layers and encoded in different ways to achieve the effect of layered transmission, which is conducive to improving the encoding flexibility and facilitating adjustments based on the feedback experience quality. At the same time, considering the changes between the target and the background for encoding, it is conducive to removing temporal redundant information, improving the compression rate, and reducing the bandwidth occupancy when uploading at the sender. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0064] Figure 1 It is one of the flow charts of the semantic video encoding and decoding method applied to the sending end provided by the present invention;

[0065] Figure 2 This is a second flow chart of a semantic video encoding and decoding method applied to a sending end provided by the present invention;

[0066] Figure 3 It is one of the flow charts of the semantic video encoding and decoding method applied to the cloud platform provided by the present invention;

[0067] Figure 4 This is the second flow chart of the semantic video encoding and decoding method applied to the cloud platform provided by the present invention;

[0068] Figure 5 This is the third flow chart of the semantic video encoding and decoding method applied to the cloud platform provided by the present invention;

[0069] Figure 6 It is one of the flow charts of the semantic video encoding and decoding method applied to the receiving end provided by the present invention;

[0070] Figure 7 This is a second flow chart of a semantic video encoding and decoding method applied to a receiving end provided by the present invention;

[0071] Figure 8 It is a structural schematic diagram of one embodiment of a security video system provided by the present invention;

[0072] Fig. 9 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0073] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0074] Combine the following Figure 1 and Figure 2 The semantic video encoding and decoding method of the present invention is described, which is applied to a sending end and includes:

[0075] S100: collecting original video data;

[0076] S110: performing semantic encoding on the original video data to obtain a semantic video stream;

[0077] S120: Sending the semantic video stream to the cloud platform;

[0078] Wherein, the S110 includes:

[0079] S111: performing target detection on each original video frame according to the original video data to obtain a corresponding first basic semantic layer, a target enhancement layer and a background layer, wherein the first basic semantic layer represents the category, position and key points of the target, and the target enhancement layer represents the edge details of the target;

[0080] S112: At every preset time interval, the corresponding original video frame and the first basic semantic layer are combined as a semantic key frame;

[0081] S113: Acquire an experience quality parameter, and generate a common semantic frame based on the first basic semantic layer and the target enhancement layer according to the experience quality parameter, or generate a common semantic frame based on the first basic semantic layer;

[0082] S114: generating a background key frame according to the difference degree of the background layers corresponding to adjacent original video frames;

[0083] S115: Generate a semantic video stream according to the semantic key frame, the common semantic frame and the background key frame.

[0084] The original video data collected by the transmitter, such as security video data, is semantically encoded, specifically by performing target detection on the original video frame, obtaining the first basic semantic layer related to the target, the target enhancement layer, and the background layer outside the target based on the preset time value. The original video frame and the first basic semantic layer are combined as semantic key frames at each interval preset time value, and the semantic key frames provide complete information as reference frames. For ordinary semantic frames that do not meet the interval preset time value conditions, ordinary semantic frames are generated based on the first semantic base layer and the target enhancement layer, or based on the first semantic base layer according to the experience quality parameters. According to the timing changes of the original video frame, when the difference between adjacent background layers exceeds the preset range, that is, the background layer changes greatly, a background key frame is generated. A semantic video stream is generated based on the semantic key frames, ordinary semantic frames, and background key frames.

[0085] By sending semantic key frames at preset time intervals as the basic reference frames of the video, between the semantic key frames, the video changes of the target are updated through ordinary semantic frames, and the video changes of the background are updated through background key frames when the background changes greatly. In this way, based on semantic analysis, the target and the background are treated as different layers and encoded separately in different ways to achieve the effect of layered transmission, which is conducive to improving the encoding flexibility and facilitating adjustment based on the feedback experience quality. At the same time, considering the changes between the target and the background for encoding, it is conducive to removing temporal redundant information, improving the compression rate, and reducing the bandwidth occupancy when uploading at the sender.

[0086] It can be understood that in the semantic video stream, key semantic frames are generated regularly according to the preset time value. The key semantic frames include the original video frame and the first basic semantic layer obtained by semantic analysis. The first basic semantic layer includes the category, position, key points and other information of the target (such as people, objects, etc.). The ordinary semantic frame between two key semantic frames must include the basic semantic layer. Based on the experience quality parameter, it can also include the target enhancement layer. The target enhancement layer includes information such as the edge details of the target. The semantic key frame is used as a reference frame, and the target image change is updated based on the ordinary semantic frame to achieve the video change of the target image. While achieving the video change of the target image, the background image is updated based on the background key frame to achieve the video change of the background image. In this way, between the two semantic key frames, there is no need to transmit the original video frame, and the target image is updated with the ordinary semantic frame, which is conducive to improving the compression rate. At the same time, the background key frame is generated only when the degree of background change is greater than the preset range, which is conducive to further improving the compression rate.

[0087] In some embodiments of the present invention, the above-mentioned generating a background key frame according to the difference degree of the background layer corresponding to the adjacent original video frames includes: obtaining a first background value and a second background value of adjacent original video frames, and calculating the difference between the first background value and the second background value, which can be calculated by the following formula:

[0088] ΔBG=|BG r -BG r-1 |

[0089] Among them, ΔBG is the difference, BG t is the first background value, BG t-1 is the second background value;

[0090] When the difference is greater than a preset background threshold, the background layer corresponding to the original video frame is used as a background key frame. The first background value and the second background value can be determined according to the RGB value, brightness value, etc. of the image.

[0091] In some embodiments of the present invention, the above-mentioned semantic encoding process can be implemented through a CGAN (Conditional Generative Adversarial Network) model. The CGAN model introduces conditional information to make the generator more controllable, generate more meaningful data based on given conditions, improve the quality of generated data, and support multimodal generation.

[0092] refer to Figure 2 In some embodiments of the semantic video encoding and decoding method applied to a transmitter of the present invention, the method further includes:

[0093] S116: Acquire experience quality feedback information, and update the experience quality parameter according to the experience quality feedback information;

[0094] The experience quality feedback information is generated by a result obtained by a cloud platform or a receiving end performing semantic decoding on the semantic video stream.

[0095] The experience quality parameters can be updated based on the feedback experience quality information. The feedback experience quality information can be the result of semantic decoding of the semantic video stream by the self-cloud platform or the receiving end, evaluating the semantic analysis effect of the semantic encoding at the sending end, and generating experience quality feedback information; in addition, it can also be combined with traditional experience quality information based on frame rate, resolution, and bit rate to integrate and generate experience quality feedback information. In this way, based on the feedback information of the semantic analysis effect and the feedback information of the video quality such as frame rate, resolution, and bit rate, the sending end updates the experience quality parameters, adjusts the ordinary semantic frames, and then adjusts the video quality to meet the needs.

[0096] It should be emphasized that the traditional conventional quality of experience (QoE) is only considered based on parameters such as frame rate, resolution, bit rate, etc., and does not involve the effect of semantic analysis. The present invention considers the effect of semantic analysis and traditional quality of experience information, generates quality of experience feedback information, and then the sender updates the quality of experience parameters based on the obtained quality of experience feedback information, adjusts the generated semantic video stream, which is conducive to adapting to the semantic coding method and improving the quality of semantic coding.

[0097] refer to Figure 3 The present invention also provides a semantic video encoding and decoding method, which is applied to a cloud platform, including:

[0098] S200: Acquire semantic video stream;

[0099] S210: semantically decode the semantic video stream to obtain first decoded video data and first experience quality feedback information;

[0100] S220: Send the first experience quality feedback information to the transmitting end, where the first experience quality feedback information is used to update the experience quality parameter for semantic coding performed by the transmitting end;

[0101] S230: performing normal encoding on the first decoded video data to obtain a normal video stream;

[0102] S240: Sending the normal video stream to a receiving end, or sending the semantic video stream to the receiving end;

[0103] The semantic video stream includes semantic key frames, common semantic frames and background key frames, and S210 includes:

[0104] S211: Acquire according to the semantic key frame and acquire a target image according to the original video frame and the first basic semantic layer;

[0105] S212: According to the common semantic frame, obtain and update the target image according to the first basic semantic layer and the target enhancement layer;

[0106] S213: Acquire a background image according to the background key frame;

[0107] S214: Combine the target image and the background image to generate the first decoded video data.

[0108] The cloud platform obtains the semantic video stream from the transmitter and performs semantic decoding on the semantic video stream. Specifically, the cloud platform obtains the target image from the original video frame based on the corresponding first basic semantic layer when it is a semantic key frame based on the frame timing of the semantic video stream; when it is a semantic key frame, the target image is updated based on the corresponding first basic semantic layer and the target enhancement layer, that is, the position, key points, edge details, etc. of the target image are changed; when it is a background key layer, the background image is obtained. Based on the target image and the background image, the two are combined to form a complete video image, and the target image and the background image are continuously updated based on the above process to achieve video image changes and obtain the first decoded video data. In this way, the target image and the background image are obtained by layered transmission, which is conducive to improving flexibility. At the same time, the ordinary semantic layer does not include the original video frame during transmission, and the background key frame will only be generated when the background change degree is greater than the preset range, which is conducive to reducing the bandwidth occupied when transmitting the semantic video stream and improving the compression rate.

[0109] After obtaining the first decoded video data, the cloud platform performs semantic analysis on the first decoded video data to obtain first experience quality feedback information. The first experience quality feedback information can measure the quality of semantic coding by indicating the degree of difference between the first decoded video data and the original video data. The first experience quality feedback information is sent to the sender to update the experience quality parameters of the sender, which is beneficial to improving the semantic coding quality of the sender.

[0110] Different receiving ends have different processing performances, such as different models of mobile phones and tablet computers. Therefore, for receiving end devices with stronger processing performance, the semantic video stream is directly forwarded to the receiving end. Since the semantic video stream has a higher compression rate, it is beneficial to reduce the occupied bandwidth and improve the transmission efficiency. For receiving ends with weaker processing performance, the first decoded video data is encoded normally, such as the normal encoding and decoding method of standards such as H.264 or H.265, and the normal video stream is obtained and sent to the receiving end, so that the receiving end can decode and play the normal video stream through the normal decoding method. In this way, adaptive processing can be performed according to the performance differences of the receiving ends.

[0111] In some embodiments of the present invention, in S214, when combining the target image with the background image, feathering may be performed between the edge of the target and the edge of the background to soften the transition edge and improve the image effect.

[0112] In some embodiments of the present invention, the process of semantic decoding by the above-mentioned cloud platform can be implemented through the CGAN model. The CGAN model introduces conditional information to make the generator more controllable, generate more meaningful data according to given conditions, improve the quality of generated data, and support multimodal generation.

[0113] refer to Figure 4 In some embodiments of the semantic video encoding and decoding method applied to a cloud platform of the present invention, in S210, the step of obtaining the first experience quality feedback information includes:

[0114] S215: Performing target detection on the first decoded video data to obtain a second basic semantic layer;

[0115] S216: Acquire a first semantic evaluation value according to the first basic semantic layer and the corresponding second basic semantic layer, where the first semantic evaluation value is determined by a category confidence difference value, an average position deviation distance value, and an average key point distance value of the target;

[0116] S217: Obtain a first experience evaluation value, where the first experience evaluation value represents the quality of a frame rate, a resolution, and a bit rate;

[0117] S218: Generate the first experience quality feedback information according to the first semantic evaluation value and the first experience evaluation value.

[0118] By performing target detection similar to that of the sending end on the first decoded video data, the effect of semantic analysis is achieved, and the second basic semantic layer is obtained. The second basic semantic layer has the same function as the first basic semantic layer, and both represent the category, position, and key points of the target. The second basic semantic layer is compared with the first basic semantic layer to obtain the category confidence difference and the average position deviation distance, and then the first semantic evaluation value is obtained. At the same time, the first experience evaluation value (corresponding to the traditional experience quality information) obtained according to the frame rate, resolution and bit rate of the video is combined to comprehensively generate the first experience quality feedback information. In this way, the first semantic evaluation value based on semantic analysis is combined with the first experience evaluation value obtained by traditional measurement of experience quality, so that the generated first experience quality feedback information is more adapted to the environment of semantic coding and decoding, and the semantic coding adjustment of the sending end is more accurate.

[0119] It can be understood that the comparison between the first basic semantic layer and the second basic semantic layer is performed on the corresponding frames. The first decoded video data is obtained by semantic decoding based on the semantic video stream. There are differences between the first decoded video data and the original video data due to encoding and decoding, but the video image content of the first decoded video data is basically consistent with the video image content of the original video data. There are differences in the semantic basic layers obtained by semantic analysis of the two. According to the difference, the semantic coding of the sender is adjusted to narrow the difference and improve the quality of semantic coding.

[0120] In some embodiments of the present invention, the category confidence difference in S216 may be calculated using the following formula:

[0121] Δscore i =|score i -score rec_i |

[0122] Among them, Δscore i is the category confidence difference, score i is the target category confidence corresponding to the first basic semantic layer, score rec_i is the target category confidence corresponding to the second basic semantic layer, i represents the i-th target. In the case of multiple targets, the average value of each target is taken.

[0123] In some embodiments of the present invention, the average position deviation distance value in S216 may be calculated using the following formula:

[0124]

[0125] Among them, Δkps i is the average position deviation distance value, kps i is the target position corresponding to the first basic semantic layer, kps rec_i is the target position corresponding to the second basic semantic layer, d is the Euclidean distance calculation symbol, i represents the i-th target, and N is the total number of targets.

[0126] In some embodiments of the present invention, the average key point distance value in S216 may be calculated using the following formula:

[0127] Δloc i =|center i -center rec_i |

[0128] Among them, Δloc i is the average key point distance value, center i is the center point of the target recognition box corresponding to the first semantic base layer, centerrec_i is the center point of the target recognition box corresponding to the second semantic base layer, i represents the i-th target. In the case of multiple targets, the average value of each target is taken.

[0129] refer to Figure 5 In some embodiments of the semantic video encoding and decoding method applied to a cloud platform of the present invention, after S200, the method further includes:

[0130] S250: Acquire a semantic tag according to the semantic video stream, where the semantic tag is used as a retrieval index;

[0131] S260: Associating the semantic video stream with the semantic tag and storing it;

[0132] S270: In response to the on-demand instruction of the receiving end, retrieve the semantic tag according to the on-demand instruction to confirm the corresponding semantic video stream, semantically decode the semantic video stream to obtain first decoded video data, normally encode the first decoded video data to obtain a normal video stream, and send the normal video stream to the receiving end;

[0133] Alternatively, S280: in response to a video-on-demand instruction from the receiving end, the semantic tag is retrieved according to the video-on-demand instruction to confirm the corresponding semantic video stream, and the semantic video stream is sent to the receiving end.

[0134] In security scenarios, the video collected by the camera device, i.e. the transmitting device, is generally sent to the user's terminal device, i.e. the receiving end, after encoding and decoding, to achieve the effect of real-time live broadcast. At the same time, in some cases, it is also necessary to trace the historical video, i.e., to play on demand. Therefore, the cloud platform stores the semantic video stream and associates it with the semantic tag to facilitate retrieval based on the semantic tag when playing on demand. In response to the on-demand instruction, after obtaining the required semantic video stream, based on the processing performance of the receiving end, when the processing performance of the receiving end is weak, the video stream is semantically decoded to obtain the first decoded video data, and then the first decoded video data is normally encoded to obtain the normal video stream, and the normal video stream is sent to the receiving end; when the processing performance of the receiving end is strong, the semantic video stream is directly forwarded to the receiving end. Due to the high compression rate of the semantic video stream, it is beneficial to reduce the transmission bandwidth occupancy and improve the transmission efficiency. In this way, the on-demand function is realized, and at the same time, when playing on demand, it can be adapted to the performance differences of the receiving end.

[0135] refer to Figure 6 The present invention also provides a semantic video encoding and decoding method, which is applied to a receiving end and includes:

[0136] S300: Acquire semantic video stream;

[0137] S310: semantically decode the semantic video stream to obtain second decoded video data and second experience quality feedback information;

[0138] S320: Send the second experience quality feedback information to the transmitting end, where the second experience quality feedback information is used to update the experience quality parameter used by the transmitting end for semantic coding;

[0139] S330: Play the second decoded video data;

[0140] Alternatively, S340: obtaining a normal video stream, performing normal decoding on the normal video stream, obtaining third decoded video data and normal feedback information on experience quality, sending the normal feedback information on experience quality to the transmitting end, and playing the third decoded video data;

[0141] The semantic video stream includes semantic key frames, common semantic frames and background key frames, and S310 includes:

[0142] S311: Acquire according to the semantic key frame and acquire a target image according to the original video frame and the first basic semantic layer;

[0143] S312: According to the common semantic frame, obtain and update the target image according to the first basic semantic layer and the target enhancement layer;

[0144] S313: Acquire a background image according to the background key frame;

[0145] S314: Combine the target image and the background image to generate the second decoded video data.

[0146] When the processing performance of the receiving end is strong, the receiving end obtains the semantic video stream from the cloud platform and performs semantic decoding on the semantic video stream. Specifically, the receiving end obtains the target image from the original video frame based on the corresponding first basic semantic layer when it is a semantic key frame based on the frame timing of the semantic video stream; when it is a semantic key frame, the target image is updated based on the corresponding first basic semantic layer and the target enhancement layer, that is, the position, key points, edge details, etc. of the target image are changed; when it is a background key layer, the background image is obtained. Based on the target image and the background image, the two are combined to form a complete video image, and the target image and the background image are continuously updated based on the above process to realize the change of the video image, and the second decoded video data is obtained for playback. In this way, the target image and the background image are obtained by layered transmission, which is conducive to improving flexibility. At the same time, the ordinary semantic layer does not include the original video frame during transmission, and the background key frame will only be generated when the background change degree is greater than the preset range, which is conducive to reducing the bandwidth occupied when transmitting the semantic video stream and improving the compression rate.

[0147] When the processing performance of the receiving end is weak, the receiving end obtains the normal video stream from the cloud platform, and obtains the third decoded video data for playback through the normal decoding method.

[0148] In some embodiments of the present invention, in S314, when combining the target image with the background image, feathering may be performed between the target edge and the background edge to soften the transition edge and improve the image effect.

[0149] It is understandable that the semantic decoding process of the semantic video stream by the cloud platform and the receiving end is essentially the same, but the semantic decoding process is selected to be completed on the cloud platform or on the receiving end according to the processing performance of the receiving end. Among them, the semantic decoding is completed on the cloud platform, which can reduce the requirements for the processing performance of the receiving end; the semantic decoding is completed on the receiving end, which can simplify the processing process of the cloud platform, without the need for semantic decoding and normal encoding, and improve processing efficiency. At the same time, based on the high compression rate of the semantic video stream, it is also conducive to improving transmission efficiency.

[0150] In some embodiments of the present invention, the process of semantic decoding at the above-mentioned receiving end can be implemented through the CGAN model. The CGAN model introduces conditional information to make the generator more controllable, generate more meaningful data according to given conditions, improve the quality of generated data, and support multimodal generation.

[0151] refer to Figure 7 In some embodiments of the semantic video encoding and decoding method applied to a receiving end of the present invention, in S310, the step of obtaining the second experience quality feedback information includes:

[0152] S315: Performing object detection on the second decoded video data to obtain a third basic semantic layer;

[0153] S316: Acquire a second semantic evaluation value according to the first basic semantic layer and the corresponding third basic semantic layer, where the second semantic evaluation value is determined by a category confidence difference value, an average position deviation distance value, and an average key point distance value of the target;

[0154] S317: Obtain a second experience evaluation value, where the second experience evaluation value represents the quality of the frame rate, resolution, and bit rate;

[0155] S318: Generate the second experience quality feedback information according to the second semantic evaluation value and the second experience evaluation value.

[0156] By performing target detection similar to that of the sending end on the second decoded video data, the effect of semantic analysis is achieved, and the third basic semantic layer is obtained. The third basic semantic layer has the same function as the first basic semantic layer, and both represent the category, position, and key points of the target. The third basic semantic layer is compared with the first basic semantic layer to obtain the category confidence difference and the average position deviation distance, and then the second semantic evaluation value is obtained. At the same time, the second experience evaluation value (corresponding to the traditional experience quality information) obtained according to the frame rate, resolution and bit rate of the video is combined to comprehensively generate the second experience quality feedback information. In this way, the second semantic evaluation value based on semantic analysis is combined with the second experience evaluation value obtained by traditional measurement of experience quality, so that the generated second experience quality feedback information is more adapted to the environment of semantic coding and decoding, and the semantic coding adjustment of the sending end is more accurate.

[0157] In some embodiments of the present invention, the category confidence difference in S316 may be calculated using the following formula:

[0158] Δscore i =|score i -score rec_i |

[0159] Among them, Δscore i is the category confidence difference, score i is the target category confidence corresponding to the first basic semantic layer, score rec_i is the target category confidence corresponding to the third basic semantic layer, i represents the i-th target. In the case of multiple targets, the average value of each target is taken.

[0160] In some embodiments of the present invention, the average position deviation distance value in S316 may be calculated by the following formula:

[0161]

[0162] Among them, Δkps i is the average position deviation distance value, kps i is the target position corresponding to the first basic semantic layer, kps rec_i is the target position corresponding to the third basic semantic layer, d is the Euclidean distance calculation symbol, i represents the i-th target, and N is the total number of targets.

[0163] In some embodiments of the present invention, the average key point distance value in S316 may be calculated using the following formula:

[0164] Δloc i =|center i -center rec_i |

[0165] Among them, Δloc i is the average key point distance value, center i is the center point of the target recognition box corresponding to the first semantic base layer, center rec_i is the center point of the target recognition box corresponding to the third semantic base layer, i represents the i-th target. In the case of multiple targets, the average value of each target is taken.

[0166] It is understandable that the process of the cloud platform generating the first experience quality feedback information is essentially the same as the process of the receiving end generating the second experience quality feedback information. Whether the first experience quality feedback information or the second experience quality feedback information is generated depends on whether the semantic decoding process is performed on the cloud platform or on the receiving end. It should be noted that the process of the receiving end generating the experience quality general feedback information is different from the process of generating the second experience quality feedback information. Since the generation of the experience quality general feedback information is based on the general decoding, it does not involve semantic analysis. The experience quality general feedback information (essentially the traditional experience quality information) includes the experience quality information generated based on the traditional video frame rate, resolution, bit rate, etc.

[0167] refer to Figure 8 , the present invention also provides a security video system, including: a sending end device, a cloud platform and a receiving end device, wherein the cloud platform is respectively connected to the sending end device and the receiving end device for communication;

[0168] The transmitting end device is used to implement the semantic video encoding and decoding method applied to the transmitting end;

[0169] The cloud platform is used to implement the semantic video encoding and decoding method applied to the cloud platform;

[0170] The receiving end device is used to implement the above-mentioned semantic video encoding and decoding method applied to the receiving end.

[0171] The security video system provided by the present invention and the semantic video encoding and decoding method applied to the sending end, the cloud platform and the receiving end can refer to each other and will not be described in detail.

[0172] The working process of the security video system is as follows: the original video data collected by the transmitting device, such as security video data, is semantically encoded, and a semantic video stream is generated and uploaded to the cloud platform. For the receiving device with strong processing performance, the cloud platform directly forwards the semantic video stream to the receiving device; for the receiving device with weak processing performance, the semantic video stream is semantically decoded, the first decoded video data is obtained, and the first experience quality feedback information is generated and sent to the transmitting device, and the first decoded video data is normally encoded to generate a normal video stream and send it to the receiving device. The receiving device with strong performance obtains the semantic video stream for semantic decoding, obtains the second decoded video data, and generates the second experience quality feedback information and sends it to the transmitting device, and plays the second decoded video data; the receiving device with weak performance obtains the normal video stream for normal decoding, obtains the third decoded video data, and generates the experience quality normal feedback information and sends it to the transmitting device, and plays the third decoded video data. The transmitting end updates the experience quality parameters according to the obtained experience quality feedback information to adjust the semantic encoding. When the receiving end sends a VOD command to the cloud platform, the cloud platform retrieves the semantic tag according to the VOD command to obtain the corresponding semantic video stream, and executes the corresponding sending process according to the performance of the receiving end.

[0173] In the security scenario, the sending device is usually a smart camera with visual sensor video acquisition capabilities and semantic coding; the cloud platform, namely the cloud server, can perform tasks such as semantic decoding, experience quality feedback information calculation, H.264 / H.265 encoding, video file storage, video semantic retrieval, etc.; the receiving end can be a mobile phone, platform computer, computer and other devices that interact with users and can realize on-demand, live broadcast, search, recommendation and other applications. It has H.264 / H.265 decoding capabilities, and some devices with higher computing power also have the ability to decode semantics and calculate experience quality feedback information.

[0174] Fig. 9 An example of a physical structure diagram of an electronic device is shown in FIG. Fig. 9 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the above-mentioned semantic video encoding and decoding method.

[0175] The electronic device can be used as a sending device, a cloud platform device or a receiving device, and implements a corresponding semantic video encoding and decoding method.

[0176] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0177] On the other hand, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the semantic video encoding and decoding methods provided by the above methods.

[0178] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0179] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0180] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A semantic video encoding and decoding method, characterized in that: Applied to the sending end, including: Collect raw video data; Performing semantic encoding on the original video data to obtain a semantic video stream; Sending the semantic video stream to a cloud platform; The step of performing semantic encoding on the original video data to obtain a semantic video stream includes: According to the original video data, target detection is performed on each original video frame to obtain a corresponding first basic semantic layer, a target enhancement layer and a background layer, wherein the first basic semantic layer represents the category, position and key points of the target, and the target enhancement layer represents the edge details of the target; At every preset time value, the corresponding original video frame and the first basic semantic layer are combined as a semantic key frame; Acquire an experience quality parameter, and generate a common semantic frame based on the first basic semantic layer and the target enhancement layer or generate a common semantic frame based on the first basic semantic layer according to the experience quality parameter; Generate a background key frame according to the difference degree of the background layers corresponding to adjacent original video frames; A semantic video stream is generated according to the semantic key frame, the common semantic frame and the background key frame.

2. The semantic video encoding and decoding method according to claim 1, characterized in that: Also includes: Acquiring experience quality feedback information, and updating the experience quality parameter according to the experience quality feedback information; The experience quality feedback information is generated by a result obtained by a cloud platform or a receiving end performing semantic decoding on the semantic video stream.

3. A semantic video encoding and decoding method, characterized in that: Applied to cloud platforms, including: Get semantic video stream; Performing semantic decoding on the semantic video stream to obtain first decoded video data and first experience quality feedback information; Sending the first experience quality feedback information to the sending end, where the first experience quality feedback information is used to update the experience quality parameter for semantic coding performed by the sending end; Performing normal encoding on the first decoded video data to obtain a normal video stream; Sending the normal video stream to a receiving end, or sending the semantic video stream to the receiving end; The semantic video stream includes semantic key frames, common semantic frames, and background key frames, and the semantic decoding of the semantic video stream to obtain first decoded video data includes: According to the semantic key frame, a target image is obtained, and according to the original video frame and the first basic semantic layer, a target image is obtained; According to the common semantic frame, acquiring and updating the target image according to a first basic semantic layer and a target enhancement layer; According to the background key frame, obtaining a background image; The target image and the background image are combined to generate the first decoded video data.

4. The semantic video encoding and decoding method according to claim 3, characterized in that: In the semantically decoding the semantic video stream to obtain first decoded video data and first experience quality feedback information, the step of obtaining the first experience quality feedback information includes: Performing target detection on the first decoded video data to obtain a second basic semantic layer; According to the first basic semantic layer and the corresponding second basic semantic layer, a first semantic evaluation value is obtained, where the first semantic evaluation value is determined by a category confidence difference value, an average position deviation distance value, and an average key point distance value of the target; Obtaining a first experience evaluation value, where the first experience evaluation value represents the quality of a frame rate, a resolution, and a bit rate; The first experience quality feedback information is generated according to the first semantic evaluation value and the first experience evaluation value.

5. The semantic video encoding and decoding method according to claim 3, characterized in that: After acquiring the semantic video stream, the method further includes: Acquire semantic tags according to the semantic video stream, where the semantic tags are used as retrieval indexes; Associating and storing the semantic video stream with the semantic tag; In response to a video-on-demand instruction from a receiving end, the semantic tag is retrieved according to the video-on-demand instruction to confirm the corresponding semantic video stream, the semantic video stream is semantically decoded to obtain first decoded video data, the first decoded video data is normally encoded to obtain a normal video stream, and the normal video stream is sent to the receiving end; Alternatively, in response to a video-on-demand instruction from a receiving end, the semantic tag is retrieved according to the video-on-demand instruction to confirm the corresponding semantic video stream, and the semantic video stream is sent to the receiving end.

6. A semantic video encoding and decoding method, characterized in that: Applied to the receiving end, including: Get semantic video stream; Performing semantic decoding on the semantic video stream to obtain second decoded video data and second experience quality feedback information; Sending the second experience quality feedback information to the sending end, where the second experience quality feedback information is used to update the experience quality parameter used by the sending end for semantic coding; Playing the second decoded video data; Alternatively, a normal video stream is obtained, the normal video stream is decoded normally, the third decoded video data and normal feedback information of experience quality are obtained, the normal feedback information of experience quality is sent to the sending end, and the third decoded video data is played; The semantic video stream includes semantic key frames, common semantic frames and background key frames, and the semantic decoding of the semantic video stream to obtain second decoded video data includes: According to the semantic key frame, a target image is obtained, and according to the original video frame and the first basic semantic layer, a target image is obtained; According to the common semantic frame, acquiring and updating the target image according to a first basic semantic layer and a target enhancement layer; According to the background key frame, obtaining a background image; The target image and the background image are combined to generate the second decoded video data.

7. The semantic video encoding and decoding method according to claim 6, characterized in that: In the semantically decoding the semantic video stream to obtain second decoded video data and second experience quality feedback information, the step of obtaining the second experience quality feedback information includes: Performing target detection on the second decoded video data to obtain a third basic semantic layer; According to the first basic semantic layer and the corresponding third basic semantic layer, a second semantic evaluation value is obtained, where the second semantic evaluation value is determined by a category confidence difference value, an average position deviation distance value, and an average key point distance value of the target; Obtaining a second experience evaluation value, where the second experience evaluation value represents the quality of the frame rate, resolution, and bit rate; The second experience quality feedback information is generated according to the second semantic evaluation value and the second experience evaluation value.

8. Security video system, characterized in that, include: A sending end device, a cloud platform and a receiving end device, wherein the cloud platform is communicatively connected with the sending end device and the receiving end device respectively; The transmitting end device is used to implement the semantic video encoding and decoding method according to claim 1 or 2; The cloud platform is used to implement the semantic video encoding and decoding method according to any one of claims 3 to 5; The receiving end device is used to implement the semantic video encoding and decoding method as described in claim 6 or 7.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the semantic video encoding and decoding method as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the semantic video encoding and decoding method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Apparatus and method for video coding and decoding and computer program

    CN111543060A

  • Hierarchical video coding method, device and product based on semantic information

    CN116723333A

  • An apparatus, a method and a computer program for video coding and decoding

    US20200260071A1

  • Device and method for performing priority setting and processing on basis of semantic message type in semantic communication

    WO2023113302A1

Cited By

  • Video semantic token compression method, video identification method and electronic equipment

    CN120881297A

  • Intelligent deployment and control system with high-definition image acquisition and stable data transmission functions and control method of intelligent deployment and control system

    CN122205032A

  • An intelligent deployment system with high-definition image acquisition and stable data transmission and a control method thereof

    CN122205032B