In recent years, evolutionary multitasking optimization (EMTO) has attracted considerable attention. Different from the traditional algorithms that solve one optimization problem at a time, EMTO aims at solving multiple problems simultaneously, through transferring useful information among individuals. The most well-known algorithm in this area is the multifactorial evolutionary algorithm (MFEA). However, when designing the information sharing mechanism, MFEA and its variants focus solely on the properties of individuals in the objective space, while neglecting the valuable information in the decision space. To make full use of the inherent knowledge of the evolving population, this paper presents a novel EMTO framework by using the locality sensitive hashing (LSH) method to analyze the population distribution in the decision space and then guide the information sharing. Specifically, LSH uses hash functions to map the individuals in the decision space into hash codes, ensuring that similar individuals have a higher probability to be mapped into the same code. Then, based on the matching relationships of the hash codes and skill factors between individuals, different reproduction and evaluation strategies are exerted to satisfy the specific requirements under different conditions. This way, the knowledge from both the decision space and the objective space are utilized for the purpose of better manipulating the individuals. Additionally, an opposition-based learning method is integrated in this algorithm to enhance exploration. The comprehensive experimental studies confirm the efficacy and efficiency of the proposed method on both single-objective multitask benchmarks and multi-objective multitask benchmarks. According to the statistic tests, the proposed single-objective and multi-objective algorithms significantly outperform their best competitors on 14/18 and 12/18 tasks, respectively.