An information obtaining method implemented by an electronic device, the method comprising: obtaining a first two-dimensional, 2D, barcode; performing an image transformation on the first 2D barcode to obtain a virtual 2D barcode; and according to validity of the virtual 2D barcode, obtaining relationship information of the first 2D barcode, wherein the relationship information is obtained based on a mapping relationship of the virtual 2D barcode in a database; wherein the obtaining of the relationship information of the first 2D barcode according to the validity of the virtual 2D barcode comprises: determining whether the virtual 2D barcode has a mapping relationship with a second 2D barcode, wherein when the virtual 2D barcode is determined to have the mapping relationship with the second 2D barcode, the virtual 2D barcode is valid and the first 2D barcode is determined to have the relationship information corresponding to the image transformation, and when the virtual 2D barcode is not determined to have the mapping relationship with the second 2D barcode, the virtual 2D barcode is invalid and the first 2D barcode is not determined to have the relationship information corresponding to the image transformation; wherein after determining whether the virtual 2D barcode has the mapping relationship with the second 2D barcode, the method further comprises: obtaining the second 2D barcode when the virtual 2D barcode is valid. obtaining a first two-dimensional, 2D, barcode; performing an image transformation on the first 2D barcode to obtain a virtual 2D barcode; and according to validity of the virtual 2D barcode, obtaining relationship information of the first 2D barcode, wherein the relationship information is obtained based on a mapping relationship of the virtual 2D barcode in a database; wherein the obtaining of the relationship information of the first 2D barcode according to the validity of the virtual 2D barcode comprises: determining whether the virtual 2D barcode has a mapping relationship with a second 2D barcode, wherein when the virtual 2D barcode is determined to have the mapping relationship with the second 2D barcode, the virtual 2D barcode is valid and the first 2D barcode is determined to have the relationship information corresponding to the image transformation, and when the virtual 2D barcode is not determined to have the mapping relationship with the second 2D barcode, the virtual 2D barcode is invalid and the first 2D barcode is not determined to have the relationship information corresponding to the image transformation; determining whether the virtual 2D barcode has a mapping relationship with a second 2D barcode, wherein when the virtual 2D barcode is determined to have the mapping relationship with the second 2D barcode, the virtual 2D barcode is valid and the first 2D barcode is determined to have the relationship information corresponding to the image transformation, and when the virtual 2D barcode is not determined to have the mapping relationship with the second 2D barcode, the virtual 2D barcode is invalid and the first 2D barcode is not determined to have the relationship information corresponding to the image transformation; wherein after determining whether the virtual 2D barcode has the mapping relationship with the second 2D barcode, the method further comprises: obtaining the second 2D barcode when the virtual 2D barcode is valid. obtaining the second 2D barcode when the virtual 2D barcode is valid.