The invention relates to a remote supervision relation extraction method based on a multilayer attention mechanism, and belongs to the technical field of artificial intelligence and natural language processing. In order to solve the technical problems that an existing remote supervision relation extraction method is poor in extraction effect in a noise environment, noise processing on sentence packages is ignored, entities in sentences appear repeatedly and the like, a relative position feature attention is designed for the situation that entity pairs in the sentences appear repeatedly, and position information of the entity pairs is fully utilized. For the sentence packet noise problem, the confidence coefficient of each sentence packet is calculated, and the sentence packets with large noise and the sentence packets with small noise, which have the same relationship, are combined into packet groups according to the confidence coefficient, so that the noise between the packet groups is relatively balanced, and the relationship extraction effect in the noise environment is improved.
Remote supervision relation extraction method based on multilayer attention mechanism