CN114579605B - Table question-answer data processing method, electronic equipment and computer storage medium - Google Patents
Table question-answer data processing method, electronic equipment and computer storage medium Download PDFInfo
- Publication number
- CN114579605B CN114579605B CN202210442078.3A CN202210442078A CN114579605B CN 114579605 B CN114579605 B CN 114579605B CN 202210442078 A CN202210442078 A CN 202210442078A CN 114579605 B CN114579605 B CN 114579605B
- Authority
- CN
- China
- Prior art keywords
- vectors
- mode
- pattern
- vector
- question
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- 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
- G06F16/2433—Query languages
- G06F16/2445—Data retrieval commands; View definitions
-
- 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/332—Query formulation
- G06F16/3329—Natural language query formulation or dialogue systems
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application provides a method for processing form question and answer data, electronic equipment and a computer storage medium, wherein the method for processing the form question and answer data comprises the following steps: acquiring a first characterization vector corresponding to the table question-answer query request; obtaining a mode vector corresponding to the first characterization vector by using a problem-mode diagram, and obtaining a second characterization vector based on the first characterization vector and the mode vector, wherein the problem-mode diagram is generated by pre-training according to a generation mode indicated by indication information by using word segmentation vectors and mode vectors as nodes and using correlation relations among all vectors as edges; and converting and generating a corresponding database query statement based on the second characterization vector. By the method and the device, the user intention corresponding to the query request can be more accurately understood, and the accuracy of converting the table question-answer query request of the natural language into the database query statement is improved.
Description
Technical Field
The embodiment of the application relates to the technical field of artificial intelligence, in particular to a method for processing form question-answer data, electronic equipment and a computer storage medium.
Background
Because the data structure is clear and easy to maintain, the table/SQL database becomes the most common structured data applied in various industries and is also an important answer source of an intelligent dialog system, a search engine and the like. The traditional table query needs a professional to write a query statement (such as an SQL statement) to complete, and the large-scale application of the table query is hindered due to high threshold. The table question and answer technique (also known as TableQA) is increasingly widely used by allowing users to interact directly with a table database using natural language by converting the natural language directly into SQL queries.
A form question-answering system is mainly composed of three parts including a natural language understanding part, a dialogue management part and a natural language generating part. The natural language understanding part mainly executes a semantic analysis algorithm and converts a natural language problem into a corresponding executable SQL statement; the dialogue management part executes multi-round state tracking and strategy optimization; the natural language generating part generates a corresponding reply according to the analyzed SQL statement and the SQL execution result.
For the natural language understanding part, finding the association between the natural language question and the database schema data, also called schema linkage, is a core process for implementing the conversion from the natural language question to the SQL statement. However, the current natural language understanding part is mostly realized by using a seq2seq model, and is limited in that the seq2seq model cannot ensure the accuracy of the sequence generation result, and the accuracy of the SQL statement generated by the current natural language understanding part is always poor.
Disclosure of Invention
In view of the above, embodiments of the present application provide a table-based data processing scheme to at least partially solve the above-mentioned problems.
According to a first aspect of the embodiments of the present application, there is provided a method for processing form question-answering data, including: acquiring a first characterization vector corresponding to the table question-answer query request; obtaining a mode vector corresponding to the first characterization vector by using a problem-mode diagram, and obtaining a second characterization vector based on the first characterization vector and the mode vector, wherein the problem-mode diagram is generated by pre-training according to a generation mode indicated by indication information by using word segmentation vectors and mode vectors as nodes and using correlation relations among all vectors as edges; and converting and generating a corresponding database query statement based on the second characterization vector.
According to a second aspect of embodiments of the present application, there is provided an electronic apparatus, including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the corresponding operation of the method according to the first aspect.
According to a third aspect of embodiments herein, there is provided a computer storage medium having stored thereon a computer program which, when executed by a processor, performs the method according to the first aspect.
According to a fourth aspect of embodiments herein, there is provided a computer program product comprising computer instructions for instructing a computing device to perform operations corresponding to the method according to the first aspect.
According to the table question-answer data processing scheme provided by the embodiment of the application, when the table question-answer query request is converted into the corresponding database query statement, not only the first characterization vector which is the characterization vector carrying the characteristics of the table question-answer query request is obtained, but also the characteristics of the first characterization vector are enhanced through the question-pattern diagram. Because the question-pattern diagram effectively fuses information of various word segmentation vectors, pattern vectors and incidence relations of the word segmentation vectors and the pattern vectors, the determination and judgment of the pattern links are more accurate, and syntax and semantic information of the table question-answer query request can be better understood, so that the user intention corresponding to the query request can be more accurately understood, and the accuracy of converting the table question-answer query request of natural language into a database query statement is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a schematic diagram of an exemplary system to which a method for processing form question-answer data according to an embodiment of the present application may be applied;
fig. 2 is a schematic structural diagram of a semantic parsing model according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating steps of a method for processing form question and answer data according to an embodiment of the present application;
FIG. 4A is a flowchart illustrating steps of a method for processing form question-answer data according to a second embodiment of the present application;
FIG. 4B is a diagram illustrating a process of creating a problem-pattern diagram in the embodiment shown in FIG. 4A;
FIG. 4C is a schematic diagram of the creation of another problem-pattern diagram in the embodiment shown in FIG. 4A;
FIG. 5A is a flowchart illustrating the steps of a method for processing form question-answer data according to a third embodiment of the present application;
FIG. 5B is an exemplary diagram of an application scenario in the embodiment shown in FIG. 5A;
fig. 6 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application shall fall within the scope of the protection of the embodiments in the present application.
The following further describes specific implementations of embodiments of the present application with reference to the drawings of the embodiments of the present application.
Fig. 1 is a schematic diagram of an exemplary system to which a method for processing form question-answering data according to an embodiment of the present application is applied. As shown in fig. 1, the system 100 may include a server 102, a communication network 104, and/or one or more user devices 106, illustrated in fig. 1 as a plurality of user devices.
In some embodiments, the communication network 104 may be any suitable combination of one or more wired and/or wireless networks. For example, the communication network 104 can include any one or more of the following: the network may include, but is not limited to, the internet, an intranet, a Wide Area Network (WAN), a Local Area Network (LAN), a wireless network, a Digital Subscriber Line (DSL) network, a frame relay network, an Asynchronous Transfer Mode (ATM) network, a Virtual Private Network (VPN), and/or any other suitable communication network. The user device 106 can be connected to the communication network 104 by one or more communication links (e.g., communication link 112), and the communication network 104 can be linked to the server 102 via one or more communication links (e.g., communication link 114). The communication link may be any communication link suitable for communicating data between the user device 106 and the server 102, such as a network link, a dial-up link, a wireless link, a hardwired link, any other suitable communication link, or any suitable combination of such links.
Although server 102 is illustrated as one device, in some embodiments, any suitable number of devices may be used to perform the functions performed by server 102. For example, in some embodiments, multiple devices may be used to implement the functions performed by the server 102. Alternatively, the functionality of the server 102 may be implemented using a cloud service.
Based on the above system, the embodiment of the present application provides a table question-answering data processing scheme, and for convenience of description, the following first illustrates the structure of the semantic parsing model used in the method.
As previously described, the form question-answering system generally includes a natural language understanding part, a dialogue management part, and a natural language generation part. In the embodiment of the application, the natural language understanding part is realized by adopting a semantic parsing model. Unlike the seq2seq model structure adopted by the conventional natural language understanding part, the semantic parsing model of the embodiment of the present application includes, in addition to the encoder 202 and the decoder 206 in the conventional seq2seq model, a question-pattern layer 204 between the encoder 202 and the decoder 206, and an exemplary structure of the semantic parsing model adopting the structure is shown in fig. 2.
The encoder 202 is configured to encode an input vector, such as an input vector corresponding to a training sample in a training phase, to generate a first sample characterization vector; or, coding the vector corresponding to the table question-answer query request in the inference stage to generate a first characterization vector.
And the problem-pattern layer 204 creates a generated problem-pattern map during the training phase based on the portion of the natural language query statement in the training sample in the first sample token vector and the portion of the database pattern data in the first sample token vector. The problem-pattern diagram is obtained based on a large number of training samples, and therefore includes a large number of vectors corresponding to the training samples and data of association between the vectors, in the problem-pattern diagram, the vectors are represented as nodes, and the association between the vectors is represented as edges between the nodes. The vector comprises a participle vector corresponding to a participle in a natural language query sentence in a training sample and a mode vector corresponding to a mode item in database mode data; the association relationship between the vectors includes an association relationship between the participle vectors, an association relationship between the mode vectors, and an association relationship between the participle vectors and the mode vectors.
Exemplarily, assuming that there are 10000 training samples, the problem-pattern diagram after training will include the word vector corresponding to the word in the 10000 training samples and the pattern vector corresponding to the pattern item (in the form of nodes), and the association relationship between them (in the form of edges).
In the reasoning stage, the question-pattern diagram may obtain word segmentation vectors corresponding to the word segmentation vectors based on the trained question-pattern diagram, and output a second characterization vector including the word segmentation vectors and the pattern vectors, in addition to the word segmentation vectors corresponding to the form question-answer query request.
The second token vector is further processed by the decoder 206 and converted into a database query statement, which is an SQL statement.
The following describes a table question-answer data processing method based on the above system and semantic analysis model by using a plurality of embodiments.
Example one
Referring to fig. 3, a flowchart illustrating steps of a method for processing form question-answer data according to a first embodiment of the present application is shown.
The embodiment focuses on the description of the training of the semantic analysis model, and the method for processing the table question-answering data of the embodiment includes the following steps:
step S302: and obtaining a form question-answer training sample.
Wherein, the table question-answer training sample comprises: a natural language query statement and corresponding database schema data. The natural language query statement may be data corresponding to a historical user query request obtained when the user data is authorized to be used; alternatively, the set of extended data generated according to a certain extension rule based on data corresponding to a part of historical user query requests and data corresponding to the part of historical user query requests may be used. Correspondingly, each natural language query statement corresponds to database schema data of the database or data table it queries. Schema data of a database, also referred to as schema data of the database, is a set of interrelated database objects used to characterize information such as tables, table columns, data types of columns, values, indexes, foreign keys, etc. in the database. Based on the method, each group of natural language query sentences and the corresponding database mode data can be used as a training sample, and a semantic analysis model is input for training.
Natural language query statements and pattern data have an associative relationship, also known as pattern linking, which is one of the important parts in training. When the two parts of data are input into the model, vectors corresponding to the two parts of data can be spliced to generate a spliced vector, and then the spliced vector is input into the semantic analysis model. By splicing the two vectors, a mode link structure can be explicitly introduced, so that which words in the natural language query statement should be linked with which items in the mode data can be predicted through training, and the links correspond to which keywords in the SQL, so that better query statement and mode representation can be obtained, and the performance of the model is effectively improved.
Illustratively, assume that the natural language query statement is "date to show transcript, at least several results, and a specific school number"; the database mode data comprises name/achievement list date/school number/score, vectors corresponding to the two parts of data are spliced, and the spliced vectors are input into an encoder of a semantic analysis model.
Step S304: and (3) obtaining a sample database query statement by using a table question-answer training sample through an encoder, a question-mode layer and a decoder of the semantic analysis model in sequence.
In one possible approach, this step can be implemented as: inputting the table question-answer training sample into an encoder for encoding processing to generate a first sample characterization vector; extracting a plurality of participle vectors and incidence relations among the participle vectors, a plurality of mode vectors and incidence relations among the participle vectors from a first sample representation vector through a question-mode layer; according to the word segmentation components, the mode vectors and the incidence relation, creating a problem-mode graph in a generation mode indicated by indication information, wherein the indication information is used for indicating the generation mode of the problem-mode graph; performing reinforcement learning on the first sample characterization vector based on the problem-pattern diagram to obtain a corresponding second sample characterization vector; and inputting the second sample characterization vector into a decoder, and converting to generate a corresponding sample database query statement.
Alternatively, the encoder may adopt a transform encoder structure, perform encoding processing on the input concatenation vector, and output a participle vector corresponding to each participle in the natural language query statement and a pattern vector corresponding to each pattern item in the database pattern data. But is not limited thereto, other encoder structures are also equally applicable to the solution of the embodiments of the present application.
After the problem-pattern layer obtains the word segmentation vectors and the pattern vectors from the encoder, the association relationship between the word segmentation vectors and the pattern vectors is obtained in a certain manner, and then the problem-pattern layer creates the problem-pattern diagram according to the generation manner indicated by the indication information, and the specific implementation of this portion will be described in detail in the following second embodiment, which is not described in detail herein. After the problem-pattern diagram is created, the first sample characterization vector can be subjected to reinforcement learning based on the problem-pattern diagram, and a corresponding second sample characterization vector is obtained. The second sample characterization vector carries information of the word segmentation vector, the association relationship among the word segmentation vectors, the mode vector, the association relationship among the mode vectors and the association relationship among the word segmentation vectors and the mode vector.
In one possible approach, performing reinforcement learning on the first sample characterization vector based on the problem-pattern diagram, and obtaining the corresponding second sample characterization vector may include: performing reinforcement learning on the first sample characterization vector based on the characterization vectors corresponding to the nodes, the characterization vectors corresponding to the edges and a preset attention mechanics paradigm in the problem-pattern diagram; and acquiring a corresponding second sample characterization vector according to the reinforcement learning result.
In one particular exemplary implementation, the attention mechanics learning paradigm can be implemented as the following formula:
wherein e is ij An attention weighting matrix obtained by representing learning; xi, Xj represent the characterization vectors of the nodes in the problem-pattern graph; wq, Wk, and Wv are learnable parameters; r is a radical of hydrogen ij Representing the incidence relation of edges between the pre-defined Xi nodes and the Xj nodes (the edges are vectors initialized randomly and participate in the study of the graph network); dz denotes the vector length (used for normalization); t represents transposition; alpha is alpha ij Means normalization of e with softmax function ij Zi represents the new node characterization vector after Xi has been graph learned.Representing a traversal of all nodes in the problem-pattern graph. For r ij Illustratively, the incidence relation of the edges includes four types, namely, a structural relation in a natural language query statement, a structural relation in pattern data, a pattern link relation between the query statement and the pattern data, and no incidence relation. It may be arranged, for example, in the form of a matrix by aligning the elements in the matrixThe elements are set to realize the representation of different relationships, if the association relationship of the edges is a mode link relationship, the corresponding row elements in the matrix, for example, the row element of the third row, are initialized randomly, and the elements of the other rows can be 0, and so on. However, the present invention is not limited to this, and other data structures or data forms that can participate in the above-mentioned paradigm operations and can characterize the association relationship of the edges are also applicable to the solution of the embodiments of the present application.
Through the attention mechanics learning paradigm, rich structural information of each part of data carried in the training sample can be fully learned.
The second sample token vector obtained based on this is input to a decoder, which may have a simple sequence-to-sequence model structure, or may use a Transformer decoder structure to convert the vector output from the question-pattern layer word by word to generate a corresponding sample database query statement.
Step S306: and training the semantic analysis model based on the query statement of the sample database and a preset loss function.
The loss function can be set by a person skilled in the art according to actual needs, including but not limited to a cross entropy loss function, and the like, which is not limited by the embodiments of the present application. Corresponding loss values can be obtained based on the query sentences of the sample database and a preset loss function, and parameters of the semantic analysis model can be adjusted by adopting a back propagation mode based on the loss values until a model training termination condition is reached, such as reaching a preset training frequency or reaching a preset threshold value of the loss values.
The trained semantic analysis model can process the table question and answer query request input by the user so as to convert the table question and answer query request into a corresponding database query statement.
According to the embodiment, on one hand, a table question-answer training sample comprising natural language query sentences and database mode data is used for training a semantic analysis model so as to explicitly introduce a mode link structure, so that the model learns better query sentences and mode representation, and the performance of the model is effectively improved; on the other hand, the problem-mode diagram which effectively fuses a plurality of word segmentation vectors, mode vectors and incidence relations of the word segmentation vectors and the mode vectors is used for carrying out feature enhancement on the first sample representation vector, so that the determination and judgment of mode links are more accurate, the syntax and semantic information of the table question-answer query request can be better understood, and the accuracy of converting the natural language query statement into the database query statement is improved.
Example two
Referring to fig. 4A, a flowchart illustrating steps of a method for processing form question-answer data according to a second embodiment of the present application is shown.
The present embodiment is based on the foregoing first embodiment, and focuses on the creation and training of the question-pattern diagram, and describes a table question-answer data processing method according to the embodiment of the present application.
The form question-answer data processing method of the embodiment comprises the following steps:
step S402: and obtaining a form question-answer training sample.
Wherein, the table question-answer training sample comprises: a natural language query statement and corresponding database schema data.
Step S404: and inputting the table question-answer training sample into an encoder of a semantic analysis model for encoding, and generating a first sample characterization vector.
The specific implementation of the above steps S402-S404 can refer to the related description in the first embodiment, and will not be described herein again.
Step S406: extracting a plurality of word segmentation vectors and incidence relations among the word segmentation vectors, a plurality of mode vectors and incidence relations among the word segmentation vectors and the mode vectors from a first sample representation vector through a question-mode layer; according to the word segmentation components, the mode vectors and the incidence relation, creating a problem-mode graph in a generating mode indicated by the indication information; and performing reinforcement learning on the first sample characterization vector based on the problem-pattern diagram to obtain a corresponding second sample characterization vector.
Wherein the indication information is used for indicating the generation mode of the problem-mode diagram. In the embodiment of the present application, the indication information includes: the problem-pattern graph generating method includes generating problem-pattern graphs in a single-stage mode by using a single-stage generating mode, and generating problem-pattern graphs in a two-stage mode by using a two-stage generating mode. When a single-stage generation mode is adopted, a problem-mode diagram corresponding to the first sample characterization vector can be generated at one time based on all the obtained vectors and the incidence relation; when a two-stage generation mode is adopted, vectors and incidence relations corresponding to the natural language query statement and the database pattern data can be respectively obtained, and then corresponding subproblem-pattern graphs are respectively generated (a first stage); a total problem-pattern map corresponding to the first sample token vector is then generated based on the generated sub-problem-pattern maps (second stage).
In addition, when the generation methods indicated by the indication information are different, the vectors and the association relations that are required to generate the problem-pattern diagram are also different.
Based on this, in a feasible manner, if the indication information is generated in a single stage, the extracted association relationship among the multiple participle vectors includes an association relationship used for indicating structures of the participles corresponding to the multiple participle vectors in the natural language query sentence; the incidence relations among the plurality of pattern vectors comprise incidence relations used for indicating structures of pattern items corresponding to the plurality of pattern vectors in the database pattern data; the associations between the plurality of participle vectors and the plurality of pattern vectors include associations indicating pattern links between natural language query statements to which the plurality of participle vectors correspond and database pattern data to which the plurality of pattern vectors correspond.
Illustratively, the association relationship for indicating the structure of the participles corresponding to the multiple participle vectors in the natural language query statement is also referred to as the query statement internal structure relationship, and when specifically obtaining, the vector part corresponding to the natural language query statement may be passed through a syntax parser/grammar parser to obtain an output with a syntax structure/grammar structure, and then the output structure (association relationship between participle vectors) is used as an edge between the participle vector and the participle vector in the natural language query statement (where one participle vector corresponds to one participle). The incidence relation for indicating the structure of the schema item corresponding to the plurality of schema vectors in the database schema data is also referred to as a schema internal structure relation, and when specifically obtaining, the incidence relation may be obtained based on the relation information of the database schema data itself, such as a foreign key relation in the database. The association relationship for indicating the schema link between the natural language query statement corresponding to the multiple word segmentation vectors and the database schema data corresponding to the multiple schema vectors is also referred to as the structural relationship between the query statement and the schema, i.e. the schema link relationship. The mode link is used for representing the corresponding relation between the mode item in the database mode data and the participle in the natural language query statement. When the structural relationship between the query statement and the pattern is obtained specifically, the structural relationship may be generated by a rule of complete/partial matching, for example, in a training sample "date of displaying the transcript, at least several results are displayed, and a specific school number/name/transcript date/school number/score" is listed, a participle vector corresponding to [ date of transcript ] in the natural language query statement is associated with a pattern vector corresponding to a pattern item [ date of transcript ] in pattern data, so as to generate an edge in the graph.
Based on this, creating the problem-pattern diagram in the generation manner indicated by the indication information according to the plurality of word segmentation components, the plurality of pattern vectors, and the association relationship may be implemented as: and generating indication information according to the single stage, taking the multiple word segmentation vectors and the multiple mode vectors as nodes, and taking the corresponding association relation as an edge to create a single problem-mode graph.
A process of creating a question-pattern diagram by using a single-stage generation mode is shown in fig. 4B, as can be seen from the diagram, after a form question-answer training sample "displays the date of a transcript list, displays at least several results, lists the concatenation vector corresponding to a specific school number/name/transcript list date/school number/score" and is input into an encoder, the encoder outputs the participle vector corresponding to the participle of the natural language query sentence part ("date of the transcript list displayed, at least several results displayed, and the school number of the parallel form") in the form question-answer training sample, and the pattern vector corresponding to the pattern item ("name/transcript list date/school number/score") in the database pattern data. The question-pattern layer obtains the association relationship between these vectors, which in this example includes the query statement internal structural relationship, the pattern internal structural relationship, and the structural relationship between the query statement and the pattern, based on the output of the encoder, and then creates a question-pattern diagram based on these vectors and the relationship between them, as shown in fig. 4B. Attention-boosting learning is performed based on the created problem-pattern graph, such as using the aforementioned attention-learning paradigm, and a second sample token vector (e.g., a token vector generated based on Zi obtained from the attention-learning paradigm) is output. The second sample characterization vector is then output to a decoder, through which a database query statement corresponding to the natural language query statement, i.e., an SQL statement, is output.
In another feasible mode, if the indication information is generated in two stages, the extracted association relationship among the multiple participle vectors comprises a dependency relationship used for indicating the participles corresponding to the multiple participle vectors in the natural language query statement, and the dependency relationship at least comprises a dominance-predicate relationship, a linkage relationship, a predicate-guest relationship and a mediate-guest relationship; the incidence relation among the plurality of mode vectors comprises an attribution relation and a connection relation which are used for indicating mode items corresponding to the plurality of mode vectors; the associations between the plurality of participle vectors and the plurality of pattern vectors include associations indicating pattern links between natural language query statements to which the plurality of participle vectors correspond and database pattern data to which the plurality of pattern vectors correspond.
Based on this, creating the problem-pattern diagram in the generation manner indicated by the indication information according to the plurality of word segmentation components, the plurality of pattern vectors, and the association relationship may be implemented as: generating indication information according to two stages, taking a plurality of word segmentation vectors as nodes and taking the correlation among the word segmentation vectors as edges, and creating a first subproblem-mode graph; creating a second subproblem-pattern graph by taking the plurality of pattern vectors as nodes and taking the correlation among the plurality of pattern vectors as edges; and generating a problem-mode diagram corresponding to the first sample characterization vector according to the incidence relation among the first sub-problem-mode diagram, the second sub-problem-mode diagram and the mode link.
Further optionally, the association relationship represented by each edge may be abstracted to be a preset association relationship based on the membership relationships between each node and each edge in the generated problem-pattern diagram and the first sub-problem-pattern diagram and the second sub-problem-pattern diagram, respectively. The preset association relationship may be an association relationship set by a person skilled in the art according to actual needs, but in order to facilitate model learning and training, the preset association relationship may be set as an internal structure relationship of a query statement, an internal structure relationship of a mode, and a structure relationship between the query statement and the mode.
Illustratively, for a part corresponding to a natural language query statement, performing deep-level language understanding of a syntactic structure/syntactic structure on a vector part corresponding to the natural language query statement through a syntactic parser/syntactic parser to obtain word segmentation vectors corresponding to word segmentation in the natural language query statement and association relations among the word segmentation vectors, taking the word segmentation vectors as nodes, and taking fine-grained dependency relations (dependency syntax types) among the word segmentation as edges among the nodes. The dependency relationships include at least four types of syntax types, namely, a "subject" relationship, an "linkage" relationship, a "subject" relationship, and a "mediate" relationship, and then a first sub-problem-schema graph is constructed based on the nodes and edges. Then, the expression vectors of the nodes in the first sub-problem-pattern diagram are updated by using the aforementioned attention-mechanics training paradigm.
Aiming at the part corresponding to the database mode data, for the purpose of carrying out table understanding by combining a table structure, only the mode vector corresponding to the mode item contained in the database mode data is taken as a node, and the attribution relation and the connection relation of the mode item corresponding to the mode vector are taken as edges. The attribution relation represents that the data columns corresponding to the mode items belong to a certain table name, the connection relation is represented by a foreign key relation, and the foreign key relation represents that foreign key labels exist between the two data columns corresponding to the two mode items. A second sub-problem-pattern graph is then constructed based on the nodes and edges of the portion. And, the expression vectors of the nodes in the second subproblem-pattern graph are updated using the aforementioned attention-mechanics training paradigm.
And after the first sub-problem-pattern diagram and the second sub-problem-pattern diagram are learned and updated, entering a large-diagram joint learning phase. At this stage, an overall problem-schema graph is generated using the schema linkage relationship between the natural language query statement and the database schema data. In the general problem-pattern diagram, the nodes are all nodes of the first sub-problem-pattern diagram and the second sub-problem-pattern diagram, and the edges between the nodes can be abstracted in a coarse granularity mode based on the incidence relation corresponding to the original edges and the subordinate sub-problem-pattern diagrams, and the abstraction mode is three types of the internal structure relation of the query statement, the structure relation between the query statement and the pattern, and the internal structure relation of the pattern. Through the abstract processing, the further information transmission of the two sub-graphs is facilitated, and the semantic analysis model is helped to depict a hierarchical graph structure.
A process of creating a question-pattern diagram by a two-stage generation method is shown in fig. 4C, as can be seen from the diagram, after a form question-answer training sample "displays the date of the transcript sheet, displays at least several results, lists the concatenation vector corresponding to the specific school number/name/transcript sheet date/school number/score" and is input into an encoder, the encoder outputs the participle vector corresponding to the participle of the natural language query sentence part ("date of the transcript sheet displayed, at least several results displayed, and the school number of the parallel form") in the form question-answer training sample, and the pattern vector corresponding to the pattern item ("name/transcript sheet date/school number/score") in the database pattern data. The problem-mode layer extracts the participle vector portion and the mode vector portion from the vector output by the encoder, respectively. Then, the association relationship between the participle vectors is obtained according to the participle vector part, and the dependency relationship of the participle corresponding to the participle vector in the natural language query statement is mainly used at the moment. And creating a first subproblem-pattern graph based on the word segmentation vector and the internal structural relation of the query statement. And performing attention reinforcement learning based on the created first subproblem-pattern diagram, for example, performing reinforcement learning by using the aforementioned attention learning paradigm, and outputting a learning updated participle vector. And obtaining the incidence relation between the mode vector parts according to the mode vector parts, wherein the incidence relation and the connection relation of the mode items are mainly used at the moment. Based on the pattern vector and the pattern internal structural relationship, a second sub-problem-pattern graph is created. And performing attention reinforcement learning based on the created second subproblem-pattern diagram, for example, performing reinforcement learning by using the aforementioned attention learning paradigm, and outputting a learning updated pattern vector. It should be noted that, the foregoing processing on the word vector and the processing on the pattern vector may not be in a sequential order, or may be executed in parallel.
And further, combining the first sub-question-pattern graph and the second sub-question-pattern graph based on the pattern link between the language natural query statement and the database pattern data to generate a total question-pattern graph. After the combination, the original dependency relationship in the total problem-pattern diagram is abstracted into the internal structure relationship of the query statement, and the original attribution relationship and the connection relationship are abstracted into the internal structure relationship of the pattern.
On the basis, a second sample characterization vector can be obtained based on the nodes and edges in the overall problem-pattern diagram.
In addition, in the process of creating the problem-pattern diagram in the two generation manners, in order to improve the effectiveness of generated data and the efficiency of creating the diagram, after extracting a plurality of participle components, a plurality of pattern vectors and the association relationship from the first sample expression vector, vectors without the association relationship can be filtered from the participle vectors and the plurality of pattern vectors; and creating a problem-mode diagram of the generation type indicated by the indication information according to the filtered word segmentation vectors, the mode vectors and the corresponding incidence relation.
Step S408: and inputting the second sample characterization vector into a decoder, and converting to generate a corresponding sample database query statement.
The second sample characterization vector output by the question-pattern layer is then input to a decoder, and a database query statement corresponding to the natural language query statement, i.e., an SQL statement, is output through the decoder.
Step S410: and training the semantic analysis model based on the query statement of the sample database and a preset loss function.
The loss function can be set by a person skilled in the art according to actual needs, including but not limited to a cross entropy loss function, and the like, which is not limited by the embodiments of the present application. Corresponding loss values can be obtained based on the query sentences of the sample database and a preset loss function, and parameters of the semantic analysis model can be adjusted by adopting a back propagation mode based on the loss values until a model training termination condition is reached, such as reaching a preset training frequency or reaching a preset threshold value of the loss values.
The trained semantic analysis model can process the table question and answer query request input by the user so as to convert the table question and answer query request into a corresponding database query statement.
According to the embodiment, on one hand, a table question-answer training sample comprising natural language query sentences and database mode data is used for training a semantic analysis model so as to explicitly introduce a mode link structure, so that the model learns better query sentences and mode representation, and the performance of the model is effectively improved; on the other hand, the problem-mode diagram which effectively fuses a plurality of word segmentation vectors, mode vectors and incidence relations of the word segmentation vectors and the mode vectors is used for carrying out feature enhancement on the first sample representation vector, so that the determination and judgment of mode links are more accurate, the syntax and semantic information of the table question-answer query request can be better understood, and the accuracy of converting the natural language query statement into the database query statement is improved.
EXAMPLE III
Referring to fig. 5A, a flowchart of steps of a method for processing form question-answer data according to the third embodiment of the present application is shown.
In this embodiment, the method for processing the form question-answering data in the embodiment of the present application is described with emphasis on the use of the trained semantic parsing model.
The form question-answer data processing method of the embodiment comprises the following steps:
step S502: and acquiring a first characterization vector corresponding to the table question-answer query request.
When a user needs to perform table or database based query, a table question-answer query request of a natural language is input through a corresponding interface, and a corresponding first characterization vector is generated based on the request.
For example, the semantic parsing model in the first embodiment or the second embodiment may be used, the table question-answering query request is converted into a corresponding input vector, the input vector is then input into the semantic parsing model, the input vector is encoded by an encoder of the semantic parsing model, and a corresponding first token vector is output.
Step S504: a mode vector corresponding to the first token vector is obtained by using the problem-mode diagram, and a second token vector is obtained based on the first token vector and the mode vector.
The problem-pattern graph is generated by pre-training in a generation manner indicated by the indication information, with the word segmentation vectors and the pattern vectors as nodes, and with the association relationship between the vectors as edges, in the semantic analysis model as in the first embodiment or the second embodiment.
Because the trained question-pattern graph contains a large number of nodes and edges, and the first characterization vector is a vector generated for a table question-answer query request input by a user, the first characterization vector can be input into a question-pattern graph layer in a semantic analysis model, nodes corresponding to participle vectors in the first characterization vector in the question-pattern graph are determined, and the association relationship between the participle vectors is determined to be the corresponding edges in the question-pattern graph. Then, the associated mode components and the association relationship between the mode components are determined based on the nodes and edges. Therefore, the database mode data required to be inquired by the table question-answer inquiry request can be supplemented through the question-mode diagram.
Further, based on the word segmentation vectors and the association relationship between the word segmentation vectors, the association relationship between the mode components and the mode components, and the association relationship between the word segmentation components and the mode components, the problem-mode map layer may output a second characterization vector carrying information of the vectors and the association relationship.
Step S506: and converting and generating a corresponding database query statement based on the second characterization vector.
After the second characterization vector is obtained, it may be converted to generate a corresponding SQL statement, i.e., a database query statement.
An exemplary scenario for the above process is shown in FIG. 5B, assuming the user enters a query request "show the date of the transcript, display at least several results, and have a specific school number"; the query request is input to the form question and answer system TableQA, specifically a semantic parsing model (for implementing the function of the natural language understanding part) that is first input to the TableQA in vector form, and the semantic parsing model is encoded into a first token vector by an encoder. Then, the first representation vector is input into a question-pattern layer of the semantic analysis model, and the question-pattern layer acquires word segmentation vectors corresponding to all the word segmentations and association relations among the word segmentation vectors; then, the question-pattern layer matches the participle vectors and the association between the participle vectors with the association corresponding to the participle vectors and edges of the nodes in the question-pattern graph to determine the specific corresponding part of the first representation vector in the question-pattern graph. The matched nodes are represented by black diagonal circles in the figure, and the matched association relationships are represented by black bold solid lines in the figure. Further, nodes (indicated by dotted bold dashed lines in the figure) corresponding to pattern vectors having a pattern linking relationship (indicated by dotted bold dashed lines in the figure) with the nodes and an association relationship (indicated by thin dashed lines in the figure) between the nodes are determined.
Illustratively, the pattern vector corresponding to the participle vector includes a pattern vector corresponding to the pattern item "name", a pattern vector corresponding to the pattern item "achievement date", a pattern vector corresponding to the pattern item "school number", and a pattern vector corresponding to the pattern item "score".
Based on the determined vectors and associations, the problem-pattern layer may output a second characterization vector that carries information of the vectors and associations. Further, the second token vector is input into the decoder, and is converted and output into the corresponding SQL statement by the decoder, AS shown in "SELECT score date, school number FROM score table AS T1 JOIN …" in fig. 5B.
The natural language generating part of the table question-answering system can access a corresponding database based on the SQL sentences to obtain a query result meeting the query condition, and further can generate a reply corresponding to the table question-answering query request based on the query result, and the reply can be fed back to the user.
Therefore, based on the table question-answer query request in the natural language form input by the user, the accurate SQL sentence can be output, and a basis is provided for obtaining an accurate query result.
It can be seen that, with the present embodiment, when a table question-answer query request is converted into a corresponding database query statement, not only the first token vector, which is the token vector carrying the features of the table question-answer query request, is obtained, but also the features of the first token vector are enhanced through the question-pattern diagram. Because the question-pattern diagram effectively fuses information of various word segmentation vectors, pattern vectors and incidence relations of the word segmentation vectors and the pattern vectors, the determination and judgment of the pattern links are more accurate, and syntax and semantic information of the table question-answer query request can be better understood, so that the user intention corresponding to the query request can be more accurately understood, and the accuracy of converting the table question-answer query request of natural language into a database query statement is improved.
Example four
Referring to fig. 6, a schematic structural diagram of an electronic device according to a third embodiment of the present application is shown, and the specific embodiment of the present application does not limit a specific implementation of the electronic device.
As shown in fig. 6, the electronic device may include: a processor (processor)602, a communication Interface 604, a memory 606, and a communication bus 608.
Wherein:
the processor 602, communication interface 604, and memory 606 communicate with one another via a communication bus 608.
A communication interface 604 for communicating with other electronic devices or servers.
The processor 602 is configured to execute the program 610, and may specifically execute relevant steps in the above-described table question-answer data processing method embodiment.
In particular, program 610 may include program code comprising computer operating instructions.
The processor 602 may be a CPU, or an application Specific Integrated circuit (asic), or one or more Integrated circuits configured to implement embodiments of the present application. The intelligent device comprises one or more processors which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 606 for storing a program 610. Memory 606 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 610 may be specifically configured to enable the processor 602 to execute operations corresponding to the table question and answer data processing method described in any of the foregoing method embodiments.
For specific implementation of each step in the program 610, reference may be made to corresponding steps and corresponding descriptions in units in the foregoing method embodiments, and corresponding beneficial effects are provided, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
The embodiment of the present application further provides a computer program product, which includes a computer instruction, where the computer instruction instructs a computing device to execute an operation corresponding to any one of the table question-answer data processing methods in the above multiple method embodiments.
It should be noted that, according to the implementation requirement, each component/step described in the embodiment of the present application may be divided into more components/steps, and two or more components/steps or partial operations of the components/steps may also be combined into a new component/step to achieve the purpose of the embodiment of the present application.
The above-described methods according to embodiments of the present application may be implemented in hardware, firmware, or as software or computer code storable in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk, or a magneto-optical disk, or as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the methods described herein may be stored in such software processes on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware such as an ASIC or FPGA. It will be appreciated that a computer, processor, microprocessor controller, or programmable hardware includes memory components (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code that, when accessed and executed by a computer, processor, or hardware, implements the methods described herein. Further, when a general-purpose computer accesses code for implementing the methods illustrated herein, execution of the code transforms the general-purpose computer into a special-purpose computer for performing the methods illustrated herein.
Those of ordinary skill in the art will appreciate that the various illustrative elements and method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
The above embodiments are only used for illustrating the embodiments of the present application, and not for limiting the embodiments of the present application, and those skilled in the relevant art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application, so that all equivalent technical solutions also belong to the scope of the embodiments of the present application, and the scope of patent protection of the embodiments of the present application should be defined by the claims.
Claims (11)
1. A method for processing form question-answer data comprises the following steps:
acquiring a first characterization vector corresponding to the table question-answer query request;
obtaining a mode vector corresponding to the first characterization vector by using a problem-mode graph, and obtaining a second characterization vector based on the first characterization vector and the mode vector, wherein the problem-mode graph is generated by pre-training in a generation mode indicated by indication information by taking word segmentation vectors and the mode vector as nodes and taking a correlation relationship between each vector as an edge; the mode vector is a vector corresponding to a mode item in database mode data, and the database mode data is schema data of a database;
and converting and generating a corresponding database query statement based on the second characterization vector.
2. The method of claim 1, wherein the method is performed by a semantic parsing model comprising: an encoder, problem-mode layers, and a decoder;
the method further comprises the following steps:
obtaining a form question-answer training sample, wherein the form question-answer training sample comprises: natural language query statements and corresponding database schema data;
using the table question-answer training sample to obtain a sample database query statement sequentially through the encoder, the question-pattern layer and the decoder;
and training the semantic analysis model based on the sample database query statement and a preset loss function.
3. The method of claim 2, wherein the obtaining, using the table question-answer training sample, a sample database query statement sequentially through the encoder, the question-pattern layer, and the decoder comprises:
inputting the table question-answer training sample into the encoder for encoding processing to generate a first sample characterization vector;
extracting a plurality of word segmentation vectors, association relations among the word segmentation vectors, a plurality of mode vectors, association relations among the mode vectors and association relations among the mode vectors from the first sample representation vector through the question-mode map layer; creating a problem-mode graph in a generation manner indicated by indication information according to the word segmentation vectors, the mode vectors and the incidence relation, wherein the indication information is used for indicating the generation manner of the problem-mode graph; based on the problem-mode diagram, performing reinforcement learning on the first sample characterization vector to obtain a corresponding second sample characterization vector;
and inputting the second sample characterization vector into the decoder, and converting to generate a corresponding sample database query statement.
4. The method of claim 3, wherein the indication information comprises: the problem-pattern graph generation method comprises the following steps of generating problem-pattern graph generation instruction information in a single-stage mode, and generating problem-pattern graph generation instruction information in a two-stage mode.
5. The method according to claim 4, wherein if the indication information is the single-stage generation indication information, the extracted association relations between the multiple participle vectors include an association relation used for indicating structures of the participles corresponding to the multiple participle vectors inside the natural language query statement; the incidence relations among the plurality of pattern vectors comprise incidence relations used for indicating structures of pattern items corresponding to the plurality of pattern vectors in the database pattern data; the incidence relations between the multiple word segmentation vectors and the multiple mode vectors comprise incidence relations used for indicating mode links between natural language query sentences corresponding to the multiple word segmentation vectors and database mode data corresponding to the multiple mode vectors;
the creating of the problem-pattern diagram in the generation manner indicated by the indication information according to the multiple word segmentation components, the multiple pattern vectors and the incidence relation comprises:
and generating indication information according to the single stage, taking the word segmentation vectors and the mode vectors as nodes, and taking the corresponding association relation as an edge to create a single problem-mode graph.
6. The method according to claim 4, wherein if the indication information is the two-stage generation indication information, the extracted association relationship among the multiple participle vectors includes a dependency relationship used for indicating the participles corresponding to the multiple participle vectors in the natural language query statement, and the dependency relationship at least includes a predicate relationship, an interlock relationship, a predicate-guest relationship and a predicate-guest relationship; the incidence relation among the plurality of mode vectors comprises an attribution relation and a connection relation which are used for indicating mode items corresponding to the plurality of mode vectors; the associations between the plurality of participle vectors and the plurality of pattern vectors comprise associations indicating pattern links between natural language query statements to which the plurality of participle vectors correspond and database pattern data to which the plurality of pattern vectors correspond.
7. The method of claim 6, wherein the creating a problem-pattern graph in the generation manner indicated by the indication information according to the plurality of participle components, the plurality of pattern vectors and the incidence relation comprises:
generating indication information according to the two stages, taking the word segmentation vectors as nodes and taking the correlation among the word segmentation vectors as edges, and creating a first subproblem-mode graph;
creating a second subproblem-pattern graph by taking the plurality of pattern vectors as nodes and taking the correlation among the plurality of pattern vectors as edges;
and generating a problem-pattern diagram corresponding to the first sample characterization vector according to the incidence relation among the first sub-problem-pattern diagram, the second sub-problem-pattern diagram and the pattern link.
8. The method of claim 7, wherein the method further comprises:
and abstracting the association relation represented by each edge into a preset association relation based on the generated membership relations between each node and each edge in the problem-pattern graph and the first sub-problem-pattern graph and the second sub-problem-pattern graph respectively.
9. The method according to any one of claims 3-8, wherein said performing reinforcement learning on the first sample characterization vector based on the problem-pattern diagram to obtain a corresponding second sample characterization vector comprises:
performing reinforcement learning on the first sample characterization vector based on the characterization vectors corresponding to the nodes, the characterization vectors corresponding to the edges and a preset attention mechanics paradigm in the problem-pattern diagram;
and acquiring a corresponding second sample characterization vector according to the reinforcement learning result.
10. An electronic device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the corresponding operation of the method according to any one of claims 1-9.
11. A computer storage medium having stored thereon a computer program which, when executed by a processor, carries out the method of any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210442078.3A CN114579605B (en) | 2022-04-26 | 2022-04-26 | Table question-answer data processing method, electronic equipment and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210442078.3A CN114579605B (en) | 2022-04-26 | 2022-04-26 | Table question-answer data processing method, electronic equipment and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114579605A CN114579605A (en) | 2022-06-03 |
CN114579605B true CN114579605B (en) | 2022-08-09 |
Family
ID=81784608
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210442078.3A Active CN114579605B (en) | 2022-04-26 | 2022-04-26 | Table question-answer data processing method, electronic equipment and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114579605B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116821696B (en) * | 2023-08-30 | 2023-11-24 | 腾讯科技(深圳)有限公司 | Training method, device, equipment and storage medium for form question-answer model |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021120707A1 (en) * | 2019-12-20 | 2021-06-24 | 中兴通讯股份有限公司 | Intelligent question-answering method and apparatus, computer device, and computer-readable medium |
CN113177123A (en) * | 2021-04-29 | 2021-07-27 | 思必驰科技股份有限公司 | Optimization method and system for text-to-SQL model |
WO2021184311A1 (en) * | 2020-03-19 | 2021-09-23 | 中山大学 | Method and apparatus for automatically generating inference questions and answers |
CN114020768A (en) * | 2021-10-13 | 2022-02-08 | 华中科技大学 | Construction method and application of SQL (structured query language) statement generation model of Chinese natural language |
CN114328823A (en) * | 2021-12-08 | 2022-04-12 | 阿里巴巴(中国)有限公司 | Database natural language query method and device, electronic equipment and storage medium |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5895466A (en) * | 1997-08-19 | 1999-04-20 | At&T Corp | Automated natural language understanding customer service system |
CN101377777A (en) * | 2007-09-03 | 2009-03-04 | 北京百问百答网络技术有限公司 | Automatic inquiring and answering method and system |
JP6270747B2 (en) * | 2015-01-16 | 2018-01-31 | 日本電信電話株式会社 | Question answering method, apparatus, and program |
KR101678787B1 (en) * | 2015-07-15 | 2016-12-06 | 포항공과대학교 산학협력단 | Method for automatic question-answering and apparatus therefor |
US10042921B2 (en) * | 2015-09-18 | 2018-08-07 | International Business Machines Corporation | Robust and readily domain-adaptable natural language interface to databases |
CN109815318B (en) * | 2018-12-24 | 2024-07-05 | 平安科技(深圳)有限公司 | Question answer query method, system and computer equipment in question answer system |
US11188530B2 (en) * | 2019-11-25 | 2021-11-30 | Servicenow, Inc. | Metadata-based translation of natural language queries into database queries |
US11693855B2 (en) * | 2019-12-20 | 2023-07-04 | International Business Machines Corporation | Automatic creation of schema annotation files for converting natural language queries to structured query language |
CN112447300B (en) * | 2020-11-27 | 2024-02-09 | 平安科技(深圳)有限公司 | Medical query method and device based on graph neural network, computer equipment and storage medium |
-
2022
- 2022-04-26 CN CN202210442078.3A patent/CN114579605B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021120707A1 (en) * | 2019-12-20 | 2021-06-24 | 中兴通讯股份有限公司 | Intelligent question-answering method and apparatus, computer device, and computer-readable medium |
WO2021184311A1 (en) * | 2020-03-19 | 2021-09-23 | 中山大学 | Method and apparatus for automatically generating inference questions and answers |
CN113177123A (en) * | 2021-04-29 | 2021-07-27 | 思必驰科技股份有限公司 | Optimization method and system for text-to-SQL model |
CN114020768A (en) * | 2021-10-13 | 2022-02-08 | 华中科技大学 | Construction method and application of SQL (structured query language) statement generation model of Chinese natural language |
CN114328823A (en) * | 2021-12-08 | 2022-04-12 | 阿里巴巴(中国)有限公司 | Database natural language query method and device, electronic equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
An Algorithm of Conversion Between Relational Data and Graph Schema;Ait El Mouden,Z.等;《Information Systems and Technologies to Support Learning. Proceedings of EMENA-ISTL 2018. Smart Innovation, Systems and Technologies (SIST 111)》;20191231;第594-602页 * |
基于知识库的自然语言理解;罗康琦;《中国博士学位论文全文数据库(电子期刊)》;20200615;第I138-106页 * |
Also Published As
Publication number | Publication date |
---|---|
CN114579605A (en) | 2022-06-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108563653B (en) | Method and system for constructing knowledge acquisition model in knowledge graph | |
CN111831789B (en) | Question-answering text matching method based on multi-layer semantic feature extraction structure | |
CN109815336B (en) | Text aggregation method and system | |
US8751433B2 (en) | Efficient probabilistic reasoning over semantic data | |
CN113591902A (en) | Cross-modal understanding and generating method and device based on multi-modal pre-training model | |
CN112633010A (en) | Multi-head attention and graph convolution network-based aspect-level emotion analysis method and system | |
US20150066476A1 (en) | Methods and Systems of Four Valued Analogical Transformation Operators Used in Natural Language Processing and Other Applications | |
CN108073576A (en) | Intelligent search method, searcher and search engine system | |
CN112328800A (en) | System and method for automatically generating programming specification question answers | |
CN114936287A (en) | Knowledge injection method for pre-training language model and corresponding interactive system | |
US20230153534A1 (en) | Generating commonsense context for text using knowledge graphs | |
WO2021061233A1 (en) | Inter-document attention mechanism | |
CN114579605B (en) | Table question-answer data processing method, electronic equipment and computer storage medium | |
CN116561251A (en) | Natural language processing method | |
CN115114419A (en) | Question and answer processing method and device, electronic equipment and computer readable medium | |
CN112417170B (en) | Relationship linking method for incomplete knowledge graph | |
CN111651528A (en) | Open entity relation extraction method based on generative countermeasure network | |
CN116680407A (en) | Knowledge graph construction method and device | |
CN116050523A (en) | Attention-directed enhanced common sense reasoning framework based on mixed knowledge graph | |
CN116340507A (en) | Aspect-level emotion analysis method based on mixed weight and double-channel graph convolution | |
CN113449517B (en) | Entity relationship extraction method based on BERT gated multi-window attention network model | |
Ronghui et al. | Application of Improved Convolutional Neural Network in Text Classification. | |
CN115203388A (en) | Machine reading understanding method and device, computer equipment and storage medium | |
Banerjee et al. | Natural language querying and visualization system | |
CN117575026B (en) | Large model reasoning analysis method, system and product based on external knowledge enhancement |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |