CN114490709B - Text generation method and device, electronic equipment and storage medium - Google Patents

Text generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114490709B
CN114490709B CN202111626289.4A CN202111626289A CN114490709B CN 114490709 B CN114490709 B CN 114490709B CN 202111626289 A CN202111626289 A CN 202111626289A CN 114490709 B CN114490709 B CN 114490709B
Authority
CN
China
Prior art keywords
query
clauses
target
processed
text
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
Application number
CN202111626289.4A
Other languages
Chinese (zh)
Other versions
CN114490709A (en
Inventor
吴锟
王丽杰
常月
肖欣延
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111626289.4A priority Critical patent/CN114490709B/en
Publication of CN114490709A publication Critical patent/CN114490709A/en
Application granted granted Critical
Publication of CN114490709B publication Critical patent/CN114490709B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • G06F16/2445Data retrieval commands; View definitions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2452Query translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a text generation method, a text generation device, electronic equipment and a storage medium, and relates to the technical field of artificial intelligence, in particular to the technical field of deep learning and natural language processing. The specific implementation scheme is as follows: receiving a sentence to be processed, obtaining a plurality of query clauses, adopting the query clauses to analyze the sentence to be processed respectively to obtain a plurality of query elements, and generating a target query text according to the query clauses and combining the corresponding query elements. Therefore, the processing efficiency of analyzing the sentences to be processed can be improved to a great extent, and the generation accuracy of the target query text is ensured, and meanwhile, the generation efficiency of the target query text is effectively improved.

Description

Text generation method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of artificial intelligence technologies, and in particular, to the field of deep learning and natural language processing, and in particular, to a text generation method and apparatus, an electronic device, and a storage medium.
Background
Artificial intelligence is the subject of research that makes computers simulate some human mental processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), both at the hardware level and at the software level. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning technology, a deep learning technology, a big data processing technology, a knowledge map technology and the like.
In the related art, a sequence-to-set or sequence-to-sequence method is usually adopted, and keywords in a sequence are sequentially output in a sequential decoding manner to realize generation of a query text.
Disclosure of Invention
The disclosure provides a text generation method, a text generation device, an electronic device, a storage medium and a computer program product.
According to a first aspect of the present disclosure, there is provided a text generation method, including: receiving a statement to be processed to obtain a plurality of query clauses; analyzing the sentence to be processed by adopting the plurality of query clauses respectively to obtain a plurality of query elements; and generating a target query text according to the plurality of query clauses and the plurality of corresponding query elements.
According to a second aspect of the present disclosure, there is provided a text generation apparatus including: the receiving module is used for receiving the statement to be processed; an obtaining module, configured to obtain a plurality of query clauses; the analysis module is used for adopting the plurality of query clauses to analyze the statement to be processed respectively to obtain a plurality of query elements; and the generating module is used for generating a target query text according to the plurality of query clauses and the plurality of corresponding query elements.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to perform the text generation method of the embodiments of the first aspect of the present disclosure.
According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the text generation method of the first aspect of the present disclosure is provided.
According to a fifth aspect of the present disclosure, a computer program product is presented, comprising a computer program which, when executed by a processor, implements the text generation method of an embodiment of the first aspect of the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a query clause structure in an embodiment of the present disclosure;
FIG. 3 is a schematic diagram according to a second embodiment of the present disclosure;
FIG. 4 is a schematic diagram according to a third embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a parallel decoding flow in an embodiment of the present disclosure;
FIG. 6 is a schematic diagram according to a fourth embodiment of the present disclosure;
FIG. 7 is a schematic diagram according to a fifth embodiment of the present disclosure;
FIG. 8 shows a schematic block diagram of an example electronic device that may be used to implement the text generation method of embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram according to a first embodiment of the present disclosure.
It should be noted that an execution subject of the text generation method of this embodiment is a text generation apparatus, the apparatus may be implemented by software and/or hardware, the apparatus may be configured in an electronic device, and the electronic device may include, but is not limited to, a terminal, a server, and the like.
The disclosed embodiment relates to the technical field of artificial intelligence, in particular to the technical field of deep learning and natural language processing.
Wherein, artificial Intelligence (Artificial Intelligence), english is abbreviated as AI. The method is a new technical science for researching and developing theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.
Deep learning is to learn the intrinsic rules and expression levels of sample data, and the information obtained in the learning process is helpful to the interpretation of data such as characters, images and sounds. The final goal of deep learning is to make a machine capable of human-like analytical learning, and to recognize data such as characters, images, and sounds.
Natural Language Processing (NLP), i.e. computer science, artificial intelligence, linguistics focus on the field of interaction between computer and human (Natural) Language. The language is used as the object, the natural language is analyzed, understood and processed by computer technology, namely, the computer is used as a language research tool, the research processing of quantifying the language information is carried out under the support of the computer, and language description which can be commonly used between people and the computer is provided.
As shown in fig. 1, the text generation method includes:
s101: receiving a statement to be processed.
The to-be-processed statement refers to a natural language statement to be generated by performing text query on the to-be-processed statement, and the to-be-processed statement may be a natural language query statement raised for a database of given constituent elements.
In the embodiment of the present disclosure, when receiving a statement to be processed, a data acquisition device may be configured on a text generation device in advance, the data acquisition device is used to acquire a natural language statement to be generated by querying a text of the statement to be processed as the statement to be processed, and the data acquisition device is used to acquire pattern constituent elements such as column names of a database corresponding to the statement to be processed.
In other embodiments, a data transmission interface may be further configured on the text generation device, the natural language sentence generated by querying the text to be processed is received as the sentence to be processed through the data transmission interface, and the database schema component element corresponding to the sentence to be processed is received, or any other possible manner may be adopted to obtain the sentence to be processed, which is not limited herein.
S102: a plurality of query clauses are obtained.
The query clause refers to a grammar rule set for a sentence structure of a structured query language, and the structured query sentence may be split into a plurality of query clauses according to the grammar rule of the structured query language, WHERE the plurality of query clauses may be, for example, a SELECT query clause, a WHERE query clause, a GROUP query clause, an ORDER query clause, an IEU query clause, and a FROM query clause.
After receiving the statement to be processed and acquiring the database composition pattern element corresponding to the statement to be processed, the embodiment of the disclosure may acquire a plurality of query clauses.
In the embodiment of the present disclosure, when a plurality of query clauses are obtained, a query sentence may be structurally split according to a sentence structure of a structured query language to obtain a plurality of query clause keywords after the splitting processing and a clause generating formula corresponding to the plurality of query clause keywords, and then the obtained plurality of query clause keywords and the clause generating formula corresponding to the plurality of query clause keywords are used as the obtained plurality of query clauses.
For example, as shown in fig. 2, fig. 2 is a schematic diagram of a Query clause structure in the embodiment of the present disclosure, when a plurality of Query clauses are obtained, a sentence structure of a Structured Query Language may be split to obtain a SELECT Query clause, a WHERE Query clause, a GROUP Query clause, an ORDER Query clause, an IEU Query clause, and a FROM Query clause 6 Query clauses, and a production formula corresponding to the 6 Query clauses is obtained, WHERE in a syntax rule of the production formula, a None represents that there is no Query clause in a Query sentence, for example, for a SELECT clause, a SELECT agg represents that only one Query element needs to be listed in the Structured Query sentence, and a agg represents that two elements need to be listed in a Structured Query Language (Structured Query Language, SQL), and the other syntax rules are analogized, and then the obtained Query clause and the production formula corresponding to a keyword of the Query clause and the Query clause may be used as the obtained Query clause.
S103: and analyzing the sentences to be processed by adopting a plurality of query clauses to obtain a plurality of query elements.
The query element refers to a query keyword for generating a target query text, and the query element may be, for example, a query clause keyword, or may be an element keyword such as a column name of a database, and other elements such as other query sentence identification words, which is not limited herein.
After receiving the to-be-processed sentence and the plurality of query clauses, the embodiments of the present disclosure may analyze the to-be-processed sentence by using the plurality of query clauses, respectively, to obtain a plurality of query elements.
In this disclosure, when the to-be-processed sentences are respectively analyzed by using the multiple query clauses, the to-be-processed sentences may be input into the neural network model, the to-be-processed sentences may be analyzed according to the syntax structures of the multiple query clauses to obtain query keywords corresponding to the to-be-processed sentences and the syntax structures of the multiple query clauses, and the obtained query keywords are used as query elements to realize that the to-be-processed sentences are respectively analyzed by using the multiple query clauses to obtain the multiple query elements.
For example, the to-be-processed sentence may be input into the neural network model, the to-be-processed sentence in the natural language and the corresponding database constituent element are aligned and mapped, for example, an entity word corresponding to the database table may be extracted from the to-be-processed sentence, or a query clause category such as a selection condition or a clustering operation triggered by the to-be-processed sentence may be extracted from the to-be-processed sentence, and then an output result of the neural network processing model is used as a plurality of query elements, or the to-be-processed sentence may be respectively parsed by using a plurality of query clauses in any other possible manner, so as to obtain a plurality of query elements, which is not limited herein.
S104: and generating a target query text according to the plurality of query clauses and the corresponding plurality of query elements.
The target query text refers to a query sentence text which can be used for obtaining a corresponding database query result.
In the embodiment of the disclosure, when a target query text is generated by combining a plurality of corresponding query elements according to a plurality of query clauses, a target query text identifier may be preset to identify a decoding processing start position of the target query text, and then, according to the target query text identifier, a decoder may be used to perform parallel decoding processing on the plurality of corresponding query elements according to the plurality of query clauses to obtain a plurality of decoded query clause texts corresponding to a sentence to be processed, and then, the plurality of decoded query clause texts may be subjected to splicing processing according to a query language grammar rule to obtain a spliced query text as the target query text.
In other embodiments, the target query text identifier may be preset, the target query text identifier is used as a root node of a syntax tree, a decoder is used to combine a plurality of corresponding query elements according to a plurality of query clauses, the syntax tree corresponding to the target query text is constructed from top to bottom from the root node of the syntax tree, then traversal operation is performed on the syntax tree according to a syntax tree precedence traversal algorithm, so as to generate a query keyword sequence corresponding to the query sentence text according to the plurality of query clauses and the corresponding plurality of query elements, and then the corresponding target query text is generated according to the query keyword sequence, or any other possible manner may be adopted to combine a plurality of corresponding query elements according to the plurality of query clauses, so as to generate the target query text, which is not limited.
In the embodiment, the sentence to be processed is received, the plurality of query clauses are obtained, the sentence to be processed is analyzed by the plurality of query clauses respectively to obtain the plurality of query elements, and the target query text is generated according to the plurality of query clauses in combination with the corresponding plurality of query elements, so that the processing efficiency of analyzing the sentence to be processed can be improved to a greater extent, and the generation accuracy of the target query text is ensured, and meanwhile, the generation efficiency of the target query text is effectively improved.
Fig. 3 is a schematic diagram according to a second embodiment of the present disclosure.
As shown in fig. 3, the text generation method includes:
s301: receiving a statement to be processed.
For the description of S301, reference may be made to the above embodiments, which are not described herein again.
S302: an initial query term is determined.
The initial query term refers to a query term at a decoding start position when parallel decoding processing is performed on a to-be-processed sentence, and the initial query term may be used to identify the decoding processing start position of the corresponding to-be-processed sentence, and may be set as a root node of a syntax tree, for example.
In the embodiment of the present disclosure, when determining the initial query term, a query identifier may be set to identify a starting position of decoding processing on a to-be-processed sentence, where the query identifier may be used as the initial query term, and may also be set to use a root node of a syntax tree as the initial syntax term, or may determine the initial query term in any other possible manner, which is not limited thereto.
S303: a plurality of initial query clauses are obtained.
The initial query clause is a query clause obtained by disassembling the structured query sentence according to the grammatical rules of the structured query language.
In the embodiment of the present disclosure, when a plurality of initial query statements are obtained, the structured query statements may be decomposed according to syntax rules of the structured query, so as to obtain a plurality of query clauses after the decomposition processing as a plurality of obtained initial query clauses.
Optionally, in some embodiments, when a plurality of initial query sentences are obtained, a plurality of intermediate query words related to the structured query sentence may be determined, and the structured query sentence is disassembled according to the plurality of intermediate query words to obtain a plurality of initial query clauses, so that the structured query sentence is disassembled according to the intermediate query words to obtain a plurality of initial query clauses.
The intermediate query term refers to a query keyword for identifying a query clause, and the intermediate query term may be used to perform parsing on a structured query statement, and the intermediate query term may be, for example, a structured language query keyword such as SELECT, WHERE, and GROUP.
In the embodiment of the present disclosure, when a plurality of initial query statements are obtained, a plurality of intermediate query terms related to a structured query statement may be determined, query keywords used for parsing the structured query statement, such as SELECT, WHERE, and GROUP, may be obtained as the intermediate query terms, and then, the structured query statement may be parsed according to the plurality of intermediate query terms, so as to parse the structured query statement into a plurality of initial query clauses.
After the structured query statement is disassembled according to the intermediate query terms to obtain the initial query clauses, the initial query clauses can be respectively processed according to the initial query terms to obtain the query clauses, and the subsequent embodiments are particularly shown.
S304: and respectively processing the plurality of initial query clauses according to the initial query words to obtain a plurality of query clauses.
After the structured query statement is disassembled according to the intermediate query terms to obtain the initial query clauses, the initial query clauses can be respectively processed according to the initial query terms to obtain the query clauses.
In this embodiment of the present disclosure, when the plurality of initial query clauses are processed according to the initial query term to obtain the plurality of query clauses, the plurality of initial query clauses may be processed into the plurality of query clauses that can be used for parsing the to-be-processed sentence according to the initial query term, and the plurality of processed initial query clauses are used as the plurality of query clauses.
In the embodiment, the initial query words are determined, the plurality of initial query clauses are obtained, and the plurality of initial query clauses are respectively processed according to the initial query words to obtain the plurality of query clauses, so that the structured query sentences can be processed according to the initial query words to obtain the plurality of query clauses.
S305: and acquiring a plurality of grammar rules respectively corresponding to the plurality of query clauses, wherein the grammar rules respectively comprise a plurality of element marks.
The grammar rule is used for querying query elements which need to be contained in the structured query statement of the clause, the query elements can form a mapping relation with the query elements in the statement to be processed, and the query elements in the statement to be processed can be database composition elements such as column names of a database table.
The element mark is a mark which is mapped with the query clause and the query element in the statement to be processed one by one.
In the embodiment of the present disclosure, when obtaining the plurality of syntax rules corresponding to the plurality of query clauses, the query generator corresponding to the plurality of query clauses may be obtained according to the intermediate query terms corresponding to the plurality of query clauses, where the obtained plurality of query generator include a plurality of element tags, respectively, and the query generator including the plurality of element tags is used as the plurality of syntax rules corresponding to the plurality of query clauses, respectively.
S306: and carrying out semantic parsing processing on the statement to be processed to obtain a plurality of candidate semantic fields.
The candidate semantic field refers to a field which can form a mapping relation with the grammar rule of the structured query statement and the constituent elements of the database in the statement to be processed.
After the to-be-processed sentence is obtained, the semantic parsing processing may be performed on the to-be-processed sentence to obtain a plurality of candidate semantic fields.
In the embodiment of the disclosure, when performing semantic parsing on a to-be-processed sentence to obtain a plurality of candidate semantic fields, a neural network processing model with a semantic parsing function may be trained in advance, the to-be-processed sentence is input into the neural network processing model, the to-be-processed sentence is subjected to semantic parsing by using the neural network processing model to obtain a plurality of semantic fields output by the neural network processing model, and the plurality of semantic fields output by the neural network model are used as a plurality of candidate semantic fields corresponding to the to-be-processed sentence.
S307: and selecting a plurality of target semantic fields which are respectively matched with the element labels from the candidate semantic fields, and taking the target semantic fields as a plurality of query elements.
The target semantic field refers to a semantic field which can be matched with an element tag in the grammar rule, and the target semantic field can be used as a query element for generating a target query text.
After the semantic parsing processing is performed on the to-be-processed sentence to obtain a plurality of candidate semantic fields, a plurality of target semantic fields respectively matched with the plurality of element tags may be selected from the plurality of candidate semantic fields.
In the embodiment of the present disclosure, when a plurality of target semantic fields respectively matched with a plurality of element tags are selected from a plurality of candidate semantic fields, traversal processing may be performed on the plurality of candidate semantic fields, and a semantic matching model is used to perform matching processing on the plurality of candidate semantic fields and the plurality of element tags, so as to select a plurality of target semantic fields respectively matched with the plurality of element tags, and use the plurality of target semantic fields as a plurality of query elements.
In the embodiment, a plurality of grammar rules respectively corresponding to a plurality of query clauses are obtained, wherein the grammar rules respectively comprise a plurality of element tags, semantic parsing processing is performed on a sentence to be processed to obtain a plurality of candidate semantic fields, a plurality of target semantic fields respectively matched with the element tags are selected from the candidate semantic fields and are used as a plurality of query elements, so that semantic parsing coding processing can be performed on the sentence to be processed, the candidate semantic fields matched with the element tags in the grammar rules are selected as the query elements to be used for generating the target query text, and therefore the legality of the generated target query text on the grammar rules can be guaranteed, and the accuracy of the generated target query text is guaranteed.
S308: and generating a target query text according to the plurality of query clauses and the corresponding plurality of query elements.
For an example, the description of S308 may refer to the above embodiments, which are not described herein again.
In the embodiment, a plurality of initial query clauses are obtained by determining an initial query word, the plurality of initial query clauses are respectively processed according to the initial query word to obtain a plurality of query clauses, so that a structured query sentence can be processed according to the initial query word to obtain a plurality of query clauses, and the initial query word is a starting point for decoding the sentence to be processed, so that the plurality of processed query clauses can be ensured to share the initial query word, the parallel decoding processing of the sentence to be processed is realized, the decoding processing efficiency is effectively improved, by obtaining a plurality of syntax rules respectively corresponding to the plurality of query clauses, wherein the plurality of syntax rules respectively comprise a plurality of element marks, the semantic parsing processing is performed on the sentence to be processed to obtain a plurality of candidate semantic fields, the plurality of target semantic fields respectively matched with the plurality of element marks are selected from the plurality of candidate semantic fields, the plurality of target semantic fields are used as a plurality of query elements, so that the semantic fields matched with the element marks in the plurality of candidate semantic fields are selected to be used for generating semantic query elements, and the target text query rules on the semantic can be generated.
Fig. 4 is a schematic diagram according to a third embodiment of the present disclosure.
As shown in fig. 4, the text generation method includes:
s401: receiving a statement to be processed.
For the description of S401, reference may be made to the above embodiments, which are not described herein again.
S402: a target database is determined, wherein the target database has a target schema.
The target database refers to a database to be subjected to data query of the generated target query text.
The target database has a target schema, the target schema of the target database refers to an object set of the database, and the object set of the database may be, for example, a database table, a view, a storage process, a storage index, and the like of the database.
In the embodiment of the disclosure, when the target database is determined, the database to be subjected to data query by the target query statement generated corresponding to the sentence to be processed may be determined according to the sentence to be processed, and the database to be subjected to data query by the target query statement may be used as the target database.
After the target database is determined, the database mode corresponding to the target database may be obtained, and the corresponding database mode is used as the target database mode, and the target database mode may be used to determine the structured query statement matched with the target mode, which may be seen in subsequent embodiments.
S403: a structured query statement that matches the target pattern is determined.
In the embodiment of the disclosure, after the target database and the target pattern corresponding to the target database are determined, a structured query statement matching the target pattern may be determined.
In the embodiment of the present disclosure, when determining the structured query statement matched with the target pattern, the structured query statement matched with the target pattern may be determined according to information such as a database view and a storage index of a target database in the target pattern, and the obtained structured query statement is used as the structured query statement matched with the target pattern.
S404: and analyzing the structured query statement to obtain the initial query word.
After the structured query statement matching the target pattern is determined, the starting query word may be obtained by parsing from the structured query statement.
In the embodiment of the present disclosure, when the initial query term is obtained by parsing from the structured query statement, the structured query statement may be parsed, an initial syntax term that can be used to identify the query clause is selected from the structured query statement, and the selected initial syntax that can identify the query clause is used as the initial query term.
In the embodiment, the target database is determined, wherein the target database has a target pattern, the structured query statement matched with the target pattern is determined, and the initial query term is obtained by analyzing the structured query statement, so that the initial query term can be obtained by analyzing the structured query statement matched with the target pattern of the target database, the initial query term can be accurately obtained in a targeted manner, and the query accuracy of the target query text during data query can be improved in an auxiliary manner.
S405: a plurality of initial query clauses are obtained.
For description of S405, reference may be made to the above embodiments, which are not described herein again.
S406: and splicing the initial query word and the corresponding plurality of initial query clauses to obtain a plurality of query clauses.
After the plurality of initial query clauses are obtained and the initial query term is obtained by analyzing the structured query sentence, the initial query term and the corresponding plurality of initial query clauses may be spliced to obtain the spliced plurality of initial query clauses, and the spliced plurality of initial query clauses are used as the plurality of query clauses.
In this embodiment, the initial query word and the corresponding plurality of initial query clauses are spliced to obtain the plurality of query clauses, so that the initial query word and the corresponding query clauses can be spliced to obtain the query clauses, the query clauses of the structured query sentence with the complete syntactic structure can be obtained, and the decoding correctness when the query sentence is used for decoding the sentence to be processed can be ensured.
S407: and respectively calling a plurality of query clauses to analyze the to-be-processed statement by adopting a parallel processing mode to obtain a plurality of query elements.
In the embodiment of the present disclosure, after the initial query term and the corresponding plurality of initial query clauses are spliced to obtain the plurality of query clauses, the plurality of query clauses may be respectively invoked to analyze the to-be-processed sentence in a parallel processing manner to obtain the plurality of query elements.
In the embodiment of the disclosure, a plurality of query clauses are respectively called in a parallel processing manner to analyze a to-be-processed statement to obtain a plurality of query elements, a decoder can be used for calling the plurality of query clauses simultaneously to perform decoding processing on the to-be-processed statement according to an initial query word in the plurality of query clauses to obtain query elements such as a plurality of query keywords corresponding to the to-be-processed statement output by the decoder, and an output result of the decoder is used as the plurality of query elements obtained after the to-be-processed statement is analyzed.
For example, as shown in fig. 5, fig. 5 is a schematic diagram of a parallel decoding flow in the embodiment of the present disclosure, when a plurality of query clauses are respectively called in a parallel processing manner to analyze a to-be-processed statement, a SELECT query clause, a WHERE query clause, a GROUP query clause, an ORDER query clause, an IEU query clause, and a FROM query clause may be simultaneously called, and 6 query clauses share an initial query word and are used to perform parallel decoding processing on the to-be-processed statement by using a decoder, so as to obtain an output result of the decoder as a plurality of query elements obtained after the to-be-processed statement is analyzed.
In the embodiment, the plurality of query clauses are respectively called to analyze the to-be-processed sentence by adopting a parallel processing mode to obtain the plurality of query elements, so that the plurality of query clauses can be respectively called to analyze the to-be-processed sentence by adopting the parallel processing mode, and the plurality of query clauses can share the initial query word to analyze the to-be-processed sentence, so that the time consumption in the decoding processing process can be reduced to a greater extent, the decoding processing efficiency is effectively improved, and the generation efficiency of the target query text is assisted to be improved.
S408: and generating a target query text according to the plurality of query clauses and the corresponding plurality of query elements.
For an example, the description of S408 may refer to the above embodiments, which are not described herein again.
In the embodiment, the target database is determined, wherein the target database has a target mode, the structured query sentence matched with the target mode is determined, the initial query word is analyzed from the structured query sentence, so that the initial query word can be analyzed and obtained aiming at the structured query sentence matched with the target mode of the target database, the initial query word can be accurately and pertinently obtained, the query accuracy of the target query text in data query can be improved in an auxiliary mode, the initial query word and the corresponding multiple initial query clauses are spliced to obtain the multiple query clauses, the initial query word and the corresponding query clauses can be spliced to obtain the query clauses, the query clauses of the structured query sentence with a complete syntactic structure can be obtained, the decoding correctness of the query sentence when the query sentence is decoded can be ensured, the multiple query clauses are respectively called in a parallel processing mode to be analyzed to obtain the multiple query elements, the multiple query clauses to be processed can be called in a parallel processing mode to be analyzed, the decoding efficiency of the multiple query clauses to be shared, and the effective decoding efficiency of the target query sentence can be improved.
Fig. 6 is a schematic diagram according to a fourth embodiment of the present disclosure.
As shown in fig. 6, the text generating apparatus 60 includes:
a receiving module 601, configured to receive a statement to be processed;
an obtaining module 602, configured to obtain a plurality of query clauses;
the parsing module 603 is configured to parse the to-be-processed sentence respectively by using a plurality of query clauses to obtain a plurality of query elements; and
and a generating module 604, configured to generate a target query text according to the plurality of query clauses in combination with the corresponding plurality of query elements.
In some embodiments of the present disclosure, as shown in fig. 7, fig. 7 is a schematic diagram according to a fifth embodiment of the present disclosure, and the text generation apparatus 70 includes: the receiving module 701, the obtaining module 702, the analyzing module 703, and the generating module 704, wherein the analyzing module 703 is specifically configured to:
and respectively calling a plurality of query clauses to analyze the to-be-processed statement by adopting a parallel processing mode to obtain a plurality of query elements.
In some embodiments of the present disclosure, among others, the parsing module 703 includes:
a first obtaining sub-module 7031, configured to obtain a plurality of syntax rules corresponding to the plurality of query clauses, where the syntax rules include a plurality of element labels;
the parsing submodule 7032 is configured to perform semantic parsing on the to-be-processed sentence to obtain a plurality of candidate semantic fields; and
the first processing sub-module 7033 is configured to select a plurality of target semantic fields respectively matched with the plurality of element tags from the plurality of candidate semantic fields, and use the plurality of target semantic fields as a plurality of query elements.
In some embodiments of the present disclosure, the obtaining module 702 includes:
a determining sub-module 7021 for determining an initial query term;
a second obtaining sub-module 7022, configured to obtain a plurality of initial query clauses; and
and a second processing sub-module 7023, configured to process the multiple initial query clauses according to the initial query term, respectively, to obtain multiple query clauses.
In some embodiments of the present disclosure, among others, the second processing sub-module 7022 is specifically configured to:
and splicing the initial query word and the corresponding plurality of initial query clauses to obtain a plurality of query clauses.
In some embodiments of the present disclosure, the determining sub-module 7021 is specifically configured to:
determining a target database, wherein the target database has a target pattern;
determining a structured query statement matched with a target pattern;
and analyzing the structured query statement to obtain the initial query word.
In some embodiments of the present disclosure, the second obtaining sub-module 7022 is further configured to:
determining a plurality of intermediate query terms related to the structured query statement;
and carrying out disassembly processing on the structured query sentence according to the intermediate query words to obtain a plurality of initial query clauses.
It is understood that the text generating device 70 in fig. 7 of this embodiment and the text generating device 60 in the foregoing embodiment, the receiving module 701 and the receiving module 601 in the foregoing embodiment, the obtaining module 702 and the obtaining module 602 in the foregoing embodiment, the parsing module 703 and the parsing module 603 in the foregoing embodiment, and the generating module 704 and the generating module 604 in the foregoing embodiment may have the same functions and structures.
It should be noted that the explanation of the text generation method is also applicable to the text generation apparatus of the present embodiment, and is not repeated herein.
In this embodiment, a target query text is generated by receiving a sentence to be processed, obtaining a plurality of query clauses, analyzing the sentence to be processed by using the plurality of query clauses to obtain a plurality of query elements, and combining the plurality of query clauses with the corresponding plurality of query elements. Therefore, the processing efficiency of analyzing the sentence to be processed can be improved to a great extent, and the generation efficiency of the target query text is effectively improved while the generation accuracy of the target query text is ensured.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 8 illustrates a schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the apparatus 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The calculation unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
A number of components in the device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, a mouse, or the like; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, or the like; and a communication unit 809 such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Computing unit 801 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and the like. The calculation unit 801 executes the respective methods and processes described above, such as the text generation method. For example, in some embodiments, the text generation method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and/or installed onto device 800 via ROM 802 and/or communications unit 809. When loaded into RAM 803 and executed by computing unit 801, a computer program may perform one or more steps of the text generation method described above. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the text generation method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (8)

1. A text generation method, comprising:
receiving a statement to be processed;
obtaining a plurality of query clauses;
analyzing the sentence to be processed by adopting the plurality of query clauses respectively to obtain a plurality of query elements; and
generating a target query text according to the plurality of query clauses and the corresponding plurality of query elements;
wherein the obtaining a plurality of query clauses comprises:
determining an initial query word, wherein the initial query word refers to a query word at a decoding start position when parallel decoding processing is performed on a sentence to be processed;
determining a plurality of intermediate query terms related to a structured query sentence, and performing disassembly processing on the structured query sentence according to the intermediate query terms to obtain a plurality of initial query clauses, wherein the intermediate query terms are query keywords for identifying the query clauses;
splicing the initial query word and the plurality of corresponding initial query clauses to obtain a plurality of query clauses; wherein, the analyzing the sentence to be processed by the plurality of query clauses to obtain a plurality of query elements includes: respectively calling the plurality of query clauses in a parallel processing mode to analyze the statement to be processed to obtain a plurality of query elements;
generating a target query text by combining the plurality of query clauses with the corresponding plurality of query elements, comprising:
presetting a target query text identifier, according to the target query text identifier, performing parallel decoding processing on a plurality of corresponding query elements by using a decoder according to a plurality of query clauses to obtain a plurality of decoded query clause texts corresponding to the to-be-processed sentence, and splicing the plurality of query clause texts according to a query language grammar rule to obtain a spliced query text serving as the target query text, wherein the target query text identifier is used for identifying the decoding processing initial position of the target query text.
2. The method of claim 1, wherein the parsing the to-be-processed sentence using the plurality of query clauses, respectively, to obtain a plurality of query elements comprises:
obtaining a plurality of grammar rules respectively corresponding to the plurality of query clauses, wherein the grammar rules respectively comprise a plurality of element marks;
performing semantic parsing processing on the statement to be processed to obtain a plurality of candidate semantic fields; and
and selecting a plurality of target semantic fields which are respectively matched with the element marks from the plurality of candidate semantic fields, and taking the plurality of target semantic fields as the plurality of query elements.
3. The method of claim 1, wherein the determining a starting query term comprises:
determining a target database, wherein the target database has a target pattern;
determining a structured query statement matching the target pattern;
and analyzing the structured query statement to obtain the initial query word.
4. A text generation apparatus comprising:
the receiving module is used for receiving the statement to be processed;
an obtaining module, configured to obtain a plurality of query clauses;
the analysis module is used for analyzing the statement to be processed by adopting the plurality of query clauses to obtain a plurality of query elements; and
the generating module is used for generating a target query text according to the plurality of query clauses and the plurality of corresponding query elements;
wherein, the analyzing the sentence to be processed by adopting the plurality of query clauses to obtain a plurality of query elements comprises: respectively calling the plurality of query clauses to analyze the statement to be processed in a parallel processing mode to obtain a plurality of query elements;
wherein, the obtaining module includes:
the determining submodule is used for determining an initial query word, wherein the initial query word refers to a query word at a decoding starting position when parallel decoding processing is carried out on a sentence to be processed;
the second obtaining sub-module is used for determining a plurality of intermediate query terms related to the structured query sentence, and performing disassembly processing on the structured query sentence according to the intermediate query terms to obtain a plurality of initial query clauses, wherein the intermediate query terms are query keywords used for identifying the query clauses; and
the second processing sub-module is used for splicing the initial query word and the corresponding plurality of initial query clauses to obtain a plurality of query clauses;
generating a target query text by combining the plurality of query clauses with the corresponding plurality of query elements, comprising:
presetting a target query text identifier, according to the target query text identifier, utilizing a decoder to perform parallel decoding processing on a plurality of corresponding query elements according to a plurality of query clauses to obtain a plurality of decoded query clause texts corresponding to the sentence to be processed, and splicing the plurality of query clause texts according to a query language grammar rule to obtain a spliced query text serving as the target query text, wherein the target query text identifier is used for identifying the decoding processing initial position of the target query text.
5. The apparatus of claim 4, wherein the parsing module comprises:
a first obtaining sub-module, configured to obtain a plurality of syntax rules corresponding to the plurality of query clauses, where the syntax rules include a plurality of element labels, respectively;
the parsing submodule is used for carrying out semantic parsing processing on the statement to be processed to obtain a plurality of candidate semantic fields; and
and the first processing submodule is used for selecting a plurality of target semantic fields which are respectively matched with the plurality of element marks from the plurality of candidate semantic fields and using the plurality of target semantic fields as the plurality of query elements.
6. The apparatus according to claim 4, wherein the determination submodule is specifically configured to:
determining a target database, wherein the target database has a target pattern;
determining a structured query statement matching the target pattern;
and analyzing the structured query statement to obtain the initial query word.
7. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-3.
8. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-3.
CN202111626289.4A 2021-12-28 2021-12-28 Text generation method and device, electronic equipment and storage medium Active CN114490709B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111626289.4A CN114490709B (en) 2021-12-28 2021-12-28 Text generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111626289.4A CN114490709B (en) 2021-12-28 2021-12-28 Text generation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114490709A CN114490709A (en) 2022-05-13
CN114490709B true CN114490709B (en) 2023-03-24

Family

ID=81495982

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111626289.4A Active CN114490709B (en) 2021-12-28 2021-12-28 Text generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114490709B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115497477A (en) * 2022-09-09 2022-12-20 平安科技(深圳)有限公司 Voice interaction method, voice interaction device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491561A (en) * 2017-09-25 2017-12-19 北京航空航天大学 A kind of urban transportation heterogeneous data integrated system and method based on body
CN110515973A (en) * 2019-08-30 2019-11-29 上海达梦数据库有限公司 A kind of optimization method of data query, device, equipment and storage medium
CN111984674A (en) * 2020-09-02 2020-11-24 深圳壹账通智能科技有限公司 Method and system for generating structured query language

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8005828B2 (en) * 2008-02-05 2011-08-23 Yahoo! Inc. Learning query rewrite policies
US10909139B2 (en) * 2018-06-13 2021-02-02 Microsoft Technology Licensing, Llc SQL query formatting by examples
CN111159330B (en) * 2018-11-06 2023-06-20 阿里巴巴集团控股有限公司 Database query statement generation method and device
CN112506949B (en) * 2020-12-03 2023-07-25 北京百度网讯科技有限公司 Method, device and storage medium for generating structured query language query statement
CN113609158A (en) * 2021-08-12 2021-11-05 国家电网有限公司大数据中心 SQL statement generation method, device, equipment and medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491561A (en) * 2017-09-25 2017-12-19 北京航空航天大学 A kind of urban transportation heterogeneous data integrated system and method based on body
CN110515973A (en) * 2019-08-30 2019-11-29 上海达梦数据库有限公司 A kind of optimization method of data query, device, equipment and storage medium
CN111984674A (en) * 2020-09-02 2020-11-24 深圳壹账通智能科技有限公司 Method and system for generating structured query language

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Impact of intellisense on the accuracy of Natural Language Interface to Database;Niket Choudhary 等;《International Conference on Reliability, Infocom Technologies and Optimization》;20151217;1-5 *
名词短语竞争与关系从句生成一项基于英汉平行数据库的研究;曹依民;《中国博士学位论文全文数据库哲学与人文科学辑》;20140915;F084-8 *

Also Published As

Publication number Publication date
CN114490709A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
JP7346609B2 (en) Systems and methods for performing semantic exploration using natural language understanding (NLU) frameworks
TWI636452B (en) Method and system of voice recognition
CN113220836B (en) Training method and device for sequence annotation model, electronic equipment and storage medium
CN114281968B (en) Model training and corpus generation method, device, equipment and storage medium
EP4113357A1 (en) Method and apparatus for recognizing entity, electronic device and storage medium
CN112784589B (en) Training sample generation method and device and electronic equipment
CN108563629B (en) Automatic log analysis rule generation method and device
CN112579727A (en) Document content extraction method and device, electronic equipment and storage medium
CN113821622B (en) Answer retrieval method and device based on artificial intelligence, electronic equipment and medium
CN111104423A (en) SQL statement generation method and device, electronic equipment and storage medium
CN114579104A (en) Data analysis scene generation method, device, equipment and storage medium
CN113836925A (en) Training method and device for pre-training language model, electronic equipment and storage medium
CN114495143A (en) Text object identification method and device, electronic equipment and storage medium
CN114490709B (en) Text generation method and device, electronic equipment and storage medium
CN115114419A (en) Question and answer processing method and device, electronic equipment and computer readable medium
CN114417878A (en) Semantic recognition method and device, electronic equipment and storage medium
CN113672699A (en) Knowledge graph-based NL2SQL generation method
CN111597302B (en) Text event acquisition method and device, electronic equipment and storage medium
CN113553411A (en) Query statement generation method and device, electronic equipment and storage medium
CN112560425A (en) Template generation method and device, electronic equipment and storage medium
CN112948573A (en) Text label extraction method, device, equipment and computer storage medium
CN115905497A (en) Method, device, electronic equipment and storage medium for determining reply sentence
CN115034209A (en) Text analysis method and device, electronic equipment and storage medium
CN114841172A (en) Knowledge distillation method, apparatus and program product for text matching double tower model
CN114020888A (en) Text generation method, device, equipment and storage medium

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