A database processing method and device based on generative language model
By generating node graphs and batch generation of SQL instructions using generative language models, the problem of the inability to handle multiple operational step texts in the prior art is solved, and an efficient and privacy-safe solution is realized in data query.
Patent Information
- Application Number
- CN202411163147.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-08-23
AI Technical Summary
Existing text-to-SQL language instruction technology cannot effectively process long text information containing multiple operational steps, and it is difficult to ensure the privacy and security of data.
By generating node graphs, determine operation nodes with the same attributes, and batch generate SQL language instructions using pre-trained generative language models to realize batch processing and data query of multiple operation steps texts, and at the same time, a privacy computing strategy is used to ensure data Safety.
It improves the efficiency of database query of natural language text, can effectively process text information containing multiple operation steps, and provides guarantees in terms of data privacy and security.
Smart Images

Figure CN118689895B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of generative language models and database technology, and in particular to a database processing method and device based on a generative language model. Background Art
[0002] At present, the text-to-SQL language instruction (Text2SQL) technology based on natural language processing has been applied. Based on this technology, users can enter query information in natural language text for query. As a result, the query information is converted into a vector by performing an embedding operation, and the context corresponding to the query information is obtained by matching in the vector database. Then, the query information and the context are combined to form the prompt information (Prompt) input to the generative language model (or large language model LLM). Therefore, the generative language model generates the SQL language instruction corresponding to the query information according to the input prompt information. Therefore, the corresponding business data can be queried in the business database according to the SQL language instruction.
[0003] However, the currently known text-to-SQL language instruction technology can only generate SQL language instructions for one query information input by the user at a time. Therefore, it is not possible to generate corresponding SQL language instructions for query information with longer text or query information containing multiple operation steps. In addition, it is also difficult to further protect the privacy and security of data in the process of obtaining database data.
[0004] The publication number is CN117725084A, and the name is a custom report generation method. By reading the table structure of the relational database, the Chinese mapping relationship between the table name and table field and its corresponding remarks is generated, and according to the relationship between the tables, the table structure relationship knowledge graph is generated; the user's text commands are processed, the data tables and fields are identified, and the entity identifiers are replaced, and then the replaced text commands are characterized; the characterized text commands are recognized for intent, and the commands that meet the custom report generation requirements are responded to, and the intent slots are filled through multiple rounds of questions; the data tables and fields in the complete text commands are replaced and filled through the Chinese mapping relationship and the table structure relationship knowledge graph, and then converted into SQL statements by the generative language model; the generated SQL statements are analyzed and reviewed, and the audited SQL statements are executed to obtain data and generate report files.
[0005] The publication number is CN117851445A, and the name is a large prediction model Text2SQL chart generation method and device. First, the Text2SQL large model architecture is selected, and the model is fine-tuned using the LORA-based method to master the ability to understand and convert text into SQL language; then, in the first phase Text2SQL prompt word engineering architecture, the LangChain development architecture is used for design, and finally, the chart generation task is selected to understand the prompt word architecture to automatically capture and parse new demand issues.
[0006] Currently, no effective solution has been proposed for the technical problem that the text-to-SQL language instruction technology in the above-mentioned prior art cannot generate corresponding SQL language instructions for long text information containing multiple operation step texts and cannot ensure data privacy security. Summary of the invention
[0007] The embodiments of the present disclosure provide a database processing method and device based on a generative language model to at least solve the technical problems in the prior art that the text-to-SQL language instruction technology cannot generate corresponding SQL language instructions for long text information containing multiple operation step texts and cannot ensure data privacy security.
[0008] According to one aspect of an embodiment of the present disclosure, a database processing method based on a generative language model is provided, comprising: receiving text information related to a data processing flow, wherein the text information includes natural language text corresponding to multiple operation steps of the data processing flow; generating a first node graph corresponding to the data processing flow according to the text information, wherein the first node graph includes multiple first operation nodes corresponding to the multiple operation steps; determining multiple second operation nodes from the first operation nodes according to attributes of the business data corresponding to the operation steps, wherein the business data corresponding to the multiple second operation nodes have specified identical attributes; determining multiple first query information corresponding to different second operation nodes respectively, wherein the first query information is natural language text information; using a pre-trained generative language model to batch generate SQL language instructions corresponding to the multiple first query information; and using the SQL language instructions to query in a first database storing the business data to obtain the first business data corresponding to the second operation node.
[0009] According to another aspect of the embodiments of the present disclosure, a storage medium is further provided. The storage medium includes a stored program, wherein the above method is executed by a processor when the program is running.
[0010] According to another aspect of the embodiment of the present disclosure, a database processing device based on a generative language model is also provided, including: a text information receiving module, used to receive text information related to a data processing flow, wherein the text information includes natural language text corresponding to multiple operation steps of the data processing flow; a first node graph generating module, used to generate a first node graph corresponding to the data processing flow according to the text information, wherein the first node graph includes multiple first operation nodes corresponding to the multiple operation steps; an operation node determining module, used to determine multiple second operation nodes from the first operation node according to the attributes of the business data corresponding to the operation steps, wherein the business data corresponding to the multiple second operation nodes have the same specified attributes; a query information determining module, used to determine multiple first query information corresponding to different second operation nodes respectively, wherein the first query information is natural language text information; an SQL language instruction generating module, used to use a pre-trained generative language model to batch generate SQL language instructions corresponding to multiple first query information; and a query module, used to use the SQL language instructions to query in a first database storing business data to obtain the first business data corresponding to the second operation node.
[0011] According to another aspect of the embodiment of the present disclosure, a database processing device based on a generative language model is also provided, including: a processor; and a memory, connected to the processor, for providing the processor with instructions for processing the following processing steps: receiving text information related to a data processing flow, wherein the text information includes natural language text corresponding to multiple operation steps of the data processing flow; generating a first node graph corresponding to the data processing flow according to the text information, wherein the first node graph includes multiple first operation nodes corresponding to the multiple operation steps; determining multiple second operation nodes from the first operation nodes according to the attributes of the business data corresponding to the operation steps, wherein the business data corresponding to the multiple second operation nodes have the same specified attributes; determining multiple first query information corresponding to different second operation nodes respectively, wherein the first query information is natural language text information; using a pre-trained generative language model, batch generating SQL language instructions corresponding to multiple first query information; and using the SQL language instructions to query in a first database storing business data to obtain the first business data corresponding to the second operation node.
[0012] In the disclosed embodiment, text information including multiple operation steps related to a data processing flow can be received, and the text information is text information based on natural language. Then, a node graph corresponding to the data processing flow is generated according to the text information, and multiple operation nodes with the same specified attributes are determined in the node graph, and query information corresponding to the multiple operation nodes is determined respectively. Then, SQL language instructions corresponding to the query information are generated in batches using a generative language model, and the generated SQL language instructions are used to query in a database storing business data, thereby obtaining business data corresponding to the multiple operation nodes. In this way, based on the same attributes of the business data, the query information corresponding to multiple operation nodes (i.e., multiple operation steps of the data processing flow) related to the data processing flow can be batch processed to batch generate multiple SQL language instructions corresponding to the multiple operation nodes, and the business data corresponding to the multiple operation nodes can be batch obtained from the business database. In this way, the efficiency of database query using natural language text is greatly improved. The technical problem that the text-to-SQL language instruction technology existing in the prior art cannot generate corresponding SQL language instructions for long text information containing multiple operation step texts is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present application. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:
[0014] Figure 1 is a hardware structure block diagram of a computing device for implementing the method according to Embodiment 1 of the present disclosure;
[0015] Figure 2 is a schematic diagram of a database processing system based on a generative language model according to Embodiment 1 of the present disclosure;
[0016] Figure 3 is a module diagram of the application server according to Embodiment 1 of the present disclosure;
[0017] Figure 4 is a flowchart of a database processing method based on a generative language model according to Embodiment 1 of the present disclosure;
[0018] Figure 5 is a schematic diagram of a first node graph according to Embodiment 1 of the present disclosure;
[0019] Figure 6 is a schematic diagram of a second node graph according to Embodiment 1 of the present disclosure;
[0020] Figure 7is a schematic diagram of parallel processing of query information of multiple subgraphs according to Embodiment 1 of the present disclosure;
[0021] Figure 8 is a schematic diagram of a database processing device based on a generative language model according to Embodiment 2 of the present disclosure; and
[0022] Fig. 9 It is a schematic diagram of a database processing device based on a generative language model according to Embodiment 3 of the present disclosure. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only embodiments of a part of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present disclosure.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof 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 necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices. Example 1
[0025] According to this embodiment, a method embodiment of database processing based on a generative language model is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0026] The method embodiment provided in this embodiment can be executed in a server or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computing device for implementing a database processing method based on a generative language model. Figure 1As shown, the computing device may include one or more processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory for storing data, a transmission device for communication functions, and an input / output interface. The memory, the transmission device, and the input / output interface are connected to the processor via a bus. In addition, it may also include: a display, a keyboard, and a cursor control device connected to the input / output interface. A person skilled in the art can understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0027] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computing device. As involved in the embodiments of the present disclosure, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0028] The memory can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the database processing method based on the generative language model in the embodiment of the present disclosure. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, the database processing method based on the generative language model of the above-mentioned application is realized. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the computing device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0029] The transmission device is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computing device. In one example, the transmission device includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0030] The display may be, for example, a touch screen liquid crystal display (LCD) that may enable a user to interact with a user interface of the computing device.
[0031] It should be noted that, in some optional embodiments, the above Figure 1 The computing device shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware elements and software elements. Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computing devices described above.
[0032] Figure 2 is a schematic diagram of a database processing system based on a generative language model according to this embodiment. Figure 2 As shown, the system includes: a terminal device 100, an application server 200, a large model server 300 running a generative language model, a first database 410 and a second database 420. The second database 420 stores the business data queried by the user. The first database 410 stores data knowledge related to the business data in the second database 420, and the data knowledge includes, for example, metadata or data meta information related to the business data, which is used to describe the table structure, data type, and corresponding rules of the business data.
[0033] also, Figure 3 The module diagram of the application server 200 is further shown. Figure 3 As shown, the application server 200 includes a user interface module, a task parsing module, a retrieval module, an enhancement module, a generation module, a query module and a calculation module.
[0034] The user interface module interacts with the terminal device 100, receives the text information of the data processing input by the user, and returns the result of the data processing to the terminal device 100. The task parsing module is used to parse the text information input by the user, so as to generate a node graph corresponding to each operation step of the text information. The retrieval module, the enhancement module and the generation module are used to interact with the first database 410 and the large model server 300, and batch generate SQL language instructions corresponding to the text information through the operation of RAG. The query module is used to obtain the corresponding business data in the second database 420 using the generated SQL language instructions, and the calculation module is used to perform calculations based on the obtained business data.
[0035] It should be noted that the terminal device 100, application server 200, large model server 300, first database 410 and second database 420 in the system can all be applied to the hardware structure described above.
[0036] In the above operating environment, according to the first aspect of this embodiment, a database processing method based on a generative language model is provided. The method comprises Figure 2 The application server 200 shown in FIG. Figure 4 A schematic diagram showing the process of the method is shown in FIG. Figure 4 As shown, the method includes:
[0037] S402: Receive text information related to a data processing flow, wherein the text information includes natural language text corresponding to a plurality of operation steps of the data processing flow;
[0038] S404: Generate a first node graph corresponding to the data processing flow according to the text information, wherein the first node graph includes a plurality of first operation nodes corresponding to a plurality of operation steps;
[0039] S406: Determine a plurality of second operation nodes from the first operation node according to the attribute of the business data corresponding to the operation step, wherein the business data corresponding to the plurality of second operation nodes have the same specified attribute;
[0040] S408: Determine a plurality of first query information corresponding to different second operation nodes respectively, wherein the first query information is natural language text information;
[0041] S410: using a pre-trained generative language model to batch generate SQL language instructions corresponding to a plurality of first query information; and
[0042] S412: Use SQL language instructions to query in the first database storing business data to obtain the first business data corresponding to the second operation node.
[0043] Specifically, for example, a user can upload text information related to the data processing flow to the application server 200 through the terminal device 100. The text information can be, for example, a txt file or a json file. Thus, the user interface module of the application server 200 receives the text information related to the data processing flow from the terminal device 100 (S402). The text information includes, for example, natural language text corresponding to multiple operation steps of the data processing flow.
[0044] Specifically, the following shows multiple operation steps included in the text information:
[0045] Step 1: Query the private business data A and calculate z1=k1 A;
[0046] Step 2: Query the private business data B and calculate z2=k2 B;
[0047] Step 3: Query the private business data C and calculate z3=k3 C;
[0048] Step 4: Calculate z4=z1+z2+z3;
[0049] Step 5: Query the private business data D and calculate z5=k4 D;
[0050] Step 6: Query the private business data E and calculate z6=k5 E;
[0051] Step 7: Calculate z7=z5+z6;
[0052] Step 8: Calculate z8=k6 z4;
[0053] Step 9: Calculate z9=k7 z7;
[0054] Step 10: Calculate z 10 =z8+z9;
[0055] Step 11: Query non-privacy business data F and calculate z 11 =k8 F;
[0056] Step 12: Query non-privacy business data G and calculate z 12 =k9 G;
[0057] Step 13: Calculate z 13 =z 11 +z 12 ;
[0058] Step 14: Calculate z 14 =z 10 +z 13 .
[0059] Then, the task parsing module of the application server 200 parses the data processing flow described in the text information and generates a first node graph corresponding to the data processing flow (S404). Figure 5 FIG. 1 shows a schematic diagram of a first node graph. Figure 5 As shown, the first node graph includes operation nodes NS1~NS 14 (ie, the first operation node) respectively correspond to steps 11 to 14 described above.
[0060] The specific method of generating the node graph can be determined according to the calculation relationship between the various parameters included in the various operation steps. The calculation relationship can be given in the form of a calculation formula or described in a natural language.
[0061] For example, in this embodiment, in steps 1-3, steps 5-6, and steps 11-12, it can be determined that these steps do not depend on the calculation results of other steps, so the operation nodes NS1-NS3, NS5-NS6, and NS 11 ~NS 12 , determined as the starting operation node or an independent operation node.
[0062] According to the calculation relationship described in step 4, it can be known that the calculation of step 4 requires the calculation results of steps 1 to 3, so the parent node of the operation node NS4 can be determined as the operation nodes NS1 to NS3.
[0063] According to the calculation relationship described in step 7, it can be known that the calculation of step 7 requires the calculation results of steps 5-6, so the parent node of the operation node NS7 can be determined as the operation nodes NS5-NS6.
[0064] By analogy, it can be determined that the parent node of the operation node NS8 is the operation node NS4, the parent node of the operation node NS9 is the operation node NS7, and the parent node of the operation node NS 10 The upper nodes are operation nodes NS8 and NS9, and the operation node NS 13 The parent node is the operation node NS 11 and NS 12 , operation node NS 14 The parent node is the operation node NS 10 and NS 13 .
[0065] Therefore, the task analysis module can further generate operation nodes NS1~NS 14 's node graph (i.e. the first node graph).
[0066] Then, the task parsing module selects the attributes of the business data corresponding to the operation steps 1 to 14 from the operation nodes NS1 to NS 14 A plurality of operation nodes (ie, second operation nodes) are determined, wherein the business data corresponding to the plurality of operation nodes have the same specified attribute (S406).
[0067] For example, refer to Figure 6 As shown, Figure 1 The business data corresponding to the operation nodes NS1 to NS4 included in the sub-nodes have the same specified attributes; Figure 2 The business data corresponding to the operation nodes NS5~NS7 and NS9 included in the sub-nodes have the same specified attributes; Figure 3 The operation nodes NS included in 11 ~NS 13 The corresponding business data has the same specified attributes. Figure 1 ,son Figure 2 and / or sub Figure 3 The operation nodes in the respectively constitute operation nodes (ie, second operation nodes) having the same specified attributes.
[0068] Then, the task parsing module further determines query information (ie, first query information) corresponding to different operation nodes in each subgraph, wherein the query information is natural language text information (S408).
[0069] Specifically, for example, the application server 200 is deployed with a template for the user to fill in the query information, so that the task parsing module can determine the query information according to the operation steps corresponding to each operation node in the subgraph.
[0070] For example: for sub Figure 1 The operation node NS1 in the sub- Figure 1 The operation node NS2 in the sub- Figure 1 The operation node NS3 in the example can determine that the corresponding query information Q3 is "query business data C". Figure 1 If the operation node NS4 in the query is NS4, no corresponding query information will be generated.
[0071] For other sub Figure 2 and 3 , and so on to generate corresponding natural language text query information.
[0072] Then, the pre-trained generative language model on the large model server 300 is used to batch generate SQL language instructions corresponding to the plurality of first query information (S410). Figure 1 The corresponding query information is generated with the sub Figure 1 Corresponding SQL language instructions; or according to the sub Figure 2 The corresponding query information is generated with the sub Figure 2 Corresponding SQL language instructions; or according to the sub Figure 3 The corresponding query information is generated with the child Figure 3 Corresponding SQL language instructions.
[0073] Finally, the application server 200 will communicate with the child Figure 1 The corresponding SQL language instruction is input into the first database 410 storing the business data for query, thereby obtaining the sub Figure 1 Corresponding business data; or Figure 2 The corresponding SQL language instruction is input into the first database 410 for query, thereby obtaining the sub Figure 2 Corresponding business data; or Figure 3 The corresponding SQL language instruction is input into the first database 410 for query, thereby obtaining the sub Figure 3 Corresponding business data (ie, first business data) (S412).
[0074] As described in the background technology, the currently known text-to-SQL language instruction technology can only generate SQL language instructions for one query information input by the user at a time, and thus cannot generate corresponding SQL language instructions for query information with longer text or query information containing multiple operation steps.
[0075] In view of this, according to the technical solution of the present application, text information including multiple operation steps related to a data processing flow can be received, and the text information is text information based on natural language. Then, a node graph corresponding to the data processing flow is generated according to the text information, and multiple operation nodes with specified identical attributes are determined in the node graph, and query information corresponding to the multiple operation nodes is determined respectively. Then, using a generative language model, SQL language instructions corresponding to the query information are generated in batches, and the generated SQL language instructions are used to query in a database storing business data, thereby obtaining business data corresponding to the multiple operation nodes.
[0076] In this way, based on the same attributes of the business data, the query information corresponding to multiple operation nodes related to the data processing flow (i.e., multiple operation steps of the data processing flow) can be batch processed to batch generate multiple SQL language instructions corresponding to the multiple operation nodes, and the business data corresponding to the multiple operation nodes can be batch acquired from the business database. In this way, the efficiency of database query using natural language text is greatly improved. The technical problem that the text-to-SQL language instruction technology in the prior art cannot generate corresponding SQL language instructions for long text information containing multiple operation step texts is solved.
[0077] Optionally, the operation of batch-generating SQL language instructions corresponding to multiple first query information using a pre-trained generative language model includes: determining contexts corresponding to the multiple first query information respectively; combining each first query information with the corresponding context to generate enhanced information corresponding to each first query information; filling the enhanced information corresponding to each first query information into the same prompt information; and inputting the prompt information into the generative language model to generate SQL language instructions.
[0078] Specifically, refer to Figure 3 As shown, the task parsing module of the application server 200 determines the task Figure 1 After the corresponding multiple query information Q1~Q3, the application server 200 will determine the contexts C1~C3 corresponding to the query information Q1~Q3 respectively through the retrieval module. The contexts C1~C3 correspond to the query information Q1~Q3 respectively. The operation of determining the context corresponding to the query information will be described in detail below.
[0079] Then, the application server 200 combines the query information Q1 with the corresponding context C1 through the enhancement module to obtain the corresponding enhanced information X1; combines the query information Q2 with the corresponding context C2 to obtain the corresponding enhanced information X2; and combines the query information Q3 with the corresponding context C3 to obtain the corresponding enhanced information X3.
[0080] Then, the application server 200 combines the enhanced information X1-X3 through the enhancement module and fills them into the same preset prompt template to generate the sub- Figure 1 The corresponding prompt information P1.
[0081] Then, the generation module of the application server 200 inputs the prompt information P1 into the generative language model to generate Figure 1 Corresponding SQL language instructions.
[0082] And, based on the same method, the application server 200 can respectively determine the sub Figure 2 The corresponding prompt information P2 and Figure 3 Then, the application server 200 inputs the prompt information P2 and P3 into the generative language model respectively, thereby generating Figure 2 The corresponding SQL language instructions and sub Figure 3 Corresponding SQL language instructions.
[0083] Therefore, according to the technical solution of the present application, it is not necessary to input the prompt information corresponding to each query information P1-P3 into the generative language model one by one, but the enhanced information X1-X3 corresponding to each query information P1-P3 is filled into the same prompt information, so that the enhanced information X1-X3 corresponding to the sub-query information P1-P3 can be generated by inputting the prompt information only once. Figure 1 The SQL language instructions corresponding to each operation node in the . This further improves the efficiency of batch generating SQL language instructions.
[0084] Optionally, the operation of determining the contexts corresponding to multiple first query information respectively includes: using a pre-trained embedding model to perform an embedding operation on the multiple first query information to respectively determine the first vectors corresponding to each first query information; and performing vector matching in a second database of knowledge data storing business data based on the first vectors to determine the contexts corresponding to each first query information.
[0085] Specifically, Figure 6 The child Figure 1 Take the task analysis module as an example to illustrate that Figure 1 After the corresponding query information Q1~Q3 is obtained, the search module of the application server 200 uses the pre-trained embedding model to perform an embedding operation on the query information Q1~Q3, thereby determining the query vectors V1~V3 corresponding to the query information Q1~Q3. The embedding model, for example, can adopt a known natural language embedding model, such as a word embedding model or other models. Thus, by performing an embedding operation on each query information Q1~Q3, the query vectors V1~V3 corresponding to the query information Q1~Q3 are determined.
[0086] Then, the retrieval module inputs the query vectors V1~V3 into the second database 420 respectively. The second database 420 stores knowledge data corresponding to each business data. The knowledge data includes metadata or meta-information of each business data. The metadata includes data information such as data collection, data model, data assets, indicator data, label portrait data, data report and data works corresponding to the business data, and the data meta-information includes information such as version, name, description and address. In addition, the knowledge data composed of data information such as metadata or meta-information is also vectorized through the embedding model to generate corresponding knowledge vectors and store them in the second database 420.
[0087] Therefore, after the query vectors V1-V3 are respectively input into the second database 420, they are matched with the knowledge vectors in the second database 420, and according to the matching results, the contexts C1-C3 corresponding to the query information Q1-Q3 are determined, wherein the contexts are composed of knowledge data.
[0088] As for the child Figure 2 Kazuko Figure 3 The query information is also processed as mentioned above and will not be repeated here.
[0089] Therefore, in this way, by means of vector matching, the context corresponding to each query information can be determined more accurately, so that more accurate prompt information can be generated in subsequent steps, which is conducive to the generative language model to generate more accurate SQL language instructions.
[0090] Optionally, according to the attributes of the business data corresponding to the operation steps, the operations of multiple second operation nodes are determined from the first operation node, including: according to the attributes of the business data corresponding to the operation steps, generating a second node graph corresponding to the first node graph, wherein the second node graph includes multiple sub-graphs, wherein the operation nodes of the same sub-graph serve as multiple second operation nodes and have the same specified attributes.
[0091] Specifically, refer to Figure 3 As shown, the task analysis module can generate Figure 5 The second node graph corresponding to the first node graph shown. Figure 6 The second node graph is shown. Figure 6 As shown, the second node graph includes sub Figure 1 ,son Figure 2 Kazuko Figure 3 .
[0092] Specifically, for example, when the user inputs text information related to the processing flow, the attributes corresponding to the business data of each step can be written in the text information. For example, in this embodiment, the attributes of the business data corresponding to each operation step are security and privacy attributes. Among them, the security and privacy attributes of the business data A~E corresponding to steps 1~3 and steps 5~6 are "privacy", and the security and privacy attributes of the business data F and G corresponding to steps 11 and 12 are "non-privacy". Therefore, the task analysis module can determine the security and privacy attributes of the data corresponding to each step based on the text information of each step. Of course, in this embodiment, the security and privacy attributes are only exemplarily described as designated attributes. Those skilled in the art should be aware that other types of attributes can be used as the designated attributes according to actual conditions.
[0093] Among them Figure 1 The business data corresponding to each operation node NS1~NS4 in the sub Figure 2 The business data corresponding to each operation node NS5~NS7 and NS9 in the Figure 3 Each operation node NS in 11 ~NS 13 Thus, according to the technical solution of the present application, by assigning nodes with the same specified attributes to the same subgraph in the first node graph, corresponding business data can be queried in parallel based on multiple subgraphs at the same time. Figure 1 ,son Figure 2 Kazuko Figure 3 The query information corresponding to each node in the process is processed in parallel, which will be described in detail later.
[0094] Optionally, using a pre-trained embedding model, embedding operations are performed on multiple first query information, and the operation of determining the first query vector corresponding to each first query information respectively includes: embedding operations are performed on the first query information of each subgraph in parallel, so as to determine the first query vector corresponding to the first query information of each subgraph in parallel. And wherein, according to the first query vector, vector matching is performed in the second database of knowledge data storing business data, and the operation of determining the first knowledge data corresponding to each first query information as context includes: performing vector matching according to the first query vector of each subgraph in parallel, so as to determine the first knowledge data corresponding to the first query information of each subgraph in parallel as context. Further optionally, the operation of combining each first query information with the corresponding context to generate enhanced information corresponding to each first query information includes: combining the first query information of each subgraph with the corresponding context in parallel to generate enhanced information corresponding to the first query information of each subgraph. The operation of filling the enhanced information corresponding to each first query information into the same prompt information includes: filling the enhanced information of each subgraph into the prompt information corresponding to each subgraph in parallel. Furthermore, the operation of inputting the prompt information into the generative language model to generate an SQL language instruction includes: inputting the prompt information corresponding to each subgraph into the generative language model in parallel to generate an SQL language instruction corresponding to each subgraph. Furthermore, optionally, the operation of using the SQL language instruction to query in the first database storing the business data to obtain the first business data corresponding to the second operation node includes: inputting the SQL language instruction corresponding to each subgraph into the first database in parallel to query, and obtaining the first business data corresponding to each subgraph in parallel.
[0095] Specifically, refer to Figure 7 As shown, according to this embodiment, after generating the second node graph, the task parsing module generates in parallel the sub-node graphs respectively. Figure 1 ,son Figure 2 Kazuko Figure 3 For example, generate the corresponding query information in parallel with the sub Figure 1 The corresponding query information Q1~Q3 and sub Figure 2 The corresponding query information Q4~Q5 and Figure 3 Corresponding query information Q6~Q7.
[0096] Then, the retrieval module generates in parallel the Figure 1 ,son Figure 2 Kazuko Figure 3 For example, query vectors V1 to V3 corresponding to query information Q1 to Q3, query vectors V4 to V5 corresponding to query information Q4 to Q5, and query vectors V6 to V7 corresponding to query information Q6 to Q7 are generated in parallel.
[0097] The retrieval module then parallelizes the Figure 1 ,son Figure 2 Kazuko Figure 3 The corresponding query vector is input into the second database 420 for retrieval to determine the sub Figure 1 ,son Figure 2 Kazuko Figure 3 Corresponding contexts. For example, the search module inputs query vectors V1-V3, query vectors V4-V5, and query vectors V6-V7 into the second database 420 in parallel, thereby determining corresponding contexts C1-C3, contexts C4-C5, and contexts C6-C7.
[0098] Then, the enhancement module generates Figure 1 ,son Figure 2 Kazuko Figure 3 For example, the enhancement module combines query information Q1-Q3 with context C1-C3 in parallel to generate enhancement information X1-X3, combines query information Q4-Q5 with context C4-C5 to generate enhancement information X4-X5, and combines query information Q6-Q7 with context C6-C7 to generate enhancement information X6-X7. Then the enhancement module generates the enhancement information X1-X3 in parallel with the sub-query information Q1-Q3 and the sub-query information Q4-Q5 and the sub-query information Q6-Q7 and the sub-query information Q6-Q7. Figure 1 ,son Figure 2 Kazuko Figure 3 For example, the enhancement module generates corresponding prompt information based on the enhancement information X1~X3 in parallel. Figure 1 The corresponding prompt information P1 is generated according to the enhanced information X4~X5 Figure 2 The corresponding prompt information P2 is generated according to the enhanced information X6~X7 Figure 3 Corresponding prompt information P3.
[0099] The generated module will then be parallelized with the sub Figure 1 ,son Figure 2 Kazuko Figure 3 The corresponding prompt information P1-P3 is input into the generative language model of the model server 300, thereby generating Figure 1 ,son Figure 2 Kazuko Figure 3 The corresponding query language instruction.
[0100] Therefore, according to the technical solution of this embodiment, the query information of each subgraph can be processed in parallel, so as to generate the prompt information corresponding to each subgraph in parallel, and generate the query language instructions corresponding to each subgraph in parallel. In this way, multiple query language instructions corresponding to each text information can be generated in batches in parallel, thereby greatly improving the efficiency of the query.
[0101] Optionally, the multiple sub-graphs include a first sub-graph and a second sub-graph, where the first sub-graph includes multiple operation nodes that need to perform privacy calculations and are configured adjacently, and the second sub-graph includes multiple operation nodes that do not need to perform privacy calculations and are configured adjacently. And wherein, the operation of obtaining the first service data corresponding to each sub-graph in parallel includes: obtaining the first service data corresponding to the first sub-graph and the second sub-graph respectively in parallel. And wherein, the method further includes: implementing the calculation processes of the first sub-graph and the second sub-graph in parallel.
[0102] Specifically, as described above, the sub- Figure 1 and sub- Figure 2 (i.e., the first sub-graph) of the second node graph, the operation nodes NS1~NS4, NS5~NS7, and NS9 are operation nodes that need to perform privacy calculations; and the sub- Figure 3 (i.e., the second sub-graph) of the second node graph, the operation nodes NS 11 ~NS 13 are operation nodes that do not need to perform privacy calculations.
[0103] Thus, according to this embodiment, the task parsing module of the application server determines the security and privacy types (private service data or non-private service data) of the service data corresponding to each operation node of the first node graph according to the security and privacy attributes of the service data corresponding to each operation step recorded in the text information. The task parsing module further combines multiple adjacent operation nodes involving private service data into a sub-graph (i.e., the first sub-graph, such as sub- Figure 1 and sub- Figure 2 ), and combines multiple adjacent operation nodes not involving private service data into a sub-graph (i.e., the second sub-graph, such as sub- Figure 3 ). Then, the calculation module implements the calculation processes corresponding to each sub- Figure 1 ~sub- Figure 3 according to the service data corresponding to the operation nodes of each sub-graph in the second node graph, using a method adapted to the service data (using privacy calculation or conventional calculation).
[0104] Therefore, according to this embodiment, multiple operation nodes that require privacy calculation in the first node graph are merged into one subgraph, or multiple operation nodes that do not require privacy calculation are merged into one subgraph. Therefore, according to the user's data privacy configuration of the business data, multiple operation nodes can be merged together with a more flexible strategy, and the calculation process of each subgraph can be performed using an adaptive calculation method. In this way, privacy calculation can be performed only on business data that the user configures as private business data, while business data that the user configures as non-private business data can be calculated using conventional methods, thereby reducing the additional consumption of computing resources caused by privacy calculations. In addition, this embodiment uniformly generates prompt information for business data in the same subgraph by batch query, thereby improving both computing efficiency and query efficiency.
[0105] Optionally, the method further includes: merging the calculation processes of the calculation nodes in the first subgraph, and performing corresponding privacy calculations on the merged calculation processes.
[0106] Specifically, refer to Figure 6 As shown, Figure 1 The calculation operation of the operation node NS1 in is: z1=k1 A; The calculation operation of operation node NS2 is z2=k2 B; The calculation operation of operation node NS3 is z3=k3 C; The calculation operation of the operation node NS4 is z4=z1+z2+z3.
[0107] Thus, when the computing module operates, Figure 1 The computing operations of operation nodes NS1~NS4 are integrated as follows:
[0108] z4=k1*A+k2 B+k3 C.
[0109] In addition, the calculation module will Figure 2 The calculation operations are integrated into:
[0110] z9=k7*(k4 D+k5 E).
[0111] And, the computing module will Figure 3 The calculation operations are integrated into:
[0112] z 13 =k8 F+k9 G.
[0113] Then, the calculation module performs integrated calculations on each subgraph.
[0114] In this way, the interaction process in the privacy calculation process can be reduced, thus greatly improving the efficiency of privacy calculation.
[0115] Optionally, the method further includes: using the calculation results of each sub-graph as constants for the operation of the second node graph.
[0116] Specifically, referring to Figure 3 and Figure 6 shown, after the calculation modules respectively complete the calculations of sub- Figure 1 ~sub- Figure 3 , the calculation results will be used as constants and combined with other calculation nodes and sub-graphs (not shown) in the second node graph for calculation, so as to obtain the calculation results corresponding to the data processing flow.
[0117] In addition, referring to Figure 1 shown, according to the second aspect of this embodiment, a storage medium is provided. The storage medium includes a stored program, wherein when the program runs, the method described in any one of the above is executed by a processor.
[0118] Thus, according to this embodiment, text information including multiple operation steps related to the data processing flow can be received, and the text information is natural language-based text information. Then, a node graph corresponding to the data processing flow is generated according to the text information, and multiple operation nodes with specified identical attributes are determined in the node graph, and query information corresponding to the multiple operation nodes is respectively determined. Then, a generative language model is used to batch generate SQL language instructions corresponding to the query information, and the generated SQL language instructions are used to query in the database storing business data, so as to obtain business data corresponding to the multiple operation nodes. In this way, based on the identical attributes of the business data, the query information corresponding to multiple operation nodes (i.e., multiple operation steps of the data processing flow) related to the data processing flow can be batch processed to batch generate multiple SQL language instructions corresponding to the multiple operation nodes, and the business data corresponding to the multiple operation nodes can be batch obtained from the business database. In this way, the efficiency of database query using natural language text is greatly improved. The technical problem in the prior art that the text-to-SQL language instruction technology cannot generate corresponding SQL language instructions for long text information containing multiple operation steps is solved.
[0119] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention. Example 2
[0121] Figure 8 FIG. 8 shows a database processing device 800 based on a generative language model according to this embodiment, which corresponds to the method described in the first aspect of Embodiment 1. Figure 8 As shown, the device 800 includes: a text information receiving module 810, which is used to receive text information related to the data processing flow, wherein the text information includes natural language text corresponding to multiple operation steps of the data processing flow; a node graph generating module 820, which is used to generate a first node graph corresponding to the data processing flow according to the text information, wherein the first node graph includes multiple first operation nodes corresponding to the multiple operation steps; an operation node determining module 830, which is used to determine multiple second operation nodes from the first operation node according to the attributes of the business data corresponding to the operation steps, wherein the business data corresponding to the multiple second operation nodes have the same specified attributes; a query information determining module 840, which is used to determine multiple first query information corresponding to different second operation nodes respectively, wherein the first query information is natural language text information; an SQL language instruction generating module 850, which is used to batch generate SQL language instructions corresponding to multiple first query information using a pre-trained generative language model; and a query module 860, which is used to query in a first database storing business data using SQL language instructions to obtain first business data corresponding to the second operation node.
[0122] Thus, according to this embodiment, text information including multiple operation steps related to a data processing flow can be received, and the text information is text information based on natural language. Then, a node graph corresponding to the data processing flow is generated according to the text information, and multiple operation nodes with the same specified attributes are determined in the node graph, and query information corresponding to the multiple operation nodes is determined respectively. Then, SQL language instructions corresponding to the query information are generated in batches using a generative language model, and the generated SQL language instructions are used to query in a database storing business data, thereby obtaining business data corresponding to the multiple operation nodes. Thus, in this way, based on the same attributes of the business data, the query information corresponding to multiple operation nodes (i.e., multiple operation steps of the data processing flow) related to the data processing flow can be batch processed to batch generate multiple SQL language instructions corresponding to the multiple operation nodes, and the business data corresponding to the multiple operation nodes can be batch obtained from the business database. Thus, in this way, the efficiency of using natural language text to perform database query is greatly improved. The technical problem that the text-to-SQL language instruction technology existing in the prior art cannot generate corresponding SQL language instructions for long text information containing multiple operation step texts is solved. Example 3
[0123] Fig. 9 FIG. 9 shows a database processing device 900 based on a generative language model according to this embodiment, which corresponds to the method described in the first aspect of Embodiment 1. Fig. 9 As shown, the device 900 includes: a processor 910; and a memory 920, which is connected to the processor 910 and is used to provide the processor 910 with instructions for processing the following processing steps: receiving text information related to a data processing flow, wherein the text information includes natural language text corresponding to multiple operation steps of the data processing flow; generating a first node graph corresponding to the data processing flow according to the text information, wherein the first node graph includes multiple first operation nodes corresponding to the multiple operation steps; determining multiple second operation nodes from the first operation nodes according to the attributes of the business data corresponding to the operation steps, wherein the business data corresponding to the multiple second operation nodes have the same specified attributes; determining multiple first query information corresponding to different second operation nodes respectively, wherein the first query information is natural language text information; using a pre-trained generative language model to batch generate SQL language instructions corresponding to multiple first query information; and using the SQL language instructions to query in a first database storing business data to obtain the first business data corresponding to the second operation node.
[0124] Thus, according to this embodiment, text information including multiple operation steps related to a data processing flow can be received, and the text information is text information based on natural language. Then, a node graph corresponding to the data processing flow is generated according to the text information, and multiple operation nodes with the same specified attributes are determined in the node graph, and query information corresponding to the multiple operation nodes is determined respectively. Then, SQL language instructions corresponding to the query information are generated in batches using a generative language model, and the generated SQL language instructions are used to query in a database storing business data, thereby obtaining business data corresponding to the multiple operation nodes. Thus, in this way, based on the same attributes of the business data, the query information corresponding to multiple operation nodes (i.e., multiple operation steps of the data processing flow) related to the data processing flow can be batch processed to batch generate multiple SQL language instructions corresponding to the multiple operation nodes, and the business data corresponding to the multiple operation nodes can be batch obtained from the business database. Thus, in this way, the efficiency of using natural language text to perform database query is greatly improved. The technical problem that the text-to-SQL language instruction technology existing in the prior art cannot generate corresponding SQL language instructions for long text information containing multiple operation step texts is solved.
[0125] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0126] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0127] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0128] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0129] In addition, each functional unit in each embodiment of the present invention 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-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0130] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0131] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A database processing method based on a generative language model, characterized in that: include: Receiving text information related to a data processing flow, wherein the text information includes natural language text corresponding to a plurality of operation steps of the data processing flow; Generate a first node graph corresponding to the data processing flow according to the text information, wherein the first node graph includes a plurality of first operation nodes corresponding to the plurality of operation steps; Determine a plurality of second operation nodes from the first operation nodes according to the attributes of the business data corresponding to the operation step, wherein the business data corresponding to the plurality of second operation nodes have the same specified attributes; Determine a plurality of first query information respectively corresponding to different second operation nodes, wherein the first query information is natural language text information; Using a pre-trained generative language model, batch-generate SQL language instructions corresponding to the plurality of first query information; as well as The SQL language instruction is used to query in a first database storing business data to obtain first business data corresponding to the second operation node, wherein The operation of batch-generating SQL language instructions corresponding to the plurality of first query information using a pre-trained generative language model includes: Determining contexts corresponding to the plurality of first query information respectively; Combining each piece of first query information with a corresponding context to generate enhanced information corresponding to the each piece of first query information; Filling the enhanced information corresponding to each of the first query information into the same prompt information; and The prompt information is input into the generative language model to generate the SQL language instruction.
2. The method according to claim 1, characterized in that: The operation of determining contexts corresponding to the plurality of first query information respectively includes: Using a pre-trained embedding model, embedding the plurality of first query information, and respectively determining a first query vector corresponding to each of the first query information; and Vector matching is performed in a second database of knowledge data storing business data according to the first query vector, and first knowledge data corresponding to each of the first query information is determined as the context.
3. The method according to claim 2, characterized in that Determining operations of a plurality of second operation nodes from the first operation nodes according to attributes of the business data corresponding to the operation steps includes: According to the attributes of the business data corresponding to the operation steps, a second node graph corresponding to the first node graph is generated, wherein the second node graph includes multiple subgraphs, wherein the operation nodes of the same subgraph serve as the multiple second operation nodes and have the same specified attributes.
4. The method according to claim 3, characterized in that Using a pre-trained embedding model, embedding the plurality of first query information to determine the first query vectors corresponding to the first query information, respectively, including: embedding the first query information of each subgraph in parallel, thereby determining the first query vectors corresponding to the first query information of each subgraph in parallel, and wherein An operation of performing vector matching in a second database of knowledge data storing business data according to the first query vector to determine the first knowledge data corresponding to the each first query information as the context includes: performing vector matching in parallel according to the first query vector of each subgraph, thereby determining in parallel the first knowledge data corresponding to the first query information of each subgraph as the context.
5. The method according to claim 4, characterized in that The operation of combining each first query information with a corresponding context to generate enhanced information corresponding to the first query information includes: combining the first query information of each subgraph with a corresponding context in parallel to generate enhanced information corresponding to the first query information of each subgraph, The operation of filling the enhanced information corresponding to each of the first query information into the same prompt information includes: filling the enhanced information of each of the sub-images into the prompt information corresponding to each of the sub-images in parallel, and The operation of inputting the prompt information into the generative language model to generate the SQL language instruction includes: inputting the prompt information corresponding to each of the subgraphs into the generative language model in parallel to generate the SQL language instruction corresponding to each of the subgraphs.
6. The method according to claim 5, characterized in that The operation of using the SQL language instruction to query in the first database storing the business data to obtain the first business data corresponding to the second operation node includes: The SQL language instructions corresponding to the subgraphs are input into the first database in parallel for query, and the first business data corresponding to the subgraphs are obtained in parallel.
7. The method according to claim 3, characterized in that The multiple subgraphs include a first subgraph and a second subgraph, wherein the first subgraph includes a plurality of adjacently configured operation nodes that need to perform privacy computing, and the second subgraph includes a plurality of adjacently configured operation nodes that do not need to perform privacy computing, and wherein, The operation of acquiring the first business data corresponding to the respective subgraphs in parallel comprises: acquiring the first business data corresponding to the first subgraph and the second subgraph respectively in parallel, and wherein: The method further includes: performing calculation processes of the first subgraph and the second subgraph in parallel.
8. A database processing device based on a generative language model, characterized in that: include: A text information receiving module, used to receive text information related to the data processing flow, wherein the text information includes natural language text corresponding to multiple operation steps of the data processing flow; A first node graph generating module, configured to generate a first node graph corresponding to the data processing flow according to the text information, wherein the first node graph includes a plurality of first operation nodes corresponding to the plurality of operation steps; An operation node determination module, configured to determine a plurality of second operation nodes from the first operation node according to the attributes of the business data corresponding to the operation step, wherein the business data corresponding to the plurality of second operation nodes have the same specified attributes; A query information determination module, used to determine a plurality of first query information respectively corresponding to different second operation nodes, wherein the first query information is natural language text information; An SQL language instruction generation module, used to generate SQL language instructions corresponding to the plurality of first query information in batches by using a pre-trained generative language model; as well as A query module is used to query the first database storing the business data using the SQL language instruction to obtain the first business data corresponding to the second operation node, wherein the SQL language instruction generation module is further used to perform the following operations: Determining contexts corresponding to the plurality of first query information respectively; Combining each piece of first query information with a corresponding context to generate enhanced information corresponding to the each piece of first query information; Filling the enhanced information corresponding to each of the first query information into the same prompt information; as well as The prompt information is input into the generative language model to generate the SQL language instruction.
9. A database processing device based on a generative language model, characterized in that: include: processor; as well as A memory, connected to the processor, configured to provide the processor with instructions for processing the following processing steps: Receiving text information related to a data processing flow, wherein the text information includes natural language text corresponding to a plurality of operation steps of the data processing flow; Generate a first node graph corresponding to the data processing flow according to the text information, wherein the first node graph includes a plurality of first operation nodes corresponding to the plurality of operation steps; Determine a plurality of second operation nodes from the first operation nodes according to the attributes of the business data corresponding to the operation step, wherein the business data corresponding to the plurality of second operation nodes have the same specified attributes; Determine a plurality of first query information respectively corresponding to different second operation nodes, wherein the first query information is natural language text information; Using a pre-trained generative language model, batch-generate SQL language instructions corresponding to the plurality of first query information; as well as The SQL language instruction is used to query in a first database storing business data to obtain first business data corresponding to the second operation node, wherein The operation of batch-generating SQL language instructions corresponding to the plurality of first query information using a pre-trained generative language model includes: Determining contexts corresponding to the plurality of first query information respectively; Combining each piece of first query information with a corresponding context to generate enhanced information corresponding to the each piece of first query information; Filling the enhanced information corresponding to each of the first query information into the same prompt information; and The prompt information is input into the generative language model to generate the SQL language instruction.
