WO2022227171A1 - 关键信息提取方法、装置、电子设备及介质 - Google Patents
关键信息提取方法、装置、电子设备及介质 Download PDFInfo
- Publication number
- WO2022227171A1 WO2022227171A1 PCT/CN2021/096521 CN2021096521W WO2022227171A1 WO 2022227171 A1 WO2022227171 A1 WO 2022227171A1 CN 2021096521 W CN2021096521 W CN 2021096521W WO 2022227171 A1 WO2022227171 A1 WO 2022227171A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- vector
- vertex
- concept
- text
- concept map
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 26
- 238000012545 processing Methods 0.000 claims abstract description 83
- 230000011218 segmentation Effects 0.000 claims abstract description 40
- 238000004422 calculation algorithm Methods 0.000 claims description 25
- 238000004364 calculation method Methods 0.000 claims description 20
- 230000007246 mechanism Effects 0.000 claims description 14
- 239000011159 matrix material Substances 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 8
- 238000013016 damping Methods 0.000 claims description 8
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000012216 screening Methods 0.000 abstract description 2
- 230000006870 function Effects 0.000 description 13
- 238000000605 extraction Methods 0.000 description 9
- 238000007726 management method Methods 0.000 description 5
- 238000013527 convolutional neural network Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000002372 labelling Methods 0.000 description 4
- 230000002028 premature Effects 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000002776 aggregation Effects 0.000 description 2
- 238000004220 aggregation Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000010009 beating Methods 0.000 description 2
- 230000000747 cardiac effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 239000003814 drug Substances 0.000 description 2
- 229940079593 drug Drugs 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 239000000902 placebo Substances 0.000 description 2
- 238000007674 radiofrequency ablation Methods 0.000 description 2
- 208000024891 symptom Diseases 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
- G06F16/334—Query execution
- G06F16/3344—Query execution using natural language analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/211—Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
- G06F40/295—Named entity recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
Definitions
- the present application relates to the technical field of intelligent decision-making, and in particular, to a method, device, electronic device and medium for extracting key information.
- online search engines can retrieve a large amount of relevant information based on the questions entered by users.
- online search engines have a large amount of health-related information, which is very attractive to users with medical problems.
- users can enter questions to get relevant answers.
- the inventor found that most of the answers retrieved by online search engines are very long, which is inconvenient for users to directly understand key information, and therefore cannot obtain the desired answers quickly and accurately.
- a key information extraction method provided by this application includes:
- a plurality of key concept entities are screened from the entity set to obtain a concept entity set, and an initial concept map is constructed according to the concept entity set and the answer text;
- a semantic vector is obtained by calculating according to the first attention weight, the second attention weight and the vertices in the initial concept map;
- the corresponding semantic text is obtained according to the semantic vector, and the semantic text is marked in the answer text as key information.
- the present application also provides a device for extracting key information, the device comprising:
- the entity recognition module is used to obtain the question text and the answer text retrieved according to the question text, perform word segmentation on the answer text, and perform entity recognition processing on the segmented answer text to obtain an entity set;
- an initial concept map building module configured to filter out a plurality of key concept entities from the entity set based on a graph sorting algorithm, obtain a concept entity set, and construct an initial concept map according to the concept entity set and the answer text;
- an initialization module used to initialize the vertices in the initial concept map to obtain a standard concept map
- an image convolution module used for inputting the standard concept map into a preset graph convolution network for image convolution processing to obtain a vertex weight vector
- the attention weight calculation module is used to perform vectorization processing on the question text to obtain a hidden question vector, and input the hidden question vector and the vertex weight vector into a preset first attention weight formula, Obtain the first attention weight, input the hidden problem vector and the vertex weight vector into the preset second attention weight formula, and obtain the second attention weight;
- a semantic vector calculation module configured to obtain a semantic vector according to the first attention weight, the second attention weight and the vertices in the initial concept map, and obtain a corresponding semantic text according to the semantic vector, The semantic text is marked in the answer text as key information.
- the present application also provides an electronic device, the electronic device comprising:
- a processor that executes the instructions stored in the memory to achieve the following steps:
- a plurality of key concept entities are screened from the entity set to obtain a concept entity set, and an initial concept map is constructed according to the concept entity set and the answer text;
- a semantic vector is obtained by calculating according to the first attention weight, the second attention weight and the vertices in the initial concept map;
- the corresponding semantic text is obtained according to the semantic vector, and the semantic text is marked in the answer text as key information.
- the present application also provides a computer-readable storage medium, where the computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in an electronic device to implement the following steps:
- a plurality of key concept entities are screened from the entity set to obtain a concept entity set, and an initial concept map is constructed according to the concept entity set and the answer text;
- a semantic vector is obtained by calculating according to the first attention weight, the second attention weight and the vertices in the initial concept map;
- the corresponding semantic text is obtained according to the semantic vector, and the semantic text is marked in the answer text as key information.
- FIG. 1 is a schematic flowchart of a method for extracting key information provided by an embodiment of the present application
- Fig. 2 is a schematic flowchart of one of the steps in the key information extraction method shown in Fig. 1;
- FIG. 3 is a functional block diagram of an apparatus for extracting key information provided by an embodiment of the present application.
- FIG. 4 is a schematic structural diagram of an electronic device implementing the method for extracting key information according to an embodiment of the present application.
- the embodiments of the present application provide a method for extracting key information.
- the execution subject of the key information extraction method includes, but is not limited to, at least one of electronic devices that can be configured to execute the method provided by the embodiments of the present application, such as a server and a terminal.
- the method for extracting key information may be executed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform.
- the server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
- FIG. 1 it is a schematic flowchart of a method for extracting key information provided by an embodiment of the present application.
- the method for extracting key information includes:
- the question text refers to questions in different fields entered by the user in the search engine
- the answer text refers to the answer corresponding to the question text retrieved from the search engine.
- the question text may be a related question in the medical field.
- the question text is "What is the treatment for premature cardiac beats?"
- the answer text is: "The heart is the central link in the human body, and it is also one of several vital parts. If the heart is abnormal It is very dangerous to have problems with beating. Generally speaking, mild patients do not need treatment, and placebos can also be used. Severe patients can use drugs or radiofrequency ablation to relieve symptoms. Let's talk about the treatment of premature heart beats in detail. one:.........."
- This embodiment of the present application performs word segmentation and entity recognition processing on the answer text to identify entities with specific meanings in the answer text, including person names, place names, organization names, proper nouns, and the like. For example, in this embodiment of the present application, a medical entity in the answer text can be identified.
- the word segmentation is performed on the answer text
- entity recognition processing is performed on the answer text after the word segmentation to obtain an entity set, including:
- Extracting multiple entities in the word segmentation set to obtain an entity set Extracting multiple entities in the word segmentation set to obtain an entity set.
- the de-symbol is to remove the non-text part in the answer text
- the answer corresponding to the answer text retrieved by the search engine is not necessarily a canonical plain text, but may contain some numerical symbols or special text. symbol, and performing de-symbol processing can retain the text part in the answer text, which is convenient for subsequent entity recognition.
- a Jieba tokenizer may be used to perform word segmentation on the answer text to obtain a word segmentation set
- a neural network-based entity recognition model may be used to screen out an entity set from the word segmentation set.
- the graph ranking algorithm is the TextRank algorithm.
- the graph sorting algorithm is used to filter key concept entities from the entity set, and an initial concept graph is obtained by constructing a concept entity set composed of the key concept entities and the answer text.
- the graph-based sorting algorithm selects a plurality of key concept entities from the entity set to obtain a concept entity set, including:
- a node in the directed weighted graph represents an entity in the entity set.
- weight calculation formula can be used to calculate the weights of the multiple nodes:
- WS(V i ) represents the weight of the node Vi
- d is the damping coefficient
- In(V i ) is the node set pointing to the node Vi
- Out(V j ) is the node set pointed to by the node Vi
- W ji is the connection weight between nodes V i and V j
- W jk is the connection weight between nodes V k and V j .
- the damping coefficient d represents the probability of pointing from a certain point in the directed weighted graph to any other point.
- the damping coefficient takes a value of 0.85.
- an initial concept map is constructed based on the concept entity set and the answer text, and the key concept entities and the corresponding answer text are intuitively displayed in the form of a concept map, so as to better display the concept map. Relationships between key concept entities.
- the initial concept map constructed according to the conceptual entity set and the answer text includes:
- the sentence corresponding to the key concept entity is searched in the answer text.
- the key concept entity and its corresponding sentence are used as vertices.
- Each vertex contains the same sentence, that is, two vertices share a sentence, then an edge is added between the two vertices. If there is no shared sentence between the two vertices, there is no need to add an edge, and finally the initial concept graph is obtained.
- initializing the vertices in the initial concept map can capture the information of the vertex context and other position information, so that the information of the vertices is more abundant.
- the initialization of the vertices in the initial concept map to obtain a standard concept map includes:
- the summation vector corresponding to each vertex is input into the preset self-attention mechanism module for relationship capture processing to obtain a hidden representation vector;
- a standard concept map is constructed according to the hidden representation vector.
- each vertex has corresponding information in the initial concept map, and information summation processing is performed on each vertex in the initial concept map to obtain a summation vector corresponding to each vertex.
- the attention mechanism module is used to capture the relationship information of the context, and the summation vector corresponding to each vertex is input into the preset self-attention mechanism module for relationship capture processing, and a hidden representation vector is obtained.
- the hidden representation vector is For each vertex after initialization, a standard concept map can be constructed according to the hidden representation vector.
- the word information, the absolute position information and the relative position information are summed to obtain a summation vector corresponding to each vertex.
- the summation vector is input into the self-attention mechanism module, and a hidden representation vector can be obtained, wherein the self-attention mechanism module can explicitly model the relationship between words. Interrelationships to capture the context of vertices.
- the preset graph convolutional network is a convolutional neural network for images, and the image convolution processing is performed on the standard concept map by using the graph convolutional neural network, and the convolutional network can be output to perform image convolution processing.
- Important weight vector during aggregation is a convolutional neural network for images, and the image convolution processing is performed on the standard concept map by using the graph convolutional neural network, and the convolutional network can be output to perform image convolution processing.
- Important weight vector during aggregation is a convolutional neural network for images
- a preset graph convolution network to perform image convolution processing to obtain a vertex weight vector, including:
- the convolution kernel is the filter function.
- Performing Fourier transform on the standard concept map and the convolution kernel and multiplying to obtain a feature matrix including:
- g is the convolution kernel
- x is the standard concept map
- U is the basis of the Fourier transform
- T is a fixed parameter.
- S5. Perform vectorization processing on the question text to obtain a hidden question vector, and input the hidden question vector and the vertex weight vector into a preset first attention weight formula to obtain a first attention weight , inputting the hidden question vector and the vertex weight vector into a preset second attention weight formula to obtain a second attention weight.
- the question text is vectorized, converted to generate a hidden question vector, which is convenient for subsequent calculations, and the hidden question vector and the vertex weight vector are input into a preset first attention weight formula and the preset second attention weight formula, the corresponding attention weight is calculated according to the formula, which is used as the weight standard for the subsequent calculation of the semantic vector.
- ⁇ i is the first attention weight
- exp is an exponential function
- q is the question hidden vector
- g i is the vertex weight vector.
- ⁇ i is the second attention weight
- t i is the hidden state representation of the vertex.
- a semantic vector is calculated according to the first attention weight, the second attention weight, and the vertices in the initial concept map, and the semantic vector fuses the first attention
- the weights and the second attention weights express more abundant and three-dimensional semantic information.
- calculating the semantic vector according to the first attention weight, the second attention weight and the vertices in the initial concept map including
- the semantic vector is calculated by the following formula:
- ⁇ i softmax( ⁇ i +(1- ⁇ ) ⁇ i )
- c i is the semantic vector
- ⁇ i is the final attention weight
- v i is the vertex in the initial concept map.
- the semantic vector is mapped to a preset space to obtain the semantic text corresponding to the semantic vector, and the semantic text is extracted and output as key information.
- the preset labeling method may be to mark the area where the key information in the answer text is located by frame selection, and use the preset labeling method to mark the key information in the answer text to facilitate intuitive understanding and summarization. s answer.
- an initial concept map is obtained by constructing a set of conceptual entities and an answer text, and the initial concept map is used to clearly and intuitively express the relationship between entities and the relationship between the entity and the answer text, and the text is clearly organized into graphics
- the structure can better analyze the answer text, vectorize the question text, and calculate the first attention weight and the second attention according to the preset first attention weight formula and second attention weight formula. force weight, the semantic vector is calculated according to the first attention weight, the second attention weight and the vertex, and the calculated semantic vector refers to two attention weights related to the question text, The relevance to the question text is enhanced, and the confidence of the semantic text is improved. Therefore, the key information extraction method proposed in this application can solve the problem of low accuracy of key information extraction.
- FIG. 3 it is a functional block diagram of an apparatus for extracting key information provided by an embodiment of the present application.
- the key information extraction apparatus 100 described in this application may be installed in an electronic device. According to the realized functions, the key information extraction apparatus 100 may include an entity recognition module 101 , an initial concept map construction module 102 , an initialization module 103 , an image convolution module 104 , an attention weight calculation module 105 and a semantic vector calculation module 106 .
- the modules described in this application may also be referred to as units, which refer to a series of computer program segments that can be executed by the processor of an electronic device and can perform fixed functions, and are stored in the memory of the electronic device.
- each module/unit is as follows:
- the entity recognition module 101 is configured to acquire question text and answer text retrieved according to the question text, perform word segmentation on the answer text, and perform entity recognition processing on the segmented answer text to obtain an entity set;
- the initial concept map building module 102 is configured to filter out a plurality of key concept entities from the entity set based on a graph sorting algorithm to obtain a concept entity set, and construct an initial concept according to the concept entity set and the answer text picture;
- the initialization module 103 is configured to initialize the vertices in the initial concept map to obtain a standard concept map
- the image convolution module 104 is configured to input the standard concept map into a preset graph convolution network for image convolution processing to obtain a vertex weight vector;
- the attention weight calculation module 105 is configured to perform vectorization processing on the question text to obtain a hidden question vector, and input the hidden question vector and the vertex weight vector into a preset first attention weight In the formula, the first attention weight is obtained, and the hidden question vector and the vertex weight vector are input into the preset second attention weight formula to obtain the second attention weight;
- the semantic vector calculation module 106 is configured to calculate and obtain a semantic vector according to the first attention weight, the second attention weight and the vertices in the initial concept map, and obtain the corresponding semantic vector according to the semantic vector. semantic text, and annotate the semantic text as key information in the answer text.
- each module of the key information extraction apparatus 100 is as follows:
- Step 1 The entity recognition module 101 obtains the question text and the answer text retrieved from the question text, performs word segmentation on the answer text, and performs entity recognition processing on the segmented answer text to obtain an entity set.
- the question text refers to questions in different fields entered by the user in the search engine
- the answer text refers to the answer corresponding to the question text retrieved from the search engine.
- the question text may be a related question in the medical field.
- the question text is "What is the treatment for premature cardiac beats?"
- the answer text is: "The heart is the central link in the human body, and it is also one of several vital parts. If the heart is abnormal It is very dangerous to have problems with beating. Generally speaking, mild patients do not need treatment, and placebos can also be used. Severe patients can use drugs or radiofrequency ablation to relieve symptoms. Let's talk about the treatment of premature heart beats in detail. one:.........."
- the embodiment of the present application performs word segmentation and entity recognition processing on the answer text, so as to identify entities with specific meanings in the answer text, including person names, place names, organization names, proper nouns, and the like. For example, in this embodiment of the present application, a medical entity in the answer text can be identified.
- the entity recognition module 101 performs word segmentation on the answer text, and performs entity recognition processing on the word segmented answer text to obtain an entity set, including:
- Extracting multiple entities in the word segmentation set to obtain an entity set Extracting multiple entities in the word segmentation set to obtain an entity set.
- the de-symbol is to remove the non-text part in the answer text
- the answer corresponding to the answer text retrieved by the search engine is not necessarily a canonical plain text, but may contain some numerical symbols or special text. symbol, and performing de-symbol processing can retain the text part in the answer text, which is convenient for subsequent entity recognition.
- a Jieba tokenizer may be used to perform word segmentation on the answer text to obtain a word segmentation set
- a neural network-based entity recognition model may be used to screen out an entity set from the word segmentation set.
- Step 2 The initial concept map building module 102 selects a plurality of key concept entities from the entity set based on a graph sorting algorithm to obtain a concept entity set, and constructs an initial concept according to the concept entity set and the answer text. picture.
- the graph ranking algorithm is the TextRank algorithm.
- the graph sorting algorithm is used to filter key concept entities from the entity set, and an initial concept graph is obtained by constructing the concept entity set composed of the key concept entities and the answer text.
- the initial concept map building module 102 selects a plurality of key concept entities from the entity set based on a graph sorting algorithm, and obtains a concept entity set, including:
- the nodes whose weights exceed the preset threshold in the directed weighted graph are regarded as the key concept entities and aggregated to obtain a concept entity set.
- a node in the directed weighted graph represents an entity in the entity set.
- weight calculation formula can be used to calculate the weights of the multiple nodes:
- WS(V i ) represents the weight of the node Vi
- d is the damping coefficient
- In(V i ) is the node set pointing to the node Vi
- Out(V j ) is the node set pointed to by the node Vi
- W ji is the connection weight between nodes V i and V j
- W jk is the connection weight between nodes V k and V j .
- the damping coefficient d represents the probability of pointing from a certain point in the directed weighted graph to any other point.
- the damping coefficient takes a value of 0.85.
- an initial concept map is constructed based on the concept entity set and the answer text, and the key concept entities and the corresponding answer text are intuitively displayed in the form of a concept map, so as to better display the concept map. Relationships between key concept entities.
- the initial concept map constructed according to the conceptual entity set and the answer text includes:
- the sentence corresponding to the key concept entity is searched in the answer text.
- the key concept entity and its corresponding sentence are used as vertices.
- Each vertex contains the same sentence, that is, two vertices share a sentence, then an edge is added between the two vertices. If there is no shared sentence between the two vertices, there is no need to add an edge, and finally the initial concept graph is obtained.
- Step 3 The initialization module 103 initializes the vertices in the initial concept map to obtain a standard concept map.
- initializing the vertices in the initial concept map can capture the information of the vertex context and other position information, so that the information of the vertices is more abundant.
- the initialization module 103 performs initialization processing on the vertices in the initial concept map to obtain a standard concept map, including:
- the summation vector corresponding to each vertex is input into the preset self-attention mechanism module for relationship capture processing to obtain a hidden representation vector;
- a standard concept map is constructed according to the hidden representation vector.
- each vertex has corresponding information in the initial concept map, and information summation processing is performed on each vertex in the initial concept map to obtain a summation vector corresponding to each vertex.
- the attention mechanism module is used to capture the relationship information of the context, and the summation vector corresponding to each vertex is input into the preset self-attention mechanism module for relationship capture processing, and a hidden representation vector is obtained.
- the hidden representation vector is For each vertex after initialization, a standard concept map can be constructed according to the hidden representation vector.
- the word information, the absolute position information and the relative position information are summed to obtain a summation vector corresponding to each vertex.
- the summation vector is input into the self-attention mechanism module, and a hidden representation vector can be obtained, wherein the self-attention mechanism module can explicitly model the relationship between words. Interrelationships to capture the context of vertices.
- Step 4 The image convolution module 104 inputs the standard concept map into a preset graph convolution network to perform image convolution processing to obtain a vertex weight vector.
- the preset graph convolutional network is a convolutional neural network for images, and the image convolution processing is performed on the standard concept map by using the graph convolutional neural network, and the convolutional network can be output to perform image convolution processing.
- Important weight vector during aggregation is a convolutional neural network for images, and the image convolution processing is performed on the standard concept map by using the graph convolutional neural network, and the convolutional network can be output to perform image convolution processing.
- Important weight vector during aggregation is a convolutional neural network for images
- the image convolution module 104 inputs the standard concept map into a preset graph convolution network to perform image convolution processing to obtain a vertex weight vector, including:
- the convolution kernel is the filter function.
- Performing Fourier transform on the standard concept map and the convolution kernel and multiplying to obtain a feature matrix including:
- g is the convolution kernel
- x is the standard concept map
- U is the basis of the Fourier transform
- T is a fixed parameter.
- the attention weight calculation module 105 performs vectorization processing on the problem text to obtain a hidden problem vector, and inputs the hidden problem vector and the vertex weight vector into the preset first attention weight. In the formula, the first attention weight is obtained, and the hidden question vector and the vertex weight vector are input into the preset second attention weight formula to obtain the second attention weight.
- the question text is vectorized, converted to generate a hidden question vector, which is convenient for subsequent calculations, and the hidden question vector and the vertex weight vector are input into a preset first attention weight formula and the preset second attention weight formula, the corresponding attention weight is calculated according to the formula, which is used as the weight standard for the subsequent calculation of the semantic vector.
- ⁇ i is the first attention weight
- exp is an exponential function
- q is the question hidden vector
- g i is the vertex weight vector.
- ⁇ i is the second attention weight
- t i is the hidden state representation of the vertex.
- Step 6 The semantic vector calculation module 106 calculates a semantic vector according to the first attention weight, the second attention weight and the vertices in the initial concept graph.
- a semantic vector is calculated according to the first attention weight, the second attention weight, and the vertices in the initial concept map, and the semantic vector fuses the first attention
- the weights and the second attention weights express more abundant and three-dimensional semantic information.
- the semantic vector calculation module 106 calculates the semantic vector according to the first attention weight, the second attention weight and the vertices in the initial concept map, including
- the semantic vector is calculated by the following formula:
- ⁇ i softmax( ⁇ i +(1- ⁇ ) ⁇ i )
- c i is the semantic vector
- ⁇ i is the final attention weight
- v i is the vertex in the initial concept graph
- Step 7 The semantic vector calculation module 106 obtains the corresponding semantic text according to the semantic vector, and marks the semantic text in the answer text as key information.
- the semantic vector is mapped to a preset space to obtain the semantic text corresponding to the semantic vector, and the semantic text is extracted and output as key information.
- the preset labeling method may be to mark the area where the key information in the answer text is located by frame selection, and use the preset labeling method to mark the key information in the answer text to facilitate intuitive understanding and summarization. s answer.
- FIG. 4 it is a schematic structural diagram of an electronic device implementing a method for extracting key information provided by an embodiment of the present application.
- the electronic device 1 may include a processor 10, a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a key information extraction program 12.
- the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc.
- the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1 .
- the memory 11 may also be an external storage device of the electronic device 1, such as a pluggable mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital) equipped on the electronic device 1. , SD) card, flash memory card (Flash Card), etc.
- the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
- the memory 11 can not only be used to store application software installed in the electronic device 1 and various types of data, such as the code of the key information extraction program 12, etc., but also can be used to temporarily store data that has been output or will be output.
- the processor 10 may be composed of integrated circuits, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits packaged with the same function or different functions, including one or more integrated circuits.
- Central Processing Unit CPU
- microprocessor digital processing chip
- graphics processor and combination of various control chips, etc.
- the processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, by running or executing programs or modules (such as key components) stored in the memory 11. information extraction program, etc.), and call data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
- the bus may be a peripheral component interconnect (PCI for short) bus or an extended industry standard architecture (Extended industry standard architecture, EISA for short) bus or the like.
- PCI peripheral component interconnect
- EISA Extended industry standard architecture
- the bus can be divided into address bus, data bus, control bus and so on.
- the bus is configured to implement connection communication between the memory 11 and at least one processor 10 and the like.
- FIG. 4 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 4 does not constitute a limitation on the electronic device 1, and may include fewer or more components than those shown in the drawings. components, or a combination of certain components, or a different arrangement of components.
- the electronic device 1 may also include a power supply (such as a battery) for powering the various components, preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that the power management
- the device implements functions such as charge management, discharge management, and power consumption management.
- the power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and any other components.
- the electronic device 1 may further include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
- the electronic device 1 may also include a network interface, optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
- a network interface optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
- the electronic device 1 may further include a user interface, and the user interface may be a display (Display), an input unit (eg, a keyboard (Keyboard)), optionally, the user interface may also be a standard wired interface or a wireless interface.
- the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, and the like.
- the display may also be appropriately called a display screen or a display unit, which is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
- the key information extraction program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions, and when running in the processor 10, it can realize:
- a plurality of key concept entities are screened from the entity set to obtain a concept entity set, and an initial concept map is constructed according to the concept entity set and the answer text;
- a semantic vector is calculated according to the first attention weight, the second attention weight and the vertices in the initial concept map, the corresponding semantic text is obtained according to the semantic vector, and the semantic text is used as Key information is noted in the answer text.
- the modules/units integrated in the electronic device 1 may be stored in a computer-readable storage medium.
- the computer-readable storage medium may be volatile or non-volatile.
- the computer-readable storage medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) Only Memory).
- the present application also provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor of an electronic device, the computer program can realize:
- a plurality of key concept entities are screened from the entity set to obtain a concept entity set, and an initial concept map is constructed according to the concept entity set and the answer text;
- a semantic vector is calculated according to the first attention weight, the second attention weight and the vertices in the initial concept map, the corresponding semantic text is obtained according to the semantic vector, and the semantic text is used as Key information is noted in the answer text.
- modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
- each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
- the above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.
- the blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
- Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information to verify its Validity of information (anti-counterfeiting) and generation of the next block.
- the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Data Mining & Analysis (AREA)
- Biomedical Technology (AREA)
- Computing Systems (AREA)
- Molecular Biology (AREA)
- Evolutionary Computation (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Biophysics (AREA)
- Databases & Information Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Machine Translation (AREA)
Abstract
在智能决策技术领域,提供了一种关键信息提取方法、装置、电子设备以及存储介质。所述方法包括:对答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合,从实体集合中筛选出概念实体集合,并根据概念实体集合和答案文本构建初始概念图,对初始概念图中的顶点进行初始化,得到标准概念图,对标准概念图进行图像卷积,得到顶点权重向量,根据第一注意力权值、第二注意力权值和初始概念图中的顶点计算语义向量,根据语义向量语义文本,并将语义文本作为关键信息在答案文本中标注出来。此外,还涉及区块链技术,所述实体集合可存储于区块链的节点。该方法可以解决关键信息提取准确性较低的问题。
Description
本申请要求于2021年4月25日提交中国专利局、申请号为CN202110450577.2、名称为“关键信息提取方法、装置、电子设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及智能决策技术领域,尤其涉及一种关键信息提取方法、装置、电子设备及介质。
随着搜索引擎技术的发展,现在的在线搜索引擎可以根据用户输入的问题检索到大量且丰富的相关信息,例如,在线搜索引擎有大量健康相关信息,这对有医学问题的用户很有吸引力,用户可以输入问题来获取相关答案。然而发明人发现在线搜索引擎检索到的答案大多都非常长,不方便用户直接了解关键信息,因此,不能快速准确的获取想要的答案。
发明内容
本申请提供的一种关键信息提取方法,包括:
获取问题文本及根据所述问题文本检索得到的答案文本,对所述答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合;
基于图排序算法从所述实体集合中筛选出多个关键概念实体,得到概念实体集合,并根据所述概念实体集合和所述答案文本构建得到初始概念图;
对所述初始概念图中的顶点进行初始化处理,得到标准概念图;
将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量;
对所述问题文本进行向量化处理,得到隐藏问题向量,将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值,将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值;
根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量;
根据所述语义向量得到对应的语义文本,并将所述语义文本作为关键信息标注在所述答案文本中。
本申请还提供一种关键信息提取装置,所述装置包括:
实体识别模块,用于获取问题文本及根据所述问题文本检索得到的答案文本,对所述答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合;
初始概念图构建模块,用于基于图排序算法从所述实体集合中筛选出多个关键概念实体,得到概念实体集合,并根据所述概念实体集合和所述答案文本构建得到初始概念图;
初始化模块,用于对所述初始概念图中的顶点进行初始化处理,得到标准概念图;
图像卷积模块,用于将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量;
注意力权值计算模块,用于对所述问题文本进行向量化处理,得到隐藏问题向量,将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值,将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值;
语义向量计算模块,用于根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量,根据所述语义向量得到对应的语义文本,并将所述语义文本作为关键信息标注在所述答案文本中。
本申请还提供一种电子设备,所述电子设备包括:
存储器,存储至少一个指令;及
处理器,执行所述存储器中存储的指令以实现如下步骤:
获取问题文本及根据所述问题文本检索得到的答案文本,对所述答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合;
基于图排序算法从所述实体集合中筛选出多个关键概念实体,得到概念实体集合,并根据所述概念实体集合和所述答案文本构建得到初始概念图;
对所述初始概念图中的顶点进行初始化处理,得到标准概念图;
将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量;
对所述问题文本进行向量化处理,得到隐藏问题向量,将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值,将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值;
根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量;
根据所述语义向量得到对应的语义文本,并将所述语义文本作为关键信息标注在所述答案文本中。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一个指令,所述至少一个指令被电子设备中的处理器执行以实现如下步骤:
获取问题文本及根据所述问题文本检索得到的答案文本,对所述答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合;
基于图排序算法从所述实体集合中筛选出多个关键概念实体,得到概念实体集合,并根据所述概念实体集合和所述答案文本构建得到初始概念图;
对所述初始概念图中的顶点进行初始化处理,得到标准概念图;
将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量;
对所述问题文本进行向量化处理,得到隐藏问题向量,将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值,将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值;
根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量;
根据所述语义向量得到对应的语义文本,并将所述语义文本作为关键信息标注在所述答案文本中。
图1为本申请一实施例提供的关键信息提取方法的流程示意图;
图2为图1所示的关键信息提取方法中其中一个步骤的流程示意图;
图3为本申请一实施例提供的关键信息提取装置的功能模块图;
图4为本申请一实施例提供的实现所述关键信息提取方法的电子设备的结构示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例提供一种关键信息提取方法。所述关键信息提取方法的执行主体包括但不限于服务端、终端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述关键信息提取方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。
参照图1所示,为本申请一实施例提供的关键信息提取方法的流程示意图。在本实施例中,所述关键信息提取方法包括:
S1、获取问题文本及根据所述问题文本检索得到的答案文本,对所述答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合。
本申请实施例中,所述问题文本是指用户在搜索引擎中输入的不同领域的问题,所述答案文本是指搜索引擎中检索出来的所述问题文本对应的答案,例如,本申请实施例中,所述问题文本可以为医学领域的相关问题。
在本申请一个应用场景中,所述问题文本为“治疗心脏早搏有什么办法?”所述答案文本为:“心脏是人体上中枢环节,也是至关重要的几个部位之一,如果心脏异常跳动出现问题是很危险的,一般来说轻微患者是不需要治疗的,也可以使用安慰剂,严重患者可通过药物或射频消融缓解症状,下面我们来具体说一下治疗心脏早搏有什么方法,第一:…………。”
本申请实施例对所述答案文本进行分词及实体识别处理,以识别出所述答案文本中具有特定意义的实体,包括人名、地名、机构名及专有名词等。例如,本申请实施例中,可以识别出所述答案文本中的医学实体。
具体地,所述对所述答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合,包括:
对所述答案文本进行去符号及分词处理,得到分词集;
提取所述分词集中的多个实体,得到实体集合。
详细地,所述去符号是将所述答案文本中的非文字部分进行去除,利用所述搜索引擎检索出所述答案文本对应的答案不一定是规范的纯文本,可能含有部分数字符号或者特殊符号,进行去符号处理可以保留所述答案文本中的文字部分,便于后续进行实体识别。
进一步地,本申请实施例可以利用Jieba分词器对所述答案文本进行分词处理,得到分词集,并采用基于神经网络的实体识别模型从所述分词集中筛选出实体集合。
S2、基于图排序算法从所述实体集合中筛选出多个关键概念实体,得到概念实体集合,并根据所述概念实体集合和所述答案文本构建得到初始概念图。
所述图排序算法是TextRank算法。本申请实施例利用所述图排序算法从所述实体集合中筛选关键概念实体,以所述关键概念实体组成的概念实体集合和所述答案文本构建得到初始概念图。
本申请实施例中,参阅图2所示,所述基于图排序算法从所述实体集合中筛选出多个关键概念实体,得到概念实体集合,包括:
S201、根据所述实体集合构建有向有权图;
S202、计算所述有向有权图中多个节点的权重;
S203、将所述有向有权图中权重超过预设阈值的节点作为所述关键概念实体并进行汇总,得到概念实体集合。
其中,所述有向有权图中的一个节点表示所述实体集合中的一个实体。
详细地,本申请实施例可以利用下述权重计算公式计算所述多个节点的权重:
其中,WS(V
i)表示节点V
i的权重,d为阻尼系数,In(V
i)为指向节点V
i的节点集合,Out(V
j)为节点V
i所指向的节点集合,W
ji为节点V
i和V
j之间的连接权重,W
jk为节点V
k和V
j之间的连接权重。
详细地,阻尼系数d代表从所述有向有权图中某一特定点指向其他任意点的概率,优选地,所述阻尼系数的取值为0.85。
进一步地,本申请实施例根据所述概念实体集合和所述答案文本构建得到初始概念图,将所述关键概念实体和对应的答案文本以概念图的形式直观的表现出来,更好的展示出关键概念实体之间的关系。
本申请其中一个实施例中,所述根据所述概念实体集合和所述答案文本构建得到初始概念图,包括:
在所述答案文本中搜索所述概念实体集合中关键概念实体对应的句子;
将所述关键概念实体和所述关键概念实体对应的句子作为所述初始概念图的顶点;
若两个所述顶点对应相同的句子,则在两个顶点之间添加一条边,得到初始概念图。
详细地,在所述答案文本中搜索出关键概念实体对应的句子,可能只有一个对应的句子,也可能存在多个对应的句子,将所述关键概念实体和其对应的句子作为顶点,若两个顶点中含有相同的句子,即两个顶点共享一个句子,则在两个顶点之间添加一条边,若两个顶点之间没有共享的句子,故无需添加边,最后得到初始概念图。
S3、对所述初始概念图中的顶点进行初始化处理,得到标准概念图。
本申请实施例中,对所述初始概念图中的顶点进行初始化处理可以将捕捉到顶点上下文的信息和其它位置信息,使得顶点的信息更加丰富。
本申请其中一个实施例中,所述对所述初始概念图中的顶点进行初始化处理,得到标准概念图,包括:
对所述初始概念图中的每个顶点进行信息求和处理,得到每个顶点对应的求和向量;
将所述每个顶点对应的求和向量输入至预设的自注意力机制模块中进行关系捕捉处理,得到隐藏表示向量;
根据所述隐藏表示向量构建得到标准概念图。
详细地,每个顶点在所述初始概念图中都有对应的信息,对所述初始概念图中的每个顶点都进行信息求和处理,得到每个顶点对应的求和向量,所述自注意力机制模块用于捕捉上下文的关系信息,将所述每个顶点对应的求和向量输入至预设的自注意力机制模块中进行关系捕捉处理,得到隐藏表示向量,所述隐藏表示向量即为经过初始化处理后的每个顶点,根据所述隐藏表示向量可以构建得到标准概念图。
具体地,所述对所述初始概念图中的每个顶点进行信息求和处理,得到每个顶点对应的求和向量,包括:
获取所述每个顶点在所述初始概念图中的词信息、绝对位置信息和相对位置信息;
将所述词信息、所述绝对位置信息和所述相对位置信息进行求和处理,得到每个顶点对应的求和向量。
进一步地,本申请实施例将所述求和向量输入至所述自注意力机制模块中,可以得到隐藏表示向量,其中,所述自注意力机制模块可以显式地建模出单词之间的相互关系,以捕获顶点的上下文。
S4、将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量。
本申请实施例中,所述预设的图卷积网络是针对图像的卷积神经网络,利用所述图卷积神经网络对所述标准概念图进行图像卷积处理,可以输出卷积网络进行聚合期间的重要权重向量。
具体地,所述将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量,包括:
获取预设的卷积核,对所述标准概念图与所述卷积核做傅里叶变换后相乘,得到特征矩阵;
对所述特征矩阵做傅里叶反变换处理,得到顶点权重向量。
详细地,所述卷积核即为filter函数。
具体地,所述对所述标准概念图与所述卷积核做傅里叶变换后相乘,得到特征矩阵,包括:
利用如下公式对所述标准概念图与所述卷积核做傅里叶变换后相乘,得到特征矩阵:
g*x=U(U
Tg·U
Tx)
其中,g为所述卷积核,x为所述标准概念图,U为傅里叶变换的基,T为固定参数。
S5、对所述问题文本进行向量化处理,得到隐藏问题向量,将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值,将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值。
本申请实施例中,对所述问题文本进行向量化处理,转换生成隐藏问题向量,便于后续计算,将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式和预设的第二注意力权值公式中,根据公式计算出对应的注意力权值,作为后续计算语义向量的权重标准。
具体地,利用Transfomer模型对所述问题文本进行向量化处理,得到隐藏问题向量。
进一步地,所述将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值,将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值,包括:
将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值:
其中,α
i为所述第一注意力权值,exp为指数函数,q为所述问题隐藏向量,g
i为所述顶点权重向量。
将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值:
t
i=RNN(t
i-1,c
i-1)
其中,β
i为所述第二注意力权值,t
i为所述顶点的隐藏状态表示。
S6、根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量。
本申请实施例中,根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量,所述语义向量融合了所述第一注意力权值和所述第二注意力权值,表达出的语义信息更加丰富和立体。
具体地,所述根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量,包括
利用如下公式计算得到语义向量:
c
i=ΣΨ
iv
i
Ψ
i=softmax(γα
i+(1-γ)β
i)
其中,c
i为语义向量,Ψ
i为最终注意力权值,v
i为所述初始概念图中的顶点。
S7、根据所述语义向量得到对应的语义文本,并将所述语义文本作为关键信息标注在所述答案文本中。
本申请实施例中,将所述语义向量映射至预设的空间中得到所述语义向量对应的语义文本,并将所述语义文本作为关键信息提取输出。所述预设的标注方式可以是将所述答案 文本中的关键信息所在的区域进行框选标注,利用预设的标注方式将所述关键信息在所述答案文本中标注出来便于直观了解总结后的答案。
本申请通过根据概念实体集合和答案文本构建得到初始概念图,利用所述初始概念图清楚且直观的表示出实体之间的关系以及实体与答案文本之间的关系,明确地将文本组织成图形结构可以更好地进行对答案文本的分析,对问题文本进行向量化并根据预设的第一注意力权值公式和第二注意力权值公式计算得到第一注意力权值和第二注意力权值,根据所述第一注意力权值、所述第二注意力权值和所述顶点计算得到语义向量,计算得到的语义向量参考了与问题文本相关的两个注意力权值,增强了与问题文本的相关性,提高了语义文本的可信度。因此本申请提出的关键信息提取方法可以解决关键信息提取准确性较低的问题。
如图3所示,是本申请一实施例提供的关键信息提取装置的功能模块图。
本申请所述关键信息提取装置100可以安装于电子设备中。根据实现的功能,所述关键信息提取装置100可以包括实体识别模块101、初始概念图构建模块102、初始化模块103、图像卷积模块104、注意力权值计算模块105及语义向量计算模块106。本申请所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。
在本实施例中,关于各模块/单元的功能如下:
所述实体识别模块101,用于获取问题文本及根据所述问题文本检索得到的答案文本,对所述答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合;
所述初始概念图构建模块102,用于基于图排序算法从所述实体集合中筛选出多个关键概念实体,得到概念实体集合,并根据所述概念实体集合和所述答案文本构建得到初始概念图;
所述初始化模块103,用于对所述初始概念图中的顶点进行初始化处理,得到标准概念图;
所述图像卷积模块104,用于将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量;
所述注意力权值计算模块105,用于对所述问题文本进行向量化处理,得到隐藏问题向量,将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值,将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值;
所述语义向量计算模块106,用于根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量,根据所述语义向量得到对应的语义文本,并将所述语义文本作为关键信息标注在所述答案文本中。
详细地,所述关键信息提取装置100各模块的具体实施方式如下:
步骤一、所述实体识别模块101获取问题文本及根据所述问题文本检索得到的答案文本,对所述答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合。
本申请实施例中,所述问题文本是指用户在搜索引擎中输入的不同领域的问题,所述答案文本是指搜索引擎中检索出来的所述问题文本对应的答案,例如,本申请实施例中,所述问题文本可以为医学领域的相关问题。
在本申请一个应用场景中,所述问题文本为“治疗心脏早搏有什么办法?”所述答案文本为:“心脏是人体上中枢环节,也是至关重要的几个部位之一,如果心脏异常跳动出现问题是很危险的,一般来说轻微患者是不需要治疗的,也可以使用安慰剂,严重患者可通过药物或射频消融缓解症状,下面我们来具体说一下治疗心脏早搏有什么方法,第一:…………。”
本申请实施例对所述答案文本进行分词及实体识别处理,以识别出所述答案文本中具 有特定意义的实体,包括人名、地名、机构名及专有名词等。例如,本申请实施例中,可以识别出所述答案文本中的医学实体。
具体地,所述实体识别模块101对所述答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合,包括:
对所述答案文本进行去符号及分词处理,得到分词集;
提取所述分词集中的多个实体,得到实体集合。
详细地,所述去符号是将所述答案文本中的非文字部分进行去除,利用所述搜索引擎检索出所述答案文本对应的答案不一定是规范的纯文本,可能含有部分数字符号或者特殊符号,进行去符号处理可以保留所述答案文本中的文字部分,便于后续进行实体识别。
进一步地,本申请实施例可以利用Jieba分词器对所述答案文本进行分词处理,得到分词集,并采用基于神经网络的实体识别模型从所述分词集中筛选出实体集合。
步骤二、所述初始概念图构建模块102基于图排序算法从所述实体集合中筛选出多个关键概念实体,得到概念实体集合,并根据所述概念实体集合和所述答案文本构建得到初始概念图。
所述图排序算法是TextRank算法。本申请实施例利用所述图排序算法从所述实体集合中筛选关键概念实体,以所述关键概念实体组成的概念实体集合和所述答案文本构建得到初始概念图。
本申请实施例中,所述初始概念图构建模块102基于图排序算法从所述实体集合中筛选出多个关键概念实体,得到概念实体集合,包括:
根据所述实体集合构建有向有权图;
计算所述有向有权图中多个节点的权重;
将所述有向有权图中权重超过预设阈值的节点作为所述关键概念实体并进行汇总,得到概念实体集合。
其中,所述有向有权图中的一个节点表示所述实体集合中的一个实体。
详细地,本申请实施例可以利用下述权重计算公式计算所述多个节点的权重:
其中,WS(V
i)表示节点V
i的权重,d为阻尼系数,In(V
i)为指向节点V
i的节点集合,Out(V
j)为节点V
i所指向的节点集合,W
ji为节点V
i和V
j之间的连接权重,W
jk为节点V
k和V
j之间的连接权重。
详细地,阻尼系数d代表从所述有向有权图中某一特定点指向其他任意点的概率,优选地,所述阻尼系数的取值为0.85。
进一步地,本申请实施例根据所述概念实体集合和所述答案文本构建得到初始概念图,将所述关键概念实体和对应的答案文本以概念图的形式直观的表现出来,更好的展示出关键概念实体之间的关系。
本申请其中一个实施例中,所述根据所述概念实体集合和所述答案文本构建得到初始概念图,包括:
在所述答案文本中搜索所述概念实体集合中关键概念实体对应的句子;
将所述关键概念实体和所述关键概念实体对应的句子作为所述初始概念图的顶点;
若两个所述顶点对应相同的句子,则在两个顶点之间添加一条边,得到初始概念图。
详细地,在所述答案文本中搜索出关键概念实体对应的句子,可能只有一个对应的句子,也可能存在多个对应的句子,将所述关键概念实体和其对应的句子作为顶点,若两个顶点中含有相同的句子,即两个顶点共享一个句子,则在两个顶点之间添加一条边,若两个顶点之间没有共享的句子,故无需添加边,最后得到初始概念图。
步骤三、所述初始化模块103对所述初始概念图中的顶点进行初始化处理,得到标准概念图。
本申请实施例中,对所述初始概念图中的顶点进行初始化处理可以将捕捉到顶点上下文的信息和其它位置信息,使得顶点的信息更加丰富。
本申请其中一个实施例中,所述初始化模块103对所述初始概念图中的顶点进行初始化处理,得到标准概念图,包括:
对所述初始概念图中的每个顶点进行信息求和处理,得到每个顶点对应的求和向量;
将所述每个顶点对应的求和向量输入至预设的自注意力机制模块中进行关系捕捉处理,得到隐藏表示向量;
根据所述隐藏表示向量构建得到标准概念图。
详细地,每个顶点在所述初始概念图中都有对应的信息,对所述初始概念图中的每个顶点都进行信息求和处理,得到每个顶点对应的求和向量,所述自注意力机制模块用于捕捉上下文的关系信息,将所述每个顶点对应的求和向量输入至预设的自注意力机制模块中进行关系捕捉处理,得到隐藏表示向量,所述隐藏表示向量即为经过初始化处理后的每个顶点,根据所述隐藏表示向量可以构建得到标准概念图。
具体地,所述对所述初始概念图中的每个顶点进行信息求和处理,得到每个顶点对应的求和向量,包括:
获取所述每个顶点在所述初始概念图中的词信息、绝对位置信息和相对位置信息;
将所述词信息、所述绝对位置信息和所述相对位置信息进行求和处理,得到每个顶点对应的求和向量。
进一步地,本申请实施例将所述求和向量输入至所述自注意力机制模块中,可以得到隐藏表示向量,其中,所述自注意力机制模块可以显式地建模出单词之间的相互关系,以捕获顶点的上下文。
步骤四、所述图像卷积模块104将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量。
本申请实施例中,所述预设的图卷积网络是针对图像的卷积神经网络,利用所述图卷积神经网络对所述标准概念图进行图像卷积处理,可以输出卷积网络进行聚合期间的重要权重向量。
具体地,所述图像卷积模块104将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量,包括:
获取预设的卷积核,对所述标准概念图与所述卷积核做傅里叶变换后相乘,得到特征矩阵;
对所述特征矩阵做傅里叶反变换处理,得到顶点权重向量。
详细地,所述卷积核即为filter函数。
具体地,所述对所述标准概念图与所述卷积核做傅里叶变换后相乘,得到特征矩阵,包括:
利用如下公式对所述标准概念图与所述卷积核做傅里叶变换后相乘,得到特征矩阵:
g*x=U(U
Tg·U
Tx)
其中,g为所述卷积核,x为所述标准概念图,U为傅里叶变换的基,T为固定参数。
步骤五、所述注意力权值计算模块105对所述问题文本进行向量化处理,得到隐藏问题向量,将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值,将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值。
本申请实施例中,对所述问题文本进行向量化处理,转换生成隐藏问题向量,便于后续计算,将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式和预 设的第二注意力权值公式中,根据公式计算出对应的注意力权值,作为后续计算语义向量的权重标准。
具体地,利用Transfomer模型对所述问题文本进行向量化处理,得到隐藏问题向量。
进一步地,所述将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值,将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值,包括:
将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值:
其中,α
i为所述第一注意力权值,exp为指数函数,q为所述问题隐藏向量,g
i为所述顶点权重向量。
将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值:
t
i=RNN(t
i-1,c
i-1)
其中,β
i为所述第二注意力权值,t
i为所述顶点的隐藏状态表示。
步骤六、所述语义向量计算模块106根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量。
本申请实施例中,根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量,所述语义向量融合了所述第一注意力权值和所述第二注意力权值,表达出的语义信息更加丰富和立体。
具体地,所述语义向量计算模块106根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量,包括
利用如下公式计算得到语义向量:
c
i=ΣΨ
iv
i
Ψ
i=softmax(γα
i+(1-γ)β
i)
其中,c
i为语义向量,Ψ
i为最终注意力权值,v
i为所述初始概念图中的顶点,
步骤七、所述语义向量计算模块106根据所述语义向量得到对应的语义文本,并将所述语义文本作为关键信息标注在所述答案文本中。
本申请实施例中,将所述语义向量映射至预设的空间中得到所述语义向量对应的语义文本,并将所述语义文本作为关键信息提取输出。所述预设的标注方式可以是将所述答案文本中的关键信息所在的区域进行框选标注,利用预设的标注方式将所述关键信息在所述答案文本中标注出来便于直观了解总结后的答案。
如图4所示,是本申请一实施例提供的实现关键信息提取方法的电子设备的结构示意图。
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如关键信息提取程序12。
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子 设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如关键信息提取程序12的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如关键信息提取程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。
图4仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图4示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。
所述电子设备1中的所述存储器11存储的关键信息提取程序12是多个指令的组合,在所述处理器10中运行时,可以实现:
获取问题文本及根据所述问题文本检索得到的答案文本,对所述答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合;
基于图排序算法从所述实体集合中筛选出多个关键概念实体,得到概念实体集合,并根据所述概念实体集合和所述答案文本构建得到初始概念图;
对所述初始概念图中的顶点进行初始化处理,得到标准概念图;
将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量;
对所述问题文本进行向量化处理,得到隐藏问题向量,将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值,将所述隐藏问题 向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值;
根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量,根据所述语义向量得到对应的语义文本,并将所述语义文本作为关键信息标注在所述答案文本中。
具体地,所述处理器10对上述指令的具体实现方法可参考图1至图4对应实施例中相关步骤的描述,在此不赘述。
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。所述计算机可读存储介质可以是易失性的,也可以是非易失性的。例如,所述计算机可读存储介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序在被电子设备的处理器所执行时,可以实现:
获取问题文本及根据所述问题文本检索得到的答案文本,对所述答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合;
基于图排序算法从所述实体集合中筛选出多个关键概念实体,得到概念实体集合,并根据所述概念实体集合和所述答案文本构建得到初始概念图;
对所述初始概念图中的顶点进行初始化处理,得到标准概念图;
将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量;
对所述问题文本进行向量化处理,得到隐藏问题向量,将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值,将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值;
根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量,根据所述语义向量得到对应的语义文本,并将所述语义文本作为关键信息标注在所述答案文本中。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。
Claims (20)
- 一种关键信息提取方法,其中,所述方法包括:获取问题文本及根据所述问题文本检索得到的答案文本,对所述答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合;基于图排序算法从所述实体集合中筛选出多个关键概念实体,得到概念实体集合,并根据所述概念实体集合和所述答案文本构建得到初始概念图;对所述初始概念图中的顶点进行初始化处理,得到标准概念图;将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量;对所述问题文本进行向量化处理,得到隐藏问题向量,将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值,将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值;根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量;根据所述语义向量得到对应的语义文本,并将所述语义文本作为关键信息标注在所述答案文本中。
- 如权利要求1所述的关键信息提取方法,其中,所述根据所述概念实体集合和所述答案文本构建得到初始概念图,包括:在所述答案文本中搜索所述概念实体集合中关键概念实体对应的句子;将所述关键概念实体和所述关键概念实体对应的句子作为所述初始概念图的顶点;若两个所述顶点对应相同的句子,则在两个顶点之间添加一条边,得到初始概念图。
- 如权利要求1所述的关键信息提取方法,其中,所述对所述初始概念图中的顶点进行初始化处理,得到标准概念图,包括:对所述初始概念图中的每个顶点进行信息求和处理,得到每个顶点对应的求和向量;将所述每个顶点对应的求和向量输入至预设的自注意力机制模块中进行关系捕捉处理,得到隐藏表示向量;根据所述隐藏表示向量构建得到标准概念图。
- 如权利要求3所述的关键信息提取方法,其中,所述对所述初始概念图中的每个顶点进行信息求和处理,得到每个顶点对应的求和向量,包括:获取所述每个顶点在所述初始概念图中的词信息、绝对位置信息和相对位置信息;将所述词信息、所述绝对位置信息和所述相对位置信息进行求和处理,得到每个顶点对应的求和向量。
- 如权利要求1所述的关键信息提取方法,其中,所述基于图排序算法从所述实体集合中的筛选出多个关键概念实体,得到概念实体集合,包括:根据所述实体集合构建有向有权图;计算所述有向有权图中多个节点的权重;将所述有向有权图中权重超过预设阈值的节点作为所述关键概念实体并进行汇总,得到概念实体集合。
- 如权利要求1所述的关键信息提取方法,其中,所述将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量,包括:获取预设的卷积核,对所述标准概念图与所述卷积核做傅里叶变换后相乘,得到特征矩阵;对所述特征矩阵做傅里叶反变换处理,得到顶点权重向量。
- 一种关键信息提取装置,其中,所述装置包括:实体识别模块,用于获取问题文本及根据所述问题文本检索得到的答案文本,对所述答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合;初始概念图构建模块,用于基于图排序算法从所述实体集合中筛选出多个关键概念实体,得到概念实体集合,并根据所述概念实体集合和所述答案文本构建得到初始概念图;初始化模块,用于对所述初始概念图中的顶点进行初始化处理,得到标准概念图;图像卷积模块,用于将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量;注意力权值计算模块,用于对所述问题文本进行向量化处理,得到隐藏问题向量,将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值,将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值;语义向量计算模块,用于根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量,根据所述语义向量得到对应的语义文本,并将所述语义文本作为关键信息标注在所述答案文本中。
- 一种电子设备,其中,所述电子设备包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下步骤:获取问题文本及根据所述问题文本检索得到的答案文本,对所述答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合;基于图排序算法从所述实体集合中筛选出多个关键概念实体,得到概念实体集合,并根据所述概念实体集合和所述答案文本构建得到初始概念图;对所述初始概念图中的顶点进行初始化处理,得到标准概念图;将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量;对所述问题文本进行向量化处理,得到隐藏问题向量,将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值,将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值;根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量;根据所述语义向量得到对应的语义文本,并将所述语义文本作为关键信息标注在所述答案文本中。
- 如权利要求9所述的电子设备,其中,所述根据所述概念实体集合和所述答案文本构建得到初始概念图,包括:在所述答案文本中搜索所述概念实体集合中关键概念实体对应的句子;将所述关键概念实体和所述关键概念实体对应的句子作为所述初始概念图的顶点;若两个所述顶点对应相同的句子,则在两个顶点之间添加一条边,得到初始概念图。
- 如权利要求9所述的电子设备,其中,所述对所述初始概念图中的顶点进行初始化处理,得到标准概念图,包括:对所述初始概念图中的每个顶点进行信息求和处理,得到每个顶点对应的求和向量;将所述每个顶点对应的求和向量输入至预设的自注意力机制模块中进行关系捕捉处理,得到隐藏表示向量;根据所述隐藏表示向量构建得到标准概念图。
- 如权利要求11所述的电子设备,其中,所述对所述初始概念图中的每个顶点进行信息求和处理,得到每个顶点对应的求和向量,包括:获取所述每个顶点在所述初始概念图中的词信息、绝对位置信息和相对位置信息;将所述词信息、所述绝对位置信息和所述相对位置信息进行求和处理,得到每个顶点对应的求和向量。
- 如权利要求9所述的电子设备,其中,所述基于图排序算法从所述实体集合中的筛选出多个关键概念实体,得到概念实体集合,包括:根据所述实体集合构建有向有权图;计算所述有向有权图中多个节点的权重;将所述有向有权图中权重超过预设阈值的节点作为所述关键概念实体并进行汇总,得到概念实体集合。
- 如权利要求9所述的电子设备,其中,所述将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量,包括:获取预设的卷积核,对所述标准概念图与所述卷积核做傅里叶变换后相乘,得到特征矩阵;对所述特征矩阵做傅里叶反变换处理,得到顶点权重向量。
- 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:获取问题文本及根据所述问题文本检索得到的答案文本,对所述答案文本进行分词,并对分词后的答案文本进行实体识别处理,得到实体集合;基于图排序算法从所述实体集合中筛选出多个关键概念实体,得到概念实体集合,并根据所述概念实体集合和所述答案文本构建得到初始概念图;对所述初始概念图中的顶点进行初始化处理,得到标准概念图;将所述标准概念图输入至预设的图卷积网络中进行图像卷积处理,得到顶点权重向量;对所述问题文本进行向量化处理,得到隐藏问题向量,将所述隐藏问题向量和所述顶点权重向量输入至预设的第一注意力权值公式中,得到第一注意力权值,将所述隐藏问题向量和所述顶点权重向量输入至预设的第二注意力权值公式中,得到第二注意力权值;根据所述第一注意力权值、所述第二注意力权值和所述初始概念图中的顶点计算得到语义向量;根据所述语义向量得到对应的语义文本,并将所述语义文本作为关键信息标注在所述 答案文本中。
- 如权利要求16所述的计算机可读存储介质,其中,所述根据所述概念实体集合和所述答案文本构建得到初始概念图,包括:在所述答案文本中搜索所述概念实体集合中关键概念实体对应的句子;将所述关键概念实体和所述关键概念实体对应的句子作为所述初始概念图的顶点;若两个所述顶点对应相同的句子,则在两个顶点之间添加一条边,得到初始概念图。
- 如权利要求16所述的计算机可读存储介质,其中,所述对所述初始概念图中的顶点进行初始化处理,得到标准概念图,包括:对所述初始概念图中的每个顶点进行信息求和处理,得到每个顶点对应的求和向量;将所述每个顶点对应的求和向量输入至预设的自注意力机制模块中进行关系捕捉处理,得到隐藏表示向量;根据所述隐藏表示向量构建得到标准概念图。
- 如权利要求18所述的计算机可读存储介质,其中,所述对所述初始概念图中的每个顶点进行信息求和处理,得到每个顶点对应的求和向量,包括:获取所述每个顶点在所述初始概念图中的词信息、绝对位置信息和相对位置信息;将所述词信息、所述绝对位置信息和所述相对位置信息进行求和处理,得到每个顶点对应的求和向量。
- 如权利要求16所述的计算机可读存储介质,其中,所述基于图排序算法从所述实体集合中的筛选出多个关键概念实体,得到概念实体集合,包括:根据所述实体集合构建有向有权图;计算所述有向有权图中多个节点的权重;将所述有向有权图中权重超过预设阈值的节点作为所述关键概念实体并进行汇总,得到概念实体集合。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110450577.2 | 2021-04-25 | ||
CN202110450577.2A CN113157864A (zh) | 2021-04-25 | 2021-04-25 | 关键信息提取方法、装置、电子设备及介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022227171A1 true WO2022227171A1 (zh) | 2022-11-03 |
Family
ID=76870605
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/096521 WO2022227171A1 (zh) | 2021-04-25 | 2021-05-27 | 关键信息提取方法、装置、电子设备及介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113157864A (zh) |
WO (1) | WO2022227171A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117033664A (zh) * | 2023-09-28 | 2023-11-10 | 腾讯科技(深圳)有限公司 | 业务的序列图生成方法、装置、计算机设备和存储介质 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117034954B (zh) * | 2023-10-09 | 2024-02-06 | 华南师范大学 | 文本评分方法、装置、设备以及存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104239513A (zh) * | 2014-09-16 | 2014-12-24 | 西安电子科技大学 | 一种面向领域数据的语义检索方法 |
CN104572651A (zh) * | 2013-10-11 | 2015-04-29 | 华为技术有限公司 | 图片排序方法及装置 |
WO2018147543A1 (ko) * | 2017-02-08 | 2018-08-16 | 한국과학기술원 | 개념 그래프 기반 질의응답 시스템 및 이를 이용한 문맥 검색 방법 |
CN110532328A (zh) * | 2019-08-26 | 2019-12-03 | 哈尔滨工程大学 | 一种文本概念图构造方法 |
CN112395391A (zh) * | 2020-11-17 | 2021-02-23 | 中国平安人寿保险股份有限公司 | 概念图谱构建方法、装置、计算机设备及存储介质 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110032632A (zh) * | 2019-04-04 | 2019-07-19 | 平安科技(深圳)有限公司 | 基于文本相似度的智能客服问答方法、装置及存储介质 |
CN111657935B (zh) * | 2020-05-11 | 2021-10-01 | 浙江大学 | 一种基于层次图卷积神经网络的癫痫脑电识别系统、终端及存储介质 |
CN111753088A (zh) * | 2020-06-28 | 2020-10-09 | 汪秀英 | 一种自然语言信息的处理方法 |
CN111738425B (zh) * | 2020-08-07 | 2021-01-15 | 北京航空航天大学 | 一种基于图挖掘的机场延误原因分析方法 |
CN112149725B (zh) * | 2020-09-18 | 2023-08-22 | 南京信息工程大学 | 基于傅立叶变换的谱域图卷积3d点云分类方法 |
-
2021
- 2021-04-25 CN CN202110450577.2A patent/CN113157864A/zh active Pending
- 2021-05-27 WO PCT/CN2021/096521 patent/WO2022227171A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104572651A (zh) * | 2013-10-11 | 2015-04-29 | 华为技术有限公司 | 图片排序方法及装置 |
CN104239513A (zh) * | 2014-09-16 | 2014-12-24 | 西安电子科技大学 | 一种面向领域数据的语义检索方法 |
WO2018147543A1 (ko) * | 2017-02-08 | 2018-08-16 | 한국과학기술원 | 개념 그래프 기반 질의응답 시스템 및 이를 이용한 문맥 검색 방법 |
CN110532328A (zh) * | 2019-08-26 | 2019-12-03 | 哈尔滨工程大学 | 一种文本概念图构造方法 |
CN112395391A (zh) * | 2020-11-17 | 2021-02-23 | 中国平安人寿保险股份有限公司 | 概念图谱构建方法、装置、计算机设备及存储介质 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117033664A (zh) * | 2023-09-28 | 2023-11-10 | 腾讯科技(深圳)有限公司 | 业务的序列图生成方法、装置、计算机设备和存储介质 |
CN117033664B (zh) * | 2023-09-28 | 2024-01-09 | 腾讯科技(深圳)有限公司 | 业务的序列图生成方法、装置、计算机设备和存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN113157864A (zh) | 2021-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11232365B2 (en) | Digital assistant platform | |
CN113707297B (zh) | 医疗数据的处理方法、装置、设备及存储介质 | |
WO2022222943A1 (zh) | 科室推荐方法、装置、电子设备及存储介质 | |
WO2022160454A1 (zh) | 医疗文献的检索方法、装置、电子设备及存储介质 | |
US10936962B1 (en) | Methods and systems for confirming an advisory interaction with an artificial intelligence platform | |
WO2022227171A1 (zh) | 关键信息提取方法、装置、电子设备及介质 | |
CN113449187A (zh) | 基于双画像的产品推荐方法、装置、设备及存储介质 | |
WO2022222942A1 (zh) | 问答记录生成方法、装置、电子设备及存储介质 | |
CN112507230B (zh) | 基于浏览器的网页推荐方法、装置、电子设备及存储介质 | |
WO2023178978A1 (zh) | 基于人工智能的处方审核方法、装置、设备及介质 | |
CN111403011B (zh) | 挂号科室推送方法、装置、系统、电子设备及存储介质 | |
CN108304381B (zh) | 基于人工智能的实体建边方法、装置、设备及存储介质 | |
CN116578704A (zh) | 文本情感分类方法、装置、设备及计算机可读介质 | |
CN116821373A (zh) | 基于图谱的prompt推荐方法、装置、设备及介质 | |
CN116483976A (zh) | 挂号科室推荐方法、装置、设备及存储介质 | |
CN113689924B (zh) | 相似病历检索方法、装置、电子设备及可读存储介质 | |
WO2018082921A1 (en) | Precision clinical decision support with data driven approach on multiple medical knowledge modules | |
US12087442B2 (en) | Methods and systems for confirming an advisory interaction with an artificial intelligence platform | |
US11823775B2 (en) | Hashing electronic records | |
US20150339602A1 (en) | System and method for modeling health care costs | |
US20230186212A1 (en) | System, method, electronic device, and storage medium for identifying risk event based on social information | |
CN116741358A (zh) | 问诊挂号推荐方法、装置、设备及存储介质 | |
CN116720525A (zh) | 基于问诊数据的疾病辅助分析方法、装置、设备及介质 | |
CN113590845B (zh) | 基于知识图谱的文献检索方法、装置、电子设备及介质 | |
CN113221578B (zh) | 疾病实体检索方法、装置、设备及介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21938641 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21938641 Country of ref document: EP Kind code of ref document: A1 |