A data processing method, device, computer equipment and storage medium

By constructing query language templates, generating natural language problems and performing synonymous conversion, the problems of high cost, time-consuming and insufficient corpus diversity in the existing technology are solved, and efficient and diverse corpus generation is achieved.

CN114297220BActive Publication Date: 2025-04-25TENCENT DIGITAL TIANJIN
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111444119.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-04-25
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

The existing table question and answer data generation technology relies on manual writing or template generation, resulting in high labor costs, long time-consuming, and insufficient corpus diversity, affecting the training effect of the model.

Method used

By constructing a query language template based on business scenarios, obtaining business table data and completing the template, generating a query language; then using the problem generation model to jointly encode the embedded representation of the query language, generating natural language problems, and generating multiple synonyms through synonymous transformation to build a problem corpus collection.

Benefits of technology

It realizes the rapid generation of a large number of natural language problems, ensures the diversity of corpus, improves the speed of corpus generation, and reduces the cost and time-consuming of manual writing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114297220B_ABST
    Figure CN114297220B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a data processing method, device, computer equipment and storage medium, wherein the method includes the following steps: constructing a query language template according to a business scenario; obtaining business table data corresponding to the business scenario, completing the to-be-filled position of the query language template according to the business table data, so as to generate a query language corresponding to the business table data; jointly encoding the embedded representation corresponding to the query language through a question generation model, and generating a natural language question corresponding to the query language; performing synonymous conversion on the natural language question, generating multiple synonymous sentences corresponding to the natural language question, and determining the natural language question and the multiple synonymous sentences as a question corpus set of the business table data. By adopting the present application, a large number of natural language questions can be quickly generated, the diversity of the corpus can be ensured, and the speed of generating the corpus can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a data processing method, apparatus, computer equipment and storage medium. Background Art

[0002] Question and answer data is extremely important in table-based dialogue systems. For example, it has a great impact on generating training data in the cold start phase of table question and answer applications and on the real-time generation of recommended questions by customer service question and answer robots. When the model needs to be pre-trained in the cold start phase of the business, generating SQL statements-question and answer data that are strongly related to the domain can effectively improve the domain adaptability of the model. Most of the existing technical solutions for generating table question and answer data remain in the manual writing and template generation stages. However, the manual writing method is expensive and time-consuming to write, and the template generation method has a small amount of corpus and weak diversity, which has little gain for the training model. Summary of the invention

[0003] The embodiments of the present application provide a data processing method, apparatus, computer device, and storage medium, which can quickly generate a large number of natural language questions, ensure the diversity of corpus, and improve the speed of corpus generation.

[0004] On the one hand, an embodiment of the present application provides a data processing method, which may include:

[0005] Build query language templates based on business scenarios;

[0006] Acquire business table data corresponding to the business scenario, and complete the to-be-filled position of the query language template according to the business table data to generate a query language corresponding to the business table data; the to-be-filled position includes a column dimension and a column value;

[0007] Jointly encoding the embedded representation corresponding to the query language through a question generation model to generate a natural language question corresponding to the query language;

[0008] Perform synonym conversion on the natural language question to generate multiple synonymous sentences corresponding to the natural language question, and determine the natural language question and the multiple synonymous sentences as a question corpus set of the business table data, wherein the synonym conversion includes synonym replacement, question word rewriting, order change, and spoken vocabulary addition; the question corpus set is used to build a dialogue system based on the business table data.

[0009] In a feasible implementation manner, constructing a query language template according to a business scenario includes:

[0010] Obtain business query language components corresponding to the business scenario, wherein the business query language components include select components, where components, group by components, order by components, and limit components;

[0011] A query language template is generated based on the business query language component.

[0012] In a feasible implementation manner, the acquiring of business table data corresponding to the business scenario, and completing the to-be-filled position of the query language template according to the business table data to generate the query language corresponding to the business table data, includes:

[0013] Obtaining the column dimensions of the business table data and the values ​​corresponding to the column dimensions;

[0014] The to-be-filled position of the query language template is completed according to the column dimension and the numerical value corresponding to the column dimension to generate a query language corresponding to the business table data.

[0015] In a feasible implementation, the step of jointly encoding the embedded representation corresponding to the query language through the question generation model to generate a natural language question corresponding to the query language includes:

[0016] Performing vector conversion on the query language to generate an embedded representation corresponding to the query language; the embedded representation includes an identifier embedded representation, a position embedded representation, a clause embedded representation, a column embedded representation, and a value embedded representation;

[0017] Encoding the embedded representation of the query language through an encoder in the question generation model to generate a query language word vector corresponding to the query language;

[0018] The query language word vector is decoded by a decoder in the question generation model to generate a natural language question corresponding to the query language.

[0019] In a feasible implementation, it also includes:

[0020] Obtaining an initial question generation model and initial business table data;

[0021] generating an initial query language corresponding to the initial business table data according to the initial business table data, and obtaining an initial natural language question set corresponding to the initial query language, wherein the initial natural language question set includes at least two natural language questions corresponding to the initial query language with the same semantics but different asking methods;

[0022] The initial question generation model is trained according to the initial query language and the initial natural language question set to generate a question generation model.

[0023] In a feasible implementation manner, the training of the initial question generation model according to the initial query language and the initial natural language question set to generate the question generation model includes:

[0024] Performing vector conversion on the initial query language to generate an embedded representation corresponding to the initial query language; the embedded representation includes an identifier embedded representation, a position embedded representation, a clause embedded representation, a column embedded representation, and a value embedded representation;

[0025] Encoding the embedded representation of the initial query language through an encoder in the initial question generation model to generate a query language word vector corresponding to the initial query language;

[0026] Decoding the query language word vector through a decoder in the initial question generation model to generate a predicted natural language question corresponding to the initial query language;

[0027] The initial question generation model is trained according to the predicted natural language question and the initial natural language question set to generate a question generation model.

[0028] In a feasible implementation manner, the training of the initial question generation model according to the predicted natural language question and the initial natural language question set to generate the question generation model includes:

[0029] Constructing a loss function according to the predicted natural language question and the natural language questions in the initial natural language question set;

[0030] Adjusting model parameters of the initial problem generation model according to the loss function;

[0031] When the adjusted initial question generation model satisfies the convergence condition, the initial question generation model including the adjusted model parameters is determined as the question generation model.

[0032] In a feasible implementation manner, the training of the initial question generation model according to the query language and the initial natural language question set to generate the question generation model includes:

[0033] Classifying the natural language questions in the initial natural language question set to generate a first natural language question set and a second natural language question set; the first natural language question set includes at least one natural language question, the second natural language question set includes at least one natural language question, and the natural language questions in the first natural language question set and the second natural language question set are different;

[0034] Concatenate the initial query language with the natural language questions in the first natural language question set to generate a concatenated statement;

[0035] Performing vector conversion on the concatenated statement to generate an embedded representation corresponding to the concatenated statement; the embedded representation includes an identifier embedded representation, a position embedded representation, a clause embedded representation, a column embedded representation, and a value embedded representation;

[0036] Encoding the embedded representation corresponding to the concatenated sentence through an encoder in the initial question generation model to generate a concatenated sentence word vector corresponding to the concatenated sentence;

[0037] Decoding the concatenated sentence word vectors through a decoder in the initial question generation model to generate a predicted natural language question corresponding to the query language;

[0038] The initial question generation model is trained according to the predicted natural language question and the second natural language question set to generate a question generation model.

[0039] In a feasible implementation manner, the training of the initial question generation model according to the predicted natural language question and the second natural language question set to generate the question generation model includes:

[0040] Constructing a loss function according to the predicted natural language problem and the natural language problem in the second natural language problem set;

[0041] Adjusting model parameters of the initial problem generation model according to the loss function;

[0042] When the adjusted initial question generation model satisfies the convergence condition, the initial question generation model including the adjusted model parameters is determined as the question generation model.

[0043] On the one hand, an embodiment of the present application provides a data processing device, which may include:

[0044] A template acquisition unit, used to construct a query language template according to a business scenario;

[0045] A query language generating unit, configured to obtain business table data corresponding to a business scenario, and to complete a position to be filled in the query language template according to the business table data, so as to generate a query language corresponding to the business table data; the position to be filled in includes a column dimension and a column value;

[0046] A question generation unit, configured to jointly encode the embedded representation corresponding to the query language through a question generation model to generate a natural language question corresponding to the query language;

[0047] A synonym conversion unit is used to perform synonym conversion on the natural language question, generate multiple synonymous sentences corresponding to the natural language question, and determine the natural language question and the multiple synonymous sentences as a question corpus set of the business table data, wherein the synonym conversion includes synonym replacement, question word rewriting, order change, and spoken vocabulary addition; the question corpus set is used to build a dialogue system based on the business table data.

[0048] In a feasible implementation manner, the template acquisition unit is used to:

[0049] Obtain business query language components corresponding to the business scenario, wherein the business query language components include select components, where components, group by components, order by components, and limit components;

[0050] A query language template is generated based on the business query language component.

[0051] In a feasible implementation manner, the query language generation unit is used to:

[0052] Obtaining the column dimensions of the business table data and the values ​​corresponding to the column dimensions;

[0053] The to-be-filled position of the query language template is completed according to the column dimension and the numerical value corresponding to the column dimension to generate a query language corresponding to the business table data.

[0054] In a feasible implementation manner, the question generating unit is used to:

[0055] Performing vector conversion on the query language to generate an embedded representation corresponding to the query language; the embedded representation includes an identifier embedded representation, a position embedded representation, a clause embedded representation, a column embedded representation, and a value embedded representation;

[0056] Encoding the embedded representation of the query language through an encoder in the question generation model to generate a query language word vector corresponding to the query language;

[0057] The query language word vector is decoded by a decoder in the question generation model to generate a natural language question corresponding to the query language.

[0058] In a feasible implementation, it also includes:

[0059] A model training unit, used to obtain an initial question generation model and initial business table data;

[0060] generating an initial query language corresponding to the initial business table data according to the initial business table data, and obtaining an initial natural language question set corresponding to the initial query language, wherein the initial natural language question set includes at least two natural language questions corresponding to the initial query language with the same semantics but different asking methods;

[0061] The initial question generation model is trained according to the initial query language and the initial natural language question set to generate a question generation model.

[0062] In a feasible implementation manner, the model training unit is used to:

[0063] Performing vector conversion on the initial query language to generate an embedded representation corresponding to the initial query language; the embedded representation includes an identifier embedded representation, a position embedded representation, a clause embedded representation, a column embedded representation, and a value embedded representation;

[0064] Encoding the embedded representation of the initial query language through an encoder in the initial question generation model to generate a query language word vector corresponding to the initial query language;

[0065] Decoding the query language word vector through a decoder in the initial question generation model to generate a predicted natural language question corresponding to the initial query language;

[0066] The initial question generation model is trained according to the predicted natural language question and the initial natural language question set to generate a question generation model.

[0067] In a feasible implementation manner, the model training unit is used to:

[0068] Constructing a loss function according to the predicted natural language question and the natural language questions in the initial natural language question set;

[0069] Adjusting model parameters of the initial problem generation model according to the loss function;

[0070] When the adjusted initial question generation model satisfies the convergence condition, the initial question generation model including the adjusted model parameters is determined as the question generation model.

[0071] In a feasible implementation manner, the model training unit is used to:

[0072] Classifying the natural language questions in the initial natural language question set to generate a first natural language question set and a second natural language question set; the first natural language question set includes at least one natural language question, the second natural language question set includes at least one natural language question, and the natural language questions in the first natural language question set and the second natural language question set are different;

[0073] Concatenate the initial query language with the natural language questions in the first natural language question set to generate a concatenated statement;

[0074] Performing vector conversion on the concatenated statement to generate an embedded representation corresponding to the concatenated statement; the embedded representation includes an identifier embedded representation, a position embedded representation, a clause embedded representation, a column embedded representation, and a value embedded representation;

[0075] Encoding the embedded representation corresponding to the concatenated sentence through an encoder in the initial question generation model to generate a concatenated sentence word vector corresponding to the concatenated sentence;

[0076] Decoding the concatenated sentence word vectors through a decoder in the initial question generation model to generate a predicted natural language question corresponding to the query language;

[0077] The initial question generation model is trained according to the predicted natural language question and the second natural language question set to generate a question generation model.

[0078] In a feasible implementation manner, the model training unit is used to:

[0079] Constructing a loss function according to the predicted natural language problem and the natural language problem in the second natural language problem set;

[0080] Adjusting model parameters of the initial problem generation model according to the loss function;

[0081] When the adjusted initial question generation model satisfies the convergence condition, the initial question generation model including the adjusted model parameters is determined as the question generation model.

[0082] On one hand, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program is suitable for being loaded by a processor and executing the above method steps.

[0083] On the one hand, an embodiment of the present application provides a computer device, including: a processor, a memory, and a network interface; the processor is connected to the memory and the network interface, wherein the network interface is used to provide a network communication function, the memory is used to store program code, and the processor is used to call the program code to execute the above-mentioned method steps.

[0084] In one aspect, the present application provides a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above method steps.

[0085] In an embodiment of the present application, by constructing a query language template according to a business scenario, further obtaining business table data corresponding to the business scenario, completing the to-be-filled position of the query language template according to the business table data to generate a query language corresponding to the business table data, and then jointly encoding the embedded representation corresponding to the query language through a question generation model to generate a natural language question corresponding to the query language, and finally performing synonymous conversion on the natural language question to generate multiple synonymous sentences corresponding to the natural language question, and determining the natural language question and the multiple synonymous sentences as a question corpus set of the business table data. By adopting the above method, natural language questions can be generated based on the question generation model, and a large number of synonymous natural language questions can be further generated through synonymous conversion, which solves the problems of high cost and time-consuming writing when manually writing, avoids the problems of small amount of corpus and weak diversity when generating corpus by relying on templates, ensures the diversity of corpus, and improves the speed of corpus generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0087] Figure 1 This is a network architecture diagram of data processing provided by an embodiment of the present application;

[0088] Figure 2 It is a flowchart of a data processing method provided in an embodiment of the present application;

[0089] Figure 3a This is an example schematic diagram of a business table data provided by an embodiment of the present application;

[0090] Figure 3b is an example schematic diagram of a question recommendation system provided in an embodiment of the present application;

[0091] Figure 4 It is a flowchart of a data processing method provided in an embodiment of the present application;

[0092] Figure 5a This is a schematic diagram of an example of a model training method provided in an embodiment of the present application;

[0093] Figure 5b is an example schematic diagram of the relationship between a query language and a natural language question provided in an embodiment of the present application;

[0094] Figure 6 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;

[0095] Figure 7 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0096] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0097] See also Figure 1 , Figure 1 It is a network architecture diagram of data processing provided by an embodiment of the present application. The network architecture diagram may include a service server 100 and a user terminal cluster, and the user terminal cluster may include a user terminal 10a, a user terminal 10b, ..., a user terminal 10c, wherein a communication connection may exist between the user terminal clusters, for example, a communication connection exists between the user terminal 10a and the user terminal 10b, and a communication connection exists between the user terminal 10b and the user terminal 10c, and any user terminal in the user terminal cluster may have a communication connection with the service server 100, for example, a communication connection exists between the user terminal 10a and the service server 100, and a communication connection exists between the user terminal 10b and the service server 100.

[0098] The user terminal cluster (including the user terminal 10a, the user terminal 10b and the user terminal 10c) may be integrated with a target application. Optionally, the target application may include an application with a function of displaying data information such as text, images and videos.

[0099] The database 10d stores an initial question generation model and initial business table data for training the initial question generation model. In a feasible implementation, the user terminal constructs a query language template according to the business scenario, and further the user terminal obtains the business table data corresponding to the business scenario, and completes the to-be-filled positions of the query language template according to the business table data to generate a query language corresponding to the business table data, wherein the to-be-filled positions include column dimensions and column values. Then, the user terminal jointly encodes the embedded representation corresponding to the query language through the question generation model to generate a natural language question corresponding to the query language. Finally, the user terminal performs a synonym conversion on the natural language question to generate multiple synonymous sentences corresponding to the natural language question, and determines the natural language question and the multiple synonymous sentences as a question corpus set of the business table data. The synonym conversion includes synonym replacement, question word rewriting, order change, and spoken vocabulary addition. The question corpus set is used to build a dialogue system based on the business table data. Optionally, the user terminal can be the user terminal in the above-mentioned Figure 1 Any user terminal selected from the user terminal cluster of the corresponding embodiment, for example, the user terminal may be the above-mentioned user terminal 10b.

[0100] It is understandable that the method provided in the embodiment of the present application can be executed by a computer device, and the computer device includes but is not limited to a terminal or a server. The business server 100 in the embodiment of the present application can be a computer device, and the user terminal in the user terminal cluster can also be a computer device, which is not limited here. The above-mentioned business server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The above-mentioned terminal may include: smart phones, tablet computers, laptops, desktop computers, smart TVs, smart speakers, desktop computers, smart watches and other smart terminals with image recognition functions, but are not limited to this. Among them, the user terminal and the business server can be directly or indirectly connected by wired or wireless communication, and this application is not limited here. The embodiments of the present invention can be applied to various scenarios such as cloud technology, artificial intelligence, and smart transportation.

[0101] For further understanding, please see Figure 2 , Figure 2 is a flow chart of a data processing method provided by an embodiment of the present application. The method may be performed by a user terminal (for example, the above Figure 1 The user terminal shown in the figure) can also be executed by the user terminal and the service server (as shown in the figure above) Figure 1 The data processing method is executed by the service server 100 in the corresponding embodiment. For ease of understanding, this embodiment takes the method executed by the above-mentioned user terminal as an example. Among them, the data processing method may at least include the following steps S101-S104:

[0102] S101, constructing a query language template according to the business scenario;

[0103] Specifically, the user terminal obtains the business query language component corresponding to the business scenario, and the business query language component includes a select component, a where component, a group by component, an order by component, and a limit component, and further generates a query language template based on the business query language component. The query language template can specifically be an SQL template. When the query language template is constructed, the more components there are, the more difficult the generated query language is. For example: select*from business table where col_0=arg_0 is a simple query language template, which means filtering the values ​​of all column dimensions through a where component; the query language template can also be select col_0, count(*)from business table where col_1=arg_0andcol_2=arg_1group by col_0order by count(*)desc limit int.

[0104] S102, acquiring business table data corresponding to the business scenario, and completing the to-be-filled position of the query language template according to the business table data to generate a query language corresponding to the business table data;

[0105] Specifically, the user terminal obtains the business table data corresponding to the business scenario, and completes the to-be-filled position of the query language template according to the business table data to generate the query language corresponding to the business table data. It can be understood that the to-be-filled position includes column dimensions and column values. Figure 3a , Figure 3a This is an example diagram of a business table data provided by an embodiment of the present application. Figure 3a As shown, the business table data is a business table of the education industry. The table content includes teacher ID, gender, age, district and county, teaching subject, education background, and school name. The user terminal completes the column dimensions and column values ​​of the query language template and other slots to be filled according to the business table data. Take select col_0, count(*) from business table where col_1 = arg_0 and col_2 = arg_1 group by col_0 order by count(*) desclimit int as an example for explanation:

[0106] Complete column dimension: select county, count(*)from business table where teaching subject = arg_0 and education = arg_1group by county order by count(*)desc limit int;

[0107] Complete the dimension-related values: select county, count(*)from business table where teaching subject = English and education = undergraduate group by county order by count(*)desc limit int;

[0108] Complete other slots: select district and county, count(*)from business table where teaching subject = English and education = undergraduate group by district and county order by count(*)desc limit 3.

[0109] S103, jointly encoding the embedded representation corresponding to the query language through a question generation model to generate a natural language question corresponding to the query language;

[0110] Specifically, the user terminal performs vector conversion on the query language to generate an embedded representation corresponding to the query language. The vector conversion can be specifically performed in a word2vec manner. The embedded representation includes an identifier embedded representation, a position embedded representation, a sentence embedded representation, a column embedded representation, and a value embedded representation. The multi-level embedded representation can maximize the parameter information of the integrated learning model. The identifier embedded representation can be a word-level encoding (Token Embedding), the position embedded representation can be a position encoding (Position Embedding), the sentence embedded representation can be a sentence encoding (Segment Embedding), the column embedded representation can be a column name / column value encoding (Columnn / Row Embedding), and the value embedded representation can be a value encoding (Num Embedding). Columnn / Row Embedding is a unified index of column names and column values ​​in a table. Each column name or column value corresponds to an index bit. Num Embedding is a new text encoding of a value. The position of a value in the text is marked as 1, and the position of a non-value is marked as 0.

[0111] Furthermore, the user terminal encodes the embedded representation of the query language through an encoder in the question generation model to generate a query language word vector corresponding to the query language. The question generation model can use a neural network, such as an RNN recurrent neural network or a Bi-RNN bidirectional recurrent neural network. Specifically, the above embedded representations are combined together by accumulation and input into the question generation model. The embedded representation of the query language is encoded by the encoder in the question generation model to generate a query language word vector corresponding to the query language.

[0112] Furthermore, the user terminal decodes the query language word vector through a decoder in the question generation model to generate a natural language question corresponding to the query language.

[0113] S104, performing synonym conversion on the natural language question to generate a plurality of synonymous sentences corresponding to the natural language question, and determining the natural language question and the plurality of synonymous sentences as a question corpus set of the business table data.

[0114] Specifically, the user terminal performs synonym conversion on the natural language question, generates multiple synonym sentences corresponding to the natural language question, and determines the natural language question and the multiple synonym sentences as the question corpus set of the business table data. It can be understood that the user terminal starts the question post-processor, performs synonym conversion on the natural language question, generates multiple synonym sentences corresponding to the natural language question, and the same sentence is also a natural language question. The synonym conversion includes synonym replacement, question word rewriting, order change, and oral vocabulary increase. Synonym replacement is to replace some words in the natural language question with synonyms, such as: "teacher" is replaced with "teacher"; question word rewriting is to expand the question word expression in the natural language question, such as: "which" is expanded to "which counties"; order change is to change the order of related words in the natural language question, so that the rewritten words are more fluent and in line with natural expression; oral vocabulary increase is to appropriately add oral expression vocabulary to the natural language question, such as: prefix expression "help me check", "you know", suffix expression "what", "what", "how", etc. Finally, the natural language question and the multiple synonymous sentences are determined as a question corpus set of the business table data. The question corpus set can be used to construct a dialogue system based on the business table data.

[0115] See also Figure 3b , Figure 3b: is an example schematic diagram of a question recommendation system provided by an embodiment of the present application. When a table-based dialogue system needs to be built for a certain field, the user stores the data table in the user terminal, and the user terminal generates a question corpus set for the above data table based on the method in this solution. The question corpus set includes a large number of natural language questions. The user terminal trains the NL2SQL model of the dialogue system based on the above natural language questions. The NL2SQL model is used to convert natural language into SQL statements, such as Figure 3b As shown, for a trained dialogue system, the dialogue system can display recommended questions to the user. The user can select any natural language question from the recommended questions, or the user can input other natural language questions by himself. The dialogue system outputs the corresponding answer to the natural language question selected or input by the user.

[0116] In an embodiment of the present application, by constructing a query language template according to a business scenario, further obtaining business table data corresponding to the business scenario, completing the to-be-filled position of the query language template according to the business table data to generate a query language corresponding to the business table data, and then jointly encoding the embedded representation corresponding to the query language through a question generation model to generate a natural language question corresponding to the query language, and finally performing synonymous conversion on the natural language question to generate multiple synonymous sentences corresponding to the natural language question, and determining the natural language question and the multiple synonymous sentences as a question corpus set of the business table data. By adopting the above method, natural language questions can be generated based on the question generation model, and a large number of synonymous natural language questions can be further generated through synonymous conversion, which solves the problems of high cost and time-consuming writing when manually writing, avoids the problems of small amount of corpus and weak diversity when generating corpus by relying on templates, ensures the diversity of corpus, and improves the speed of corpus generation.

[0117] See also Figure 4 , Figure 4 is a flow chart of a data processing method provided by an embodiment of the present application. The method may be performed by a user terminal (for example, the above Figure 1 The user terminal shown in the figure) can also be executed by the user terminal and the service server (as shown in the figure above) Figure 1 The data processing method is executed by the service server 100 in the corresponding embodiment. For ease of understanding, this embodiment takes the method executed by the above-mentioned user terminal as an example. Among them, the data processing method may at least include the following steps S201-S205:

[0118] S201, obtaining an initial question generation model, training the initial question generation model, and generating a question generation model.

[0119] Specifically, the user terminal obtains an initial question generation model and initial business table data, generates an initial query language corresponding to the initial business table data according to the initial business table data, and obtains an initial natural language question set corresponding to the initial query language, wherein the initial natural language question set includes at least two natural language questions corresponding to the initial query language with the same semantics but different asking methods; for example, the initial natural language question set may include natural language question 1: Which are the top three districts and counties in terms of the number of teachers who teach English and have a bachelor's degree? Natural language question 2: Tell me which are the three districts and counties with the largest number of teachers who have a bachelor's degree and teach English? Natural language question 1 and natural language question 2 are questions with the same semantics but different asking methods.

[0120] Furthermore, the initial question generation model is trained according to the initial query language and the initial natural language question set to generate a question generation model.

[0121] There are two ways to train the initial question generation model. The first way is to take the initial query language as input, and generate a question generation model based on the output of the model and the initial natural language question set. The second way is to divide the natural language questions in the initial natural language question set into two parts, take the initial query language and the first part of the initial natural language question set as input, and generate a question generation model based on the output of the model and the second part of the initial natural language question set.

[0122] The specific process of the first training method is as follows:

[0123] The initial query language is vectorized to generate an embedded representation corresponding to the initial query language; the embedded representation includes an identifier embedded representation, a position embedded representation, a clause embedded representation, a column embedded representation, and a numerical embedded representation. The embedded representations are merged together by accumulation, and the merged embedded representation is encoded by an encoder in the initial question generation model to generate a query language word vector corresponding to the initial query language. The query language word vector is further decoded by a decoder in the initial question generation model to generate a predicted natural language question corresponding to the initial query language. The initial question generation model is trained according to the predicted natural language question and the initial natural language question set to generate a question generation model. In the model training, the column embedded representation and the numerical embedded representation are strengthened. The initial question generation model can better convert the keyword information into similar phrase expressions by learning the vector representation of the phrase. For example, the keyword "teaching English" can be converted into "teaching English", "English teacher", etc. The column embedded representation and the numerical embedded representation can enable the tokens of these keyword positions to obtain higher learning weights, and can capture the synonyms of the keywords faster and more accurately, which can improve the question generation model generated by training, and the accuracy and speed of corpus generation.

[0124] The specific steps of generating the question generation model according to the predicted natural language question and the initial natural language question set are as follows:

[0125] A loss function is constructed based on the predicted natural language question and the natural language questions in the initial natural language question set, and the model parameters of the initial question generation model are adjusted according to the loss function. When the adjusted initial question generation model meets the convergence condition, the initial question generation model including the adjusted model parameters is determined as the question generation model.

[0126] The specific process of the second training method is as follows:

[0127] See also Figure 5a , Figure 5a is an example schematic diagram of a model training method provided in an embodiment of the present application. Figure 5aAs shown, the natural language questions in the initial natural language question set are classified to generate a first natural language question set and a second natural language question set; the first natural language question set includes at least one natural language question, the second natural language question set includes at least one natural language question, and the natural language questions in the first natural language question set are different from those in the second natural language question set. The initial query language is further concatenated with the natural language questions in the first natural language question set to generate a concatenated statement, and the concatenated statement is vectorized to generate an embedded representation corresponding to the concatenated statement, the embedded representation includes an identifier embedded representation, a position embedded representation, a clause embedded representation, a column embedded representation, and a numerical embedded representation. The embedded representations are merged together by accumulation, the merged embedded representation is encoded by the encoder in the initial question generation model, and a concatenated statement word vector corresponding to the concatenated statement is generated. The concatenated statement word vector is decoded by the decoder in the initial question generation model to generate a predicted natural language question corresponding to the query language, and the initial question generation model is trained according to the predicted natural language question and the second natural language question set to generate a question generation model.

[0128] By using the initial query language and the natural language questions in the first natural language question set as the input of the initial question generation model to train the model, the "query language-natural language question" relationship diagram between the initial query language and the natural language question can be captured. The "query language-natural language question" relationship diagram includes linking structure information (Linking Structure) and question structure information (Question Structure). The linking structure information is the relationship between the initial query language and the natural language question, and the question structure information is the structural relationship of the natural language question itself. See Figure 5b , Figure 5b FIG. 1 is an example diagram of the relationship between a query language and a natural language question provided in an embodiment of the present application. Figure 5bAs shown in the figure, if the initial query language input to the initial question generation model is: [CLS] select county, count(*) from business table where teaching subject = English and education = undergraduate group by county order by count(*) desc limit 3 [SEP], the natural language question input to the initial question generation model is: which counties are the top three in terms of the number of teachers who teach English and have undergraduate education? [SEP]. The concatenated sentence generated by concatenating the initial query language and the natural language question includes two types of information: connection structure information and question structure information. The initial question generation model can learn the connection structure information of the initial query sentence and the natural language question, so as to learn the association between keywords and learn the question structure information of the natural language question. The question structure information is the part of speech learning of each phrase of the natural language question itself, which includes verb (V), noun (N), conjunction (C), existential word (E), etc. At the same time, the initial question generation model can learn the dependency relationship between parts of speech, such as verbs followed by nouns, nouns can be connected in series, etc. By learning the connection structure information and question structure information between the initial query statement and the natural language question, the accuracy and speed of the question generation model generated by training can be improved.

[0129] The specific steps of generating the question generation model according to the predicted natural language question and the second natural language question set are as follows:

[0130] A loss function is constructed based on the predicted natural language question and the natural language questions in the second natural language question set, and model parameters of the initial question generation model are adjusted according to the loss function. When the adjusted initial question generation model meets the convergence condition, the initial question generation model including the adjusted model parameters is determined as the question generation model.

[0131] It should be noted that for the question generation model trained using the second method, when using the question generation model to generate natural language questions, if the model input only has query language and no natural language questions, the input corresponding to the natural language questions can be left blank.

[0132] S202, constructing a query language template according to the business scenario;

[0133] Wherein, step S202 of the embodiment of the present invention refers to Figure 2 The specific description of step S101 of the illustrated embodiment is not repeated here.

[0134] S203, obtaining business table data corresponding to the business scenario, and completing the to-be-filled position of the query language template according to the business table data to generate a query language corresponding to the business table data; the to-be-filled position includes a column dimension and a column value;

[0135] Wherein, step S203 of the embodiment of the present invention refers to Figure 2 The specific description of step S102 of the illustrated embodiment is not repeated here.

[0136] S204, jointly encoding the embedded representation corresponding to the query language through a question generation model to generate a natural language question corresponding to the query language;

[0137] Wherein, step S204 of the embodiment of the present invention refers to Figure 2 The specific description of step S103 of the illustrated embodiment is not repeated here.

[0138] S205, performing synonym conversion on the natural language question, generating multiple synonymous sentences corresponding to the natural language question, determining the natural language question and the multiple synonymous sentences as a question corpus set of the business table data, wherein the synonym conversion includes synonym replacement, question word rewriting, order change, and spoken vocabulary addition; the question corpus set is used to construct a dialogue system based on the business table data.

[0139] Among them, step S205 of the embodiment of the present invention refers to Figure 2 The specific description of step S104 of the illustrated embodiment is not repeated here.

[0140] In an embodiment of the present application, by constructing a query language template according to a business scenario, further obtaining business table data corresponding to the business scenario, completing the to-be-filled position of the query language template according to the business table data to generate a query language corresponding to the business table data, and then jointly encoding the embedded representation corresponding to the query language through a question generation model to generate a natural language question corresponding to the query language, and finally performing synonymous conversion on the natural language question to generate multiple synonymous sentences corresponding to the natural language question, and determining the natural language question and the multiple synonymous sentences as a question corpus set of the business table data. By adopting the above method, natural language questions can be generated based on the question generation model, and a large number of synonymous natural language questions can be further generated through synonymous conversion, which solves the problems of high cost and time-consuming writing when manually writing, avoids the problems of small amount of corpus and weak diversity when generating corpus by relying on templates, ensures the diversity of corpus, and improves the speed of corpus generation.

[0141] See also Figure 6 , Figure 6: is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. The data processing device may be a computer program (including program code) running in a computer device, for example, the data processing device is an application software; the device may be used to execute the corresponding steps in the method provided in an embodiment of the present application. Figure 6 As shown, the data processing device 1 of the embodiment of the present application may include: a template acquisition unit 11, a query language generation unit 12, a question generation unit 13, and a synonym conversion unit 14.

[0142] A template acquisition unit 11, used to construct a query language template according to a business scenario;

[0143] The query language generating unit 12 is used to obtain business table data corresponding to the business scenario, and complete the to-be-filled position of the query language template according to the business table data to generate a query language corresponding to the business table data; the to-be-filled position includes a column dimension and a column value;

[0144] A question generation unit 13, configured to jointly encode the embedded representation corresponding to the query language through a question generation model to generate a natural language question corresponding to the query language;

[0145] The synonym conversion unit 14 is used to perform synonym conversion on the natural language question, generate multiple synonymous sentences corresponding to the natural language question, and determine the natural language question and the multiple synonymous sentences as a question corpus set of the business table data. The synonym conversion includes synonym replacement, question word rewriting, order change, and spoken vocabulary addition; the question corpus set is used to build a dialogue system based on the business table data.

[0146] In a feasible implementation manner, the template acquisition unit 11 is used to:

[0147] Obtain business query language components corresponding to the business scenario, wherein the business query language components include select components, where components, group by components, order by components, and limit components;

[0148] A query language template is generated based on the business query language component.

[0149] In a feasible implementation manner, the query language generation unit 12 is used to:

[0150] Obtaining the column dimensions of the business table data and the values ​​corresponding to the column dimensions;

[0151] The to-be-filled position of the query language template is completed according to the column dimension and the numerical value corresponding to the column dimension to generate a query language corresponding to the business table data.

[0152] In a feasible implementation manner, the question generating unit 13 is used to:

[0153] Performing vector conversion on the query language to generate an embedded representation corresponding to the query language; the embedded representation includes an identifier embedded representation, a position embedded representation, a clause embedded representation, a column embedded representation, and a value embedded representation;

[0154] Encoding the embedded representation of the query language through an encoder in the question generation model to generate a query language word vector corresponding to the query language;

[0155] The query language word vector is decoded by a decoder in the question generation model to generate a natural language question corresponding to the query language.

[0156] See also Figure 6 , the data processing device 1 of the embodiment of the present application may also include: a model training unit 15.

[0157] A model training unit 15, used to obtain an initial question generation model and initial business table data;

[0158] generating an initial query language corresponding to the initial business table data according to the initial business table data, and obtaining an initial natural language question set corresponding to the initial query language, wherein the initial natural language question set includes at least two natural language questions corresponding to the initial query language with the same semantics but different asking methods;

[0159] The initial question generation model is trained according to the initial query language and the initial natural language question set to generate a question generation model.

[0160] In a feasible implementation manner, the model training unit 15 is used to:

[0161] Performing vector conversion on the initial query language to generate an embedded representation corresponding to the initial query language; the embedded representation includes an identifier embedded representation, a position embedded representation, a clause embedded representation, a column embedded representation, and a value embedded representation;

[0162] Encoding the embedded representation of the initial query language through an encoder in the initial question generation model to generate a query language word vector corresponding to the initial query language;

[0163] Decoding the query language word vector through a decoder in the initial question generation model to generate a predicted natural language question corresponding to the initial query language;

[0164] The initial question generation model is trained according to the predicted natural language question and the initial natural language question set to generate a question generation model.

[0165] In a feasible implementation manner, the model training unit 15 is used to:

[0166] Constructing a loss function according to the predicted natural language question and the natural language questions in the initial natural language question set;

[0167] Adjusting model parameters of the initial problem generation model according to the loss function;

[0168] When the adjusted initial question generation model satisfies the convergence condition, the initial question generation model including the adjusted model parameters is determined as the question generation model.

[0169] In a feasible implementation manner, the model training unit 15 is used to:

[0170] Classifying the natural language questions in the initial natural language question set to generate a first natural language question set and a second natural language question set; the first natural language question set includes at least one natural language question, the second natural language question set includes at least one natural language question, and the natural language questions in the first natural language question set and the second natural language question set are different;

[0171] Concatenate the initial query language with the natural language questions in the first natural language question set to generate a concatenated statement;

[0172] Performing vector conversion on the concatenated statement to generate an embedded representation corresponding to the concatenated statement; the embedded representation includes an identifier embedded representation, a position embedded representation, a clause embedded representation, a column embedded representation, and a value embedded representation;

[0173] Encoding the embedded representation corresponding to the concatenated sentence through an encoder in the initial question generation model to generate a concatenated sentence word vector corresponding to the concatenated sentence;

[0174] Decoding the concatenated sentence word vectors through a decoder in the initial question generation model to generate a predicted natural language question corresponding to the query language;

[0175] The initial question generation model is trained according to the predicted natural language question and the second natural language question set to generate a question generation model.

[0176] In a feasible implementation manner, the model training unit 15 is used to:

[0177] Constructing a loss function according to the predicted natural language problem and the natural language problem in the second natural language problem set;

[0178] Adjusting model parameters of the initial problem generation model according to the loss function;

[0179] When the adjusted initial question generation model satisfies the convergence condition, the initial question generation model including the adjusted model parameters is determined as the question generation model.

[0180] In an embodiment of the present application, by constructing a query language template according to a business scenario, further obtaining business table data corresponding to the business scenario, completing the to-be-filled position of the query language template according to the business table data to generate a query language corresponding to the business table data, and then jointly encoding the embedded representation corresponding to the query language through a question generation model to generate a natural language question corresponding to the query language, and finally performing synonymous conversion on the natural language question to generate multiple synonymous sentences corresponding to the natural language question, and determining the natural language question and the multiple synonymous sentences as a question corpus set of the business table data. By adopting the above method, natural language questions can be generated based on the question generation model, and a large number of synonymous natural language questions can be further generated through synonymous conversion, which solves the problems of high cost and time-consuming writing when manually writing, avoids the problems of small amount of corpus and weak diversity when generating corpus by relying on templates, ensures the diversity of corpus, and improves the speed of corpus generation.

[0181] See also Figure 7 , Figure 7 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 7 As shown, the computer device 1000 may include: at least one processor 1001, such as a CPU, at least one network interface 1004, a user interface 1003, a memory 1005, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a random access memory (Random Access Memory, RAM) or a non-volatile memory (non-volatile memory, NVM), such as at least one disk storage. The memory 1005 may optionally be at least one storage device located away from the aforementioned processor 1001. As Figure 7As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a data processing application program.

[0182] exist Figure 7 In the computer device 1000 shown in the figure, the network interface 1004 can provide a network communication function, the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the data processing application stored in the memory 1005 to implement the above Figure 2-Figure 5b The description of the data processing method in any corresponding embodiment will not be repeated here.

[0183] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 2-Figure 5b The description of the data processing method in any corresponding embodiment can also be performed as described above. Figure 6 The description of the data processing device in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here.

[0184] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the data processing device mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the above-mentioned Figure 2-Figure 5b The description of the data processing method in any corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, program instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one location, or on multiple computing devices distributed at multiple locations and interconnected by a communication network. Multiple computing devices distributed at multiple locations and interconnected by a communication network can constitute a blockchain system.

[0185] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program. The above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the above-mentioned computer-readable storage medium can be a data processing device provided by any of the above-mentioned embodiments or an internal storage unit of the above-mentioned device, such as a hard disk or memory of an electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the electronic device. The above-mentioned computer-readable storage medium can also include a disk, an optical disk, a read-only memory (ROM) or a random access memory, etc. Further, the computer-readable storage medium can also include both the internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and quantities required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.

[0186] The terms "first", "second", etc. in the claims, specification and drawings of the present invention are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. Mentioning "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present invention. Displaying the phrase at various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments. The term "and / or" used in the specification and the appended claims of the present invention refers to any combination of one or more of the items listed in association and all possible combinations, and includes these combinations.

[0187] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0188] Each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0189] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A data processing method, characterized in that: include: Build query language templates based on business scenarios; Acquire business table data corresponding to the business scenario, and complete the to-be-filled position of the query language template according to the business table data to generate a query language corresponding to the business table data; the to-be-filled position includes a column dimension and a column value; Jointly encoding the embedded representation corresponding to the query language through a question generation model to generate a natural language question corresponding to the query language; Perform synonym conversion on the natural language question to generate multiple synonymous sentences corresponding to the natural language question, and determine the natural language question and the multiple synonymous sentences as a question corpus set of the business table data, wherein the synonym conversion includes synonym replacement, question word rewriting, order change, and spoken vocabulary addition; the question corpus set is used to build a dialogue system based on the business table data.

2. The method according to claim 1, characterized in that The query language template is constructed according to the business scenario, including: Obtain business query language components corresponding to the business scenario, wherein the business query language components include select components, where components, group by components, order by components, and limit components; A query language template is generated based on the business query language component.

3. The method according to claim 1, characterized in that The acquiring of business table data corresponding to the business scenario, and completing the to-be-filled position of the query language template according to the business table data to generate a query language corresponding to the business table data, includes: Obtaining the column dimensions of the business table data and the values ​​corresponding to the column dimensions; The to-be-filled position of the query language template is completed according to the column dimension and the numerical value corresponding to the column dimension to generate a query language corresponding to the business table data.

4. The method according to claim 1, characterized in that: The step of jointly encoding the embedded representation corresponding to the query language through the question generation model to generate a natural language question corresponding to the query language includes: Performing vector conversion on the query language to generate an embedded representation corresponding to the query language; the embedded representation includes an identifier embedded representation, a position embedded representation, a clause embedded representation, a column embedded representation, and a value embedded representation; Encoding the embedded representation of the query language through an encoder in the question generation model to generate a query language word vector corresponding to the query language; The query language word vector is decoded by a decoder in the question generation model to generate a natural language question corresponding to the query language.

5. The method according to claim 1, characterized in that Also includes: Obtaining an initial question generation model and initial business table data; generating an initial query language corresponding to the initial business table data according to the initial business table data, and obtaining an initial natural language question set corresponding to the initial query language, wherein the initial natural language question set includes at least two natural language questions corresponding to the initial query language with the same semantics but different asking methods; The initial question generation model is trained according to the initial query language and the initial natural language question set to generate a question generation model.

6. The method according to claim 5, characterized in that The step of training the initial question generation model according to the initial query language and the initial natural language question set to generate the question generation model includes: Performing vector conversion on the initial query language to generate an embedded representation corresponding to the initial query language; the embedded representation includes an identifier embedded representation, a position embedded representation, a clause embedded representation, a column embedded representation, and a value embedded representation; Encoding the embedded representation of the initial query language through an encoder in the initial question generation model to generate a query language word vector corresponding to the initial query language; Decoding the query language word vector through a decoder in the initial question generation model to generate a predicted natural language question corresponding to the initial query language; The initial question generation model is trained according to the predicted natural language question and the initial natural language question set to generate a question generation model.

7. The method according to claim 6, characterized in that The step of training the initial question generation model according to the predicted natural language question and the initial natural language question set to generate a question generation model includes: Constructing a loss function according to the predicted natural language question and the natural language questions in the initial natural language question set; Adjusting model parameters of the initial problem generation model according to the loss function; When the adjusted initial question generation model satisfies the convergence condition, the initial question generation model including the adjusted model parameters is determined as the question generation model.

8. The method according to claim 5, characterized in that The step of training the initial question generation model according to the query language and the initial natural language question set to generate the question generation model includes: Classifying the natural language questions in the initial natural language question set to generate a first natural language question set and a second natural language question set; the first natural language question set includes at least one natural language question, the second natural language question set includes at least one natural language question, and the natural language questions in the first natural language question set and the second natural language question set are different; Concatenate the initial query language with the natural language questions in the first natural language question set to generate a concatenated statement; Performing vector conversion on the concatenated statement to generate an embedded representation corresponding to the concatenated statement; the embedded representation includes an identifier embedded representation, a position embedded representation, a clause embedded representation, a column embedded representation, and a value embedded representation; Encoding the embedded representation corresponding to the concatenated sentence through an encoder in the initial question generation model to generate a concatenated sentence word vector corresponding to the concatenated sentence; Decoding the concatenated sentence word vectors through a decoder in the initial question generation model to generate a predicted natural language question corresponding to the query language; The initial question generation model is trained according to the predicted natural language question and the second natural language question set to generate a question generation model.

9. The method according to claim 8, characterized in that The step of training the initial question generation model according to the predicted natural language question and the second natural language question set to generate a question generation model includes: Constructing a loss function according to the predicted natural language problem and the natural language problem in the second natural language problem set; Adjusting model parameters of the initial problem generation model according to the loss function; When the adjusted initial question generation model satisfies the convergence condition, the initial question generation model including the adjusted model parameters is determined as the question generation model.

10. A data processing device, characterized in that: include: A template acquisition unit, used to construct a query language template according to a business scenario; A query language generating unit, configured to obtain business table data corresponding to a business scenario, and to complete a position to be filled in the query language template according to the business table data, so as to generate a query language corresponding to the business table data; the position to be filled in includes a column dimension and a column value; A question generation unit, configured to jointly encode the embedded representation corresponding to the query language through a question generation model to generate a natural language question corresponding to the query language; A synonym conversion unit is used to perform synonym conversion on the natural language question, generate multiple synonymous sentences corresponding to the natural language question, and determine the natural language question and the multiple synonymous sentences as a question corpus set of the business table data, wherein the synonym conversion includes synonym replacement, question word rewriting, order change, and spoken vocabulary addition; the question corpus set is used to build a dialogue system based on the business table data.

11. A computer device, characterized in that: include: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide a network communication function, the memory is used to store program code, and the processor is used to call the program code to execute the method described in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is suitable for being loaded by a processor and executing the method according to any one of claims 1 to 9.

13. A computer program product or a computer program, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium, the processor of a computer device reading the computer instructions from the computer-readable storage medium, the processor executing the computer instructions to execute the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • A conversion method and device for a natural language and a structured query language

    CN109933602A

  • Dialogue generation and corpus expansion method and device, computer equipment and storage medium

    CN111061847A