WO2021213160A1 - 基于图神经网络的医疗查询方法、装置、计算机设备及存储介质 - Google Patents
基于图神经网络的医疗查询方法、装置、计算机设备及存储介质 Download PDFInfo
- Publication number
- WO2021213160A1 WO2021213160A1 PCT/CN2021/084265 CN2021084265W WO2021213160A1 WO 2021213160 A1 WO2021213160 A1 WO 2021213160A1 CN 2021084265 W CN2021084265 W CN 2021084265W WO 2021213160 A1 WO2021213160 A1 WO 2021213160A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- query
- nodes
- word
- network
- column
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 36
- 239000013598 vector Substances 0.000 claims abstract description 147
- 238000004590 computer program Methods 0.000 claims description 13
- 108091026890 Coding region Proteins 0.000 claims description 8
- 238000010276 construction Methods 0.000 claims description 5
- 238000012549 training Methods 0.000 abstract description 13
- 229940079593 drug Drugs 0.000 description 17
- 239000003814 drug Substances 0.000 description 17
- 238000012545 processing Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000003745 diagnosis Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000002372 labelling Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H50/00—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
- G16H50/70—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for mining of medical data, e.g. analysing previous cases of other patients
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- 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
-
- 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
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- This application relates to the field of artificial intelligence, and in particular to a medical query method, device, computer equipment and storage medium based on a graph neural network.
- the medical data of the existing medical industry (such as patient visit information, department personnel information, drug prescription history information, etc.) are usually stored in the database in the form of tables. Different data tables correspond to different information, and the tables depend on each other. For some relational connections, professionals need to use SQL statements to accurately integrate and query different tables to query data. The inventor realized that for those who lack the professional knowledge of sentences in this area, if they want to query the data in the database, they can only query the data by selecting the options set by the developer, but this query form limits the freedom of data query Sex, and cannot meet all the query needs of users.
- machine learning is mainly used to train query models by collecting a large number of SQL statements and the query result annotation information corresponding to these statements, and query the database through the trained query models, so as to meet the complex and changeable query needs of users.
- this method has the disadvantages of large labeling workload, long training time, and the difficulty of reusing the model trained under the original label for a brand-new database, leading to the need for retraining and time-consuming.
- the first aspect of the present application provides a medical query method based on graph neural network, including:
- Extract the table name and corresponding column name of each data table in the database use the table name as the table node and the column name as the column node, and connect the corresponding table node with the corresponding column node to connect different data tables
- Table nodes of different table names corresponding to the same column name are connected to form a relationship graph network, and the network nodes of the relationship graph network include table nodes and column nodes;
- the second aspect of the present application provides a medical query device based on graph neural network, including:
- the construction unit is used to extract the table name and corresponding column name of each data table in the database, use the table name as the table node and the column name as the column node, and connect the corresponding table node with the corresponding column node , Connecting table nodes with different table names corresponding to the same column name in different data tables to form a relationship graph network, and the network nodes of the relationship graph network include table nodes and column nodes;
- the recognition unit is configured to obtain a query request, and perform entity recognition on the query request to obtain a query word;
- a generating unit configured to calculate the word vector of the query word and the network node in the relationship graph network to generate a word vector sequence
- An encoding unit configured to use an encoder to encode the word vector sequence to obtain an encoding sequence
- a decoding unit configured to use a decoder to decode the coded sequence to obtain a query sentence
- the query unit is configured to query the database according to the query sentence to obtain query results.
- a third aspect of the present application provides a computer device, the computer device includes a memory, a processor, and a computer program stored in the memory and running on the processor.
- the processor executes the computer program, the following is achieved Medical query method based on graph neural network:
- Extract the table name and corresponding column name of each data table in the database use the table name as the table node and the column name as the column node, and connect the corresponding table node with the corresponding column node to connect different data tables
- Table nodes of different table names corresponding to the same column name are connected to form a relationship graph network, and the network nodes of the relationship graph network include table nodes and column nodes;
- a fourth aspect of the present application provides a computer-readable storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, the following medical query method based on graph neural network is implemented:
- the medical query method, device, computer equipment and storage medium based on the graph neural network provided in this application can construct a relationship graph network composed of table nodes and column nodes according to the table names and column names of the data tables in the database.
- the network represents the association relationship between tables in the database; it can perform entity recognition on the received query request to determine the query word, calculate the word vector of the query word and the network node in the relationship graph network to obtain the word vector sequence, and use the encoder to
- the word vector sequence is coded to obtain the coded sequence, and the coded sequence is decoded by the decoder to obtain the query sentence, thereby querying the database according to the query sentence to obtain the query result, thereby achieving the purpose of improving query efficiency and simplifying the user's query of multi-dimensional information Query steps and reduce the time cost of learning and training.
- FIG. 1 is a flowchart of an embodiment of the medical query method based on graph neural network described in this application;
- FIG. 2 is a flowchart of an embodiment of generating a word vector sequence in this application
- FIG. 3 is a block diagram of an embodiment of the medical query device based on graph neural network according to this application;
- FIG. 4 is a hardware architecture diagram of an embodiment of the computer device of this application.
- the medical query method, device, computer equipment, and storage medium based on graph neural network are suitable for the field of smart medical care.
- This application can construct a relationship graph network composed of table nodes and column nodes according to the table names and column names of the data tables in the database, and the relationship between the tables in the database can be expressed through the relationship graph network;
- the received query can be performed Request entity recognition to determine the query word, calculate the word vector of the query word and the network node in the relationship graph network to obtain the word vector sequence, encode the word vector sequence by the encoder to obtain the code sequence, and decode the code sequence by the decoder to obtain the query Statements, thereby querying the database according to the query statements to obtain query results, thereby achieving the purpose of improving query efficiency, simplifying the query steps when users query multi-dimensional information, and reducing the time cost of learning and training.
- a medical query method based on a graph neural network in an embodiment of the present application includes the following steps:
- the network nodes of the relationship graph network include table nodes and column nodes.
- the database is a medical database
- the data table may include a patient information table (column names may include: patient name, gender, patient id, etc.), time information table (column names may include: time period id, patient name, etc.) ), medical information table (column names can include: medical id, condition description, prescription of medicines, etc.) and other information tables.
- the relationship graph network is constructed by extracting the table name of each information table and the corresponding column name in the table, where the table name corresponds to the table node in the relationship graph network, and the column name corresponds to the column node in the relationship graph network. In the relationship graph network, table nodes and table nodes use the same column nodes to build an association relationship.
- the column name of the patient id in the patient information table is the same as the patient id column name in the medical information table, because the two tables
- the column names correspond to the same column nodes, so there is an association relationship between the table nodes corresponding to the patient information table and the table nodes of the medical information table.
- the above-mentioned data table may also be stored in a node of a blockchain.
- step S2 may include: obtaining the query request, and using a BERT tokenizer to perform entity recognition on the query request to obtain the query word.
- a natural language query request input by the user is received, such as "Query the name of the drug that the doctor prescribed the most for patient X in February", and use the BERT tokenizer to perform entity recognition on the query request to obtain the query Words: February, patient X, the name of the drug with the most.
- the BERT tokenizer is a tokenizer obtained after training the BERT Chinese pre-training model using the NER (Named Entity Recognition) data set.
- the BERT tokenizer is used to extract nouns, negative words and other adjectives such as "most" in the query request.
- step S3 shown in FIG. 2 may include the following steps:
- each query word can be matched with all the table nodes in the relationship graph network one by one to obtain the matched table nodes and the number of table nodes.
- the query module includes a single-table query mode and a multi-table query module.
- step S32 may include: when the number of table nodes is one, selecting the single-table query mode; when the number of table nodes is greater than one, selecting the multi-table query mode ; When the number of table nodes is less than one, a message that cannot be queried is generated and output to feedback the user.
- step S33 may include: when the query mode is a single-table query mode, obtaining the table nodes matching all the query terms and the column nodes associated with the table nodes, and calculating the query respectively Words and word vectors of table nodes and column nodes to generate the word vector sequence.
- the single-table query mode can be used to query to obtain the column associated with the table node of the table. Node, calculate the correlation degree between each network node (table node and column node) and the query term by formula (1), that is, the correlation degree between the network node in the relationship graph network constructed in step S1 and each word xi in the query term slink, and normalize by softmax to obtain a probability distribution (the function is to unify the probability range from 0 to 1 for easy calculation), and take the largest probability as the relevance to the query:
- v is the mode that needs to be learned, which refers to the corresponding column names in the database table that can correspond to the numbers of different vocabularies, drug names, etc., for example, the column names in February: time, Zhang Sanke corresponds to the user information table Column name: name, etc.
- GNN obtains the final word vector of each network node based on the query word relevance, and after processing by the GNN module, each network node can make changes to the user’s problem Good alignment for subsequent coding.
- step S33 may include: when the query mode is a multi-table query mode, obtaining the table nodes that match all the query terms, as well as the column nodes and other table nodes associated with each of the table nodes Calculate the word vectors of the query word, the table node and the corresponding column node respectively to generate the word vector sequence.
- the multi-table query mode can be used to query to obtain the table node association with the table.
- Select the table nodes and column nodes associated with the query term from the network in step S1 for example, the column nodes associated with the table nodes corresponding to the patient information table may include: patient id, patient name, etc.
- the column nodes associated with the table node corresponding to the table may include: patient id, drug name, time and other column nodes; the column node associated with the table node corresponding to the drug information table may include: drug id), and each is calculated by formula (1)
- the correlation degree between each network node (table node and column node) and the query word that is, the correlation degree slink between the network node in the relationship graph network constructed in step S1 and each word xi in the query word, and normalized by softmax
- a probability distribution (the function is to unify the probability range from 0 to 1 for easy calculation), take the largest probability as the relevance to the query word, use this relevance and the initial vector (that is, the number of each query word xi in the query request) Vector representation) to obtain a vector based on the query word, after the L layer (the number of L is defined based on the number of different input words, until the final word vector conversion of all nodes is completed)
- GNN obtains the final word vector of each network no
- step S4 may include: inputting the word vector sequence into the encoder for encoding to obtain an initial coding sequence, using an attention model to calculate the weight value of each word vector, and comparing the weight value of each word vector with The corresponding coding initial vector in the coding initial sequence is calculated to obtain the coding vector, and the coding sequence is generated according to the coding vector.
- the preliminary encoding of the word is completed through step S3, that is, the correlation between the network node and the query word is completed based on the relationship between the network nodes.
- the final word vector of each node calculated in step S3 is encoded based on the two-way LSTM network.
- the working principle can be understood as that each node word vector is used as an independent input and input to the two-way LSTM encoding
- the past and future characteristics of the current time t are captured in the encoder, that is, each input will refer to the content of the input before and after, so as to ensure that the most timing information is retained during encoding.
- the Attention model the attention model, is added in the encoding process.
- This model When this model generates output, it will also generate an "attention range" indicating which parts of the input sequence should be focused on when outputting next, and then The next output is generated based on the area of interest.
- This attention model calculates a weight value for the word vector of each node based on the original problem, and gives each word vector that is encoded a different attention proportion. The above coding steps can ensure that more reasonable output judgments can be made according to the context, the content of focus, etc. during output.
- step S5 may include: inputting the encoding sequence into the decoder for decoding to obtain a candidate vocabulary sequence, where the candidate vocabulary is the table name of the table node or the column name of the column node; according to each of the The coding vector corresponding to the candidate vocabulary is calculated, the score of each candidate vocabulary is calculated, the candidate vocabulary with the highest score is used as the target vocabulary, the target vocabulary is matched with the sentence in the preset sentence library, and the The query sentence matched by the target vocabulary.
- the query statement in this embodiment adopts a SQL statement.
- a sequence containing the corresponding relationship between each node word vector pair and the query word and the vector containing the context of each word vector can be obtained, and the sequence can be input to the decoder for decoding.
- the decoder in this embodiment uses the LSTM network, based on the network when decoding, each step will selectively select a subset from the vector sequence based on the weight value for further processing, so that when each output is generated , Can make full use of the information carried by the input sequence, including context and attention information.
- the output is an operation vocabulary (such as "at most")
- the SQL word corresponding to the operation at most is completed and the position order of the operation output.
- the output is a word such as table name (Header)/column name (Table) (such as drugs, patients, etc.)
- a score calculates the query SQL output using the vector decoding
- the score refers to the degree of association between the SQL word and each Header/Table in the table. Further obtain the degree of connection between the SQL word and each in the table during decoding, and select the highest score as the final output, and perform the output matching of the SQL statement, and complete the final output of the complete SQL query statement.
- the query result is output to the user. If the query result meets the actual query requirements of the user, the correlation between the nodes in the query is confirmed and the query is updated. Link to the original graph network. If the query cannot be completed based on the decoded output SQL statement (such as the query table cannot be found, or the output result does not meet the query requirements, the name of the drug needs to be output but the quantity is output, etc.), the query results that are not queried will be fed back to the user for convenience The user enters the query request again according to the query result to query.
- the decoded output SQL statement such as the query table cannot be found, or the output result does not meet the query requirements, the name of the drug needs to be output but the quantity is output, etc.
- the medical query method based on the graph neural network can construct a relationship graph network composed of table nodes and column nodes according to the table names and column names of the data tables in the database, and the tables and tables in the database can be represented by the relationship graph network
- the association relationship between the received query request can be identified by entity recognition to determine the query word, the query word and the word vector of the network node in the relationship graph network are calculated to obtain the word vector sequence, and the word vector sequence is encoded by the encoder to obtain the coding sequence , Through the decoder to decode the encoding sequence to obtain the query statement, thereby query the database according to the query statement to obtain the query result, thereby achieving the purpose of improving query efficiency, while simplifying the query steps for users to query multi-dimensional information, and reducing learning The time cost of training.
- the existing methods of querying the database often ignore the structure of the database schema, such as when a table with two columns, where each column is a foreign key of the other two tables, use this table to describe the other two tables
- the existing methods are difficult to accurately express the many-to-many relationship between.
- the medical query method based on the graph neural network of this embodiment uses the semantic analysis database query implemented by the graph neural network (GNN), and can effectively calculate the implicit correlation between each table mentioned in the text information in the query through GNN. Complete the extraction and expression of the constraints implied by the table on the SQL output, so as to achieve the effect of further improving the accuracy.
- GNN graph neural network
- This embodiment combined with natural language processing technology, can provide strong support for the existing smart medical system, simplify the query steps of medical personnel for multi-dimensional information, reduce learning costs, improve work efficiency, and reduce data labeling and model training. The labor and time cost required for the above.
- a medical query device 1 based on a graph neural network in this embodiment includes: a construction unit 11, a recognition unit 12, a generation unit 13, an encoding unit 14, a decoding unit 15 and a query unit 16.
- the construction unit 11 is used to extract the table name and corresponding column name of each data table in the database, use the table name as the table node and the column name as the column node, and perform the corresponding table node with the corresponding column node Connecting: connecting table nodes with different table names corresponding to the same column name in different data tables to form a relationship graph network.
- the network nodes of the relationship graph network include table nodes and column nodes.
- the network nodes of the relationship graph network include table nodes and column nodes.
- the database is a medical database
- the data table may include a patient information table (column names may include: patient name, gender, patient id, etc.), time information table (column names may include: time period id, patient name, etc.) ), medical information table (column names can include: medical id, condition description, prescription of medicines, etc.) and other information tables.
- the relationship graph network is constructed by extracting the table name of each information table and the corresponding column name in the table, where the table name corresponds to the table node in the relationship graph network, and the column name corresponds to the column node in the relationship graph network. In the relationship graph network, table nodes and table nodes use the same column nodes to build an association relationship.
- the column name of the patient id in the patient information table is the same as the patient id column name in the medical information table, because the two tables
- the column names correspond to the same column nodes, so there is an association relationship between the table nodes corresponding to the patient information table and the table nodes of the medical information table.
- the above-mentioned data table may also be stored in a node of a blockchain.
- the identification unit 12 is configured to obtain a query request, and perform entity recognition on the query request to obtain a query word.
- the recognition unit 12 may obtain the query request, and use a BERT tokenizer to perform entity recognition on the query request to obtain the query term.
- a natural language query request input by the user is received, such as "Query the name of the drug that the doctor prescribed the most for patient X in February", and use the BERT tokenizer to perform entity recognition on the query request to obtain the query Words: February, patient X, the name of the drug with the most.
- the BERT tokenizer is a tokenizer obtained after training the BERT Chinese pre-training model using the NER data set.
- the BERT tokenizer is used to extract nouns, negative words and other adjectives such as "most" in the query request.
- the generating unit 13 is configured to calculate the word vector of the query word and the network node in the relationship graph network to generate a word vector sequence.
- the generating unit 13 is configured to match the query words with the table nodes in the relationship graph network one by one to obtain the table nodes that match all the query words; according to the number of the table nodes Query mode is selected by number; according to the selected query mode, the word vectors of the table nodes matching all the query words and the network nodes associated with the table nodes are calculated to generate a word vector sequence.
- the query module includes a single-table query mode and a multi-table query module.
- each query word can be matched with all the table nodes in the relationship graph network one by one to obtain the matched table nodes and the number of table nodes.
- the single-table query mode is selected; when the number of table nodes is greater than one, the multi-table query mode is selected; when the number of table nodes When the number is less than 1, a message that cannot be queried is generated and output to feedback the user.
- the query mode is a single-table query mode
- the single-table query mode can be used to query to obtain the column associated with the table node of the table. Node, calculate the correlation degree of each network node (table node and column node) with the query term by formula (1).
- the query mode is a multi-table query mode
- the multi-table query mode can be used to query to obtain the table node association with the table.
- the column nodes associated with the table node corresponding to the patient information table can include: patient id, patient name, etc.); the corresponding to the diagnosis information table
- the column nodes associated with the table node can include: patient id, drug name, time and other column nodes; the column node associated with the table node corresponding to the drug information table can include: drug id), calculate each network node by formula (1)
- the degree of relevance between (table node and column node) and the query word that is, the correlation degree slink between the network node in the relationship graph network constructed in step S1 and each word xi in the query word, and a probability distribution is normalized by softmax (The role is to unify the probability range from 0 to 1 for easy calculation), take the largest probability as the relevance to the query word, use this relevance and the initial vector (that is, the vector of each query word xi in the query request) Get the vector based on the query word, go through the L
- the encoding unit 14 is configured to use an encoder to encode the word vector sequence to obtain an encoding sequence.
- the encoding unit 14 may include: inputting the word vector sequence into the encoder for encoding to obtain an initial encoding sequence, using an attention model to calculate the weight value of each word vector, and calculating the weight value of each word vector Calculate the coding initial vector corresponding to the coding initial sequence to obtain the coding vector, and generate the coding sequence according to the coding vector.
- the decoding unit 15 is configured to use a decoder to decode the coded sequence to obtain a query sentence.
- the decoding unit 15 may include: inputting the encoding sequence into the decoder for decoding to obtain a candidate vocabulary sequence, where the candidate vocabulary is the table name of the table node or the column name of the column node; The coding vector corresponding to the candidate vocabulary is calculated, the score of each candidate vocabulary is calculated, the candidate vocabulary with the highest score is taken as the target vocabulary, and the target vocabulary is matched with the sentences in the preset sentence library to obtain The query sentence matching the target vocabulary.
- the query unit 16 is configured to query the database according to the query sentence to obtain query results.
- the query result is output to the user. If the query result meets the actual query requirements of the user, the correlation between the nodes in the query is confirmed and the query is updated. Link to the original graph network. If the query cannot be completed based on the decoded output SQL statement (such as the query table cannot be found, or the output result does not meet the query requirements, the name of the drug needs to be output but the quantity is output, etc.), the query results that are not queried will be fed back to the user for convenience The user enters the query request again according to the query result to query.
- the decoded output SQL statement such as the query table cannot be found, or the output result does not meet the query requirements, the name of the drug needs to be output but the quantity is output, etc.
- the medical query device 1 based on the graph neural network can construct a relationship graph network composed of table nodes and column nodes according to the table names and column names of the data tables in the database through the construction unit 11, which is represented by the relationship graph network
- the association relationship between the tables in the database the recognition unit 12 is used to identify the received query request to determine the query word; the generation unit 13 is used to calculate the query word and the word vector of the network node in the relationship graph network to obtain the word vector sequence ,
- the encoding sequence is obtained by encoding the word vector sequence by the encoder in the encoding unit 14, and the encoding sequence is decoded by the decoder in the decoding unit 15 to obtain the query sentence, so that the query unit 16 is used to query the database according to the query sentence to obtain the query result, So as to achieve the purpose of improving query efficiency, at the same time simplify the query steps when users query multi-dimensional information, and reduce the time cost of learning and training.
- the present application also provides a computer device 2 which includes a plurality of computer devices 2.
- the components of the graph neural network-based medical query device 1 of the second embodiment can be dispersed in different computer devices 2 Among them, the computer device 2 can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a cabinet server (including an independent server, or a combination of multiple servers) that executes the program. Server cluster) and so on.
- the computer equipment 2 of this embodiment at least includes but is not limited to: a memory 21, a processor 23, a network interface 22 and a medical query device 1 based on a graph neural network (refer to FIG.
- FIG. 4 only shows the computer device 2 with components, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
- the memory 21 includes at least one type of computer-readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access Memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
- the readable storage medium may be non-volatile or volatile.
- the memory 21 may be an internal storage unit of the computer device 2, for example, a hard disk or a memory of the computer device 2.
- the memory 21 may also be an external storage device of the computer device 2, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (Secure Digital, SMC) equipped on the computer device 2. SD) card, flash card (Flash Card), etc.
- the memory 21 may also include both the internal storage unit of the computer device 2 and its external storage device.
- the memory 21 is generally used to store the operating system and various application software installed in the computer device 2, such as the program code of the medical query method based on the graph neural network in the first embodiment.
- the memory 21 can also be used to temporarily store various types of data that have been output or will be output.
- the processor 23 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips.
- the processor 23 is generally used to control the overall operation of the computer device 2, for example, to perform data interaction or communication-related control and processing with the computer device 2.
- the processor 23 is used to run the program code or processed data stored in the memory 21, for example, to run the medical query device 1 based on the graph neural network.
- the network interface 22 may include a wireless network interface or a wired network interface, and the network interface 22 is generally used to establish a communication connection between the computer device 2 and other computer devices 2.
- the network interface 22 is used to connect the computer device 2 with an external terminal through a network, and establish a data transmission channel and a communication connection between the computer device 2 and the external terminal.
- the network may be Intranet, Internet, Global System of Mobile Communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G Network, Bluetooth (Bluetooth), Wi-Fi and other wireless or wired networks.
- FIG. 4 only shows the computer device 2 with components 21-23, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
- the graph neural network-based medical query device 1 stored in the memory 21 may also be divided into one or more program modules, and the one or more program modules are stored in the memory 21, It is executed by one or more processors (the processor 23 in this embodiment) to complete the application.
- the computer-readable storage medium may be a non-volatile computer-readable storage medium, and the computer-readable storage medium may also be a volatile computer-readable storage medium.
- the medium includes multiple storage media, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read only memory (ROM) , Electrically Erasable Programmable Read-Only Memory (EEPROM), Programmable Read-Only Memory (PROM), Magnetic Memory, Disk, Optical Disk, Server, App Application Mall, etc., on which computer programs are stored, and the programs are controlled by the processor 23 The corresponding function is realized during execution.
- the computer-readable storage medium of this embodiment is used to store the medical query device 1 based on the graph neural network, and when executed by the processor 23, it implements the medical query method based on the graph neural network of the first embodiment.
- the blockchain referred to in this application is a new application mode of computer technology 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 for verification. The validity of the information (anti-counterfeiting) and the 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)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Public Health (AREA)
- Artificial Intelligence (AREA)
- Software Systems (AREA)
- Medical Informatics (AREA)
- Mathematical Physics (AREA)
- Biomedical Technology (AREA)
- Pathology (AREA)
- Primary Health Care (AREA)
- Life Sciences & Earth Sciences (AREA)
- Epidemiology (AREA)
- Biophysics (AREA)
- Evolutionary Computation (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种基于图神经网络的医疗查询方法、装置、计算机设备及存储介质。该方法可根据数据库中的数据表的表名及列名构建由表节点和列节点组成的关系图网络,通过关系图网络表示数据库中表与表之间的关联关系;能够对接收到的查询请求进行实体识别以确定查询词,计算查询词与关系图网络中网络节点的词向量得到词向量序列,通过编码器对词向量序列编码得到编码序列,通过解码器对编码序列解码,以得到查询语句,从而根据查询语句查询数据库获取查询结果,达到提高查询效率的目的,同时简化了用户对多维度信息查询时的查询步骤,并减低了学习训练的时间成本。
Description
本申请要求于2020年11月27日提交中国专利局、申请号为202011364216.8、发明名称为“基于图神经网络的医疗查询方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
本申请涉及人工智能领域,尤其涉及一种基于图神经网络的医疗查询方法、装置、计算机设备及存储介质。
现有医疗行业的医疗数据(如:患者就诊信息、科室人员信息、药物开具历史信息等)通常以表格的形式存储在数据库中,不同的数据表对应着不同的信息,表与表之间依靠一些关系连接,专业人员查询资料需要采用SQL语句来对不同的表进行精准整合和查询。发明人意识到对于缺乏这方面专业语句知识的人员来说,想要查询数据库中的数据,只能通过选择开发人员设定好的选项来查询数据,但这种查询形式限制了数据查询的自由性,并不能满足用户的所有查询需求。
针对这一问题,目前主要采用机器学习的方式,通过采集大量的SQL语句以及这些语句对应的查询结果标注信息训练查询模型,通过训练后的查询模型查询数据库,从而满足用户复杂多变的查询需求。但发明人发现该方法存在标注工作量大、训练时间长而且针对全新的数据库时原有标注下训练的模型会难以复用导致需要_重新训练,以及耗时长的缺陷。
发明内容
针对现有查询数据库的方法学习训练时间长的问题,现提供一种旨在可降低学习训练的时间成本,查询效率高的基于图神经网络的医疗查询方法、装置、计算机设备及存储介质。
为实现上述目的,本申请第一方面提供了一种基于图神经网络的医疗查询方法,包括:
提取数据库中各个数据表的表名及对应的列名,将所述表名作为表节点、所述列名作为列节点,并将相应的表节点与相应的列节点进行连接,将不同数据表中相同列名对应的不同表名的表节点进行连接,形成关系图网络,所述关系图网络的网络节点包括表节点和列节点;
获取查询请求,对所述查询请求进行实体识别获取查询词;
计算所述查询词与所述关系图网络中网络节点的词向量,生成词向量序列;
采用编码器对所述词向量序列进行编码获取编码序列;
采用解码器对所述编码序列进行解码以获取查询语句;
根据所述查询语句查询所述数据库获取查询结果。
本申请第二方面提供一种基于图神经网络的医疗查询装置,包括:
构建单元,用于提取数据库中各个数据表的表名及对应的列名,将所述表名作为表节点、所述列名作为列节点,并将相应的表节点与相应的列节点进行连接,将不同数据表中相同列名对应的不同表名的表节点进行连接,形成关系图网络,所述关系图网络的网络节点包括表节点和列节点;
识别单元,用于获取查询请求,对所述查询请求进行实体识别获取查询词;
生成单元,用于计算所述查询词与所述关系图网络中网络节点的词向量,生成词向量序列;
编码单元,用于采用编码器对所述词向量序列进行编码获取编码序列;
解码单元,用于采用解码器对所述编码序列进行解码以获取查询语句;
查询单元,用于根据所述查询语句查询所述数据库获取查询结果。
本申请第三方面提供一种计算机设备,所述计算机设备包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如下所述的基于图神经网络的医疗查询方法:
提取数据库中各个数据表的表名及对应的列名,将所述表名作为表节点、所述列名作为列节点,并将相应的表节点与相应的列节点进行连接,将不同数据表中相同列名对应的不同表名的表节点进行连接,形成关系图网络,所述关系图网络的网络节点包括表节点和列节点;
获取查询请求,对所述查询请求进行实体识别获取查询词;
计算所述查询词与所述关系图网络中网络节点的词向量,生成词向量序列;
采用编码器对所述词向量序列进行编码获取编码序列;
采用解码器对所述编码序列进行解码以获取查询语句;
根据所述查询语句查询所述数据库获取查询结果。
本申请第四方面提供一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下所述的基于图神经网络的医疗查询方法:
获取查询请求,对所述查询请求进行实体识别获取查询词;
计算所述查询词与所述关系图网络中网络节点的词向量,生成词向量序列;
采用编码器对所述词向量序列进行编码获取编码序列;
采用解码器对所述编码序列进行解码以获取查询语句;
根据所述查询语句查询所述数据库获取查询结果。
本申请提供的基于图神经网络的医疗查询方法、装置、计算机设备及存储介质,可根据数据库中的数据表的表名及列名构建由表节点和列节点组成的关系图网络,通过关系图网络表示数据库中表与表之间的关联关系;能够对接收到的查询请求进行实体识别以确定查询词,计算查询词与关系图网络中网络节点的词向量得到词向量序列,通过编码器对词向量序列编码得到编码序列,通过解码器对编码序列解码,以得到查询语句,从而根据查询语句查询数据库获取查询结果,从而达到提高查询效率的目的,同时简化了用户对多维度信息查询时的查询步骤,并减低了学习训练的时间成本。
图1为本申请所述的基于图神经网络的医疗查询方法的一种实施例的流程图;
图2为本申请生成词向量序列的一种实施例的流程图;
图3为本申请所述基于图神经网络的医疗查询装置的一种实施例的模块图;
图4为本申请计算机设备的一个实施例的硬件架构图。
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
本申请提供的基于图神经网络的医疗查询方法、装置、计算机设备及存储介质适用于智慧医疗领域。本申请可根据数据库中的数据表的表名及列名构建由表节点和列节点组成 的关系图网络,通过关系图网络表示数据库中表与表之间的关联关系;能够对接收到的查询请求进行实体识别以确定查询词,计算查询词与关系图网络中网络节点的词向量得到词向量序列,通过编码器对词向量序列编码得到编码序列,通过解码器对编码序列解码,以得到查询语句,从而根据查询语句查询数据库获取查询结果,从而达到提高查询效率的目的,同时简化了用户对多维度信息查询时的查询步骤,并减低了学习训练的时间成本。
为便于理解,下面对本申请实施例的具体流程进行描述,请参阅图1,本申请实施例的一种基于图神经网络的医疗查询方法,包括以下步骤:
S1.提取数据库中各个数据表的表名及对应的列名,将所述表名作为表节点、所述列名作为列节点,并将相应的表节点与相应的列节点进行连接,将不同数据表中相同列名对应的不同表名的表节点进行连接,形成关系图网络。
其中,所述关系图网络的网络节点包括表节点和列节点。
本实施例中,数据库为医疗数据库,数据表可以包括患者信息表(列名可包括:患者姓名、性别、患者id等)、时间信息表(列名可包括:时间段id、就诊患者姓名等)、就诊信息表(列名可包括:就诊id、病情描述、开具药物等)等信息表。通过提取各个信息表的表名以及表中相应的列名构建关系图网络,其中,表名对应关系图网络中的表节点,列名对应关系图网络中的列节点。在关系图网络中,表节点与表节点之间通过相同的列节点构建关联关系,例如:患者信息表中的患者id的列名与就诊信息表中的患者id列名相同,由于两个表的列名对应的列节点相同,因此患者信息表对应的表节点与就诊信息表的表节点之间存在关联关系。
需要强调的是,为进一步保证上述数据表的私密和安全性,上述数据表还可以存储于一区块链的节点中。
S2.获取查询请求,对所述查询请求进行实体识别获取查询词。
进一步地,步骤S2可包括:获取所述查询请求,采用BERT分词器对所述查询请求进行实体识别,以获取所述查询词。
作为举例而非限定,接收到用户输入的自然语言的查询请求,如“查询在2月份医生为病患X开具最多的药物的名称”,采用BERT分词器对查询请求进行实体识别,以获取查询词:2月份,患者X,最多的药物名称。
本实施例中,BERT分词器为应用NER(Named Entity Recognition,命名实体识别)数据集对BERT中文预训练模型进行训练后得到的分词器。通过BERT分词器实现对查询请求中的名词、否定词以及其他形容词如“最多的”的提取。
S3.计算所述查询词与所述关系图网络中网络节点的词向量,生成词向量序列。
进一步地,参阅图2所示步骤S3可包括以下步骤:
S31.将所述查询词逐个与所述关系图网络中的所述表节点进行匹配,获取与所有所述查询词匹配的所述表节点。
本实施例中,当查询词有多个时,可逐个将每一查询词与关系图网络中的所有表节点进行匹配,以获取匹配的表节点以及表节点的个数。
S32.根据所述表节点的个数选择查询模式。
其中,所述查询模块包括单表查询模式和多表查询模块。
具体地,步骤S32可包括:当所述表节点的个数为1个时,选择所述单表查询模式;当所述表节点的个数为大于1个时,选择所述多表查询模式;当表节点的个数小于1个时,生成无法查询的消息并输出,以向反馈用户。
S33.根据选择的查询模式,计算与所有所述查询词匹配的所述表节点以及与所述表节点关联的网络节点的词向量,生成词向量序列。
具体地,步骤S33可包括:当所述查询模式为单表查询模式时,获取与所有所述查询词 匹配的所述表节点,以及与所述表节点关联的列节点,分别计算所述查询词与表节点以及列节点的词向量,以生成所述词向量序列。
本实施例中,当与查询词匹配的表节点只有一个时,表示关系图网络中与查询词匹配的表只有一个,可采用单表查询模式进行查询,获取与该表的表节点关联的列节点,通过公式(1)计算每个网络节点(表节点和列节点)与查询词的相关程度,即步骤S1中所构建的关系图网络中网络节点与查询词中每个词xi的相关度slink,并且通过softmax归一化得到一个概率分布(作用是统一概率范围到0至1之间便于计算),取其中最大一个概率作为与查询词的相关度:
其中,v为需要学习的模式,该模式指不同词汇的数字、药品名称等可以对应的数据库表中的对应的列名,如2月可对应列名:time,张三可对应用户信息表中列名:name等。取其中最大的一个概率作为查询词xi与网络节点的相关度,用这个相关度和初始向量(即查询请求中每个查询词xi的向量表示)得到基于查询词的向量,经过L层(L数量基于不同输入词汇数量定义,直到完成所有节点的最终词向量转换)GNN得到每个网络节点基于查询词相关度的最终词向量,经过GNN模块处理后使每个网络节点可以和用户问题做更好的对齐,以便后续的编码。
具体地,步骤S33可包括:当所述查询模式为多表查询模式时,获取与所有所述查询词匹配的所述表节点,以及与每一个所述表节点关联的列节点以及其他表节点,分别计算所述查询词与所述表节点以及相应的所述列节点的词向量,以生成所述词向量序列。
本实施例中,当与查询词匹配的表节点有多个时,表示关系图网络中与查询词匹配的表只有多个,可采用多表查询模式进行查询,获取与该表的表节点关联的列节点和与该表的表节点关联的其他表节点,以及与其他表节点关联的其他列节点。从步骤S1网络中选取与查询词相关联的表节点和列节点(如:与病患信息表对应的表节点关联的列节点可包括:病患id、病患姓名等列节点;与诊信息表对应的表节点关联的列节点可包括:病患id、药物名称、时间等列节点;与药物信息表对应的表节点关联的列节点可包括:药物id),通过公式(1)计算每个网络节点(表节点和列节点)与查询词的相关程度,即步骤S1中所构建的关系图网络中网络节点与查询词中每个词xi的相关度slink,并且通过softmax归一化得到一个概率分布(作用是统一概率范围到0至1之间便于计算),取其中最大一个概率作为与查询词的相关度,用这个相关度和初始向量(即查询请求中每个查询词xi的向量表示)得到基于查询词的向量,经过L层(L数量基于不同输入词汇数量定义,直到完成所有节点的最终词向量转换)GNN得到每个网络节点基于查询词相关度的最终词向量,经过GNN模块处理后使每个网络节点可以和用户问题做更好的对齐,以便后续的编码。
S4.采用编码器对所述词向量序列进行编码获取编码序列。
进一步地,步骤S4可包括:将所述词向量序列输入所述编码器进行编码获取编码初始序列,采用注意力模型计算每个词向量的权重值,将每个所述词向量的权重值与所述编码初始序列中相应的编码初始向量进行计算,获取编码向量,根据所述编码向量生成所述编码序列。
本实施例中,通过步骤S3完成了针对词的初步编码,即基于网络节点间的关系完成网络节点与查询词关联程度的对应。继续将步骤S3中得到的结合了基于查询词的相关度的每个词向量输入语义解析模型中进行编码(Encoding),在该过程中输入的序列,即步骤S3中得到的词向量序列,通过编码器转化成一个编码后的向量的编码序列。
具体地,在编码阶段基于双向LSTM网络对步骤S3中计算得到的每个节点的最终词向量 进行编码,其工作原理可理解为,每一个节点词向量作为一个独立的输入,输入到双向LSTM编码器,在该编码器中通过捉到当前时刻t的过去和未来的特征,即每一个输入都会参考前后输入的内容,从而确保在编码时保留最多的时序信息。同时在编码过程中会加入Attention模型,即注意力模型,这种模型在产生输出的时候,还会产生一个“注意力范围”表示接下来输出的时候要重点关注输入序列中的哪些部分,然后根据关注的区域来产生下一个输出。该注意力模型基于原始问题对每个节点的词向量计算一个权重值,会赋予每个进行编码的词向量不同的关注比重。上述编码步骤能够确保输出时能够针对上下文语境、重点关注的内容等进行更合理的输出判断。
S5.采用解码器对所述编码序列进行解码以获取查询语句。
进一步地,步骤S5可包括:将所述编码序列输入到所述解码器进行解码,以获取候选词汇序列,所述候选词汇为表节点的表名或列节点的列名;根据每一个所述候选词汇对应的编码向量,分别计算每一所述候选词汇的分值,将分值最高的所述候选词汇作为目标词汇,将所述目标词汇与预设语句库中的语句进行匹配,获取与所述目标词汇匹配的所述查询语句。
本实施例中的查询语句采用SQL语句。
在步骤S4中完成序列的编码后,可以获得一个包含每个节点词向量对与查询词对应关系以及包含每个词向量前后关系的向量的序列,将其输入解码器进行解码。本实施例中的解码器使用的是LSTM网络,基于该网络在解码的时候,每一步都会基于权重值选择性的从向量序列中挑选一个子集进行进一步处理,这样在产生每一个输出的时候,都能够做到充分利用输入序列携带的信息,包括上下文以及关注度信息。解码输出时,如输出的是操作词汇(如“最多”),则完成最多所对应的操作SQL单词以及该操作输出的位置顺序。如果输出的是表名(Header)/列名(Table)这类词(如药品、患者等),则用该向量与数据库表格的Header/Table计算一个分数(计算使用该向量解码输出的查询SQL词汇的向量与基于原始输入的自然语言问题中的相关词汇,基于节点连接计算距离),该分数指代SQL单词与表格中各个Header/Table的关联程度。进一步获取解码时SQL单词与表格中各个的联系程度并选择分数最高的作为最终输出,并进行SQL语句的输出匹配,并完成最终的完整SQL查询语句的输出。这样可以利用多表完成SQL语句的解码输出,并且确保所输出的SQL语句为经由语义编码一解析器所处理后结合多表关联输出的最优解析结果。系统会将该结果作为最终SQL查询语句输出。
S6.根据所述查询语句查询所述数据库获取查询结果。
本实施例中,若解码后输出的查询语句可完成查询,则向用户输出查询结果,如查询结果符合本次用户实际查询需求,则确认本次查询中的节点之间的关联性并更新该关联到原有图网络中。如无法基于解码输出的SQL语句完成查询(如查询不到表、或输出结果不符合查询需要入需要输出药品名称但输出了数量等),则将未查询到的查询结果反馈至用户,以便于用户根据该查询结果再次输入查询请求进行查询。
在本实施例中,基于图神经网络的医疗查询方法可根据数据库中的数据表的表名及列名构建由表节点和列节点组成的关系图网络,通过关系图网络表示数据库中表与表之间的关联关系;能够对接收到的查询请求进行实体识别以确定查询词,计算查询词与关系图网络中网络节点的词向量得到词向量序列,通过编码器对词向量序列编码得到编码序列,通过解码器对编码序列解码,以得到查询语句,从而根据查询语句查询数据库获取查询结果,从而达到提高查询效率的目的,同时简化了用户对多维度信息查询时的查询步骤,并减低了学习训练的时间成本。
考虑到现有的查询数据库的方法往往忽略了数据库模式的结构,如当一个有两列的表,其中每列都是另外两个表的外键(Foreign key),以该表描述其他两表间的多对多关系时 现有的方法难以准确表达。本实施例的基于图神经网络的医疗查询方法利用图神经网络(GNN)实现的语义解析数据库查询,能够通过GNN有效计算所查询文本信息中所提及的每张表格间隐含的相互关联,完成对表格对SQL输出暗含的约束提取与表达,从而达到进一步提升准确率的效果。本实施例结合自然语言处理技术,能够为现有的智慧医疗系统提供有力支持,简化的医务人员对多维度信息的查询步骤,降低学习成本,提高工作效率,也能够减少在数据标注以及模型训练上所需的人工和时间成本。
请参阅图3,本实施例的一种基于图神经网络的医疗查询装置1,包括:构建单元11、识别单元12、生成单元13、编码单元14、解码单元15和查询单元16。
构建单元11,用于提取数据库中各个数据表的表名及对应的列名,将所述表名作为表节点、所述列名作为列节点,并将相应的表节点与相应的列节点进行连接,将不同数据表中相同列名对应的不同表名的表节点进行连接,形成关系图网络,所述关系图网络的网络节点包括表节点和列节点。
其中,所述关系图网络的网络节点包括表节点和列节点。
本实施例中,数据库为医疗数据库,数据表可以包括患者信息表(列名可包括:患者姓名、性别、患者id等)、时间信息表(列名可包括:时间段id、就诊患者姓名等)、就诊信息表(列名可包括:就诊id、病情描述、开具药物等)等信息表。通过提取各个信息表的表名以及表中相应的列名构建关系图网络,其中,表名对应关系图网络中的表节点,列名对应关系图网络中的列节点。在关系图网络中,表节点与表节点之间通过相同的列节点构建关联关系,例如:患者信息表中的患者id的列名与就诊信息表中的患者id列名相同,由于两个表的列名对应的列节点相同,因此患者信息表对应的表节点与就诊信息表的表节点之间存在关联关系。
需要强调的是,为进一步保证上述数据表的私密和安全性,上述数据表还可以存储于一区块链的节点中。
识别单元12,用于获取查询请求,对所述查询请求进行实体识别获取查询词。
进一步地,识别单元12可获取所述查询请求,采用BERT分词器对所述查询请求进行实体识别,以获取所述查询词。
作为举例而非限定,接收到用户输入的自然语言的查询请求,如“查询在2月份医生为病患X开具最多的药物的名称”,采用BERT分词器对查询请求进行实体识别,以获取查询词:2月份,患者X,最多的药物名称。
本实施例中,BERT分词器为应用NER数据集对BERT中文预训练模型进行训练后得到的分词器。通过BERT分词器实现对查询请求中的名词、否定词以及其他形容词如“最多的”的提取。
生成单元13,用于计算所述查询词与所述关系图网络中网络节点的词向量,生成词向量序列。
进一步地,生成单元13用于将所述查询词逐个与所述关系图网络中的所述表节点进行匹配,获取与所有所述查询词匹配的所述表节点;根据所述表节点的个数选择查询模式;根据选择的查询模式,计算与所有所述查询词匹配的所述表节点以及与所述表节点关联的网络节点的词向量,生成词向量序列。
其中,所述查询模块包括单表查询模式和多表查询模块。
本实施例中,当查询词有多个时,可逐个将每一查询词与关系图网络中的所有表节点进行匹配,以获取匹配的表节点以及表节点的个数。
具体地,当所述表节点的个数为1个时,选择所述单表查询模式;当所述表节点的个数为大于1个时,选择所述多表查询模式;当表节点的个数小于1个时,生成无法查询的消息 并输出,以向反馈用户。
当所述查询模式为单表查询模式时,获取与所有所述查询词匹配的所述表节点,以及与所述表节点关联的列节点,分别计算所述查询词与表节点以及列节点的词向量,以生成所述词向量序列。
本实施例中,当与查询词匹配的表节点只有一个时,表示关系图网络中与查询词匹配的表只有一个,可采用单表查询模式进行查询,获取与该表的表节点关联的列节点,通过公式(1)计算每个网络节点(表节点和列节点)与查询词的相关程度。
具体地,当所述查询模式为多表查询模式时,获取与所有所述查询词匹配的所述表节点,以及与每一个所述表节点关联的列节点以及其他表节点,分别计算所述查询词与所述表节点以及相应的所述列节点的词向量,以生成所述词向量序列。
本实施例中,当与查询词匹配的表节点有多个时,表示关系图网络中与查询词匹配的表只有多个,可采用多表查询模式进行查询,获取与该表的表节点关联的列节点和与该表的表节点关联的其他表节点,以及与其他表节点关联的其他列节点。网络中选取与查询词相关联的表节点和列节点(如:与病患信息表对应的表节点关联的列节点可包括:病患id、病患姓名等列节点;与诊信息表对应的表节点关联的列节点可包括:病患id、药物名称、时间等列节点;与药物信息表对应的表节点关联的列节点可包括:药物id),通过公式(1)计算每个网络节点(表节点和列节点)与查询词的相关程度,即步骤S1中所构建的关系图网络中网络节点与查询词中每个词xi的相关度slink,并且通过softmax归一化得到一个概率分布(作用是统一概率范围到0至1之间便于计算),取其中最大一个概率作为与查询词的相关度,用这个相关度和初始向量(即查询请求中每个查询词xi的向量表示)得到基于查询词的向量,经过L层(L数量基于不同输入词汇数量定义,直到完成所有节点的最终词向量转换)GNN得到每个网络节点基于查询词相关度的最终词向量,经过GNN模块处理后使每个网络节点可以和用户问题做更好的对齐,以便后续的编码。
编码单元14,用于采用编码器对所述词向量序列进行编码获取编码序列。
进一步地,编码单元14可包括:将所述词向量序列输入所述编码器进行编码获取编码初始序列,采用注意力模型计算每个词向量的权重值,将每个所述词向量的权重值与所述编码初始序列中相应的编码初始向量进行计算,获取编码向量,根据所述编码向量生成所述编码序列。
解码单元15,用于采用解码器对所述编码序列进行解码以获取查询语句。
进一步地,解码单元15可包括:将所述编码序列输入到所述解码器进行解码,以获取候选词汇序列,所述候选词汇为表节点的表名或列节点的列名;根据每一个所述候选词汇对应的编码向量,分别计算每一所述候选词汇的分值,将分值最高的所述候选词汇作为目标词汇,将所述目标词汇与预设语句库中的语句进行匹配,获取与所述目标词汇匹配的所述查询语句。
查询单元16,用于根据所述查询语句查询所述数据库获取查询结果。
本实施例中,若解码后输出的查询语句可完成查询,则向用户输出查询结果,如查询结果符合本次用户实际查询需求,则确认本次查询中的节点之间的关联性并更新该关联到原有图网络中。如无法基于解码输出的SQL语句完成查询(如查询不到表、或输出结果不符合查询需要入需要输出药品名称但输出了数量等),则将未查询到的查询结果反馈至用户,以便于用户根据该查询结果再次输入查询请求进行查询。
在本实施例中,基于图神经网络的医疗查询装置1可通过构建单元11根据数据库中的数据表的表名及列名构建由表节点和列节点组成的关系图网络,通过关系图网络表示数据库中表与表之间的关联关系;采用识别单元12对接收到的查询请求进行实体识别以确定查询词;利用生成单元13计算查询词与关系图网络中网络节点的词向量得到词向量序列,通过 编码单元14中的编码器对词向量序列编码得到编码序列,通过解码单元15中的解码器对编码序列解码,以得到查询语句,从而利用查询单元16根据查询语句查询数据库获取查询结果,从而达到提高查询效率的目的,同时简化了用户对多维度信息查询时的查询步骤,并减低了学习训练的时间成本。
为实现上述目的,本申请还提供一种计算机设备2,该计算机设备2包括多个计算机设备2,实施例二的基于图神经网络的医疗查询装置1的组成部分可分散于不同的计算机设备2中,计算机设备2可以是执行程序的智能手机、平板电脑、笔记本电脑、台式计算机、机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。本实施例的计算机设备2至少包括但不限于:可通过系统总线相互通信连接的存储器21、处理器23、网络接口22以及基于图神经网络的医疗查询装置1(参考图4)。需要指出的是,图4仅示出了具有组件-的计算机设备2,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
本实施例中,所述存储器21至少包括一种类型的计算机可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等,所述可读存储介质可以是非易失性,也可以是易失性。在一些实施例中,存储器21可以是计算机设备2的内部存储单元,例如该计算机设备2的硬盘或内存。在另一些实施例中,存储器21也可以是计算机设备2的外部存储设备,例如该计算机设备2上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器21还可以既包括计算机设备2的内部存储单元也包括其外部存储设备。本实施例中,存储器21通常用于存储安装于计算机设备2的操作系统和各类应用软件,例如实施例一的基于图神经网络的医疗查询方法的程序代码等。此外,存储器21还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器23在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器23通常用于控制计算机设备2的总体操作例如执行与所述计算机设备2进行数据交互或者通信相关的控制和处理等。本实施例中,所述处理器23用于运行所述存储器21中存储的程序代码或者处理数据,例如运行所述的基于图神经网络的医疗查询装置1等。
所述网络接口22可包括无线网络接口或有线网络接口,该网络接口22通常用于在所述计算机设备2与其他计算机设备2之间建立通信连接。例如,所述网络接口22用于通过网络将所述计算机设备2与外部终端相连,在所述计算机设备2与外部终端之间的建立数据传输通道和通信连接等。所述网络可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯系统(Global System of Mobile communication,GSM)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、Wi-Fi等无线或有线网络。
需要指出的是,图4仅示出了具有部件21-23的计算机设备2,但是应理解的是,并不要求实施所有示出的部件,可以替代的实施更多或者更少的部件。
在本实施例中,存储于存储器21中的所述基于图神经网络的医疗查询装置1还可以被分割为一个或者多个程序模块,所述一个或者多个程序模块被存储于存储器21中,并由一个或多个处理器(本实施例为处理器23)所执行,以完成本申请。
为实现上述目的,本申请还提供一种计算机可读存储介质,计算机可读存储介质可以 为非易失性计算机可读存储介质,该计算机可读存储介质也可以为易失性计算机可读存储介质其包括多个存储介质,如闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘、服务器、App应用商城等等,其上存储有计算机程序,程序被处理器23执行时实现相应功能。本实施例的计算机可读存储介质用于存储基于图神经网络的医疗查询装置1,被处理器23执行时实现实施例一的基于图神经网络的医疗查询方法。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。
Claims (20)
- 一种基于图神经网络的医疗查询方法,其中,包括:提取数据库中各个数据表的表名及对应的列名,将所述表名作为表节点、所述列名作为列节点,并将相应的表节点与相应的列节点进行连接,将不同数据表中相同列名对应的不同表名的表节点进行连接,形成关系图网络,所述关系图网络的网络节点包括表节点和列节点;获取查询请求,对所述查询请求进行实体识别获取查询词;计算所述查询词与所述关系图网络中网络节点的词向量,生成词向量序列;采用编码器对所述词向量序列进行编码获取编码序列;采用解码器对所述编码序列进行解码以获取查询语句;根据所述查询语句查询所述数据库获取查询结果。
- 根据权利要求1所述的基于图神经网络的医疗查询方法,其中,获取查询请求,对所述查询请求进行实体识别获取查询词,包括:获取所述查询请求;采用BERT分词器对所述查询请求进行实体识别,以获取所述查询词。
- 根据权利要求1所述的基于图神经网络的医疗查询方法,其中,计算所述查询词与所述关系图网络中网络节点的词向量,生成词向量序列,包括:将所述查询词逐个与所述关系图网络中的所述表节点进行匹配,获取与所有所述查询词匹配的所述表节点;根据所述表节点的个数选择查询模式;根据选择的查询模式,计算与所有所述查询词匹配的所述表节点以及与所述表节点关联的网络节点的词向量,生成词向量序列。
- 根据权利要求3所述的基于图神经网络的医疗查询方法,其中,所述查询模块包括单表查询模式和多表查询模块;根据所述表节点的个数选择查询模式,包括:当所述表节点的个数为1个时,选择所述单表查询模式;当所述表节点的个数为大于1个时,选择所述多表查询模式。
- 根据权利要求4所述的基于图神经网络的医疗查询方法,其中,根据选择的查询模式,计算与所有所述查询词匹配的所述表节点以及与所述表节点关联的网络节点的词向量,生成词向量序列,包括:当所述查询模式为单表查询模式时,获取与所有所述查询词匹配的所述表节点,以及与所述表节点关联的列节点,分别计算所述查询词与表节点以及列节点的词向量,以生成所述词向量序列;当所述查询模式为多表查询模式时,获取与所有所述查询词匹配的所述表节点,以及与每一个所述表节点关联的列节点以及其他表节点,分别计算所述查询词与所述表节点以及相应的所述列节点的词向量,以生成所述词向量序列。
- 根据权利要求1所述的基于图神经网络的医疗查询方法,其中,采用编码器对所述词向量序列进行编码获取编码序列,包括:将所述词向量序列输入所述编码器进行编码获取编码初始序列,采用注意力模型计算每个词向量的权重值,将每个所述词向量的权重值与所述编码初始序列中相应的编码初始向量进行计算,获取编码向量,根据所述编码向量生成所述编码序列。
- 根据权利要求1所述的基于图神经网络的医疗查询方法,其中,采用解码器对所述编码序列进行解码以获取查询语句,包括:将所述编码序列输入到所述解码器进行解码,以获取候选词汇序列,所述候选词汇为 表节点的表名或列节点的列名;根据每一个所述候选词汇对应的编码向量,分别计算每一所述候选词汇的分值,将分值最高的所述候选词汇作为目标词汇,将所述目标词汇与预设语句库中的语句进行匹配,获取与所述目标词汇匹配的所述查询语句。
- 一种基于图神经网络的医疗查询装置,其中,包括:构建单元,用于提取数据库中各个数据表的表名及对应的列名,将所述表名作为表节点、所述列名作为列节点,并将相应的表节点与相应的列节点进行连接,将不同数据表中相同列名对应的不同表名的表节点进行连接,形成关系图网络,所述关系图网络的网络节点包括表节点和列节点;识别单元,用于获取查询请求,对所述查询请求进行实体识别获取查询词;生成单元,用于计算所述查询词与所述关系图网络中网络节点的词向量,生成词向量序列;编码单元,用于采用编码器对所述词向量序列进行编码获取编码序列;解码单元,用于采用解码器对所述编码序列进行解码以获取查询语句;查询单元,用于根据所述查询语句查询所述数据库获取查询结果。
- 一种计算机设备,其中,所述计算机设备包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时执行如下所述的基于图神经网络的医疗查询方法的步骤:提取数据库中各个数据表的表名及对应的列名,将所述表名作为表节点、所述列名作为列节点,并将相应的表节点与相应的列节点进行连接,将不同数据表中相同列名对应的不同表名的表节点进行连接,形成关系图网络,所述关系图网络的网络节点包括表节点和列节点;获取查询请求,对所述查询请求进行实体识别获取查询词;计算所述查询词与所述关系图网络中网络节点的词向量,生成词向量序列;采用编码器对所述词向量序列进行编码获取编码序列;采用解码器对所述编码序列进行解码以获取查询语句;根据所述查询语句查询所述数据库获取查询结果。
- 根据权利要求9所述的计算机设备,其中,所述计算机设备被所述处理器执行所述获取查询请求,对所述查询请求进行实体识别获取查询词的步骤时,包括:获取所述查询请求;采用BERT分词器对所述查询请求进行实体识别,以获取所述查询词。
- 根据权利要求9所述的计算机设备,其中,所述计算机设备被所述处理器执行所述计算所述查询词与所述关系图网络中网络节点的词向量,生成词向量序列的步骤时,包括:将所述查询词逐个与所述关系图网络中的所述表节点进行匹配,获取与所有所述查询词匹配的所述表节点;根据所述表节点的个数选择查询模式;根据选择的查询模式,计算与所有所述查询词匹配的所述表节点以及与所述表节点关联的网络节点的词向量,生成词向量序列。
- 根据权利要求11所述的计算机设备,其中,所述查询模块包括单表查询模式和多表查询模块;所述计算机设备被所述处理器执行所述根据所述表节点的个数选择查询模式的步骤时,包括:当所述表节点的个数为1个时,选择所述单表查询模式;当所述表节点的个数为大于1个时,选择所述多表查询模式。
- 根据权利要求12所述的计算机设备,其中,所述计算机设备被所述处理器执行所述根据选择的查询模式,计算与所有所述查询词匹配的所述表节点以及与所述表节点关联的网络节点的词向量,生成词向量序列的步骤时,包括:当所述查询模式为单表查询模式时,获取与所有所述查询词匹配的所述表节点,以及与所述表节点关联的列节点,分别计算所述查询词与表节点以及列节点的词向量,以生成所述词向量序列;当所述查询模式为多表查询模式时,获取与所有所述查询词匹配的所述表节点,以及与每一个所述表节点关联的列节点以及其他表节点,分别计算所述查询词与所述表节点以及相应的所述列节点的词向量,以生成所述词向量序列。
- 根据权利要求9所述的计算机设备,其中,所述计算机设备被所述处理器执行所述采用编码器对所述词向量序列进行编码获取编码序列的步骤时,包括:将所述词向量序列输入所述编码器进行编码获取编码初始序列,采用注意力模型计算每个词向量的权重值,将每个所述词向量的权重值与所述编码初始序列中相应的编码初始向量进行计算,获取编码向量,根据所述编码向量生成所述编码序列。
- 根据权利要求9所述的计算机设备,其中,所述计算机设备被所述处理器执行所述采用解码器对所述编码序列进行解码以获取查询语句的步骤时,包括:将所述编码序列输入到所述解码器进行解码,以获取候选词汇序列,所述候选词汇为表节点的表名或列节点的列名;根据每一个所述候选词汇对应的编码向量,分别计算每一所述候选词汇的分值,将分值最高的所述候选词汇作为目标词汇,将所述目标词汇与预设语句库中的语句进行匹配,获取与所述目标词汇匹配的所述查询语句。
- 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下所述的基于图神经网络的医疗查询方法的步骤:提取数据库中各个数据表的表名及对应的列名,将所述表名作为表节点、所述列名作为列节点,并将相应的表节点与相应的列节点进行连接,将不同数据表中相同列名对应的不同表名的表节点进行连接,形成关系图网络,所述关系图网络的网络节点包括表节点和列节点;获取查询请求,对所述查询请求进行实体识别获取查询词;计算所述查询词与所述关系图网络中网络节点的词向量,生成词向量序列;采用编码器对所述词向量序列进行编码获取编码序列;采用解码器对所述编码序列进行解码以获取查询语句;根据所述查询语句查询所述数据库获取查询结果。
- 根据权利要求16所述的计算机可读存储介质,其中,所述计算机程序被处理器执行所述获取查询请求,对所述查询请求进行实体识别获取查询词的步骤时,包括:获取所述查询请求;采用BERT分词器对所述查询请求进行实体识别,以获取所述查询词。
- 根据权利要求16所述的计算机可读存储介质,其中,所述计算机程序被处理器执行所述计算所述查询词与所述关系图网络中网络节点的词向量,生成词向量序列的步骤时,包括:将所述查询词逐个与所述关系图网络中的所述表节点进行匹配,获取与所有所述查询词匹配的所述表节点;根据所述表节点的个数选择查询模式;根据选择的查询模式,计算与所有所述查询词匹配的所述表节点以及与所述表节点关 联的网络节点的词向量,生成词向量序列。
- 根据权利要求18所述的计算机可读存储介质,其中,所述查询模块包括单表查询模式和多表查询模块;所述计算机程序被处理器执行所述根据所述表节点的个数选择查询模式的步骤时,包括:所述查询模块包括单表查询模式和多表查询模块;根据所述表节点的个数选择查询模式,包括:
- 根据权利要求19所述的计算机可读存储介质,其中,所述计算机程序被处理器执行所述根据选择的查询模式,计算与所有所述查询词匹配的所述表节点以及与所述表节点关联的网络节点的词向量,生成词向量序列的步骤时,包括:当所述查询模式为单表查询模式时,获取与所有所述查询词匹配的所述表节点,以及与所述表节点关联的列节点,分别计算所述查询词与表节点以及列节点的词向量,以生成所述词向量序列;当所述查询模式为多表查询模式时,获取与所有所述查询词匹配的所述表节点,以及与每一个所述表节点关联的列节点以及其他表节点,分别计算所述查询词与所述表节点以及相应的所述列节点的词向量,以生成所述词向量序列。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011364216.8 | 2020-11-27 | ||
CN202011364216.8A CN112447300B (zh) | 2020-11-27 | 2020-11-27 | 基于图神经网络的医疗查询方法、装置、计算机设备及存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021213160A1 true WO2021213160A1 (zh) | 2021-10-28 |
Family
ID=74738737
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/084265 WO2021213160A1 (zh) | 2020-11-27 | 2021-03-31 | 基于图神经网络的医疗查询方法、装置、计算机设备及存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112447300B (zh) |
WO (1) | WO2021213160A1 (zh) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116049511A (zh) * | 2023-02-06 | 2023-05-02 | 华院计算技术(上海)股份有限公司 | 多维数据的查询方法、系统、设备及存储介质 |
CN117235108A (zh) * | 2023-11-14 | 2023-12-15 | 云筑信息科技(成都)有限公司 | 一种基于图神经网络的nl2sql生成方法 |
CN117453732A (zh) * | 2023-12-25 | 2024-01-26 | 智业软件股份有限公司 | 一种cdss医嘱数据查询优化方法和系统 |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112447300B (zh) * | 2020-11-27 | 2024-02-09 | 平安科技(深圳)有限公司 | 基于图神经网络的医疗查询方法、装置、计算机设备及存储介质 |
CN113239818B (zh) * | 2021-05-18 | 2023-05-30 | 上海交通大学 | 基于分割和图卷积神经网络的表格跨模态信息提取方法 |
CN113642312A (zh) * | 2021-08-19 | 2021-11-12 | 平安医疗健康管理股份有限公司 | 体检数据的处理方法、装置、设备及存储介质 |
CN114579605B (zh) * | 2022-04-26 | 2022-08-09 | 阿里巴巴达摩院(杭州)科技有限公司 | 表格问答数据处理方法、电子设备及计算机存储介质 |
CN114969261B (zh) * | 2022-05-30 | 2024-07-05 | 平安科技(深圳)有限公司 | 基于人工智能的数据查询方法、装置、电子设备及介质 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9448995B2 (en) * | 2013-02-18 | 2016-09-20 | Nadine Sina Kurz | Method and device for performing natural language searches |
CN109542929A (zh) * | 2018-11-28 | 2019-03-29 | 山东工商学院 | 语音查询方法、装置和电子设备 |
CN111506701A (zh) * | 2020-03-25 | 2020-08-07 | 中国平安财产保险股份有限公司 | 一种智能查询方法及相关装置 |
CN111797196A (zh) * | 2020-06-01 | 2020-10-20 | 武汉大学 | 一种结合注意力机制lstm和神经主题模型的服务发现方法 |
CN111831626A (zh) * | 2020-07-16 | 2020-10-27 | 平安科技(深圳)有限公司 | 数据库逻辑关系的图结构生成方法、数据查询方法及装置 |
CN112447300A (zh) * | 2020-11-27 | 2021-03-05 | 平安科技(深圳)有限公司 | 基于图神经网络的医疗查询方法、装置、计算机设备及存储介质 |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040054642A1 (en) * | 2002-09-17 | 2004-03-18 | Po-Zen Chen | System for decoding and searching content of file and operation method thereof |
CN101216852A (zh) * | 2008-01-11 | 2008-07-09 | 孟小峰 | 基于序列模式的数据导入及查询方法 |
CN104424296B (zh) * | 2013-09-02 | 2018-07-31 | 阿里巴巴集团控股有限公司 | 查询词分类方法和装置 |
CN108415894B (zh) * | 2018-03-15 | 2021-01-05 | 平安科技(深圳)有限公司 | 报表数据初始化方法、装置、计算机设备及存储介质 |
CN109766355A (zh) * | 2018-12-28 | 2019-05-17 | 上海汇付数据服务有限公司 | 一种支持自然语言的数据查询方法和系统 |
CN111639254A (zh) * | 2020-05-28 | 2020-09-08 | 华中科技大学 | 一种医疗领域的sparql查询语句的生成系统和方法 |
-
2020
- 2020-11-27 CN CN202011364216.8A patent/CN112447300B/zh active Active
-
2021
- 2021-03-31 WO PCT/CN2021/084265 patent/WO2021213160A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9448995B2 (en) * | 2013-02-18 | 2016-09-20 | Nadine Sina Kurz | Method and device for performing natural language searches |
CN109542929A (zh) * | 2018-11-28 | 2019-03-29 | 山东工商学院 | 语音查询方法、装置和电子设备 |
CN111506701A (zh) * | 2020-03-25 | 2020-08-07 | 中国平安财产保险股份有限公司 | 一种智能查询方法及相关装置 |
CN111797196A (zh) * | 2020-06-01 | 2020-10-20 | 武汉大学 | 一种结合注意力机制lstm和神经主题模型的服务发现方法 |
CN111831626A (zh) * | 2020-07-16 | 2020-10-27 | 平安科技(深圳)有限公司 | 数据库逻辑关系的图结构生成方法、数据查询方法及装置 |
CN112447300A (zh) * | 2020-11-27 | 2021-03-05 | 平安科技(深圳)有限公司 | 基于图神经网络的医疗查询方法、装置、计算机设备及存储介质 |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116049511A (zh) * | 2023-02-06 | 2023-05-02 | 华院计算技术(上海)股份有限公司 | 多维数据的查询方法、系统、设备及存储介质 |
CN117235108A (zh) * | 2023-11-14 | 2023-12-15 | 云筑信息科技(成都)有限公司 | 一种基于图神经网络的nl2sql生成方法 |
CN117453732A (zh) * | 2023-12-25 | 2024-01-26 | 智业软件股份有限公司 | 一种cdss医嘱数据查询优化方法和系统 |
CN117453732B (zh) * | 2023-12-25 | 2024-03-01 | 智业软件股份有限公司 | 一种cdss医嘱数据查询优化方法和系统 |
Also Published As
Publication number | Publication date |
---|---|
CN112447300B (zh) | 2024-02-09 |
CN112447300A (zh) | 2021-03-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021213160A1 (zh) | 基于图神经网络的医疗查询方法、装置、计算机设备及存储介质 | |
WO2021217935A1 (zh) | 问题生成模型的训练方法、问题生成方法及其相关设备 | |
CN113707300B (zh) | 基于人工智能的搜索意图识别方法、装置、设备及介质 | |
US11615148B2 (en) | Predictive system for generating clinical queries | |
WO2021151353A1 (zh) | 医学实体关系抽取方法、装置、计算机设备及可读存储介质 | |
WO2021135469A1 (zh) | 基于机器学习的信息抽取方法、装置、计算机设备及介质 | |
CN110427618B (zh) | 对抗样本生成方法、介质、装置和计算设备 | |
WO2021217850A1 (zh) | 疾病名称对码方法、装置、计算机设备及存储介质 | |
CN112015917A (zh) | 基于知识图谱的数据处理方法、装置及计算机设备 | |
US20220277005A1 (en) | Semantic parsing of natural language query | |
CN112559687B (zh) | 问题识别及查询方法、装置、电子设备及存储介质 | |
WO2022088671A1 (zh) | 自动问答方法、装置、设备及存储介质 | |
WO2022222943A1 (zh) | 科室推荐方法、装置、电子设备及存储介质 | |
WO2021208444A1 (zh) | 电子病例自动生成方法、装置、设备及存储介质 | |
WO2021174871A1 (zh) | 数据查询方法、系统、计算机设备及存储介质 | |
US20190384856A1 (en) | Description matching for application program interface mashup generation | |
CN111797217B (zh) | 基于faq匹配模型的信息查询方法、及其相关设备 | |
CN111883251A (zh) | 医疗误诊检测方法、装置、电子设备及存储介质 | |
CN113707299A (zh) | 基于问诊会话的辅助诊断方法、装置及计算机设备 | |
WO2022100067A1 (zh) | 数据库数据查询方法、装置、电子设备及存储介质 | |
WO2022160442A1 (zh) | 答案生成方法、装置、电子设备及可读存储介质 | |
WO2023029510A1 (zh) | 基于人工智能的远程问诊方法、装置、设备及介质 | |
WO2023178978A1 (zh) | 基于人工智能的处方审核方法、装置、设备及介质 | |
CN110502620B (zh) | 导诊相似问题对生成方法、系统及计算机设备 | |
CN112328621A (zh) | Sql转换方法、装置、计算机设备及计算机可读存储介质 |
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: 21792903 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: 21792903 Country of ref document: EP Kind code of ref document: A1 |