Question answering method and device and electronic equipment

The preset pulse neural network simulates the brain neural signal transmission process, determines the first type of brain knowledge graph, and provides it to the large language model, solving the problem of low accuracy in answering questions by intelligent models, and achieving more accurate and intelligent answer output.

CN119647601APending Publication Date: 2025-03-18TONGFANG KNOWLEDGE DIGITAL PUBLISHING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411830276.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

When answering questions, the answers of existing intelligent models are low, and how to improve the accuracy of answering questions by intelligent models has become an urgent problem that technicians need to solve.

Method used

Knowledge reasoning is performed through preset pulse neural networks to simulate the brain neural signal transmission process, determine the first type of brain knowledge graph, and provide it to the preset large language model to output more accurate answers.

Benefits of technology

By simulating the brain nerve signal transmission process, a more comprehensive brain knowledge graph is determined, which improves the accuracy of large language models when answering questions and provides a more solid foundation to support intelligent applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119647601A_ABST
    Figure CN119647601A_ABST
Patent Text Reader

Abstract

Some embodiments of the invention disclose a question answering method and apparatus, and an electronic device, in the method, a preset spiking neural network can simulate a brain neural signal transmission process to perform knowledge reasoning, and a first class brain knowledge graph is determined. The first-class brain knowledge graph can provide more comprehensive background knowledge for the preset large language model, so that the preset large language model outputs more accurate answers based on questions. The method comprises the following steps: inputting a problem into a preset signal conversion model to obtain a first pulse signal; inputting the first pulse signal into a preset pulse neural network to determine a propagation path of the first pulse signal in the preset pulse neural network; according to first neurons in the propagation path and first synapses used for connecting different first neurons, determining a first type of brain knowledge graph; and inputting the first-class brain knowledge graph and the question into a preset large language model to output an answer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of question answering, and in particular to a method, device and electronic device for answering questions. Background Art

[0002] Currently, intelligent models can answer questions raised by users in many fields. However, users often find that the answers output by intelligent models are less accurate. Therefore, how to improve the accuracy of intelligent models in answering questions has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0003] The present application provides a method, device and electronic device for answering questions, in which a preset pulse neural network can simulate the brain nerve signal transmission process to perform knowledge reasoning and determine a first type of brain knowledge graph. The first type of brain knowledge graph can provide more comprehensive background knowledge for a preset large language model, thereby enabling the preset large language model to output a more accurate answer based on the question.

[0004] In a first aspect, an embodiment of the present application provides a method for answering a question, the method comprising:

[0005] Inputting the problem into a preset signal conversion model to obtain a first pulse signal;

[0006] Inputting the first pulse signal into a preset pulse neural network to determine a propagation path of the first pulse signal in the preset pulse neural network, wherein the propagation path includes first neurons and first synapses for connecting different first neurons;

[0007] Determining a first type of brain knowledge graph according to the first neurons in the propagation path and the first synapses for connecting different first neurons;

[0008] The first type of brain knowledge graph and the question are input into a preset large language model to output an answer.

[0009] In some embodiments, the question is input into a preset signal conversion model, and the step of obtaining a first pulse signal includes: splitting the question into word segments, performing semantic understanding based on the word segments to obtain semantic information, and converting the semantic information into a first pulse signal.

[0010] In some embodiments, the process of determining the preset pulse neural network includes:

[0011] Using preset data, constructing a knowledge graph, wherein the knowledge graph includes entities, relationships, and attributes;

[0012] Using the knowledge graph, construct a second type of brain knowledge graph, wherein the second type of brain knowledge graph includes a first node and a third synapse, the third synapse is located between the first nodes, the third synapse includes a first active synapse and a first silent synapse, the first node is an entity in the knowledge graph, and the first active synapse is a relationship in the knowledge graph;

[0013] The preset pulse neural network is determined by using the second type of brain knowledge graph, wherein the architecture of the preset pulse neural network includes an input layer and an output layer, the second neurons in the input layer and the output layer are both first nodes in the second type of brain knowledge graph, the second neurons in the input layer and the second neurons in the output layer are connected by second synapses, the second synapses include second active synapses and second silent synapses, the second active synapses between the second neurons in the input layer and the second neurons in the output layer are the first active synapses between the first nodes in the second type of brain knowledge graph that are the same as the second neurons in the input layer and the output layer, and the second synapses have corresponding synaptic weights.

[0014] In some embodiments, the step of determining a preset pulse neural network using the second brain knowledge graph includes:

[0015] Using the second type of brain knowledge graph, constructing the architecture of the preset pulse neural network;

[0016] Filtering out a preset path from the second type of brain knowledge graph;

[0017] The preset path is used to train a preset pulse neural network having the architecture to determine a synaptic weight corresponding to a second synapse in the preset pulse neural network.

[0018] In some embodiments, the method further comprises: displaying the propagation path.

[0019] In some embodiments, the step of determining a first type of brain knowledge graph according to the first neurons in the propagation path and the first synapses for connecting different first neurons comprises:

[0020] Determine a first neuron in the propagation path as a second node in the first brain-like knowledge graph;

[0021] The first synapse in the propagation path for connecting different first neurons is determined as a relationship in the first brain knowledge graph.

[0022] In some embodiments, the step of inputting the first brain knowledge graph and the question into a preset large language model to output an answer includes:

[0023] Based on the first type of brain knowledge graph and the question, construct a prompt template;

[0024] The prompt template is input into a preset large language model to output an answer.

[0025] In some embodiments, the method further comprises:

[0026] The preset spiking neural network is trained according to the question and the answer to update the synaptic weight corresponding to the second synapse in the preset spiking neural network.

[0027] In a second aspect, an embodiment of the present application further provides a device for answering questions, including:

[0028] A conversion unit, used for inputting the question into a preset signal conversion model to obtain a first pulse signal;

[0029] an input unit, configured to input the first pulse signal into a preset pulse neural network to determine a propagation path of the first pulse signal in the preset pulse neural network, wherein the propagation path includes first neurons and first synapses for connecting different first neurons;

[0030] a determining unit, configured to determine a first type of brain knowledge graph according to the first neurons in the propagation path and the first synapses for connecting different first neurons;

[0031] An output unit is used to input the first type of brain knowledge graph and the question into a preset large language model to output an answer.

[0032] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for answering questions when executing the computer program.

[0033] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for answering questions are implemented.

[0034] In the above embodiment, a method, device and electronic device for answering questions are provided, wherein a preset pulse neural network can simulate the brain nerve signal transmission process to perform knowledge reasoning and determine a first type of brain knowledge graph. The first type of brain knowledge graph can provide more comprehensive background knowledge for the preset large language model, thereby enabling the preset large language model to output a more accurate answer based on the question. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1A flowchart of a method for answering questions provided according to some embodiments is exemplified;

[0036] Figure 2 A schematic diagram of a preset signal conversion model provided according to some embodiments is exemplarily shown;

[0037] Figure 3 A schematic diagram of a propagation path provided according to some embodiments is exemplarily shown;

[0038] Figure 4 A schematic diagram of a process for determining a preset pulse neural network according to some embodiments is exemplarily shown;

[0039] Figure 5 A schematic diagram of a second type of brain knowledge graph provided according to some embodiments is exemplarily shown;

[0040] Figure 6 A schematic diagram of a preset pulse neural network provided according to some embodiments is exemplarily shown;

[0041] Figure 7 A schematic diagram of a second synapse provided according to some embodiments is exemplarily shown;

[0042] Figure 8 A schematic structural diagram of a device for answering questions provided according to some embodiments is exemplarily shown. DETAILED DESCRIPTION

[0043] In order to make the purpose and implementation method of the present application clearer, the exemplary implementation method of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0044] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.

[0045] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.

[0046] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.

[0047] Currently, intelligent models can answer questions raised by users in many fields. However, users often find that the answers output by intelligent models are less accurate. Therefore, how to improve the accuracy of intelligent models in answering questions has become a technical problem that needs to be solved urgently by those skilled in the art.

[0048] In related technologies, when knowledge graphs are combined with large models, their powerful data processing capabilities are further released, and they can deeply analyze and mine massive data from a global perspective, providing a solid foundation for intelligent answering of questions. However, in practical applications, the construction and reasoning process of knowledge graphs face many challenges. Specifically, the lack of sophistication in relational reasoning limits the scope of application of knowledge graphs. In complex knowledge reasoning scenarios, more sophisticated relational descriptions and reasoning mechanisms are often required to support a higher level of intelligence.

[0049] Therefore, in order to solve the above technical problems, the embodiment of the present application provides a method for answering questions, in which a preset pulse neural network can simulate the brain nerve signal transmission process to perform knowledge reasoning and determine a first type of brain knowledge graph. The first type of brain knowledge graph can provide more comprehensive background knowledge for the preset large language model, thereby enabling the preset large language model to output more accurate answers based on the question.

[0050] Figure 1 The flowchart of a method for answering questions provided according to some embodiments is exemplarily shown. The method in the embodiment of the present application includes S100-S400, and steps S100-S400 can also be called a reasoning process.

[0051] S100: Input the question into a preset signal conversion model to obtain a first pulse signal.

[0052] In an embodiment of the present application, the number of the first pulse signals may be multiple. In some embodiments, the preset signal conversion model obtains a one-dimensional vector of dimension N, and each element in the vector represents a first pulse signal. In an example, the question may be to comprehensively summarize the development process of brain-like neural networks.

[0053] In some embodiments, the process of determining the preset signal conversion model includes: training a basic signal conversion model using training samples to obtain a preset signal conversion model, wherein the training samples include a preset question and a second pulse signal corresponding to the preset question.

[0054] In this embodiment, a preset signal conversion model is obtained by pre-training using training samples, so that in actual use, the first pulse signal obtained by inputting the problem into the preset signal conversion model can be more accurate.

[0055] In some embodiments, the question is input into a preset signal conversion model, and the step of obtaining a first pulse signal includes: splitting the question into word segments, performing semantic understanding based on the word segments to obtain semantic information, and converting the semantic information into a first pulse signal.

[0056] In some embodiments, the preset signal conversion model is a deep learning neural network. The step of inputting the question into the preset signal conversion model to obtain the first pulse signal includes: splitting the question into word segments, performing forward propagation through the deep learning neural network, extracting semantic information of the word segments, and converting the semantic information into the first pulse signal through a fully connected layer in the deep learning neural network. Figure 2 The following is a schematic diagram of a preset signal conversion model provided according to some embodiments. Figure 2 The text information, i.e. the question, is input into the deep learning neural network, and a first pulse signal is obtained. The first pulse signal will stimulate the second neuron in the preset pulse neural network, i.e., the second neuron displayed in the correlation box of each neuron. How to stimulate the second neuron in the preset pulse neural network is described in detail below.

[0057] S200. Input the first pulse signal into a preset pulse neural network to determine a propagation path of the first pulse signal in the preset pulse neural network, wherein the propagation path includes a first neuron and a first synapse for connecting different first neurons.

[0058] In the embodiment of the present application, the preset pulse neural network includes a second neuron and a second synapse for connecting different second neurons. The first pulse signal is input into the preset pulse neural network. At this time, the first pulse signal will stimulate the second neuron in the preset pulse neural network. After the second neuron is stimulated, it will continue to propagate backward along the second synapse corresponding to it. The second neuron behind it continues to be stimulated and propagates backward, completing the semantic connection of the preset pulse neural network in the reasoning process, and finally forming a propagation path of the first pulse signal in the preset pulse neural network. The propagation path includes the first neuron and the first synapse for connecting the first neuron. The first neuron is the stimulated second neuron, and the first synapse is the second synapse for propagating the pulse signal after the second neuron is stimulated.

[0059] In some embodiments, each first pulse signal has a corresponding serial number, and the second neuron in the preset pulse neural network has a corresponding neuron corner mark. The first pulse signal is used to stimulate the second neuron corresponding to the neuron corner mark with the same serial number as the first pulse signal. After receiving the stimulation of the first pulse signal, the second neuron will propagate backward along the second synapse. Exemplarily, the question can be "Please comprehensively summarize the development process of brain-like neural networks", and the five first pulse signals are finally determined. The five first pulse signals correspond to the five second neurons in the preset pulse neural network in the following text, and the five second neurons can be "brain-like neural network", "brain-like", "neural network", "summarize", and "development process". It can be understood that the current five second neurons can be used as the first neurons of the propagation path because they receive the stimulation of the pulse signal. In addition, since the five second neurons will continue to propagate the pulse signal backward after receiving the stimulation of the pulse signal, the current five second neurons are part of the first neurons in the propagation path of the first pulse signal in the preset pulse neural network.

[0060] In one example, the second neuron that receives stimulation from the pulse signal may be marked as 1. When the second neuron is marked as 1, it indicates that the second neuron receives stimulation from the pulse signal.

[0061] Figure 3 A schematic diagram of a propagation path provided according to some embodiments is exemplarily shown. At time t1, the five second neurons in the input layer receive the first pulse signal, that is, the five first neurons, specifically including "brain-like neural network", "brain-like", "neural network", "generalization", and "development process". After being stimulated, the above-mentioned first neurons send pulse signals to other first neurons through the first synapse. Here, at time t2, the first neurons that receive the stimulation are "neural network", "brain synapse", "neural network development process", "artificial intelligence" and "knowledge graph", and so on at time t3. Figure 3 It includes multiple propagation paths. The exemplary “brain-like neural network”, “neural network”, “brain synapse” and “neural network” are one propagation path, and “brain-like neural network”, “neural network”, “brain synapse” and “current status of human brain research” are another propagation path.

[0062] In some embodiments, the method further comprises: displaying the propagation path.

[0063] In this embodiment, the output of the preset pulse neural network can accurately reflect the potential changes of different first neurons. Through iterative cycles at different times, the output information can be input into the preset pulse neural network again as input information, and the preset pulse neural network can simulate the brain neurons to realize the signal transmission process. In order to better demonstrate the reasoning process of the preset pulse neural network, the propagation path of the response is displayed to the user. The preset pulse neural network iterates and cycles at different times, and visualizes the first neuron and the first synapse that responds at each moment. In the embodiment of the present application, the reasoning process of the human brain is simulated, and the visualization of the reasoning process is realized.

[0064] In some embodiments, Figure 4 The schematic diagram of a process for determining a preset spiking neural network according to some embodiments is exemplarily shown. The process of determining the preset spiking neural network may also be called a training process, including S500-S700.

[0065] S500, constructing a knowledge graph using preset data, wherein the knowledge graph includes entities, relationships, and attributes;

[0066] In an embodiment of the present application, the preset data is an open source and / or closed source database. The preset data includes structured data and unstructured data. The unstructured data is processed, and specifically, the unstructured data can be processed by methods such as cleaning, denoising and format conversion to extract useful information from the unstructured data. The structured data and the processed unstructured data are converted into knowledge, specifically including entity recognition, relationship extraction, knowledge representation, community clustering and domain division to convert data information into knowledge, and knowledge is obtained through knowledge conversion, and knowledge is used to construct a knowledge graph, which includes entities, relationships and attributes.

[0067] In some embodiments, to construct a knowledge graph in the literature field, preset data in the literature field may be selected.

[0068] S600. Using the knowledge graph, construct a second type of brain knowledge graph, wherein the second type of brain knowledge graph includes a first node and a third synapse, the third synapse is located between the first nodes, the third synapse includes a first active synapse and a first silent synapse, the first node is an entity in the knowledge graph, and the first active synapse is a relationship in the knowledge graph. In addition, the attributes in the knowledge graph can be defined as different brain regions. For example, the "brain science" attribute in the knowledge graph represents the "brain science" functional area, i.e., the brain region, in the second type of brain knowledge graph as a community element.

[0069] In the embodiment of the present application, the entity in the knowledge graph is used as the first node in the second type of brain knowledge graph, and the relationship in the knowledge graph is used as the first active synapse in the second type of brain knowledge graph. There are M third synapses in the second type of brain knowledge graph, and except for the first active synapse, the rest are all first silent synapses. M is a fixed value, which is set according to the requirements.

[0070] Exemplarily, the entities in the knowledge graph include "brain science" and "brain science is defined as...", and the relationship between the two entities is "meaning". Then the second neurons in the second type of brain knowledge graph include "brain science" and "brain science is defined as...", and there are M third synapses between the two second neurons, among which the third synapse representing "meaning" is the first active synapse, and the remaining M-1 third synapses are first silent synapses.

[0071] In complex knowledge reasoning scenarios, the third synapse in the second-type brain knowledge graph can provide more detailed relationship descriptions and reasoning mechanisms to support higher-level intelligent applications.

[0072] In an embodiment of the present application, in order to effectively simulate the reasoning process of brain neurons, the synaptic structure is defined based on the architecture of the knowledge graph. Figure 5 A schematic diagram of a second type of brain knowledge graph provided according to some embodiments is exemplarily shown. Figure 5 includes a plurality of first nodes, and there are third synapses between different first nodes. Figure 5 Only the first active synapse in the different first nodes is marked, and the first silent synapse is not marked.

[0073] S700. Determine a preset pulse neural network using the second brain knowledge graph, wherein the preset pulse neural network includes an input layer and an output layer, the second neurons in the input layer and the output layer are both first nodes in the second brain knowledge graph, the second neurons in the input layer and the second neurons in the output layer are connected using second synapses, the second synapses include second active synapses and second silent synapses, the second active synapses between the second neurons in the input layer and the second neurons in the output layer are the first active synapses between the first nodes in the second brain knowledge graph that are the same as the second neurons in the input layer and the output layer, and the second synapses have corresponding synaptic weights.

[0074] In an embodiment of the present application, the nodes in the second type of brain knowledge graph are used as the second neurons in the input layer and output layer of the preset pulse neural network. In some embodiments, the preset pulse neural network is a LIF (Leaky Integrate-and-Fire) model, which uses the LIF model to simulate and describe the dynamic behavior of the second neuron. The second neurons are connected in a fully connected manner, and second synapses are constructed between different second neurons. When there is no associated connection between the second neurons, it is initialized as a silent synapse, and the second neuron is a LIF neuron. After receiving the first pulse signal, the corresponding second neuron receives the stimulus and emits a pulse signal. Under the action of the second synapse, the emitted pulse signal is transmitted backward in the preset pulse neural network.

[0075] Figure 6 A schematic diagram of a preset pulse neural network provided according to some embodiments is exemplarily shown. Figure 6 In the example, an input layer and an output layer are included. The second neurons in the input layer are pre-neuron 1, pre-neuron 2, ... pre-neuron n. The second neurons in the output layer are post-neuron 1, post-neuron 2, ... post-neuron 3. Pre-neuron 1 and post-neuron 1 have the same content, and the second synapse used to connect the two is a related self-synapse, and the second synapse used to connect pre-neuron 1 and a post-neuron other than post-neuron 1 is a related synapse. Figure 7 A schematic diagram of a second synapse provided according to some embodiments is exemplarily shown, where the second synapse exists between a front neuron and a rear neuron, that is, between two second neurons.

[0076] In some embodiments, the step of determining a preset pulse neural network using the second brain knowledge graph includes:

[0077] The architecture of the preset pulse neural network is constructed by utilizing the second type of brain knowledge graph.

[0078] In this embodiment, the architecture of the preset pulse neural network includes an input layer and an output layer, the second neurons in the input layer and the output layer are both first nodes in the second type brain knowledge graph, the second neurons in the input layer and the second neurons in the output layer are connected by second synapses, the second synapses include second active synapses and second silent synapses, the second active synapses between the second neurons in the input layer and the second neurons in the output layer are the first active synapses between the first nodes in the second type brain knowledge graph that are the same as the second neurons in the input layer and the output layer, and the second synapses have corresponding synaptic weights.

[0079] From the second brain-like knowledge graph, a preset path is selected. In this embodiment, there may be multiple preset paths. For example, a preset path may be a path from the node "brain-like research" to the node "synapse formation" through "brain-like definition", "human brain", "synapse simulation", etc., and the path is used as input, so that the synapse automatically learns the relevant weights.

[0080] The preset path is used to train a preset pulse neural network having the architecture to determine a synaptic weight corresponding to a second synapse in the preset pulse neural network.

[0081] In the embodiment of the present application, the preset pulse neural network is unsupervised learning, and the input pulse signal can realize the learning of synaptic weights and determine the synaptic weight corresponding to the second synapse. The nodes in the preset path are converted into pulse signals to realize the learning of synaptic weights and realize the updating of the preset pulse neural network.

[0082] In the embodiment of the present application, for the plasticity of synapses, the learning of synaptic weights adopts the STDP (Spike-Timing Dependent Plasticity) mechanism. The learning of synaptic weights adjusts the strength of synaptic connections according to the time difference of action potentials to simulate the learning and memory process of the brain and is designed with adaptive learning ability. Specifically, the learning of synaptic weights depends on the time difference between the pulses of the presynaptic neuron and the postsynaptic neuron. When the presynaptic neuron emits an action potential before the postsynaptic neuron generates an action potential, it will lead to an increase in synaptic strength, that is, an increase in synaptic weight. This time difference makes the synaptic connection stronger and enhances the synchronization between the two. If the presynaptic neuron emits an action potential after the postsynaptic neuron generates an action potential, it will lead to a decrease in synaptic strength and a decrease in synaptic weight. This time difference weakens the synaptic connection and reduces the synchronization between the two. The pre-neuron and the post-neuron here can be nodes connected before and after the second synapse. By presetting the self-learning ability of the pulse neural network, the neural network parameters, i.e., the synaptic weights, are automatically optimized to make the reasoning process more accurate.

[0083] S300: Determine a first type of brain knowledge graph based on the first neurons in the propagation path and the first synapses used to connect different first neurons.

[0084] In the embodiment of the present application, different first neurons do not necessarily have different contents, but may also be located in different positions. For example, the contents of two first neurons are both "brain-like definition", but one is located in the input layer and the other is located in the output layer. In this case, the two first neurons with the content of "brain-like definition" are also different first neurons.

[0085] In an embodiment of the present application, the first neurons at different moments in the propagation path and the first synapses between the first neurons are integrated to obtain a first class brain knowledge graph. In some embodiments, the step of determining the first class brain knowledge graph based on the first neurons in the propagation path and the first synapses used to connect different first neurons includes: determining the first neuron in the propagation path as the second node in the first class brain knowledge graph; determining the first synapse in the propagation path for connecting different first neurons as the fourth synapse in the first class brain knowledge graph. The first class brain knowledge graph includes a second node and a fourth synapse for connecting different second nodes.

[0086] S400: Input the first type of brain knowledge graph and the question into a preset large language model to output an answer.

[0087] In an embodiment of the present application, the first type of brain knowledge graph and questions are input into a preset large language model. The preset large language model can perform a more comprehensive analysis based on the first type of brain knowledge graph and questions, and obtain more accurate answers to return to the user.

[0088] The inventors found that the knowledge graph has certain structural similarities with the neuron composition state of the brain. Neurons in the brain process and store information through complex connection and transmission mechanisms. Similarly, the nodes and edges in the knowledge graph also constitute a complex information network, which realizes the acquisition and application of knowledge through reasoning and calculation. Therefore, the inventors thought of using a combination of brain-like knowledge graphs and preset large language models. Compared with knowledge graphs, brain-like knowledge graphs provide more comprehensive background knowledge for preset large language models. Ultimately, the preset large language model can output more accurate answers based on questions.

[0089] In an embodiment of the present application, the first type of brain knowledge graph includes a fourth synapse, and the fourth synapse has a corresponding synaptic weight, which can enrich the information contained in the first type of brain knowledge graph, so that the answer determined by using the first type of brain knowledge graph and the question can be more accurate.

[0090] In the embodiment of the present application, when the first type of brain knowledge graph is combined with the preset large language model, its powerful data processing capability is further released, and it is able to conduct in-depth analysis and mining of massive data from a global perspective, providing a solid foundation for intelligent applications.

[0091] In some embodiments, the step of inputting the first brain knowledge graph and the question into a preset large language model to output an answer includes:

[0092] Based on the first brain knowledge graph and the question, a prompt template is constructed. In this embodiment, the prompt template is a structured prompt that guides the preset large language model to complete the task, and usually contains clear instructions and background information to ensure that the model can accurately understand and perform specific tasks.

[0093] The prompt template is input into a preset large language model to output an answer.

[0094] In an embodiment of the present application, the preset large language model can utilize the first type of brain knowledge graph and the question to collaborate to output an answer, so that the answer obtained is more accurate.

[0095] In some embodiments, the preset large language model may be an LLM (Large Language Model), which refers to a deep learning model trained using a large amount of text data and can generate natural language text or understand the meaning of language text.

[0096] In some embodiments, the method further comprises:

[0097] According to the question and the answer, update the knowledge graph;

[0098] In this embodiment, the questions and answers are further processed into knowledge to obtain knowledge information, that is, the corresponding entities, relationships and other information are extracted, and the knowledge information is updated to the knowledge graph. The first type of brain knowledge graph is combined with the preset large language model, and the returned answers continue to act on the re-learning of the knowledge graph, which is more scientific and reasonable, and provides new perspectives and methods for research in fields such as neuroscience, psychology and medicine.

[0099] Use the updated knowledge graph to update the preset spiking neural network.

[0100] In this embodiment, the second type of brain knowledge graph is updated using the updated knowledge graph, and the preset spiking neural network is determined using the updated second type of brain knowledge graph, completing the step of updating the preset spiking neural network.

[0101] In this way, the synapses in the preset pulse neural network are self-learned through the unsupervised learning method of the STDP mechanism to achieve dynamic knowledge completion, and also provide new perspectives and methods for research in fields such as neuroscience, psychology, and medicine. When new entities and relationships are generated, the second neuron and the second synapse corresponding to the pulse neural network are regularly expanded, as well as the synaptic weight of the second synapse. At the same time, the analysis results are further knowledge-based, and the synapse is self-learned to achieve the reasoning update of the reasoning model.

[0102] In some embodiments, the knowledge information obtained from the questions and answers can also be used to expand the preset signal conversion model, which can improve the output accuracy of the preset signal conversion model.

[0103] In the embodiments of the present application, the method can simulate the information transmission mechanism of the human brain, simplify the machine learning process, reduce the difficulty, improve the reasoning ability, release the huge potential of large models for knowledge analysis in different fields, assist in analysis work, and expand the application scenarios of AIG C (Artificial Intelligence Generated Content). At the same time, by simulating the reasoning process of the human brain, dynamic knowledge completion is achieved, providing new perspectives and methods for research in fields such as neuroscience and medicine.

[0104] In the above embodiment, a method, device and electronic device for answering questions are provided, wherein a preset pulse neural network can simulate the brain nerve signal transmission process to perform knowledge reasoning and determine a first type of brain knowledge graph. The first type of brain knowledge graph can provide more comprehensive background knowledge for the preset large language model, thereby enabling the preset large language model to output a more accurate answer based on the question.

[0105] Further, as Figure 1 The specific implementation of the method, Figure 8 A schematic structural diagram of a device for answering questions provided according to some embodiments is exemplarily shown, and the device includes 801-804.

[0106] The conversion unit 801 is used to input the problem into a preset signal conversion model to obtain a first pulse signal.

[0107] An input unit 802 is used to input the first pulse signal into a preset pulse neural network to determine a propagation path of the first pulse signal in the preset pulse neural network, wherein the propagation path includes first neurons and first synapses for connecting different first neurons;

[0108] A determining unit 803, configured to determine a first type of brain knowledge graph according to the first neurons in the propagation path and the first synapses for connecting different first neurons;

[0109] The output unit 804 is used to input the first type of brain knowledge graph and the question into a preset large language model to output an answer.

[0110] In some embodiments, the conversion unit specifically performs: splitting the question into word segments, performing semantic understanding based on the word segments to obtain semantic information, and converting the semantic information into a first pulse signal.

[0111] In some embodiments, the apparatus further comprises:

[0112] A first construction unit is used to construct a knowledge graph using preset data, wherein the knowledge graph includes entities, relationships and attributes;

[0113] A second construction unit is used to construct a second type of brain knowledge graph using the knowledge graph, wherein the second type of brain knowledge graph includes a first node and a third synapse, the third synapse is located between the first nodes, the third synapse includes a first active synapse and a first silent synapse, the first node is an entity in the knowledge graph, and the first active synapse is a relationship in the knowledge graph;

[0114] Determine a preset pulse neural network unit, which is used to determine the preset pulse neural network using the second brain knowledge graph, wherein the architecture of the preset pulse neural network includes an input layer and an output layer, the second neurons in the input layer and the output layer are both first nodes in the second brain knowledge graph, the second neurons in the input layer and the second neurons in the output layer are connected using second synapses, the second synapses include second active synapses and second silent synapses, the second active synapses between the second neurons in the input layer and the second neurons in the output layer are the first active synapses between the first nodes in the second brain knowledge graph that are the same as the second neurons in the input layer and the output layer, and the second synapses have corresponding synaptic weights.

[0115] In some embodiments, the determining of the preset pulse neural network unit is specifically performed:

[0116] Using the second type of brain knowledge graph, constructing the architecture of the preset pulse neural network;

[0117] Filtering out a preset path from the second type of brain knowledge graph;

[0118] The preset path is used to train a preset pulse neural network having the architecture to determine a synaptic weight corresponding to a second synapse in the preset pulse neural network.

[0119] In some embodiments, the device further includes: a display unit for displaying the propagation path.

[0120] In some embodiments, the determining unit specifically performs:

[0121] Determine a first neuron in the propagation path as a second node in the first brain-like knowledge graph;

[0122] The first synapse in the propagation path for connecting different first neurons is determined as the fourth synapse in the first brain knowledge graph.

[0123] In some embodiments, the output unit specifically performs:

[0124] Based on the first type of brain knowledge graph and the question, construct a prompt template;

[0125] The prompt template is input into a preset large language model to output an answer.

[0126] In some embodiments, the apparatus further comprises:

[0127] A training unit is used to train the preset pulse neural network according to the question and the answer to update the synaptic weight corresponding to the second synapse in the preset pulse neural network.

[0128] Correspondingly, an embodiment of the present application further provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned method of answering questions is implemented.

[0129] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0130] Based on the virtual device embodiment, in order to achieve the above-mentioned purpose, the embodiment of the present application also provides a physical device based on answering questions, which can be specifically a computer, a smart phone, a tablet computer, a smart watch, a server, or a network device, etc. The physical device includes a storage medium and a processor; the storage medium is used to store computer programs; the processor is used to execute the computer program to implement the above-mentioned method based on answering questions.

[0131] Optionally, the physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.

[0132] Those skilled in the art will appreciate that the electronic device structure provided in this embodiment does not limit the electronic device, and may include more or fewer components, or a combination of certain components, or different component arrangements.

[0133] The storage medium may also include an operating device and a network communication module. The operating device is a program that manages and saves the hardware and software resources of the electronic device, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the various controls inside the storage medium, and the communication with other hardware and software in the physical device.

[0134] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or by hardware.

[0135] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the units or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the units in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The units of the above-mentioned implementation scenarios can be combined into one unit, or can be further split into multiple sub-units.

[0136] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.

Claims

1. A method for answering a question, characterized in that include: Inputting the problem into a preset signal conversion model to obtain a first pulse signal; Inputting the first pulse signal into a preset pulse neural network to determine a propagation path of the first pulse signal in the preset pulse neural network, wherein the propagation path includes first neurons and first synapses for connecting different first neurons; Determining a first type of brain knowledge graph according to the first neurons in the propagation path and the first synapses for connecting different first neurons; The first type of brain knowledge graph and the question are input into a preset large language model to output an answer.

2. The method according to claim 1, characterized in that: The step of inputting the question into a preset signal conversion model to obtain a first pulse signal includes: splitting the question into word segments, performing semantic understanding based on the word segments to obtain semantic information, and converting the semantic information into a first pulse signal.

3. The method according to claim 1, characterized in that The process of determining the preset pulse neural network includes: Using preset data, constructing a knowledge graph, wherein the knowledge graph includes entities, relationships, and attributes; Using the knowledge graph, construct a second type of brain knowledge graph, wherein the second type of brain knowledge graph includes a first node and a third synapse, the third synapse is located between the first nodes, the third synapse includes a first active synapse and a first silent synapse, the first node is an entity in the knowledge graph, and the first active synapse is a relationship in the knowledge graph; The preset pulse neural network is determined by using the second type of brain knowledge graph, wherein the architecture of the preset pulse neural network includes an input layer and an output layer, the second neurons in the input layer and the output layer are both first nodes in the second type of brain knowledge graph, the second neurons in the input layer and the second neurons in the output layer are connected by second synapses, the second synapses include second active synapses and second silent synapses, the second active synapses between the second neurons in the input layer and the second neurons in the output layer are the first active synapses between the first nodes in the second type of brain knowledge graph that are the same as the second neurons in the input layer and the output layer, and the second synapses have corresponding synaptic weights.

4. The method according to claim 3, characterized in that The step of determining a preset pulse neural network using the second type of brain knowledge graph comprises: Using the second type of brain knowledge graph, constructing the architecture of the preset pulse neural network; Filtering out a preset path from the second type of brain knowledge graph; The preset path is used to train a preset pulse neural network having the architecture to determine a synaptic weight corresponding to a second synapse in the preset pulse neural network.

5. The method according to claim 1, characterized in that Also includes: The propagation path is displayed.

6. The method according to claim 3, characterized in that The step of determining a first type of brain knowledge graph according to the first neurons in the propagation path and the first synapses for connecting different first neurons comprises: Determine a first neuron in the propagation path as a second node in the first brain-like knowledge graph; The first synapse in the propagation path for connecting different first neurons is determined as the fourth synapse in the first brain knowledge graph.

7. The method according to claim 1, characterized in that The step of inputting the first brain knowledge graph and the question into a preset large language model to output an answer includes: Based on the first type of brain knowledge graph and the question, construct a prompt template; The prompt template is input into a preset large language model to output an answer.

8. The method according to claim 7, characterized in that Also includes: The preset spiking neural network is trained according to the question and the answer to update the synaptic weight corresponding to the second synapse in the preset spiking neural network.

9. A device for answering questions, characterized in that: include: A conversion unit, used for inputting the question into a preset signal conversion model to obtain a first pulse signal; an input unit, configured to input the first pulse signal into a preset pulse neural network to determine a propagation path of the first pulse signal in the preset pulse neural network, wherein the propagation path includes first neurons and first synapses for connecting different first neurons; a determining unit, configured to determine a first type of brain knowledge graph according to the first neurons in the propagation path and the first synapses for connecting different first neurons; An output unit is used to input the first type of brain knowledge graph and the question into a preset large language model to output an answer.

10. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for answering questions as described in any one of claims 1 to 8 when executing the computer program.