A storage space mapping method, comprising: defining storage area identifiers used to indicate storage space that is used to store a variable or a function at an L1 storage space or an L2 storage space; configuring a storage area identifier at a file level, that is, allocating a storage area identifier to each file, and establishing a mapping relationship between the file and the storage area identifier; parsing source code, so as to acquire a home file of each function and/or variable in the source code, wherein project source code written by a user is read, and by morphological and grammatical analysis, each function and variable in the source code, and a home file path of each function or variable, that is, a file or a folder to which each function or variable belongs, are acquired, and wherein, after the project source code is read, at least two source code files in the project source code are acquired; acquiring the mapping relationship between the home file and the storage area identifier corresponding to the file to which each function or variable belongs, and establishing, according to the mapping relationship, a mapping relationship between each function and/or variable and the storage area identifier; compiling code that identifies a mapping relationship between a function or a variable and a storage area identifier into a file that can be redirected, and establishing a mapping relationship between a storage area identifier and specified storage space by modifying a link script; generating an image file by linking the file that can be redirected and the link script together, wherein in this case, storage space of each variable and function in the project code is determined, where each variable and function in the project code are deployed in a multi-tier storage system; and mapping , according to the mapping relationship between the storage area identifier and storage space, each function and/or variable to the storage space. defining storage area identifiers used to indicate storage space that is used to store a variable or a function at an L1 storage space or an L2 storage space; configuring a storage area identifier at a file level, that is, allocating a storage area identifier to each file, and establishing a mapping relationship between the file and the storage area identifier; parsing source code, so as to acquire a home file of each function and/or variable in the source code, wherein project source code written by a user is read, and by morphological and grammatical analysis, each function and variable in the source code, and a home file path of each function or variable, that is, a file or a folder to which each function or variable belongs, are acquired, and wherein, after the project source code is read, at least two source code files in the project source code are acquired; acquiring the mapping relationship between the home file and the storage area identifier corresponding to the file to which each function or variable belongs, and establishing, according to the mapping relationship, a mapping relationship between each function and/or variable and the storage area identifier; compiling code that identifies a mapping relationship between a function or a variable and a storage area identifier into a file that can be redirected, and establishing a mapping relationship between a storage area identifier and specified storage space by modifying a link script; generating an image file by linking the file that can be redirected and the link script together, wherein in this case, storage space of each variable and function in the project code is determined, where each variable and function in the project code are deployed in a multi-tier storage system; and mapping , according to the mapping relationship between the storage area identifier and storage space, each function and/or variable to the storage space. <EOS>