Data processing method and device, computer equipment and computer readable storage medium
By obtaining user query data and user operation selection data, determining the target database type and target data set of the database to be queried, and generating the first query script data, solving the problems of high labor costs and low R&D efficiency in the digital transformation of enterprises, realizing the Efficient automation and cost reduction.
Patent Information
- Application Number
- CN202311058909.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2025-02-21
AI Technical Summary
Enterprises' digital transformation heavily relies on professional R&D personnel, resulting in high labor costs and low R&D efficiency.
By obtaining user query data and user operation selection data, determining the target database type and target data set of the database to be queried, generating the first query script data, and realizing the automated processing of user needs.
It improves the efficiency of enterprise digital transformation, reduces labor costs, and realizes that users only need to provide basic inquiry content and database selection to obtain query results.
Smart Images

Figure CN119493815A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, computer equipment and computer-readable storage medium. Background Art
[0002] Enterprise digital transformation refers to the redesign and reconstruction of the business, processes, culture and organizational model of traditional enterprises through the application of digital technology to achieve digitalization, networking and intelligence of business and enhance the competitiveness and innovation ability of enterprises. This transformation covers all aspects of the entire enterprise value chain, including production, supply chain management, sales and marketing, customer service, human resources, financial management and other aspects.
[0003] The core goal of enterprise digital transformation is to achieve efficient, flexible, intelligent and innovative business operations through the application of digital technology. However, in related technical fields, enterprise digital transformation relies heavily on professional R&D personnel, which has high labor costs and low R&D efficiency.
[0004] Therefore, how to improve the efficiency of enterprise digital transformation and reduce labor costs is a technical problem that needs to be urgently solved in the current field of computer technology. Summary of the invention
[0005] The present application provides a data processing method, apparatus, computer device and computer-readable storage medium, aiming to solve the problem of how to improve the efficiency of enterprise digital transformation and reduce labor costs.
[0006] In one aspect, the present application provides a data processing method, the method comprising:
[0007] Acquire user query data and user operation selection data, wherein the user operation selection data includes database type selection data and data set selection data performed by the user in a preset front-end operation interface;
[0008] Based on the user operation selection data, determine the target database type and target data set of the database to be queried;
[0009] Determining language description data based on the target database type and the target data set;
[0010] Determine target user demand description data based on the user query data, target database type, language description data and preset experience parameters;
[0011] Based on the target user demand description data, first query script data is generated.
[0012] In some embodiments, generating first query script data based on the target user demand description data includes:
[0013] Inputting the target user demand description data into a preset dialogue generation model to generate first query script data;
[0014] After generating the first query script data, the method further includes:
[0015] Execute the first query script data, and generate a first execution result and a first execution status;
[0016] If the first execution state is a normal state, the first execution result is sent to the front end.
[0017] In some embodiments, after executing the first query script data and generating a first execution result and a first execution status, the method further includes:
[0018] If the first execution state is an abnormal state, generating abnormal feedback data;
[0019] If the abnormal feedback data is abnormal feedback data of a preset type, re-inputting the target user demand description data into the dialogue generation model to generate second query script data;
[0020] Execute the second query script data, and generate a second execution result and a second execution status;
[0021] If the second execution state is a normal state, the second execution result is sent to the front end.
[0022] In some embodiments, after executing the first query script data and generating a first execution result and a first execution status, the method further includes:
[0023] If the first execution state is an abnormal state, generating abnormal feedback data;
[0024] Based on the abnormal feedback data, the cause of the abnormality is determined.
[0025] In some embodiments, after determining the cause of the abnormality based on the abnormality feedback data, the method further includes:
[0026] If the cause of the abnormality is a cause of the abnormality of a preset type, determining a first data structure of the user query data;
[0027] Comparing the first data structure with a preset target data structure;
[0028] If the comparison results are different, modification guidance data for the query data is generated;
[0029] The modified guidance data is sent to the terminal.
[0030] In some embodiments, the determining the target user demand description data based on the user query data, the target database type, the language description data and the preset experience parameters includes:
[0031] Determining the empirical parameter based on the target database type and a preset database type and empirical parameter relationship mapping table;
[0032] Based on the target database type, determining an output type of a query result for the user query data;
[0033] Based on the user query data, output type, language description data and experience parameters, target user demand description data is determined.
[0034] In some embodiments, the determining of the language description data based on the target database type and the target data set includes:
[0035] Based on the target database type, determining a data table structure of the target data set;
[0036] Based on the data table structure, the target data set is initialized as language description data.
[0037] In another aspect, the present application provides a data processing device, the device comprising:
[0038] A first acquisition unit, used to acquire user query data and user operation selection data, wherein the user operation selection data includes database type selection data and data set selection data performed by the user in a preset front-end operation interface;
[0039] A first determining unit, configured to determine a target database type and a target data set of a database to be queried based on the user operation selection data;
[0040] A second determining unit, configured to determine language description data based on the target database type and the target data set;
[0041] A third determining unit, configured to determine target user demand description data based on the user query data, the target database type, the language description data, and preset experience parameters;
[0042] The first generating unit is used to generate first query script data based on the target user demand description data.
[0043] In some embodiments, the first generating unit is specifically configured to:
[0044] Inputting the target user demand description data into a preset dialogue generation model to generate first query script data;
[0045] After generating the first query script data, the device is further used for:
[0046] Execute the first query script data, and generate a first execution result and a first execution status;
[0047] If the first execution state is a normal state, the first execution result is sent to the front end.
[0048] In some embodiments, after executing the first query script data and generating a first execution result and a first execution status, the apparatus is further configured to:
[0049] If the first execution state is an abnormal state, generating abnormal feedback data;
[0050] If the abnormal feedback data is abnormal feedback data of a preset type, re-inputting the target user demand description data into the dialogue generation model to generate second query script data;
[0051] Execute the second query script data, and generate a second execution result and a second execution status;
[0052] If the second execution state is a normal state, the second execution result is sent to the front end.
[0053] In some embodiments, after executing the first query script data and generating a first execution result and a first execution status, the apparatus is further configured to:
[0054] If the first execution state is an abnormal state, generating abnormal feedback data;
[0055] Based on the abnormal feedback data, the cause of the abnormality is determined.
[0056] In some embodiments, after determining the cause of the abnormality based on the abnormality feedback data, the device is further configured to:
[0057] If the cause of the abnormality is a cause of the abnormality of a preset type, determining a first data structure of the user query data;
[0058] Comparing the first data structure with a preset target data structure;
[0059] If the comparison results are different, modification guidance data for the query data is generated;
[0060] The modified guidance data is sent to the terminal.
[0061] In some embodiments, the third determining unit is specifically configured to:
[0062] Determining the empirical parameter based on the target database type and a preset database type and empirical parameter relationship mapping table;
[0063] Based on the target database type, determining an output type of a query result for the user query data;
[0064] Based on the user query data, output type, language description data and experience parameters, target user demand description data is determined.
[0065] In some embodiments, the second determining unit is specifically configured to:
[0066] Based on the target database type, determining a data table structure of the target data set;
[0067] Based on the data table structure, the target data set is initialized as language description data.
[0068] On the other hand, the present application also provides a computer device, the computer device comprising:
[0069] one or more processors;
[0070] Memory; and
[0071] One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the data processing method.
[0072] On the other hand, the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is loaded by a processor to execute the steps in the data processing method.
[0073] The embodiment of the present application provides a data processing method, which obtains user query data and user operation selection data, wherein the user operation selection data includes database type selection data and data set selection data performed by the user in a preset front-end operation interface; based on the user operation selection data, determines the target database type and target data set of the database to be queried; based on the target database type and the target data set, determines the language description data; based on the user query data, the target database type, the language description data and the preset experience parameters, determines the target user demand description data; based on the target user demand description data, generates the first query script data. The method realizes that the user only needs to provide the most basic query content and basic selection of the database, and the result that the user needs to query can be obtained through data analysis of the back-end server, thereby improving the efficiency of the digital transformation of the enterprise and reducing labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0075] Figure 1 is a scenario schematic diagram of a data processing system provided in an embodiment of the present application;
[0076] Figure 2 It is a schematic diagram of an embodiment of a data processing method provided in an embodiment of the present application;
[0077] Figure 3 is a schematic diagram of the structure of an embodiment of a data processing device provided in an embodiment of the present application;
[0078] Figure 4 It is a schematic diagram of the structure of an embodiment of a computer device provided in the embodiments of the present application. DETAILED DESCRIPTION
[0079] 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 those skilled in the art without creative work are within the scope of protection of this application.
[0080] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the said features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0081] In this application, the word "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any technician in the field to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present application can be implemented without using these specific details. In other instances, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.
[0082] The embodiments of the present application provide a data processing method, apparatus, computer device, and computer-readable storage medium, which are described in detail below.
[0083] like Figure 1 As shown, Figure 1 1 is a schematic diagram of a data processing system provided in an embodiment of the present application. The data processing system may include a computer device 100, in which a data processing device is integrated, such as Figure 1 A computer device 100 in FIG.
[0084] In the embodiment of the present application, the computer device 100 is mainly used to obtain user query data and user operation selection data, wherein the user operation selection data includes database type selection data and data set selection data performed by the user in a preset front-end operation interface; based on the user operation selection data, the target database type and target data set of the database to be queried are determined; based on the target database type and the target data set, the language description data is determined; based on the user query data, the target database type, the language description data and the preset experience parameters, the target user demand description data is determined; based on the target user demand description data, the first query script data is generated.
[0085] In the embodiment of the present application, the computer device 100 may be a terminal or a server. When the computer device 100 is a server, it may be an independent server, or a server network or server cluster composed of servers. For example, the computer device 100 described in the embodiment of the present application includes but is not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud server constructed by a plurality of servers. The cloud server is constructed by a large number of computers or network servers based on cloud computing.
[0086] It is understandable that when the computer device 100 in the embodiment of the present application is a terminal, the terminal used may be a device including both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. Such a device may include: a cellular or other communication device having a single-line display or a multi-line display or a cellular or other communication device without a multi-line display. The specific computer device 100 may be a desktop terminal or a mobile terminal, and the computer device 100 may also be one of a mobile phone, a tablet computer, a laptop computer, a medical auxiliary instrument, etc.
[0087] Those skilled in the art will understand that Figure 1 The application environment shown in the figure is only one application scenario of the present application solution, and is not intended to limit the application scenario of the present application solution. Other application environments may also include Figure 1 More or less computer equipment as shown in Figure 1 Only one computer device is shown in the figure. It can be understood that the data processing system may also include one or more other computer devices, which are not specifically limited here.
[0088] In addition, if Figure 1 As shown, the data processing system may further include a memory 200 for storing data, such as user operation selection data and data processing data, such as data processing data when the data processing system is running.
[0089] It should be noted that Figure 1 The scenario diagram of the data processing system shown is merely an example. The data processing system and scenario described in the embodiments of the present application are intended to more clearly illustrate the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided in the embodiments of the present application. A person of ordinary skill in the art will appreciate that with the evolution of the data processing system and the emergence of new business scenarios, the technical solution provided in the embodiments of the present application is equally applicable to similar technical problems.
[0090] Next, the data processing method provided by the embodiment of the present application is introduced.
[0091] In the embodiment of the data processing method of the present application embodiment, a data processing device is used as an execution subject. For the sake of simplicity and ease of description, the execution subject will be omitted in the subsequent method embodiments. The data processing device is applied to a computer device. The method includes: obtaining user query data and user operation selection data, the user operation selection data including database type selection data and data set selection data performed by the user in a preset front-end operation interface; based on the user operation selection data, determining a target database type and a target data set of the database to be queried; based on the target database type and the target data set, determining language description data; based on the user query data, the target database type, the language description data and preset experience parameters, determining target user demand description data; based on the target user demand description data, generating first query script data.
[0092] See also Figures 2 to 4 , Figure 2 The following is a flow chart of an embodiment of a data processing method provided in an embodiment of the present application. The data processing method includes:
[0093] 201. Acquire user query data and user operation selection data, wherein the user operation selection data includes database type selection data and data set selection data performed by the user in a preset front-end operation interface;
[0094] In the embodiment of the present application, the preset front-end operation section includes the following contents:
[0095] Button class: Generate SQL button, Execute SQL button;
[0096] Selection box: database selection, data set selection, database type selection;
[0097] Text box: user demand input box, SQL script receiving box (results returned by the dialogue generation model (such as chatgpt)), SQL execution results (returned by the database);
[0098] Table: Receives SQL return result set.
[0099] SQL (Structured Query Language) is a standardized query language used to manage and operate relational databases (RDBMS). It is a declarative language used to perform database operations such as querying data, inserting, updating and deleting data, and creating and managing database objects (tables, views, indexes, etc.).
[0100] The SQL used in this application has the following advantages: Set-oriented: The SQL language is set-oriented and can perform operations on entire tables or subsets of tables without processing data row by row. Interaction with database management systems: The SQL language performs operations by interacting with database management systems (DBMS), including data query, data update, transaction control, etc. Support for multiple operations: The SQL language supports a variety of operations, including data query (SELECT), data insertion (INSERT), data update (UPDATE), data deletion (DELETE), etc. Data definition capabilities: The SQL language can not only operate data, but also define and manage the structure of the database, including creating tables, defining columns, setting constraints, etc. Standardization: The SQL language follows international standards. Different database vendors have implemented their own SQL extensions, but the basic syntax and functions are the same.
[0101] The SQL button mentioned above is usually a function button used to execute SQL statements. When the user clicks the SQL button, a text box or a dialog box usually pops up on the front-end interface for entering SQL statements. The user can enter a valid SQL statement in the text box and then click the Execute button or the Submit button to send the SQL statement to the back-end server for processing.
[0102] The main function of the SQL button is to allow users to query, insert, update, delete, and other operations on the database in the form of SQL statements. Users can write SQL statements according to their needs and submit them to the back-end server for processing through the SQL button on the interface. The back-end server will parse the SQL statement, perform the corresponding database operations, and return the results to the front-end interface for display to the user.
[0103] In actual applications, the SQL button is usually used in conjunction with other function buttons (such as query button, add button, delete button, etc.) to provide a full range of database operation capabilities. Through the SQL button, users can directly write and execute SQL statements, flexibly operate the database, and meet various complex data requirements.
[0104] In an embodiment of the present application, the user query data can be input by the user in the user demand input box of the preset front-end operation interface, such as: find out the subject scores corresponding to the top 10 classmates; and the user operation selection data is the content selected by the user in the selection box of the preset front-end operation interface; after the user performs the above operation, the front end will send the data corresponding to the above content to the server, and then the server will receive it to obtain the user query data and user operation selection data.
[0105] 202. Determine a target database type and a target data set of a database to be queried based on the user operation selection data;
[0106] Among them, database type refers to different types of database management systems (DBMS), which differ in specific data models and structures. Specifically, each type of database is briefly described. Relational database (RDBMS): A relational database is a database based on the relational model, using tables (i.e., relationships) to store and manage data. The most common relational databases are MySQL, Oracle, SQL Server, and PostgreSQL; Non-relational database (NoSQL): Non-relational databases are relative to relational databases. They do not use fixed tables and patterns, but use key-value, document, column family, or graph to store and organize data. Common non-relational databases include MongoDB, Cassandra, Redis, and Neo4j; Object database (OODBMS): An object database is a database designed for object-oriented applications. It can store and operate objects (object instances) instead of simple data records. Object databases provide the ability to directly map objects to databases. Common object databases include db4o and ObjectDB; XML database: An XML database is a database specifically used to store and query XML (Extensible Markup Language) documents. It stores XML documents as structured data to support XML query and operation. Common XML databases include eXist and BaseX. Graph database: A graph database is a database designed to process graph structured data. It uses nodes and edges to represent the relationship and connection between data. Graph databases are often used in social network analysis, recommendation systems, and path search. Common graph databases include Neo4j and ArangoDB. In addition to the above types, there are also some other databases for specific purposes, such as time series databases for storing and processing time series data, and spatial databases for storing and querying spatial data.
[0107] The specific database type can be selected according to the actual business development needs, and the number can also be adjusted. It can be pre-set, such as setting three database types: HiveSQL, Oracle, and MySQL. The data set mainly includes a variety of data sets related to the enterprise business, such as the logistics customer complaint information table and the regional logistics annual customer complaint ranking table. For the sake of ease of understanding, the student information table and the course score table will be used as the target data sets in the specific implementation. It should be noted that these data sets can be adjusted according to actual business needs.
[0108] Optionally, the database type selection data in the user operation selection data can be used to determine the target database type corresponding to the database to be queried, and then the data set selection data in the user operation selection data can be used to determine the target data set corresponding to the database to be queried.
[0109] 203. Determine language description data based on the target database type and the target data set;
[0110] In an embodiment of the present application, determining the language description data based on the target database type and the target data set includes: determining the data table structure of the target data set based on the target database type; and initializing the target data set to the language description data based on the data table structure.
[0111] Specifically, after determining the target database type, the table structure it adopts can be determined, and then the target data set can be initialized into a language description through the data table structure, such as the student information table user_tb{user_id: user ID, user_name: user name, course_id: course ID}, and the course score table course_tb{course_id: course ID, course_name: course name, score}.
[0112] 204. Determine target user demand description data based on the user query data, target database type, language description data, and preset experience parameters;
[0113] In an embodiment of the present application, the target user demand description data is determined based on the user query data, the target database type, the language description data and the preset experience parameters, including: determining the experience parameters based on the target database type and a preset database type and experience parameter relationship mapping table; determining the output type of the query result for the user query data based on the target database type; determining the target user demand description data based on the user query data, the output type, the language description data and the experience parameters.
[0114] The database type and the empirical parameter relationship mapping table is preset, and these empirical parameters can be the experience or methods accumulated in the professional field, which are not fixed forms.
[0115] Optionally, the empirical parameters are determined based on the target database type and a preset database type and empirical parameter relationship mapping table, that is, each database type may correspond to at least one empirical parameter. For example, for the HiveSQL database, it corresponds to three empirical parameters. The empirical parameters may be that the code needs to focus on execution efficiency, avoid syntax errors and code usage that affects execution efficiency.
[0116] The output type of the above query result refers to the output of the code block of the type corresponding to different target database types. For example, for a HiveSQL database, a HiveSQL code block is output.
[0117] Optionally, determining the target user demand description data based on the user query data, output type, language description data and experience parameters may include sorting, sorting and integrating the user query data, output type, language description data and experience parameters to obtain the target user demand description data. For example, based on the user query data, output type, language description data and experience parameters, the target user demand description data determined are: ① I am a senior HiveSQL R&D personnel, and now I need to find out the subject scores corresponding to the top 10 students; ② The required table structure is: student information table user_tb{user_id: user ID, user_name: user name, course_id: course ID}, course score table course_tb{course_id: course ID, course_name: course name, score}; ③ The HiveSQL code block is required to be output, which is required to be concise, and the complex part can be divided into steps to achieve the result, including necessary comments; ④ The code should focus on execution efficiency, avoid syntax errors and code usage that affects execution efficiency.
[0118] 205. Generate first query script data based on the target user demand description data.
[0119] In some embodiments of the present application, the first query script data is generated based on the target user demand description data, including: inputting the target user demand description data into a preset dialogue generation model to generate the first query script data. Specifically, the target user demand description data is used as the input condition of the dialogue, and the dialogue generation model interface is called, wherein the dialogue generation model includes DialoGPT, ChatGPT, Meena, BlenderBot and a self-developed dialogue generation model. The embodiment of the present application preferably uses ChatGPT, which is based on a deep learning model and is trained through a large-scale pre-training data set. It has powerful language understanding and generation capabilities. It can receive natural language input from users and generate corresponding natural language responses to achieve interaction and dialogue with users.
[0120] The embodiment of the present application provides a data processing method, which obtains user query data and user operation selection data, wherein the user operation selection data includes database type selection data and data set selection data performed by the user in a preset front-end operation interface; based on the user operation selection data, determines the target database type and target data set of the database to be queried; based on the target database type and the target data set, determines the language description data; based on the user query data, the target database type, the language description data and the preset experience parameters, determines the target user demand description data; based on the target user demand description data, generates the first query script data. The method realizes that the user only needs to provide the most basic query content and basic selection of the database, and the result that the user needs to query can be obtained through data analysis of the back-end server, thereby improving the efficiency of the digital transformation of the enterprise and reducing labor costs.
[0121] In some embodiments of the present application, after generating the first query script data, the method further includes: returning the first query script data to the front end, and displaying it in the SQL script receiving box in the front end, thereby facilitating the user to view the first query script data at a specified location and improving data processing efficiency.
[0122] In some embodiments of the present application, after generating the first query script data, the method further includes: executing the first query script data and generating a first execution result and a first execution status; if the first execution status is a normal status, sending the first execution result to the front end.
[0123] Among them, executing the first query script data may specifically include: the user clicks the "Execute SQL" button, and the back-end server calls the executeSql method to execute the first query script data.
[0124] In this way, the user's interactive experience at the front-end and back-end can be improved, and the interaction efficiency can be improved.
[0125] In some embodiments of the present application, after executing the first query script data and generating a first execution result and a first execution status, the method further includes: if the first execution status is an abnormal state, generating abnormal feedback data; if the abnormal feedback data is abnormal feedback data of a preset type, re-inputting the target user demand description data into the dialogue generation model to generate second query script data; executing the second query script data, and generating a second execution result and a second execution status; if the second execution status is a normal state, sending the second execution result to the front end.
[0126] Among them, the preset types of abnormal feedback data include network abnormal feedback data and model operation abnormal feedback data.
[0127] By monitoring the above two types of abnormal feedback data and re-running the model, we can avoid anomalies caused by objective problems such as network or model instability, reduce the final anomaly rate, and improve data processing accuracy and operating efficiency.
[0128] In some embodiments of the present application, after executing the first query script data and generating a first execution result and a first execution status, the method further includes: if the first execution status is an abnormal state, generating abnormal feedback data; based on the abnormal feedback data, determining the cause of the abnormality.
[0129] In some embodiments of the present application, after determining the cause of the exception based on the exception feedback data, the method also includes: if the cause of the exception is a preset type of exception, determining a first data structure of the user inquiry data; comparing the first data structure with a preset target data structure; if the comparison results are different, generating modification guidance data for the inquiry data; and sending the modification guidance data to the terminal.
[0130] The preset type of exception cause is the exception cause caused by user input problems, such as typos, grammatical errors, etc. in the user input content.
[0131] In this way, through the above method, users can make quick corrections, improve user interaction experience, improve data processing accuracy, and improve data processing efficiency.
[0132] In order to better implement the data processing method in the embodiment of the present application, based on the data processing method, a data processing device is also provided in the embodiment of the present application, such as Figure 3 As shown, the data processing device 300 includes:
[0133] The first acquisition unit 301 is used to acquire user query data and user operation selection data, wherein the user operation selection data includes database type selection data and data set selection data performed by the user in a preset front-end operation interface;
[0134] A first determining unit 302 is used to determine a target database type and a target data set of a database to be queried based on the user operation selection data;
[0135] A second determining unit 303 is used to determine language description data based on the target database type and the target data set;
[0136] The third determining unit 304 is used to determine the target user demand description data based on the user query data, the target database type, the language description data and the preset experience parameters;
[0137] The first generating unit 305 is used to generate first query script data based on the target user demand description data.
[0138] In some embodiments of the present application, the first generating unit 305 is specifically used to:
[0139] Inputting the target user demand description data into a preset dialogue generation model to generate first query script data;
[0140] After generating the first query script data, the device is further used for:
[0141] Execute the first query script data, and generate a first execution result and a first execution status;
[0142] If the first execution state is a normal state, the first execution result is sent to the front end.
[0143] In some embodiments of the present application, after executing the first query script data and generating a first execution result and a first execution status, the apparatus is further configured to:
[0144] If the first execution state is an abnormal state, generating abnormal feedback data;
[0145] If the abnormal feedback data is abnormal feedback data of a preset type, re-inputting the target user demand description data into the dialogue generation model to generate second query script data;
[0146] Execute the second query script data, and generate a second execution result and a second execution status;
[0147] If the second execution state is a normal state, the second execution result is sent to the front end.
[0148] In some embodiments of the present application, after executing the first query script data and generating a first execution result and a first execution status, the apparatus is further configured to:
[0149] If the first execution state is an abnormal state, generating abnormal feedback data;
[0150] Based on the abnormal feedback data, the cause of the abnormality is determined.
[0151] In some embodiments of the present application, after determining the cause of the abnormality based on the abnormality feedback data, the device is further used to:
[0152] If the cause of the abnormality is a cause of the abnormality of a preset type, determining a first data structure of the user query data;
[0153] Comparing the first data structure with a preset target data structure;
[0154] If the comparison results are different, modification guidance data for the query data is generated;
[0155] The modified guidance data is sent to the terminal.
[0156] In some embodiments of the present application, the third determining unit 304 is specifically configured to:
[0157] Determining the empirical parameter based on the target database type and a preset database type and empirical parameter relationship mapping table;
[0158] Based on the target database type, determining an output type of a query result for the user query data;
[0159] Based on the user query data, output type, language description data and experience parameters, target user demand description data is determined.
[0160] In some embodiments of the present application, the second determining unit 303 is specifically configured to:
[0161] Based on the target database type, determining a data table structure of the target data set;
[0162] Based on the data table structure, the target data set is initialized as language description data.
[0163] The data processing device provided in the present application is used to obtain user query data and user operation selection data through a first acquisition unit 301, and the user operation selection data includes database type selection data and data set selection data performed by the user in a preset front-end operation interface; a first determination unit 302 is used to determine the target database type and target data set of the database to be queried based on the user operation selection data; a second determination unit 303 is used to determine language description data based on the target database type and the target data set; a third determination unit 304 is used to determine target user demand description data based on the user query data, target database type, language description data and preset experience parameters; a first generation unit 305 is used to generate first query script data based on the target user demand description data, so that the user only needs to provide the most basic query content and basic selection of the database, and the result that the user needs to query can be obtained through data analysis of the back-end server, thereby improving the efficiency of enterprise digital transformation and reducing labor costs.
[0164] In addition to the above-described data processing method and device, the embodiment of the present application further provides a computer device, which integrates any data processing device provided in the embodiment of the present application, and the computer device includes:
[0165] one or more processors;
[0166] Memory; and
[0167] One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the processor to perform the operations of any method described in any of the above data processing method embodiments.
[0168] The present application also provides a computer device that integrates any data processing device provided in the present application. Figure 4 As shown, it shows a schematic diagram of the structure of the computer device involved in the embodiment of the present application, specifically:
[0169] The computer device may include components such as a processor 401 with one or more processing cores, a storage unit 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that Figure 4 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0170] The processor 401 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the storage unit 402 and calling data stored in the storage unit 402, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0171] The storage unit 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the storage unit 402. The storage unit 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the storage unit 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the storage unit 402 may also include a memory controller to provide the processor 401 with access to the storage unit 402.
[0172] The computer device also includes a power supply 403 for supplying power to various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0173] The computer device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0174] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in the embodiment of the present application, the processor 401 in the computer device will load the executable file corresponding to the process of one or more application programs into the storage unit 402 according to the following instructions, and the processor 401 will run the application program stored in the storage unit 402, thereby realizing various functions, as follows:
[0175] Acquire user query data and user operation selection data, wherein the user operation selection data includes database type selection data and data set selection data performed by the user in a preset front-end operation interface; determine a target database type and a target data set of the database to be queried based on the user operation selection data; determine language description data based on the target database type and the target data set; determine target user demand description data based on the user query data, the target database type, the language description data and preset experience parameters; and generate first query script data based on the target user demand description data.
[0176] The embodiment of the present application provides a data processing method, which obtains user query data and user operation selection data, wherein the user operation selection data includes database type selection data and data set selection data performed by the user in a preset front-end operation interface; based on the user operation selection data, determines the target database type and target data set of the database to be queried; based on the target database type and the target data set, determines the language description data; based on the user query data, the target database type, the language description data and the preset experience parameters, determines the target user demand description data; based on the target user demand description data, generates the first query script data. The method realizes that the user only needs to provide the most basic query content and basic selection of the database, and the result that the user needs to query can be obtained through data analysis of the back-end server, thereby improving the efficiency of the digital transformation of the enterprise and reducing labor costs.
[0177] To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. The computer-readable storage medium stores a plurality of instructions, which can be loaded by a processor to execute the steps in any data processing method provided in the embodiment of the present application. For example, the instruction can execute the following steps:
[0178] Acquire user query data and user operation selection data, wherein the user operation selection data includes database type selection data and data set selection data performed by the user in a preset front-end operation interface; determine a target database type and a target data set of the database to be queried based on the user operation selection data; determine language description data based on the target database type and the target data set; determine target user demand description data based on the user query data, the target database type, the language description data and preset experience parameters; and generate first query script data based on the target user demand description data.
[0179] In the above embodiments, 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.
[0180] The above is a detailed introduction to a data processing method, device, computer equipment and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data processing method, characterized in that: The method comprises: Acquire user query data and user operation selection data, wherein the user operation selection data includes database type selection data and data set selection data performed by the user in a preset front-end operation interface; Based on the user operation selection data, determine the target database type and target data set of the database to be queried; Determining language description data based on the target database type and the target data set; Determine target user demand description data based on the user query data, target database type, language description data and preset experience parameters; Based on the target user demand description data, first query script data is generated.
2. The data processing method according to claim 1, characterized in that: The step of generating first query script data based on the target user demand description data includes: Inputting the target user demand description data into a preset dialogue generation model to generate first query script data; After generating the first query script data, the method further includes: Execute the first query script data, and generate a first execution result and a first execution status; If the first execution state is a normal state, the first execution result is sent to the front end.
3. The data processing method according to claim 2, characterized in that: After executing the first query script data and generating a first execution result and a first execution status, the method further includes: If the first execution state is an abnormal state, generating abnormal feedback data; If the abnormal feedback data is abnormal feedback data of a preset type, re-inputting the target user demand description data into the dialogue generation model to generate second query script data; Execute the second query script data, and generate a second execution result and a second execution status; If the second execution status is a normal status, the second execution result is sent to the front end.
4. The data processing method according to claim 2, characterized in that: After executing the first query script data and generating a first execution result and a first execution status, the method further includes: If the first execution state is an abnormal state, generating abnormal feedback data; Based on the abnormal feedback data, the cause of the abnormality is determined.
5. The data processing method according to claim 4, characterized in that: After determining the cause of the abnormality based on the abnormality feedback data, the method further includes: If the cause of the abnormality is a cause of the abnormality of a preset type, determining a first data structure of the user query data; Comparing the first data structure with a preset target data structure; If the comparison results are different, modification guidance data for the query data is generated; The modified guidance data is sent to the terminal.
6. The data processing method according to claim 1, characterized in that: The step of determining target user demand description data based on the user query data, the target database type, the language description data, and the preset experience parameters includes: Determining the empirical parameter based on the target database type and a preset database type and empirical parameter relationship mapping table; Based on the target database type, determining an output type of a query result for the user query data; Based on the user query data, output type, language description data and experience parameters, target user demand description data is determined.
7. The data processing method according to claim 1, characterized in that: The determining of the language description data based on the target database type and the target data set includes: Based on the target database type, determining a data table structure of the target data set; Based on the data table structure, the target data set is initialized as language description data.
8. A data processing device, characterized in that: The device comprises: A first acquisition unit, used to acquire user query data and user operation selection data, wherein the user operation selection data includes database type selection data and data set selection data performed by the user in a preset front-end operation interface; A first determining unit, configured to determine a target database type and a target data set of a database to be queried based on the user operation selection data; A second determining unit, configured to determine language description data based on the target database type and the target data set; A third determining unit, configured to determine target user demand description data based on the user query data, the target database type, the language description data, and preset experience parameters; The first generating unit is used to generate first query script data based on the target user demand description data.
9. A computer device, characterized in that: The computer device comprises: one or more processors; Memory; and One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the data processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the data processing method according to any one of claims 1 to 7.