A context modeling method of a split flag, applied to a video encoding device or a video decoding device, wherein the method comprises: obtaining (S101, S201) a height and a width of a current node, a height of a first leaf node adjacent to the current node in a first direction, and a width of a second leaf node adjacent to the current node in a second direction, wherein the first direction is perpendicular to the second direction, and the first leaf node and the second leaf node are reconstructed leaf nodes; determining whether the current node meets a first preset condition and a second preset condition, wherein the first preset condition comprises that the height of the current node is greater than the height of the first leaf node, and the second preset condition comprises that the width of the current node is greater than the width of the second leaf node; and determining a subset index of the context model of the split flag based on the height and the width of the current node; determining (S103a) a context model of a split flag of the current node based on whether the first preset condition and the second preset condition are met and the subset index of the context model of the split flag; wherein the determining a subset index of the context model of the split flag based on the height and the width of the current node comprises: querying a preset subset index query table for the subset index of the context model of the split flag based on the height and the width of the current node, wherein the subset index query table comprises the height and the width of the current node and the subset index corresponding to the width and the height of the current node; wherein the preset subset index query table satisfies the following table. Name Width of the current node 4 8 16 32 64 128 Height of the current node 4 4 4 8 4 4 3 3 16 4 3 3 2 2 32 3 2 2 1 1 64 2 1 1 0 128 1 0 0 obtaining (S101, S201) a height and a width of a current node, a height of a first leaf node adjacent to the current node in a first direction, and a width of a second leaf node adjacent to the current node in a second direction, wherein the first direction is perpendicular to the second direction, and the first leaf node and the second leaf node are reconstructed leaf nodes; determining whether the current node meets a first preset condition and a second preset condition, wherein the first preset condition comprises that the height of the current node is greater than the height of the first leaf node, and the second preset condition comprises that the width of the current node is greater than the width of the second leaf node; and determining a subset index of the context model of the split flag based on the height and the width of the current node; determining (S103a) a context model of a split flag of the current node based on whether the first preset condition and the second preset condition are met and the subset index of the context model of the split flag; wherein the determining a subset index of the context model of the split flag based on the height and the width of the current node comprises: querying a preset subset index query table for the subset index of the context model of the split flag based on the height and the width of the current node, wherein the subset index query table comprises the height and the width of the current node and the subset index corresponding to the width and the height of the current node; wherein the preset subset index query table satisfies the following table. Name Width of the current node 4 8 16 32 64 128 Height of the current node 4 4 4 8 4 4 3 3 16 4 3 3 2 2 32 3 2 2 1 1 64 2 1 1 0 128 1 0 0 querying a preset subset index query table for the subset index of the context model of the split flag based on the height and the width of the current node, wherein the subset index query table comprises the height and the width of the current node and the subset index corresponding to the width and the height of the current node; wherein the preset subset index query table satisfies the following table. Name Width of the current node 4 8 16 32 64 128 Height of the current node 4 4 4 8 4 4 3 3 16 4 3 3 2 2 32 3 2 2 1 1 64 2 1 1 0 128 1 0 0