An encoding method, comprising: receiving data to be encoded; encoding the data to be encoded to generate encoded data; recording the encoded data in an encoded graph; wherein, the encoded graph is a square, comprising: a first positioning block located at a first corner region in the encoded graph; a second positioning block located at a second corner region in the encoded graph, wherein, the second corner region and the first corner region are not located on a same diagonal line of the encoded graph; a third positioning block located at a third corner region in the encoded graph, wherein, the third corner region and the second corner region are located on a same diagonal line of the encoded graph; a fourth positioning block located in the encoded graph; an encoded region located in a region not occupied by four positioning blocks in the encoded graph, and the encoded data is recorded in the encoded region, wherein the four positioning blocks comprise the first positioning block, the second positioning block, the third positioning block and the fourth positioning block; wherein, in a quadrilateral formed by centers of the four positioning blocks, an inner corner at a location of the fourth positioning block is the largest inner corner of the quadrilateral, and a distance between the center of the fourth positioning block and the center of the third positioning block is smaller than a distance between the center of the fourth positioning block and the center of the second positioning block. receiving data to be encoded; encoding the data to be encoded to generate encoded data; recording the encoded data in an encoded graph; wherein, the encoded graph is a square, comprising: a first positioning block located at a first corner region in the encoded graph; a second positioning block located at a second corner region in the encoded graph, wherein, the second corner region and the first corner region are not located on a same diagonal line of the encoded graph; a third positioning block located at a third corner region in the encoded graph, wherein, the third corner region and the second corner region are located on a same diagonal line of the encoded graph; a fourth positioning block located in the encoded graph; an encoded region located in a region not occupied by four positioning blocks in the encoded graph, and the encoded data is recorded in the encoded region, wherein the four positioning blocks comprise the first positioning block, the second positioning block, the third positioning block and the fourth positioning block; wherein, in a quadrilateral formed by centers of the four positioning blocks, an inner corner at a location of the fourth positioning block is the largest inner corner of the quadrilateral, and a distance between the center of the fourth positioning block and the center of the third positioning block is smaller than a distance between the center of the fourth positioning block and the center of the second positioning block. a first positioning block located at a first corner region in the encoded graph; a second positioning block located at a second corner region in the encoded graph, wherein, the second corner region and the first corner region are not located on a same diagonal line of the encoded graph; a third positioning block located at a third corner region in the encoded graph, wherein, the third corner region and the second corner region are located on a same diagonal line of the encoded graph; a fourth positioning block located in the encoded graph; an encoded region located in a region not occupied by four positioning blocks in the encoded graph, and the encoded data is recorded in the encoded region, wherein the four positioning blocks comprise the first positioning block, the second positioning block, the third positioning block and the fourth positioning block; wherein, in a quadrilateral formed by centers of the four positioning blocks, an inner corner at a location of the fourth positioning block is the largest inner corner of the quadrilateral, and a distance between the center of the fourth positioning block and the center of the third positioning block is smaller than a distance between the center of the fourth positioning block and the center of the second positioning block.