Video encoding method and apparatus
Patent Information
- Application Number
- HK62026126008
- Authority / Receiving Office
- HK · HK
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-13
- Filing Date
- 2026-07-10
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-12-13
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
(12) International application published under the Patent Cooperation Treaty (19) International Bureau of the World Intellectual Property Organization (43) International Publication Date: December 19, 2024 (19.12.2024) WIPO I PCT (51) International Patent Classification: H04N19 / 119 (2014.01) H04N19 / 174 (2QU.QV) (21) International Application Number: PCT / CN2023 / 138765 (22) International Application Date: December 14, 2023 (14.12.2023) (25) Application Language: Chinese (26) Publication Language: Chinese (30) Priority: 2023115400 June 13, 2023 (13.06.2023) RU (71) Applicant: Huawei Cloud Computing Technologies Co., Ltd. CO., LTD.) [CN / CN]; Huawei Cloud Data Center, Jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province, China, 550025 (CN) 0 lllllllllllllllllllllllllllllll^ (10) International Publication No. WO 2024 / 255171 Al (72) Inventors: Natalia Domnina; Huawei Cloud Data Center, Jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province, China, 550025 (CN) 0 OLGA Zueva; Huawei Cloud Data Center, Jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province, China, 550025 (CN) 0 PAVEL Frolov; Huawei Cloud Data Center, Jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province, China, 550025 (CN) 0 Li Gang; Huawei Cloud Data Center, Jiaoxinggong Road, Qianzhong Avenue, Guian New District, Guiyang City, Guizhou Province, China 550025 (CN) 0 Ding Wenpeng; Huawei Cloud Data Center, Jiaoxinggong Road, Qianzhong Avenue, Guian New District, Guiyang City, Guizhou Province, China 550025 (CN) 0 (74) Agent: Beijing Longsun Lead IP LTD.; Beijing, China = -=====- = == ======== (54) Title: VIDEO ENCODING METHOD AND APPARATUS (54) Invention Title: A video encoding method and apparatus 400Figure 4. Based on the encoding performance prediction values of the N second slices obtained when the second video frame adopts the first slice solution, determine the second slice solution for the second video frame. Based on the second slice solution, divide the second video frame into N third slices and encode each of the N third slices. adopts the first slice solution; determining a second slice solution for theThe second video frame is divided into N second slices according to the encoding performance prediction values; and the second video frame is divided into N third slices according to the second slice solution, and each of the N third slices is encoded. Embodiments of the present application, [see continued page] WO 2024 / 255171 Al || ... DZ, EC, EE, EG, ES, FI, GB, GD, GE, GH, GM, GT, HN, HR, HU, ID, IL, IN, IQ, IR, IS, IT, JM, JO, JP, KE, KG, KH, KN, KP, KR, KW, KZ, LA, LC, LK, LR, LS, LU, LY MA, MD, MG, MK, MN, MU, MW, MX, MY MZ, NA, NG, NI, NO, NZ, OM, PA, PE, PG, PH, PL, PT, QA, RO, RS, RU, RW, SA, SC, SD, SE, SG, SK, SL, ST, SY SY TH, TJ, TM, TN, TR, TT, TZ, UA, UG, US, UZ, VC, VN, WS, ZA, ZM, ZWO (84) Designated countries (unless otherwise specified, each requiring available regional protection): ARIPO (BW, CV, GH, GM, KE, LR, LS, MW, MZ, NA, RW, SC, SD, SL, ST,SZ, TZ, UG, ZM, ZW), Eurasia (AM, AZ, BY, KG, KZ, RU, TJ, TM), Europe (AL, AT, BE, BG, CH, CY, CZ, DE, DK, EE, ES, FI, FR, GB, GR, HR, HU, IE, IS, IT, LT, LU, LV, MC, ME, MK, MT, NL, NO, PL, PT, RO, RS, SE, SI, SK, SM, TR), OAPI (BF, BJ, CF, CG, CI, CM, GA, GN, GQ, GW, KM, ML, MR, NE, SN, TD,TG). This international publication includes an international search report (Article 21 of the Treaty) ________________________________________________________________ by means of determining predicted encoding performance of a current frame and a second frame, determine a second slice solution suitable for the second video frame and more balanced in encoding performance, significantly improving the encoding performance of the video frame and the whole video. (57) Abstract: This application provides a video encoding method and apparatus. The video encoding method includes: obtaining a first slice scheme for a first video frame; determining the predicted encoding performance values of N second slices obtained when the second video frame adopts the first slice scheme; determining a second slice scheme for the second video frame based on the predicted encoding performance values of the N second slices; dividing the second video frame into N third slices based on the second slice scheme, and encoding the N third slices respectively. The embodiments of this application determine a second slice scheme suitable for the second video frame and with more balanced encoding performance by determining the predicted encoding performance of the current video frame, i.e., the second video frame, thereby significantly improving the encoding performance of the video frame and the whole video. WO 2024 / 255171 PCT / CN2023 / 138765 1 - A method and apparatus for video encodingThis application claims priority to Russian Patent Application No. RU2023115400, filed on June 13, 2023, with the Russian Federal Intellectual Property Office, entitled "Slicebalancing," the entire contents of which are incorporated herein by reference. Technical Field This application relates to the field of video encoding and decoding technology, and more particularly to a method and apparatus for video encoding. Background Art Cloud multimedia services have experienced rapid development in recent years, including live streaming, real-time communication (RTC), video conferencing, and cloud desktops. Simultaneously, these cloud multimedia services are also pursuing higher performance or lower latency. As a core technology for media services, video encoding and decoding technology needs optimization in terms of encoding latency, encoding speed, and encoding efficiency to build technological competitiveness. Typically, to improve the encoding speed of a video encoder, each frame of the video needs to be encoded in parallel. Therefore, each video frame can be first sliced, and then the multiple slices obtained after slicing can be encoded in parallel, thereby improving the encoding speed of each video frame. In current video coding standards, the slicing scheme for segmenting video frames does not consider video content but rather divides the frames into even slices. Consequently, when the video content varies unevenly, the coding performance (such as coding latency and speed) of multiple slices within a video frame becomes uneven, reducing the coding performance of the video frame and even the entire video. This application provides a video coding method and apparatus that, by determining the predicted coding performance of the current video frame (i.e., the second video frame), determines a second slicing scheme suitable for the second video frame and with more balanced coding performance, thereby significantly improving the coding performance of the entire video frame and even the entire video. Firstly, a video encoding method is provided, comprising: obtaining a first slicing scheme for a first video frame, the first slicing scheme being used to divide the first video frame into N first slices, where N is a positive integer greater than or equal to 2; determining the encoding performance prediction values of the N second slices obtained when a second video frame is used with the first slicing scheme, wherein the N second slices correspond one-to-one with the N first slices, the position of each second slice in the second video frame is the same as the position of the corresponding first slice in the first video frame, and the area of each second slice is the same as the area of the corresponding first slice; determining a second slicing scheme for the second video frame based on the encoding performance prediction values of the N second slices, the second slicing scheme being used to divide the second video frame into N third slices; dividing the second video frame into the N third slices based on the second slicing scheme; and encoding each of the N third slices to obtain the encoded second video frame. According to the technical solution provided in this application, the current video frame, i.e., the second video frame, is predicted based on the first slicing scheme of the encoded first video frame.The coding performance of each slice of the second video frame is analyzed to determine a second slicing scheme suitable for the second video frame and with more balanced coding performance, thereby significantly improving the coding performance of the entire second video frame and even the entire video. The second video frame can be the frame following the first video frame, or any frame arranged after the first video frame in the video frame sequence. In other words, the first video frame is any encoded video frame preceding the second video frame. In embodiments of this application, the second video frame is preferably the frame following the first video frame, thus making the determination or adjustment process of the slicing scheme smoother, thereby improving the coding performance of the entire video. In conjunction with the first aspect, in some implementations of the first aspect, determining the second slicing scheme of the second video frame based on the predicted coding performance values of the N second slices includes: adjusting the area of some or all of the N second slices based on the predicted coding performance values of the N second slices to obtain the second slicing scheme. According to the technical solution provided by this application, the second slicing scheme corresponding to the second video frame can be different from the first slicing scheme of the first video frame, thereby realizing a dynamic slicing process for different video frames. Each video frame's corresponding slicing scheme can achieve balanced coding performance across video frame slices, thereby improving the overall video coding performance. In conjunction with the first aspect, in some implementations of the first aspect, adjusting the area of some or all of the N second slices includes: determining a fourth slice from the N second slices, wherein the fourth slice has the smallest predicted coding performance value when the predicted coding performance value is positively correlated with the coding performance, and the fourth slice has the largest predicted coding performance value when the predicted coding performance value is negatively correlated with the coding performance; and reducing the area of the fourth slice. According to the technical solution provided in this application, by reducing the area of the fourth slice with the worst coding performance, the overall coding performance of the entire video frame is improved. In conjunction with the first aspect, in some implementations of the first aspect, reducing the area of the fourth slice includes: moving the slice boundary of the fourth slice and at least one adjacent second slice towards the fourth slice by K slice rows. According to the technical solution provided in this application, by adjusting the slice boundary between the fourth slice and the adjacent second slice, the area of the fourth slice can be quickly adjusted without involving a recalculation process of the adjusted area, thus improving coding performance. In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: determining a fifth slice from the N second slices, wherein the coding performance prediction value of the fifth slice is the largest when the coding performance prediction value is positively correlated with the coding performance, and the coding performance prediction value of the fifth slice is the smallest when the coding performance prediction value is negatively correlated with the coding performance; reducing the area of the fourth slice includes:The boundary of one or more slices between the fourth and fifth slices is shifted K slice rows towards the fourth slice. According to the technical solution provided in this application, by adjusting the slice boundary between the fourth and fifth slices while keeping the area of other second slices unchanged, the coding performance of the fourth slice can be improved while the coding performance of the fifth slice is reduced, while the coding performance of other second slices remains essentially unchanged. This results in a more balanced coding performance for N third and second slice schemes, improving the coding performance of the second video frame. In some implementations of the first aspect, K is set to 1. According to the technical solution provided in this application, when k is set to 1, the adjustment range of the slice scheme for different video frames in the same sequence can be reduced, thus avoiding frequent or excessive adjustments to the slice scheme. In some implementations of the first aspect, the value of K is positively correlated with the difference between the maximum and minimum predicted values of the coding performance of the N second slices. According to the technical solution provided in this application, the larger the difference between the maximum and minimum predicted values of the coding performance of the N second slices, the larger the value of K. This allows for the rapid reduction of the coding performance gap between the two second slices corresponding to the maximum and minimum values in the predicted coding performance. In conjunction with the first aspect, in some implementations of the first aspect, before determining the second slice scheme for the second video frame, the method further includes: determining that the difference between the maximum and minimum values of the predicted coding performance of the N second slices reaches a target difference threshold. According to the technical solution provided in this application, it can be determined whether the coding performance of the N second slices is balanced. When the difference between the maximum and minimum values of the predicted coding performance of the N second slices reaches the target difference threshold, it indicates that the coding performance of the N second slices is not balanced, thus indicating that the first slice scheme needs to be adjusted to determine a more balanced second slice scheme; otherwise, the first slice scheme is reused. In conjunction with the first aspect, in some implementations of the first aspect, determining the predicted coding performance values of the N second slices obtained when the second video frame adopts the first slicing scheme includes: determining the predicted coding performance value of the i-th second slice among the N second slices corresponding to the i-th first slice based on the target prediction model and the values of the coding parameters and / or coding performance of the i-th first slice among the N first slices, where i is a positive integer less than or equal to N. According to the technical solution provided in this application, by training and fitting the values of the coding parameters and / or coding performance of the N first slices with numerical delay, a prediction model capable of accurately predicting the predicted coding performance values of the N second slices is obtained. This prediction model can be used to guide the slicing process of the video frame. In conjunction with the first aspect, in some implementations of the first aspect, the predicted coding performance value is the predicted coding delay value, and the target prediction...The model is a target prediction formula. Based on the target prediction model and the values of the encoding parameters and / or encoding performance of the i-th first slice among the N first slices, the predicted encoding performance value of the i-th second slice among the N second slices corresponding to the i-th first slice is determined. This includes: obtaining the number of bytes after encoding the i-th first slice and the number of macroblocks in the i-th first slice; and determining the predicted encoding delay value of the i-th second slice corresponding to the i-th first slice based on the target prediction formula, the number of bytes after encoding the i-th first slice, and the number of macroblocks in the i-th first slice. Secondly, a video decoding method is provided, comprising: acquiring an encoded second video frame, the second video frame including N encoded third slices, the N third slices being obtained by segmenting the second video frame using a second slicing scheme, the second slicing scheme being determined by the coding performance prediction values of the N second slices, the N second slices being obtained by using a first slicing scheme, the first slicing scheme being used to segment the first video frame into N first slices; decoding the encoded N third slices to obtain N video frame fragments; and splicing the N video frame fragments to obtain the decoded second video frame. In embodiments of this application, the first video frame can be any video frame arranged before the second video frame in a video frame sequence, or in other words, any encoded video frame preceding the second video frame. WO 2024 / 255171 PCT / CN2023 / 138765 3 In conjunction with the second aspect, in some implementations of the second aspect, the area of the N third slices in the second slicing scheme is determined by adjusting the area of some or all of the N second slices. Thirdly, a video encoding apparatus is provided, comprising: an acquisition module for acquiring a first slicing scheme for a first video frame, the first slicing scheme being used to divide the first video frame into N first slices, where N is a positive integer greater than or equal to 2; a processing module for determining the encoding performance prediction values of the N second slices obtained when a second video frame adopts the first slicing scheme, wherein the N second slices correspond one-to-one with the N first slices, the position of each second slice in the second video frame is the same as the position of the corresponding first slice in the first video frame, and the area of each second slice is the same as the area of the corresponding first slice, and determining a second slicing scheme for the second video frame based on the encoding performance prediction values of the N second slices, the second slicing scheme being used to divide the second video frame into N third slices; and an encoding module for dividing the second video frame into the N third slices according to the second slicing scheme, and encoding the N third slices respectively to obtain the encoded second video frame. In conjunction with the third aspect, in some implementations of the third aspect, the processing module is specifically used to: based on the encoding of the N second slices...The performance prediction value is used to adjust the area of some or all of the N second slices to obtain the second slice scheme. In conjunction with the third aspect, in some implementations of the third aspect, the processing module is specifically used to: determine a fourth slice from the N second slices, wherein the fourth slice has the smallest predicted coding performance value when the predicted coding performance value is positively correlated with the coding performance, and the largest predicted coding performance value when the predicted coding performance value is negatively correlated with the coding performance; and reduce the area of the fourth slice. In conjunction with the third aspect, in some implementations of the third aspect, the processing module is specifically used to: move the slice boundary of the fourth slice and at least one adjacent second slice by K slice rows towards the fourth slice. In conjunction with the third aspect, in some implementations of the third aspect, the processing module is further configured to: determine a fifth slice from the N second slices, wherein the fifth slice has the largest predicted coding performance value when the predicted coding performance value is positively correlated with the coding performance, and the fifth slice has the smallest predicted coding performance value when the predicted coding performance value is negatively correlated with the coding performance; specifically, the processing module is configured to: move one or more slice boundaries between the fourth slice and the fifth slice by K slice rows towards the direction of the fourth slice. In conjunction with the third aspect, in some implementations of the third aspect, the value of K is 1. In conjunction with the third aspect, in some implementations of the third aspect, the value of K is positively correlated with the difference between the maximum and minimum predicted coding performance values of the N second slices. In conjunction with the third aspect, in some implementations of the third aspect, before determining the second slicing scheme of the second video frame, the processing module is further configured to: determine that the difference between the maximum and minimum predicted coding performance values of the N second slices reaches a target difference threshold. In conjunction with the third aspect, in some implementations of the third aspect, the processing module is specifically used to: determine the predicted coding performance value of the i-th second slice among the N second slices corresponding to the i-th first slice, based on the target prediction model and the values of the coding parameters and / or coding performance of the i-th first slice among the N first slices, where i is a positive integer less than or equal to N. In conjunction with the third aspect, in some implementations of the third aspect, the predicted coding performance value is the predicted coding delay value, the target prediction model is the target prediction formula, and the processing module is specifically used to: obtain the number of bytes after encoding the i-th first slice and the number of macroblocks in the i-th first slice; and determine the predicted coding delay value of the i-th second slice corresponding to the i-th first slice based on the target prediction formula, the number of bytes after encoding the i-th first slice, and the number of macroblocks in the i-th first slice. Fourthly, a video decoding apparatus is provided, the apparatus comprising: an acquisition module, used to acquire encoded second video frames,The second video frame includes N encoded third slices, which are obtained by segmenting the second video frame using a second slicing scheme determined by the coding performance prediction values of the N second slices. The N second slices are obtained by using a first slicing scheme to divide the first video frame into N first slices. A decoding module is used to decode the encoded N third slices to obtain N video frame pieces; these N video frame pieces are then stitched together to obtain the decoded second video frame. In conjunction with the fourth aspect, in some implementations of the fourth aspect, the area of the N third slices in the second slicing scheme is determined by adjusting the area of some or all of the N second slices. In a fifth aspect, a video encoder is provided, including a memory and a processor, which calls program code stored in the memory to execute methods as described in the first aspect or any possible implementation thereof. In a sixth aspect, a video decoder is provided, including a memory and a processor, which calls program code stored in the memory to execute methods as described in the second aspect or any possible implementation thereof. A seventh aspect provides a computing device including a processor and a memory, wherein the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory, causing the computing device to perform the method of the first aspect or any possible implementation thereof, or, WO 2024 / 255171 PCT / CN2023 / 138765 4, causing the computing device to perform the method of the second aspect or any possible implementation thereof. An eighth aspect provides a computing device cluster including at least one computing device, each computing device including a processor and a memory, wherein the memory is used to store instructions, and the processor is used to call and execute the instructions from the memory, causing the computing device cluster to perform the method of the first aspect or any possible implementation thereof, or causing the computing device cluster to perform the method of the second aspect or any possible implementation thereof. Optionally, the processor may be a general-purpose processor, which may be implemented by means of components or by software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc.; when implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory, which can be integrated into the processor or exist independently outside the processor. In a ninth aspect, a chip is provided that acquires instructions and executes those instructions to implement the method of the first aspect or any possible implementation thereof, or to implement the method of the second aspect or any possible implementation thereof.Optionally, as one implementation, the chip includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface and executes the method in the first aspect or any possible implementation of the first aspect, or executes the method in the second aspect or any possible implementation of the second aspect. Optionally, as one implementation, the chip may further include a memory storing instructions. The processor executes the instructions stored in the memory. When the instructions are executed, the processor executes the method in the first aspect or any possible implementation of the first aspect, or executes the method in the second aspect or any possible implementation of the second aspect. A tenth aspect provides a computer program product containing instructions. When the instructions are run by a computing device or a cluster of computing devices, the computing device or the cluster of computing devices causes the computing device or the cluster of computing devices to execute the method in the first aspect or any possible implementation of the first aspect, or execute the method in the second aspect or any possible implementation of the second aspect. Eleventhly, a computer-readable storage medium is provided, including computer program instructions that, when executed by a computing device or a cluster of computing devices, cause the computing device or cluster of computing devices to perform the method in the first aspect or any possible implementation thereof, or to perform the method in the second aspect or any possible implementation thereof. As examples, these computer-readable storage media include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), flash memory, electrically EPROM (EEPROM), and hard drive. Optionally, as an implementation, the above-mentioned storage medium may specifically be a non-volatile storage medium. Brief Description of the Drawings: Figure 1 is a schematic diagram of the architecture of a video encoding and decoding system provided in an embodiment of this application. Figure 2 is a schematic diagram of a video composition structure provided in an embodiment of this application. Figure 3 is a schematic diagram of a video slicing scheme provided in an embodiment of this application. Figure 4 is a schematic flowchart of a video encoding method provided in an embodiment of this application. Figure 5 is a schematic flowchart of a video decoding method provided in an embodiment of this application. Figure 6 is a schematic diagram of a slicing scheme determination provided in an embodiment of this application. Figure 7 is a schematic diagram of the fitting result of the encoding delay of a macroblock and the number of encoded bytes of a macroblock provided in an embodiment of this application. Figure 8 is a schematic flowchart of a slicing scheme determination provided in an embodiment of this application. Figure 9 is a schematic diagram of how to achieve frame-by-frame changes of multiple slices by adjusting slice boundaries provided in an embodiment of this application.Figure 10 is a schematic diagram of the experimental results of a video comparison experiment provided in an embodiment of this application. Figure 11 is a schematic diagram of another experimental result of a video comparison experiment provided in an embodiment of this application. Figure 12 is a schematic diagram of another experimental result of a video comparison experiment provided in an embodiment of this application. Figure 13 is a schematic diagram of the experimental results of another video comparison experiment provided in an embodiment of this application. Figure 14 is a schematic block diagram of a video encoding device provided in an embodiment of this application. Figure 15 is a schematic block diagram of a video decoding device provided in an embodiment of this application. Figure 16 is a schematic structural block diagram of a computing device provided in an embodiment of this application. Figure 17 is a schematic structural block diagram of a computing device cluster provided in an embodiment of this application. Figure 18 is a schematic structural block diagram of another computing device cluster provided in an embodiment of this application. WO 2024 / 255171 PCT / CN2023 / 138765 5 Detailed Description The technical solutions in the embodiments of this application will be described below with reference to the accompanying drawings. To facilitate understanding of the technical solutions of this application, the technical terms mentioned in this application will be briefly explained below. 1. Video Encoding and Decoding Technology. Video encoding technology is used to compress raw video, thereby reducing the transmission and storage costs of video data. The video encoding process may involve sampling frames or image data in the video stream, encoding the frames or image data, and then compressing them into smaller data packets for transmission. Video encoding technology mainly compresses redundant information in video data, such as spatial redundancy caused by strong correlation between adjacent pixels in the same video frame, temporal redundancy caused by strong correlation between adjacent frames, and visual redundancy in video information that is imperceptible to the human eye. Currently, the main video encoding standards include H.264 (Advanced Video Coding, AVC), H.265 (High Efficiency Video Coding, HEVC), and H.266 (Versatile Video Coding, VVC). Correspondingly, video decoding technology is used to decode or decompress encoded video. For example, the video decoding process may involve the receiving end of the video playback opening the received encoded video data packet, decoding the video data packet and reconstructing it into multiple frames, and finally arranging these multiple frames sequentially to form a video stream. Figure 1 is a schematic diagram of the architecture of the video encoding and decoding system provided in an embodiment of this application. The video encoding and decoding system provided in this application embodiment may include a capture terminal 110, a transmission unit 150, and a playback terminal 120. The capture terminal 110 may include a capture unit 130 and an encoding unit 140, and the playback terminal 120 may include a receiving unit 160, a decoding unit 170, and a display unit 180.The acquisition unit 130 is used to acquire images at a preset frame rate, including but not limited to acquiring images from a camera, a graphics card, or a graphics engine. The encoding unit 140 is used to perform video encoding, encoding each video frame according to the format specified in the video encoding standard, such as H.264 and H.265 mentioned above. This application does not limit the specific encoding format. In the embodiments of this application, the encoding unit 140 is used to encode the video frames divided into N slices in parallel and output the encoded video stream, where N is a positive integer greater than or equal to 2. The encoding unit 140 may include a software encoder or a hardware encoder. The transmission unit 150 is used to transmit the video stream output by the acquisition end 110 and distribute it to the playback end 120. The receiving unit 160 is used to download and cache the video stream, downloading the video stream from the transmission unit 150 to the local cache. The decoding unit 170 is used to decode the video stream, that is, to decode the video frames containing N encoded slices, and to reassemble the n slices to obtain the video frame picture or image, and then transmit it to the display unit 180. The decoding unit 170 may include a software decoder or a hardware decoder, etc. The display unit 180 is used to display the image, and displays the image sent by the decoding unit 170 on the display screen. It is worth noting that Figure 1 is only a schematic diagram of a system architecture provided by an embodiment of this application, and the devices, components, modules, etc. shown in the figure do not constitute any limitation. For example, the acquisition end 110 may also include a streaming unit, and this application does not limit this. 2. Sequence, Frame, Slice, Macroblock Figure 2 shows the composition structure of the video in the video encoding process provided by the embodiment of this application. Among them, the video within a period of time is generated by the acquisition unit 130 into a sequence including multiple video frames. Each video frame in the sequence is further divided into multiple slices, and each slice is an independent encoding unit. Each slice comprises multiple macroblocks, each macroblock consisting of pixels ranging from 4x4 to 128x128. In other embodiments of this application, each macroblock may also consist of an integer number of blocks, each block consisting of multiple pixels. For example, in H.264, a block may be a luminance pixel block containing 16x16 pixels and two color pixel blocks containing 8x8 pixels. The above partitioning process is described in detail below. In a video over a period of time, the differences in pixels, luminance, and color temperature between adjacent video frames are usually small. Therefore, the first video frame of this period can be selected for complete encoding, and the encoding process of the next video frame only records the pixels and luminance of the first video frame.The difference can be identified by features such as color temperature. The set of video images whose content remains largely unchanged over a period of time is called a sequence, or a sequence comprising a segment of video frame data with the same or similar characteristics. Video frames include I (intra-coded) frames used to represent keyframes, P (predictive-coded) frames used to record differences from the previous frame, and B (bidirectionally predicted) frames used to record differences from frames before and after. For example, the first frame in a sequence can be an I frame, and the other frames can be P or B frames. In current video standards such as H.264, H.265, and H.266, each video frame can be divided into one or more slices, and each slice can be independently encoded and decoded by a separate processor, independent of other slices within the same video frame. As shown in Figure 2, the video frame is divided into four slices; the embodiments of this application do not limit the number of slices. In the embodiments of this application, the area of multiple slices (i.e., the number of macroblocks they contain) can be the same area divided equally, or different areas, meaning they contain different numbers of macroblocks. In some other embodiments of this application, the shape of the slice can be a rectangle as shown in Figure 2, or an irregular shape, that is, the slice boundary between adjacent slices spans multiple macroblock rows. For example, a macroblock row is divided into two parts by the slice boundary: the first part is the last row of macroblock rows of the i-th slice, and the second part is the first row of macroblock rows of the (i+1)-th slice. The advantages of using slice segmentation for video frames are reduced error propagation, reduced data packet size, and the ability to perform parallel encoding and decoding of multiple slices. In the case of parallel encoding and decoding, after the video frame is segmented, the overall coding performance of the video frame depends on the slice with the worst coding performance. If coding latency is taken as a consideration of coding performance, Figure 3 shows a schematic diagram of the non-slice coding method and the slice coding method. Among them, R0-R15 are slice rows, which are the rows composed of the most basic video coding units in the embodiments of this application. For example, if the most basic video coding unit is a single macroblock, then a slice row can be a macroblock row consisting of an entire row of macroblocks; if the most basic video coding unit is a single pixel, then a slice row can be a pixel row consisting of an entire row of pixels. This application does not limit the type and number of slice rows used for encoding in a slice; the 16 slice rows shown in Figure 3 are merely an example. According to the encoder's kernel design, when encoding each video coding unit in a slice row, prediction must rely on the previously encoded video coding units. Generally, macroblocks or pixels in a slice are encoded according to the scan order. For example, if the video coding unit is a pixel, each pixel in the first slice row depends on the previous encoded pixel for prediction, while the first pixel in the second slice row...Each pixel needs to rely on the pixels already encoded in the first row for prediction. Therefore, as shown in Figure 3, the encoding start time of each slice row is slightly later than the previous slice row that has already started encoding. As shown in Figure 3(a), if the video frame is not segmented by slices, the total encoding delay of the video frame depends on the last slice row or the slice row that finishes encoding the latest, that is, the total encoding delay of the video frame is the encoding completion time t of slice row R15 shown in Figure 3(a); as shown in Figure 3(b), if the video frame is segmented by slices, and each slice is encoded independently, the total encoding delay of the video frame depends on the slice that finishes encoding the latest, that is, the encoding completion time t2 of slice row R7 shown in Figure 3(b). The reason is that, as shown in Figure 3(b), R4, R8, and R12, which originally needed to wait for the previous slice row to be encoded, can start encoding together with R0, thereby reducing the total encoding delay of the video. Since t2 is less than ti, the total coding latency of the video frame in Figure 3(b) is less than that in Figure 3(a). Therefore, slicing the video frame improves the overall coding performance. Currently, most traditional slicing methods use a fixed, average slicing approach, meaning each frame uses the same slicing scheme and each slice has the same area. For example, each video frame in the sequence is averaged into four slices as shown in Figure 3(b). However, with the expansion of applications in real-time fields such as video conferencing, online education, remote terminals, interactive games, e-commerce live streaming, and telemedicine, the traditional fixed and average slicing method is not suitable for real-time video coding in these fields. This is because the video content in these fields exhibits imbalance; one part of the video frame content changes little, has smooth texture, low video complexity, and fast coding speed, while another part changes drastically, has complex texture, high video complexity, and slow coding speed, leading to uneven coding performance among the slices within the same video frame. For example, in video conferencing or interactive live streaming, video content containing human figures changes more drastically than video content containing background walls. As shown in Figure 3(b), if the average slice segmentation method is used, the encoding delay of the second slice containing the human image is much greater than that of the fourth slice containing the background wall. This results in the fourth slice completing encoding first, but it must wait for the second slice to finish encoding and cannot start encoding the next frame prematurely. Furthermore, the video used for encoding may include multiple sequences, and the changing trends of adjacent video frames within each sequence or video frames within different sequences are different. If a fixed slice segmentation scheme is used for all sequences, the encoding performance of some video frames will be significantly lower than that of other video frames. For example, the first slice of the i-th video frame contains a rapidly changing human image, while the second slice contains a slowly changing background wall.The first slice of the m-th video frame contains a slowly changing background wall, while the second slice contains a rapidly changing human figure. If the m-th video frame uses the same slice segmentation method as the i-th video frame, the encoding performance of the two video frames will be unbalanced, meaning the encoding performance of the m-th video frame will be much lower than that of the i-th video frame. To solve the problem of unbalanced encoding performance between slices and between video frames, this application proposes a video encoding method 400. Figure 4 shows a schematic flowchart of a video encoding method 400 provided in an embodiment of this application, wherein method 400 includes steps 410 to 440. In method 400, the encoding performance of each slice of the current video frame is predicted based on the slicing scheme of the first video frame, thereby determining the slicing scheme corresponding to the current video frame. The slicing scheme corresponding to the current frame can be different from the slicing scheme of the first video frame, thus realizing the dynamic slicing process of different video frames. The apparatus for implementing method 400 can be the encoding unit 140 shown in Figure 1. Step 410: Obtain the first slicing scheme of the first video frame. Wherein, the first video frame is a video frame that has been encoded. The first slicing scheme is used to divide the first video frame into N first slices, where N is a positive integer greater than or equal to 2. The areas of the N first slices can be the same. For example, if the first video frame is a keyframe (I-frame) in the sequence, meaning it's difficult to predict and encode the first video frame by referencing a significantly different previous frame or several previous frames, the embodiments of this application can use an average slicing method for the first video frame. The areas of the N first slices can also be different. For example, if the first video frame is a P-frame or a B-frame, the areas of the N first slices correspond to the actual changes in the video content of the first video frame. That is, the more complex the changes in the video content (including WO 2024 / 255171 PCT / CN2023 / 138765 7), the smaller the area of the first slice. Step 420: Determine the predicted coding performance values of the N second slices obtained when the second video frame uses the first slicing scheme. The second video frame is the current video frame, i.e., the video frame to be encoded. The second video frame can be the frame following the first video frame, or any frame in the video frame sequence that follows the first video frame. In other words, the first video frame is any encoded video frame preceding the first frame in the second video. In the embodiments of this application, the second video frame is preferably the frame following the first video frame. This makes the process of determining or adjusting the slicing scheme smoother, thereby improving the overall video encoding performance. Encoding performance can be any one or more of encoding latency, encoding speed, encoding complexity, encoding efficiency, and adaptive code control. For example, in scenarios with high latency requirements such as live streaming, video conferencing, and cloud gaming, encoding performance can be encoding latency or encoding speed.The higher the coding performance, the lower the coding latency or the faster the coding speed. In scenarios such as telemedicine where both video quality and latency requirements are high, coding performance can be either coding efficiency or compression ratio; that is, higher coding performance leads to higher coding efficiency or higher compression ratio. This predicted coding performance is the predicted coding performance of N second slices obtained by using the first slicing scheme for the second video frame. In the embodiments of this application, the first slicing scheme is used because, as described above regarding sequences, if the second video frame and the first video frame are in the same sequence or even adjacent video frames in the same sequence, the differences in pixels, brightness, and color temperature between the two video frames are small, and consequently, the differences in the slicing schemes of the two video frames will also be small. The N second slices are the slices determined when the second video frame uses the first slicing scheme. These N second slices correspond to N first slices, with each second slice located at the same position in the second video frame as the corresponding first slice in the first video frame, and each second slice having the same area as the corresponding first slice. It is worth noting that the N second slices are not obtained by actually segmenting the second video frame, but are reference slices used to predict coding performance, determined according to the slicing method of the first slicing scheme. In the embodiments of this application, the method for determining the predicted coding performance value of each second slice can be based on empirical formulas, fitting formulas, or prediction models, etc. The method for predicting coding performance will be described in detail below, and will not be repeated here. Step 430: Determine the second slicing scheme of the second video frame based on the predicted coding performance values of the N second slices. Based on the predicted coding performance values of each second slice in the second video frame obtained in step 420, it can be determined whether there is a problem of unbalanced coding performance among the N second slices. If there is an imbalance problem, that is, the predicted coding performance of some second slices is much lower than that of other second slices, then the embodiments of this application can adjust the first slicing scheme, that is, reduce the area of the second slices, and finally obtain a second slicing scheme with balanced coding performance. The specific adjustment method will be described in detail below, and will not be repeated here. In some other embodiments of this application, if the predictive coding performance of each slice is relatively balanced, or if the difference between the maximum and minimum predicted values of the coding performance of the N second slices is small, then the second slicing scheme can directly reuse the first slicing scheme. Step 440: According to the second slicing scheme, the second video frame is divided into N third slices, and the N third slices are encoded respectively. If the second slicing scheme has been adjusted relative to the first slicing scheme, then the area of the N third slices is different from the area of the N second slices, and the coding performance of the N third slices is more balanced. If the second slicing scheme is the same as the first slicing scheme, then the area of the N third slices is different from the area of the N second slices, and the coding performance of the N third slices is more balanced.The area is the same as the area of N second slices. By encoding N third slices in parallel, the encoding speed is accelerated, and if one or more third slices have encoding errors, the errors can be confined to those slices and not spread to other slices, thus reducing the area of screen tearing during decoding. The embodiments of this application determine the predictive coding performance of the current video frame (i.e., the second video frame) and identify a suitable second slice scheme with more balanced encoding performance, thereby significantly improving the encoding performance of the entire video frame and even the entire video. Method 400 can be used in any real-time video encoding scenario, such as video conferencing, online education, remote terminals, interactive games, e-commerce live streaming, and telemedicine, as mentioned above. For example, in a real-time interactive cloud gaming scenario, game content is rendered and generated on a cloud server. Players perform game operations on the client, and the client uploads operation instructions to the cloud. The cloud generates game content based on the user's operation instructions, encodes the game content, and transmits it to the client via the network. Another example is in live streaming and video conferencing scenarios, where the host or broadcaster needs to interact with multiple parties in real time via video. In these scenarios, high encoding speed and low encoding latency are both important. The method provided in this application can be used in various real-time video applications, including but not limited to video conferencing applications, VoIP applications, and streaming media applications. Related technical products may include codecs, video conferencing software, and streaming media servers. The method provided in this application can be implemented through hardware devices or software products, or it may be implemented through a software platform provided as a service or a software development kit (SDK) accompanying a cloud service. Correspondingly, Figure 5 shows a schematic flowchart of a video decoding method 500 provided in an embodiment of this application. Method 500 includes steps 510 to 530. The apparatus for implementing method 500 may be the decoding unit 170 shown in Figure 1. Step 510: Obtain the encoded second video frame. The second video frame includes the N third slices encoded in parallel as mentioned above. Step 520: Decode the N encoded third slices in the second video frame to obtain N video frame segments. Step 530: The n video frame slices are spliced together to obtain the decoded second video frame. The splicing of the N video frame slices can be achieved by calculating the position of each frame slice within the video frame based on the position field of the first macroblock of each slice (first_mb_in_slice), and then splicing the N video frame slices one by one according to their positions. The implementation process of method 400, or step 420 and step 430, will be described below with reference to specific embodiments. Figure 6 shows a schematic block diagram of a slicing scheme provided by an embodiment of this application.As shown in Figure 6(a), the first video frame is divided into N first slices according to the first slicing scheme. In step 420, as shown in Figure 6(b), the second video frame is divided into N second slices after applying the first slicing scheme. The dashed lines in Figure 6(b) indicate that the N second slices are not the actual segmentation of the second video frame, but are only used as reference slices to simulate the second video frame after slicing when predicting coding performance. In other words, the N second slices are only used as reference slices in the prediction process, not slices obtained from the actual slicing process. The predicted coding performance of the N second slices is finally obtained through empirical formulas, fitting formulas, or prediction models, such as the coding latency shown in Figure 6. Among them, the coding latency of the second slice #2 is higher than that of the second slice #1 and much higher than that of the second slice #N. The technical solution for determining the predicted value of coding performance in the embodiments of this application will be described in detail below. Optionally, in the embodiments of this application, a prediction model can be used to predict the coding performance. The prediction model can be an artificial neural network model or a decision tree model such as random forest, XGBoost, etc. When training the prediction model, the input to the prediction model can be any one or more of the relevant parameters of each slice in the k-th video frame, such as the coding performance of each slice, the number of bytes after coding, and the coding bitrate, the number of macroblocks or pixels contained, and the coding type. The output of the prediction model can be the actual coding performance of each slice obtained by slicing the k2-th video frame according to the slicing scheme of the ki-th frame. In this way, when using the prediction model for prediction, the predicted coding performance values of the N second slices can be determined based on the values of the relevant parameters of the N first slices. Optionally, in the embodiments of this application, the training-obtained fitting formula can be used to predict the coding performance of the N second slices. Taking the coding delay shown in Figure 6(b) as a consideration of coding performance, in order to accurately predict the dependent variable, i.e., the coding delay of each second slice, it is necessary to select appropriate independent variables. For example, an example of a fitting formula is given below. Through training and fitting using numerical experiments, the embodiments of this application show a logarithmic relationship between the encoding latency and the number of encoded bytes for each macroblock. The number of encoded bytes for a macroblock is related to the amount of motion and detail in the image region within the macroblock. Figure 7 illustrates the fitting results of the encoding latency versus the number of encoded bytes for each macroblock at 720P and 4K video resolutions, including scatter plots and the fitting formula. As shown in Figure 7, the fitting result of this formula has a small error in most cases. In fact, other cases with larger errors are mostly those involving scene changes or sequence switching in the video, i.e., when the current frame is a keyframe (I-frame). The two fitting formulas in Figure 7 can be expressed by the following Formula 1: macroblock_time = ax ln(macroblock_size) + b (Formula 1)wherein, macroblock_size is the number of bytes of the macroblock after encoding, and e is the encoding delay of the macroblock in milliseconds. The values of a and b depend not only on information such as the video resolution, but also may depend on the platform for performing video encoding, for example, video encoders of different types or models, or different apparatuses provided with video encoders of the same type or model. Formula 1 indicates that the encoding time of a macroblock is related to the number of bytes of the macroblock after encoding. Moreover, since the degree of change between video frames in the same sequence is small, the number of bytes after encoding of a macroblock in a first video frame is substantially the same as the number of bytes after encoding of a macroblock at the same position in a second video frame. Therefore, when predicting the encoding delay of each second slice, the embodiments of the present application can reuse the number of bytes after encoding of macroblocks of each first slice as the predicted encoding bytes of macroblocks at the same positions in the corresponding second slice. Finally, the predicted encoding delay of the second slice is shown in Formula 2: pre_slice_time = Σi=1 to n[α × In (macroblock_sizei) + b] (Formula 2) where pre_slice_time is the predicted encoding delay value of the second slice in milliseconds, macroblock_sizei is the predicted encoding bytes of the i-th macroblock in the second slice in bytes, that is, the actual encoding bytes of the i-th macroblock in the first slice corresponding to the second slice, and the second slice includes n macroblocks in total. In some other embodiments of the present application, in order to save calculation time in the encoding process, the encoding bytes of multiple macroblocks in the second slice can be approximately regarded as the same, that is, the predicted encoding bytes of each macroblock is the ratio of the total predicted encoding bytes of the second slice to the number of macroblocks in the second slice, or in other words, the ratio of the total encoding bytes of the first slice corresponding to the second slice to the number of macroblocks. Then Formula 2 can be equivalently converted into Formula 3 as shown below: WO 2024 / 255171 PCT / CN2023 / 138765 9 pre_slice_time = [a × In ( slice_size / num_of_macroblocks ) + b] × num_of_macroblocks (Formula 3) wherein, slice_size is the total predicted encoding bytes of the second slice, that is, the total encoding bytes of the corresponding first slice, and num_of_macroblocks is the number of macroblocks in the second slice. Optionally, in some other embodiments of the present application, Formula 3 can be trained or fitted according to the historical data used for training the prediction model mentioned above, so as to finally obtain specific values of a and b. Step 420 can predict the predicted encoding delay value of the second slice by using Formula 3 that includes specific values of a and b.In some other embodiments of the present application, if it is only necessary to compare the size ranking relationship of the predictive coding delays between the respective second slices without requiring specific predicted values, 4 and 6 can directly use constant values, for example, 4 is 1 and 6 is 0. In this case, formula 3 can be converted into formula 4 shown as follows: pre_slice_time = ln (----- slice_size ----- / num_of_macroblocks ) × Locks (formula 4) By using formula 4, the size relationship of the predictive coding delays between the respective second slices can be obtained, for example, the size relationship of the coding delays of the second slices shown in (b) of FIG. 6 is: second slice #2 > second slice #1 > second slice #N. When subsequently determining the second slice scheme, the areas of the N second slices or the areas of the N first slices corresponding to the N second slices can be adjusted only for the second slices that rank high or low in the size ranking. In step 430, the second slice scheme is determined according to the predicted coding delay values t₁~tN of the respective second slices shown in (b) of FIG. 6. The second slice scheme may be a second slice scheme determined by adjustment based on the first slice scheme, such as the second slice scheme shown in (c) of FIG. 6, or may reuse the first slice scheme. Optionally, in the embodiments of the present application, before determining the second slice scheme, the method 400 may further include determining whether the predictive coding delays of the N second slices are balanced, for example, whether the difference between the maximum value and the minimum value of the predictive coding delays of the N second slices is greater than a target difference threshold. For example, it is determined whether the difference between the minimum value and the maximum value of the predictive coding delays of the N second slices is greater than 20% of the maximum value, or whether the difference between the maximum value and the minimum value is greater than 100 ms, etc. When it is determined that the predictive coding delays of the N second slices are not balanced, it is determined that the first slice scheme needs to be adjusted to determine the second slice scheme. In this way, frequent adjustment of slice schemes during the encoding process of consecutive video frames can be reduced. The following specifically describes embodiments of adjusting the first slice scheme to obtain the second slice scheme. FIG. 8 shows a schematic flow chart of determining a second slice scheme provided by an embodiment of the present application, where the dashed part represents optional steps. Wherein, when the coding performance prediction value is positively correlated with the coding performance, the second slice with the largest coding performance prediction value has the optimal coding performance; when the coding performance prediction value is negatively correlated with the coding performance, the second slice with the smallest coding performance prediction value has the worst coding performance. If coding delay is taken as the consideration of coding performance, under the condition that it is determined that the second video frame is not a key I frame and it is determined that the predictive coding performance (i.e., coding delay) of the N second slices is not balanced, the N second slices are traversed. First, the second slice with the worst coding performance, that is, the highest coding delay, such as the second slice #2 shown in (b) of FIG. 6, is determined, and the area of the second slice #2 is adjusted, for example, reducedThe number of macroblocks or the number of slice rows reduced. Preferably, to achieve higher adjustment efficiency, the method of adjusting the area of the second slice in this application is to reduce the number of slice rows by K. As shown in Figure 6(c), the third slice #2 has 1 fewer slice row than the second slice #2. In the embodiments of this application, the value of K is related to the difference between the maximum and minimum values of the coding performance prediction value. For example, the larger the difference, the larger the value of K. In some other embodiments of this application, in order to reduce the magnitude of the slice scheme adjustment and avoid frequent adjustments, the value of K can be 1. Optionally, the macroblocks or slice rows reduced in the second slice #2 can be evenly distributed to other second slices, so that some or all of the other second slices have one or more macroblocks added. Optionally, as shown in Figure 8, the embodiments of this application can also determine the second slice with the best coding performance, i.e., the second slice #N shown in Figure 6(b), and distribute the macroblocks or slice rows reduced in the second slice #2 to the second slice #N, while the area of other second slices can remain unchanged. As shown in Figure 6(c), the third slice #N has one more slice row than the second slice #N. Ultimately, as shown in Figure 6(c), the second slicing scheme is determined after adjusting the first slicing scheme. The second video frame is divided into N third slices after slicing using the second slicing scheme. Thus, compared to the coding performance of the N first slices, the coding performance of the N third slices is more balanced, and the total coding latency shown in Figure 6(c) is lower than the total coding latency shown in Figure 6(b). Similarly, if the coding performance of the N third slices in the second video frame still does not meet the requirement of balance, this application determines the third slicing scheme when encoding the third video frame. As shown in Figure 6(d), the fourth slice #1 and the fourth slice #2 in the third video frame each have one fewer slice row than the third slice #1 and the third slice #2, while the fourth slice #N has one more slice row than the third slice #N. WO 2024 / 255171 PCT / CN2023 / 138765 10 Optionally, the method of adding or removing slice rows can be to directly adjust the slice boundaries between each slice. Figure 9 shows a schematic diagram of a slice scheme changing frame by frame. As shown in Figure 9(a), video frame A is divided into slice #A to slice #D. Figures 9(b), (c), and (d) show different slice boundary adjustment methods, respectively. For example, combined with Formula 4, if for a 1024x1920 video, assuming the video frame is divided into 4 slices as shown in Figure 9, and each macroblock contains 64x64 pixels, then each video frame contains a total of 480 macroblocks. Table 1 shows a data table for a coding performance prediction corresponding to video frame A. Among them, the second and third columns of Table 1 show the number of encoded bytes and the macroblocks contained in each slice of video frame A.The number of macroblocks, the fourth column of Table 1 shows the predicted coding delay of video frame B using the slicing scheme of video frame A, calculated based on Formula 4. The number of macroblocks can be obtained from the slicesegment_address field in the video analyzer, and the number of bytes after encoding of the slice can be obtained from the slice size in the video analysis tool. Table 1 Number of bytes after encoding of slice (bytes) Number of macroblocks Predicted coding delay (ms) #A 3533 120 406 #B 244 120 85 #C 1272 120 283 #D 2411 120 360 According to the predicted coding delay in the fourth column of Table 1 and the process of adjusting the slice area in Figure 8, it can be seen that slice #A needs to be reduced by 1 row and slice #B needs to be increased by 1 row. As shown in Figure 9(b), by moving the slice boundary AB between slice #A and slice #B one row towards slice #A, the slicing scheme of video frame B is obtained. In other words, if two slices that need adjustment are adjacent slices, the slice boundary between the two slices can be moved one slice row towards the slice with the worst coding performance. After encoding video frame B, the coding performance prediction data table for video frame B can be obtained as shown in Table 2. The fourth column of Table 2 is the predicted coding delay when video frame C adopts the slicing scheme of video frame B. Table 2 Slice Number of bytes after slicing Number of macroblocks Predicted coding delay (ms) #A 2788 90 309 #B 1266 150 320 #C 1990 120 337 #D 2411 120 360 According to the predicted coding delay shown in the fourth column of Table 2, the difference between the maximum predicted coding delay of 360 ms and the minimum predicted coding delay of 309 ms does not reach 20% or 100 ms of the maximum value of 360 ms. Therefore, as shown in Figure 9(c), the slicing scheme of video frame C was not adjusted based on the slicing scheme of video frame B. After encoding video frame C, the data table of predicted coding performance corresponding to video frame C, as shown in Table 3, can be obtained. The fourth column of Table 3 is the predicted coding delay when video frame D adopts the slicing scheme of video frame C. Table 3 Number of bytes after slicing (bytes) Number of macroblocks Predicted coding delay (ms) #A 1084 90 224 #B 356 150 140 #C 305 120 112 #D 47 120 35 According to the predicted coding delay in the fourth column of Table 3 and the process of adjusting the slice area in Figure 8, it can be seen that slice #A needs to be reduced by 1 slice row and slice #D needs to be increased by 1 slice row. As shown in Figure 9(d), by adjusting all slice boundaries between slice #A and slice #D(Slice boundaries AB, BC, and CD) are moved one row towards slice #A to obtain the slicing scheme for video frame D. In other words, if two slices that need adjustment are not adjacent slices, all slice boundaries between the two slices can be moved one slice row towards the slice with the worst coding performance. This achieves smooth, row-by-row movement of slice boundaries between consecutive frames. This application determines the slicing scheme corresponding to the current video frame by determining the predictive coding performance of the current video frame, making the coding performance of each slice more balanced after the current video frame is segmented, and improving the overall coding performance of the current video frame. The beneficial effects of the embodiments of this application will be introduced below with specific experimental results. Tables 4 and 5 show the experimental results provided by the embodiments of this application for different types or different resolutions of video. Table 4 shows the encoding speed (frames per second, FPS) and encoding quality of 18 videos from two scenarios: live streaming and live e-commerce, after applying the video encoding method of this application. The resolutions of these 18 videos range from 480x720 to 1080x1920. As shown in Table 4, the average encoding speed of the 18 videos improved by 6% in both live streaming and live e-commerce scenarios, with the largest improvement being 19%, while the average encoding quality remained almost unchanged. Table 4 shows the dataset's Average, Max, Min, FPS, Quality, FPS, Quality, FPS, Quality. Live Streaming: 6.34%, -0.06%, 18.16%, 0.10%, -1.52%, -0.26%; Live E-commerce: 6.18%, 0.07%, 19.08%, 0.38%, 0.24%, -0.03%. Table 5 shows the encoding speed (frames per second, FPS) and quality of 30 videos in a game scenario after applying the video encoding method of this application. The resolutions of these 30 videos are divided into three categories: less than 2K, 2K, and 4K. As shown in Table 5, in the game scenario, the average encoding speed of the 30 videos improved by 3% to 4%, with a maximum improvement of 10%, while the average encoding quality remained almost unchanged. Table 5. Dataset Average Max Min FPS Quality FPS Quality FPS Quality <2K 3.28% -0.02% 5.84% 0.19% 0.37% -0.33% 2K 4.49% 0.10% 10.21% 0.31% -0.09% -0.15% 4K 3.16% 0.07% 9.45% 0.27% -0.33%-0.08% Figure 10 is a schematic diagram of the experimental results of a video comparison experiment provided by an embodiment of this application. Figure 10 shows the encoding delay of each slice in multiple video frames of the experimental video. The experimental results in Figure 10 are obtained by applying a video coding method that includes a traditional evenly divided and fixed slicing scheme and a video coding method that includes the dynamic slicing scheme of this application to the video frames in the same video. As shown in Figure 10(a), when the traditional evenly divided and fixed slicing scheme is used, the encoding delay of the four slices is not balanced. For example, the encoding delay of slices #A and #C is about 5 s to 15 s, the encoding delay of slice #B is about 15 s to 25 s, and the encoding delay of slice #D is concentrated between 5 s and 10 s. As shown in Figure 10(b), when the dynamic slicing scheme of this application is adopted, the encoding delay of slices #A to #D is relatively balanced, and the encoding delay is concentrated in 10 s~15 s. Therefore, the dynamic slicing method of this application can make the encoding delay of each slice balanced and significantly reduce the total encoding delay of the video frame, that is, the encoding delay of the slice that completes the encoding process last. Figure 11 is a schematic diagram of another experimental result of the above video comparison experiment. Figure 11 shows the number of encoded bytes of each slice in multiple video frames. The experimental results in Figure 11 were obtained by applying a video coding method including the traditional evenly divided and fixed slicing scheme and a video coding method including the dynamic slicing scheme of this application to the video frames in the same experimental video in Figure 10. As shown in Figure 11(a), when the traditional evenly divided and fixed slicing scheme is adopted, the number of encoded bytes of the four slices is not balanced. The number of encoded bytes of slice #D is much smaller than that of slice #A and slice #B, while the number of encoded bytes of slice #A changes or fluctuates more drastically. As shown in Figure 11(b), when the dynamic slicing scheme of this application is adopted, the number of encoded bytes for slices #A to #C is mainly concentrated between 2000 bytes and 4000 bytes, and the number of encoded bytes for slice D is mainly concentrated between 1000 bytes and 2000 bytes. Furthermore, except for some fluctuations, the degree of change in the number of encoded bytes for slice #A gradually decreases. Therefore, the dynamic slicing scheme of this application achieves a balance in the number of encoded bytes for each slice. Figure 12 is a schematic diagram of another experimental result from the above video comparison experiment. Figure 12 shows the ratio of the maximum to the minimum encoding delay and the ratio of the maximum to the minimum number of encoded bytes for each slice in each video frame of the experimental video. WO 2024 / 255171 PCT / CN2023 / 138765 12 As shown in Figure 12(a), when using the traditional evenly divided and fixed slicing scheme, the maximum value of the ratio of the maximum coding delay to the minimum coding delay is approximately 7, and the average value is approximately 3.4; when using the dynamic slicing scheme of this application, the maximum coding delay and minimum coding delay of each video frame are...The ratio of minimum coding latency is mostly between 1 and 2, with a maximum value of approximately 3 and an average value of 1.7. Therefore, when using the scheme of this application, both the maximum and average values of the ratio of maximum to minimum coding latency are reduced by a factor of 2. As shown in Figure 12(b), when using the traditional evenly divided and fixed slicing scheme, the maximum value of the ratio of maximum to minimum coding bytes is approximately 180, and the average value is approximately 60; when using the dynamic slicing scheme of this application, the ratio of maximum to minimum coding bytes for each video frame is mostly between 5 and 10, with a maximum value of approximately 30. Therefore, when using the scheme of this application, the ratio of maximum to minimum coding bytes decreases more significantly, meaning the distribution of coding bytes across slices within the same video frame is more balanced. Figure 13 is a schematic diagram of the experimental results of another video comparison experiment. This video comparison experiment compared the total coding latency (i.e., the sum of the coding latencies of all video frames) of multiple videos with resolutions less than 2K and 4K. As shown in Figure 13(a), compared to traditional video encoding methods, when using the video encoding method of this application, the total encoding latency of five videos with a resolution less than 2K is reduced by a maximum of 11.2% and a minimum of 2.4%. As shown in Figure 13(b), when using the scheme of this application, the total encoding latency of three videos with a resolution of 4K is reduced by a maximum of 10.8% and a minimum of 9.3%. Therefore, the technical solution of this application can significantly reduce the total encoding latency of videos. The video encoding and decoding method according to the embodiments of this application has been described above. The apparatus and device according to the embodiments of this application are described below with reference to Figures 14 to 18. Figure 14 is a structural example diagram of a video encoding apparatus 1400 provided in an embodiment of this application. The video encoding apparatus 1400 includes an acquisition module 1410, a processing module 1420, and an encoding module 1430. The acquisition module 1410 is used to acquire a first slicing scheme for a first video frame and execute step 410 shown in Figure 4. Processing module 1420 is used to determine the coding performance prediction values of N second slices obtained when the second video frame adopts the first slicing scheme, and to determine the second slicing scheme of the second video frame based on the coding performance prediction values of the N second slices. Encoding module 1430 is used to divide the second video frame into N third slices according to the second slicing scheme, and to encode the N third slices respectively. Figure 15 is a structural example diagram of a video decoding device 1500 provided in an embodiment of this application. The video decoding device 1500 includes an acquisition module 1510 and a decoding module 1520. The acquisition module 1510 is used to acquire the encoded second video frame, which includes the encoded N third slices. The decoding module 1520 is used to decode the encoded N third slices to obtain N video frame slices, and to process the N video frame slices.The frames are then stitched together to obtain the decoded second video frame. All of the above modules can be implemented in software or by physical components. For example, the implementation of processing module 1420 will be described below. Similarly, the implementation of acquisition modules 1410 and 1510, decoding module 1520, and encoding module 1430 can refer to the implementation of processing module 1420. As an example of a software functional unit, processing module 1420 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, processing module 1420 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code can be distributed within the same availability zone (AZ) or across different AZs. Each AZ includes one or more geographically proximate data centers. Typically, a region can include multiple AZs. Similarly, the multiple hosts / virtual machines / containers used to run the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within one region. Communication between two VPCs within the same region, and between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs. As an example of a hardware functional unit, the processing module 1420 can include at least one computing device, such as a server. Alternatively, the processing module 1420 can also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The aforementioned PLD can be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. (WO 2024 / 255171 PCT / CN2023 / 138765 13)The processing module 1420 includes multiple computing devices that can be distributed in the same region or in different regions. The processing module 1420 can also be distributed in the same Availability Zone (AZ) or in different AZs. Similarly, the processing module 1420 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. The multiple computing devices included in the processing module 1420 can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs. This application also provides a computing device 1600. As shown in FIG16, the computing device 1600 includes: a bus 1602, a processor 1604, a memory 1606, and a communication interface 1608. The processor 1604, the memory 1606, and the communication interface 1608 communicate via the bus 1602. The computing device 1600 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 1600. Bus 1602 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one line is used in Figure 16, but this does not imply that there is only one bus or one type of bus. Bus 1602 can include pathways for transmitting information between various components of computing device 1600 (e.g., memory 1606, processor 1604, communication interface 1608). Processor 1604 can include any one or more processors such as a central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP). Memory 1606 can include volatile memory, such as random access memory (RAM). The memory 1606 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).The memory 1606 stores executable program code, and the processor 1604 executes the executable program code to implement the functions of the aforementioned acquisition module 1410 and acquisition module 1510, processing module 1420, decoding module 1520, and encoding module 1430, thereby implementing the aforementioned video encoding method. That is, the memory 1606 stores instructions for executing the aforementioned video encoding method. The communication interface 1608 uses a transceiver module, such as, but not limited to, a network interface card or transceiver, to enable communication between the computing device 1600 and other devices or communication networks. Figure 17 of this embodiment also provides a computing device cluster. The computing device cluster includes at least two computing devices. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a desktop computer, a laptop computer, or a smartphone, etc. As shown in Figure 17, the computing device cluster includes at least two computing devices 1600. The memories 1606 of multiple computing devices 1600 in the computing device cluster may store the same instructions for executing the aforementioned video encoding or decoding methods. In some possible implementations, the memories 1606 of the multiple computing devices 1600 in the computing device cluster may also each store a portion of the instructions for executing the aforementioned video encoding method. In other words, a combination of one or more computing devices 1600 can jointly execute the instructions for executing the aforementioned video encoding method. It should be noted that the memories 1606 of different computing devices 1600 in the computing device cluster may store different instructions, each used to execute a portion of the functions of the aforementioned device. That is, the instructions stored in the memories 1606 of different computing devices 1600 can implement the functions of one or more modules among the acquisition module, processing module, and encoding module. In some possible implementations, the multiple computing devices in the computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 18 illustrates one possible implementation. As shown in Figure 18, two computing devices 1600A and 1600B are connected via a network. Specifically, the network is connected via communication interfaces in each computing device. In this possible implementation, the memory 1606 in computing device 1600A stores instructions for the functions of the acquisition module. Simultaneously, the memory 1606 in computing device 1600B stores instructions for executing the functions of the processing module and the encoding module. It should be understood that the functions of computing device 1600A shown in FIG. 18 can also be performed by multiple computing devices 1600. Similarly, the functions of computing device 1600B can also be performed by multiple computing devices 1600. This application embodiment also provides a chip including a processor and a data interface, the processor reading memory through the data interface.The instructions stored on the device are used to execute the video encoding method described above. This application also provides a computer program product containing instructions. This computer program product can be software or program products containing instructions that can run on a computing device or be stored on any usable medium. When the computer program product runs on at least one computing device, it causes at least one computing device to execute the video encoding method described above. This application also provides a computer-readable storage medium. This computer-readable storage medium can be any usable medium that a computing device can store, or a data storage device such as a data center containing one or more usable media. The usable medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the video encoding method described above. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application. Those skilled in the art can clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is merely a logical functional division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical or other forms. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Selection can be made according to actual needs.Some or all of the modules are selected to achieve the purpose of the solution in this embodiment. Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes: USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, and other media capable of storing program code. The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims. WO 2024 / 255171 PCT / CN2023 / 138765 15 Claim 1. A method for video coding, characterized in that the method comprises: obtaining a first slicing scheme for a first video frame, the first slicing scheme being used to divide the first video frame into N first slices, where N is a positive integer greater than or equal to 2; determining the coding performance prediction values of N second slices obtained when a second video frame adopts the first slicing scheme, wherein the N second slices correspond one-to-one with the N first slices, each second slice being located at the same position in the second video frame as the corresponding first slice is located in the first video frame, and the area of each second slice is the same as the area of the corresponding first slice; determining a second slicing scheme for the second video frame based on the coding performance prediction values of the N second slices, the second slicing scheme being used to divide the second video frame into N third slices; dividing the second video frame into the N third slices based on the second slicing scheme; and encoding the N third slices respectively to obtain the encoded second video frame. 2. The method according to claim 1, wherein determining the second slicing scheme of the second video frame based on the coding performance prediction values of the N second slices comprises: calculating the area of some or all of the N second slices based on the coding performance prediction values of the N second slices.3. The method according to claim 2, wherein adjusting the area of some or all of the N second slices comprises: determining a fourth slice from the N second slices, wherein the coding performance prediction value of the fourth slice is the smallest when the coding performance prediction value is positively correlated with the coding performance, and the coding performance prediction value of the fourth slice is the largest when the coding performance prediction value is negatively correlated with the coding performance; and reducing the area of the fourth slice. 4. The method according to claim 3, wherein reducing the area of the fourth slice comprises: moving the slice boundary of the fourth slice and at least one adjacent second slice toward the fourth slice by K slice rows, where K is a positive integer. 5. The method according to claim 3, characterized in that the method further comprises: determining a fifth slice from the N second slices, wherein the coding performance prediction value of the fifth slice is the largest when the coding performance prediction value is positively correlated with coding performance, and the coding performance prediction value of the fifth slice is the smallest when the coding performance prediction value is negatively correlated with coding performance; reducing the area of the fourth slice comprises: moving one or more slice boundaries between the fourth slice and the fifth slice toward the direction of the fourth slice by K slice rows, where K is a positive integer. 6. The method according to claim 4 or 5, characterized in that the value of K is 1. 7. The method according to claim 4 or 5, characterized in that the value of K is positively correlated with the difference between the maximum and minimum values of the coding performance prediction values of the N second slices. 8. The method according to any one of claims 2 to 7, characterized in that, before determining the second slicing scheme of the second video frame, the method further comprises: determining that the difference between the maximum and minimum values of the coding performance prediction values of the N second slices reaches a target difference threshold. 9. The method according to any one of claims 1 to 8, wherein the predicted coding performance values of the N second slices obtained when determining that the second video frame adopts the first slicing scheme include: determining the predicted coding performance value of the i-th second slice among the N second slices corresponding to the i-th first slice based on the target prediction model and the values of the coding parameters and / or coding performance of the i-th first slice among the N first slices, wherein i is a positive integer less than or equal to N. 10. The method according to claim 9, wherein the predicted coding performance value is a predicted coding delay value, the target prediction model is a target prediction formula, and the determination of the predicted coding performance value of the i-th second slice among the N second slices corresponding to the i-th first slice based on the target prediction model and the values of the coding parameters and / or coding performance of the i-th first slice among the N first slices includes: WO2024 / 255171 PCT / CN2023 / 138765 16 Obtain the number of bytes after encoding the i-th first slice and the number of macroblocks in the i-th first slice; Determine the encoding delay prediction value of the i-th second slice corresponding to the i-th first slice based on the target prediction formula, the number of bytes after encoding the i-th first slice and the number of macroblocks in the i-th first slice. 11. A video encoding apparatus, characterized in that the apparatus comprises: an acquisition module, configured to acquire a first slicing scheme for a first video frame, the first slicing scheme being used to divide the first video frame into N first slices, where N is a positive integer greater than or equal to 2; a processing module, configured to determine the encoding performance prediction values of N second slices obtained when a second video frame adopts the first slicing scheme, wherein the N second slices correspond one-to-one with the N first slices, the position of each second slice in the second video frame is the same as the position of the corresponding first slice in the first video frame, and the area of each second slice is the same as the area of the corresponding first slice, and, based on the first slicing scheme and the encoding performance prediction values of the N second slices, determine a second slicing scheme for the second video frame, the second slicing scheme being used to divide the second video frame into N third slices; and an encoding module, configured to divide the second video frame into the N third slices according to the second slicing scheme, and encode the N third slices respectively to obtain the encoded second video frame. 12. The apparatus according to claim 2, wherein the processing module is specifically configured to: adjust the area of some or all of the N second slices according to the predicted coding performance values of the N second slices to obtain the second slicing scheme. 13. The apparatus according to claim 12, wherein the processing module is specifically configured to: determine a fourth slice from the N second slices, wherein the predicted coding performance value of the fourth slice is the smallest when the predicted coding performance value is positively correlated with coding performance, and the predicted coding performance value of the fourth slice is the largest when the predicted coding performance value is negatively correlated with coding performance; and reduce the area of the fourth slice. 14. The apparatus according to claim 13, wherein the processing module is specifically configured to: move the slice boundary of the fourth slice and at least one adjacent second slice towards the fourth slice by K slice rows. 15. The apparatus according to claim 13, wherein the processing module is further configured to: determine a fifth slice from the N second slices, wherein the coding performance prediction value of the fifth slice is the largest when the coding performance prediction value is positively correlated with the coding performance, and the coding performance prediction value of the fifth slice is the smallest when the coding performance prediction value is negatively correlated with the coding performance;The processing module is specifically configured to: move one or more slice boundaries between the fourth slice and the fifth slice by K slice rows towards the direction of the fourth slice. 16. The apparatus according to claim 14 or 15, wherein the value of K is 1. 17. The apparatus according to claim 14 or 15, wherein the value of K is positively correlated with the difference between the maximum and minimum values of the predicted coding performance values of the N second slices. 18. The apparatus according to any one of claims 12 to 17, wherein before determining the second slicing scheme of the second video frame, the processing module is further configured to: determine that the difference between the maximum and minimum values of the predicted coding performance values of the N second slices reaches a target difference threshold. 19. The apparatus according to any one of claims 11 to 18, wherein the processing module is specifically configured to: determine the predicted coding performance value of the i-th second slice among the N second slices corresponding to the i-th first slice based on the target prediction model and the values of the coding parameters and / or coding performance of the i-th first slice among the N first slices, wherein i is a positive integer less than or equal to N. 20. The apparatus according to claim 19, wherein the coding performance prediction value is the coding delay prediction value, the target prediction model is the target prediction formula, and the processing module is specifically used to: obtain the number of bytes after encoding the i-th first slice and the number of macroblocks in the i-th first slice; determine the coding delay prediction value of the i-th second slice corresponding to the i-th first slice according to the target prediction formula, the number of bytes after encoding the i-th first slice and the number of macroblocks in the i-th first slice. 21. A computing device cluster, comprising: at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device to cause the computing device cluster to perform the method according to any one of claims 1 to 10. 22. A computer program product containing instructions, wherein when the instructions are run by the computing device cluster, the computing device cluster causes the computing device cluster to perform the method according to any one of claims 1 to 10. 23. A computer-readable storage medium, characterized in that it comprises computer program instructions, which, when executed by a cluster of computing devices, perform the method as described in any one of claims 1 to 10. WO 2024 / 255171 PCT / CN2023 / 138765 1 / 14 Figure 1 Sequence Diagram 2 WO 2024 / 255171 PCT / CN2023 / 138765 2 / 14Figure 3 WO 2024 / 255171 PCT / CN2023 / 138765 3 / 14 400 Figure 4 500 Figure 5 WO 2024 / 255171 PCT / CN2023 / 138765 4 / 14 R12 | R13 "I R14「 Ί R15 (c) Second video frame adopts the second tiling scheme R(4N-5) | I R(4N-4) I I R(4N-3) Third slice #1 Third slice #2 First slice / N Third slice / N| R(4N-2) | । > \ R(4N-1) | | | In t1 t2 Figure 6 WO 2024 / 255171 PCT / CN2023 / 138765 5 / 14 Figure 7 WO 2024 / 255171 PCT / CN2023 / 138765 6 / 14 Figure 8 WO 2024 / 255171 PCT / CN2023 / 138765 7 / 14 Φ) Video frame B Slice #A Slice #B Slice #C Slice #D Slice #A Slice #B Slice #C Slice #D (a) Video frame A ' / / / / / / / / / / / / / / / / / / / / / / / / / Z V / / / / / / / / / / / / / / / / / / / / / / / / . --■ ½ 戏戏戏戏戏戏戏戏戏戏戏戏 vvvvvvvvvvvvvvvvvvvvvvvvv\ a.%%%%%%%%%%%%%%%%%%%%%%%%%: iC\_限限限限限限限限限限限限限限限限限限限限限限限 ΧΧΧΧΧΧΧΧΧΧΧΧΧΧΧΧΧΧΧΧΧΧΧΧχ> %%%%%%%%%%%%%%%%%%%%%%%%%% (d) Video frame D««««««««««««« Slice #A Slice boundary 一 AB Slice #B Slice #C Slice #D Slice boundary AB Slice boundary BC Slice boundary CD Slice boundary CD Slice #D ⑹ Video frame C Slice #A —Slice boundary AB Slice #B —Slice boundary BC Slice #C '〃〃〃〃〃〃〃〃〃〃 / 〃〃 / '〃〃〃〃〃〃〃〃〃〃〃 / 〃, y / / / / / / / / / / / / / / / / / / / / / / / / / . — — 双双双双双双双双双双 煤 7 vwwwwwwwwwwww< 3气%%飞%%飞%%飞%%飞%%飞%%飞%%飞%%? Χ%ΛΛΛΛΛΛΛΛΛΛ^^ Slice boundary AB Slice boundary BC Slice boundary CD Figure 9 WO 2024 / 255171 PCT / CN2023 / 138765 8 / 14 Slice #A Slice #B 戏.:频渡 Slice #C Video frame Slice #D Video frame 8) Slice #A 校.:竣检'" Sheng Hao I Slice #B 3ϋϋϋΟ i50C<J ίϋϋϋΟ 5:;00 Video Travel Black £ '" "'- Slice #c 5ϋ:;00 354.2 2022 ίίϋϋΰ ΙϋϋϋΟ 5OCG 0 、7 '◎ .'■'■! ;:; .7 7”. -'' 乂"1 ''' \;> .■»■»' : Ο ,5' ;:; .7 7”. -'' 乂"1 ''' \;> —<·\ Ρ· c ί' 6 υ- ■' i …、'C s g C;. Ζ :、; 。: S >'' X,7 .、、 、、、 、、、 、、, 、、, -'■ e e ¢7 ¢7 .·; <-; Video 2 or Slice #D 300GG 25ϋϋϋ ?.ϋϋϋθ ϊ 5:;00 10^00 5 Morning 2 0 Figure 10 WO 2024 / 255171 PCT / CN2023 / 138765 9 / 14 〔ENN ;3a c 80υϋ 60;?0 2 Entertainment Electricity Slice #A —:<:■ —' Ό ,7 <: >—! V, —: <:■ —' Ό >7 ■ e ,—■ V; 17 V:. Heart, -' L、 N 10 ;' ;>, C ■' ϊ ·、' 'C Ό : Force:..—'C7 '、, V1 ''■■ :>J,、、‘ .7 .、、 、、、 、、、 、、、 、、《 <7 弋7 d ,:.;,、;,、, Video Surprise 3 8 0 * Qin Spring Style Pro (b) ίζΟϋυ :ϋί;ϊ:0 SOGG 6 Han Qin Xun ,*〕 2G0G Video Trace Slice #A Video Cover Surprise Slice #B Q >-、 5 …、。1 、;'. 一、 9 …* .7 C 〜' 9 ■**· .07' C 、- 6 ;> e 0 S 9 :.·; Ο. ,7 ■- ; 、·;·Public:' ;.-:…...,… … … … … c z ·' ; 4, n ;\ Video Info 12-pass :ϋϋϊ:Ο SOGG 60ΰί: •ίΟΟΟ 2C0G Neck Plate ■OCOG aoiji: Before.】 Crack Its Pass ?Λϋ:0 Slice #D 9 —■ ' C …s —、 9 .7 、,:: 一、 9 …七 >7 、,:,…9 —· ■ C2、 tr 7·、;'. ·~' :a:、t7 ··; V, 、:,a。 ::'', W !'· k♦,.-、... ,--.>-v >-、 .-« 弋7 弋7 C; .' i .、! :7 Video Performance Figure 11 WO2024 / 255171 PCT / CN2023 / 138765 10 / 14 Conventional video coding scheme The video coding scheme of the present application Figure 12 WO 2024 / 255171 PCT / CN2023 / 138765 11 / 14 "UM Conventional video coding scheme The video coding scheme of the present application 5 八 ■ ' 、〉 ■, --'I 、卷l w E $ I u u u u u u u [I u u u u u u[i [I u u u u u U u ij u u u u [I u u [I u u u u[I u u [I u u u U u u u [I u u [I u u u u [I u u 1111 .4-. -0 !W妙切则妙则妙嬲妙财i-Br "IJ IJ IJ IJ IJ IJ" IJ IJ IJ IJ IJ IJ IJ 11 IJ IJ IJ IJ IJ IJ IJ 11U IJ IJ IJ IJ IJ 11 IJ IJ IJ IJ IJ IJ IJ" [I [I [I [I [I [I [I" [I [I [I [I [I TT111111111 II 15 ■ ©% ,〃〃〃〃〃〃〃〃〃〃〃"〃〃〃〃产〃〃〃〃〃〃〃〃〃A Γ4ΤΠΤ.2%] IU U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U U」111 Figure 13 WO 2024 / 255171 PCT / CN2023 / 138765 12 / 14 Video encoding apparatus 1400 Acquisition module 1410 — Processing module 1420 — Encoding module 1430 Figure 14 Video decoding apparatus 1500 Acquisition module Decoding module 1510 1520 Figure 15 WO 2024 / 255171 PCT / CN2023 / 138765 13 / 14 Figure 17 WO 2024 / 255171 PCT / CN2023 / 138765 14 / 14 INTERNATIONAL SEARCH REPORT International application No. PCT / CN2023 / 138765 A. CLASSIFICATION OF SUBJECT MATTER H04N19 / 119(2014.01)i; H04N19 / 174(2014.01)i According toInternational Patent Classification (IPC) or to both national classification and IPC B. FIELDS SEARCHED Minimum documentation searched (classification system followed by classification symbols) IPC: H04N Documentation searched other than minimum documentation to the extent that such documents are included in the fields searched Electronic data base consulted during the international search (name of data base and, where practicable, search terms used) CNTXT, CNABS, WPABS, DWPI, ENTXT, IEEE, CNKI: slicing, stripe, division (partition, area, scheme, mode, regulation, rule, performance, frame, determine C. DOCUMENTS CONSIDERED TO BE RELEVANT Category* Citation of document, with indication, where appropriate, of the relevant passages Relevant to claim No. A CN 115883836 A (BEIJING RONGXUN KECHUANG TECHNOLOGY CO., LTD.) 31 March 2023 (2023-03-31) description, paragraphs 0030-0066 and 0082-0114 1-23 A JP 2012110054 A (CANON K. K.) 07 June 2012(2012-06-07) entire document 1-23 A CN 115299046 A (HFI INNOVATION INC.) 04 November 2022 (2022-11-04) entire document 1-23 A CN 110430434 A (AGORA LAB INC.) 08 November 2019 (2019-11-08) entire document 1-23 A CN 111263154 A (TENCENT TECHNOLOGY (SHENZHEN) CO., LTD.) 09 June 2020 (2020-06-09) entire document 1-23 A WO 2023061334 Al (BEIJING BYTEDANCE NETWORK TECHNOLOGY CO., LTD. et al.) 20 April 2023 (2023-04-20) entire document 1-23 | | Further documents are listed in the continuation of Box C. | / 1 See patent family annex. * Special categories of cited documents: “T" later document published after the international filing date or priority “A" document defining the general state of the art which is not considered date and not in conflict with the application but cited to understand the to be of paiticulai' relevance principle or theory underlying the invention "D” document cited by the applicant in the international application “χ” document of particular relevance; the claimedinvention cannot be “E” eailier application or patent but published on or after the international considered novel or cannot be considered to involve an inventive step filing date when the document is taken alone “L" document which may thi'ow doubts on priority claim(s) or which is “Y" document of paiticulai' relevance; the claimed invention cannot be cited to establish the publication date of another citation or other considered to involve an inventive step when the document is special reason (as specified) combined with one or more other such documents, such combination "O” document refen'ing to an oral disclosure, use, exhibition or other being obvious to a person skilled in the art means document member of the same patent family "P” document published prior to the international filing date but later than the priority date claimed Date of the actual completion of the international search 19 February 2024 Date of mailing of the international search report 22 February 2024 Name andmailing address of the ISA / CN China National Intellectual Property Administration (ISA / CN) China No. 6, Xitucheng Road, Jimenqiao, Haidian District, Beijing 100088 Authorized officer Telephone No. Form PCT / ISA / 210 (second sheet) (July 2022) International application No. PCT / CN2023 / 138765 INTERNATIONAL SEARCH REPORT Information on patent family members Patent document cited in search report Publication date (day / month / year) Patent family member(s) Publication date (day / month / year) CN 115883836 A 31 March 2023 None JP 2012110054 A 07 June 2012 JP 5389205 B2 15 January 2014 US 2007253490 Al 01 November 2007 US 8179973 B2 15 May 2012 JP 2007318726 A 06 December 2007 JP 5002286 B2 15 August 2012 CN 115299046 A 04 November 2022 TW 202139717 A 16 October 2021 TWI 761166 B 11 April 2022 EP 4128767 Al 08 February 2023 US 2023119121 Al 20 April 2023 WO 2021197433 Al 07 October 2021 CN 110430434 A 08 November 2019 US 2019342567 Al 07 November 2019 US 10567781 B2 18 February 2020 EP 3565246 Al 06November 2019 EP 3565246 Bl 17 March 2021 CN 111263154 A 09 June 2020 US 2022232222 A1 21 July 2022 WO 2021147448 A1 29 July 2021 WO 2023061334 A1 20 April 2023 None Form PCT / ISA / 210 (patent family annex) (July 2022) International Search Report International Application Number PCT / CN2023 / 138765 A. Subject Classification H04N19 / 119 (2014.01) 1; H04N19 / 174 (2014.01) 1 According to the International Patent Classification (IPC) or both national classification and IPC classification B. Minimum literature to be retrieved in the search field (indicating the classification system and classification number) IPC: H04N Electronic databases consulted during international searches, excluding the minimum literature included in the search field (database name and search terms used, if applicable) CNTXT, CNABS, WPABS, DWPI, ENTXT, IEEE, CNKI: slice, strip, partition, division, area, scheme, mode, rule, performance, frame, determine C. Related document types* Referenced documents, indicating relevant paragraphs where necessary Related claims A CN 115883836 A (Beijing Rongxun Kechuang Technology Co., Ltd.) March 31, 2023 (2023-03-31) Specification No. 030-0066,0082-0114 Section 1-23 A JP 2012110054 A (CANON KK) June 7, 2012 (2012-06-07) Full text 1-23 A CN 115299046 A (Huanfa Co., Ltd.) November 4, 2022 (2022-11-04) Full text 1-23 A CN 110430434 A (Dayin Network Technology (Shanghai) Co., Ltd.) November 8, 2019 (2019-11-08) Full text 1-23 A CN 111263154 A (Tencent Technology (Shenzhen) Co., Ltd.) June 9, 2020 (2020-06-09)Full text 1-23 A WO 2023061334 A1 (BEIJING BYTEDANCE NETWORK TECH. CO., LTD. et al.) April 20, 2023 (2023-04-20) Full text 1-23 □ The remaining documents are listed on the continuation page of column C. * Specific types of cited documents: “A” Documents that are considered not particularly relevant and represent the general state of the prior art. “D” Documents cited by the applicant in the international application. “E” Earlier applications or patents published on or after the international filing date. “L” Documents that may raise doubt about the priority claim, or documents cited to determine the publication date of another cited document, or documents cited for other special reasons (as specifically stated). Documents involving □head disclosure, use, exhibition, or other disclosure. “P” Documents published before the international filing date but later than the claimed priority date. See the patent family appendix. "A document published after the claim date or priority date, which does not conflict with the application, but is particularly different from the subsequent document for understanding the inventive theory or principle, is considered alone and the claimed invention is deemed not novel or lacking inventiveness. A document particularly related to "Y" is also considered when the document is not combined with any of the other documents of the same class and such combination is obviously excessive to those skilled in the art. The claimed invention lacks inventiveness. International search of patent family documents: Date of actual completion: February 19, 2024. Name and mailing address of ISA / CN: China National Intellectual Property Administration, No. 6, Tucheng Road, Xijimenqiao, Haidian District, Beijing, 100088, China. International search report mailing date: February 22, 2024. Authorized officer: Xu Wei. Telephone number: (+86) 010-53961818. PCT / ISA / 210 Form (Page 2) (July 2022) International Search Report Information on Patent Families International Application No. PCT / CN2023 / 138765 Publication Dates of Patent Documents Cited in the Search Report (Year / Month / Day) Publication Dates of Patent Families (Year / Month / Day) CN 115883836 A March 31, 2023 None JP 2012110054 A June 7, 2012 JP 5389205 B2 January 15, 2014 US 2007253490 A1 November 1, 2007 US 8179973 B2 May 15, 2012 JP 2007318726 A December 6, 2007 JP 5002286 B2 August 15, 2012 CN 115299046 A November 4, 2022 TW 202139717 A October 16, 2021 TWI761166 B April 11, 2022 EP 4128767 A1 February 8, 2023 US 2023119121 A1 April 20, 2023 WO 2021197433 A1 October 7, 2021 CN 110430434 A November 8, 2019 US 2019342567 A1 November 7, 2019 US 10567781 B2 February 18, 2020 EP 3565246 A1 November 6, 2019 EP 3565246 B1 March 17, 2021 CN 111263154 A June 9, 2020 US 2022232222 A1 July 21, 2022 WO 2021147448 A1 July 29, 2021 WO 2023061334 A1 April 20, 2023 No PCT / ISA / 210 form (appendix to patent family) (July 2022) (19) State Intellectual Property Office (12) Invention Patent Application (10) Application Publication Number (43) Application Publication Date (21) Application Number 202380099153.3 (22) Application Date 2023.12.14 (30) Priority Data 2023115400 2023.06.13 RU (85) Date of PCT International Application Entering National Phase 2025.12.09 (86) Application Data of PCT International Application PCT / CN2023 / 138765 2023.12.14 (87) Publication data of PCT international application WO2024 / 255171 ZH 2024.12.19 (71) Applicant Huawei Cloud Computing Technology Co., Ltd. Address 550025, Guizhou Province, Guiyang City, Guian New District, Qianzhong Avenue, Xinggong Road Huawei Cloud Data Center (72) Inventors Donina Natalia Sueva Olgafrolov Pavel Li Gang Ding Wenpeng (74) Patent Agency Beijing Longshuang Lida Intellectual Property Agency Co., Ltd. 11329 Patent Attorney Hao Huijuan Sun Tao (51) Int.Cl. H04N 19 / 119 (2006.01) H04N 19 / 174 (2006.01) (54) Invention title A method and apparatus for video encoding (57) Abstract This application provides a method and apparatus for video encoding. The video coding method includes: obtaining a first slicing scheme for a first video frame; determining the coding performance prediction values of N second slices obtained when a second video frame adopts the first slicing scheme; and determining the coding performance prediction values of the second video frame based on the N second slices.A second slicing scheme for the frame; according to the second slicing scheme, the second video frame is divided into N third slices, and each of the N third slices is encoded. Embodiments of this application determine a suitable second slicing scheme with more balanced coding performance for the second video frame by determining the predictive coding performance of the current video frame, i.e., the second video frame, thereby significantly improving the coding performance of the video frame and the entire video. CN 121336399 A 2026.01.13 CN 1 21 33 63 99 A