The invention belongs to the field of cognitive neuroscience, particularly relates to a question and answer method and system based on a brain-like semantic hierarchical memory reasoning model, and aims to solve the problem of small sample learning of natural language understanding tasks such as text generation and automatic question and answer. The method comprises the steps of acquiring and inputting a question text and an answer text; Performing time sequence pooling on the text to obtain a word vector matrix; Pooling the space and time of each word vector in the word vector matrix to obtain a binary word representation set of which each bit is 0 or 1 corresponding to the word vector; Performing brain-like learning on the text and the word set to obtain an optimized model; And independently inputting the question text, performing word reduction based on the cell prediction state in the model, obtaining an answer text, and outputting the answer text. According to the method, a semantic hierarchical time sequence memory model is combined, the model is constructed based on a learning mode of small sample data and knowledge reasoning, the requirement for the number of samples is low, a large number of parameters do not need to be adjusted, and the expandability of the model is improved.
Question and answer method and system based on brain-like semantic hierarchical memory reasoning model