Data diagnosis method and device, electronic equipment and computer readable medium
By receiving data diagnosis requests, extracting and querying meta information, generating model prompt words and calling data diagnosis strategy big model, the problems of low data diagnosis efficiency and low accuracy in the existing technology are solved, and automated and intelligent data diagnosis process is realized, and diagnostic efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411864653.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-28
AI Technical Summary
In the prior art, data problem diagnosis in the fields of database management and data analysis is inefficient and accurate, mainly relying on manual debugging and error troubleshooting by database administrators (DBAs) and developers.
By receiving data diagnostic requests, obtaining user input data, extracting name fields in execution statements, querying meta information from the meta information database table, and generating model prompt words based on user input data and meta information, calling the data diagnostic strategy big model, obtaining diagnostic results, and performing data comparison and historical dialogue data updates until the data diagnostic results are output.
It improves the efficiency and accuracy of data diagnosis, reduces dependence on database administrators and developers, and realizes an automated and intelligent data diagnosis process.
Smart Images

Figure CN119719072A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data diagnosis method, device, electronic device and computer-readable medium. Background Art
[0002] At present, in the current database management and data analysis fields, the diagnosis of data problems is an important technical challenge. With the growth of data volume and the complexity of business logic, syntax errors and logic errors in SQL statements have become more common. Existing technologies mainly rely on database administrators (DBAs) and developers to manually debug and troubleshoot SQL statements, which results in low data diagnosis efficiency and accuracy. Summary of the invention
[0003] In view of this, the embodiments of the present application provide a data diagnosis method, device, electronic device and computer-readable medium, which can solve the existing problem of relying on database administrators (DBAs) and developers to manually debug and troubleshoot SQL statements, and the low efficiency and accuracy of data diagnosis.
[0004] To achieve the above object, according to one aspect of an embodiment of the present application, a data diagnosis method is provided, comprising:
[0005] Acquire user input data according to the received data diagnosis request, and extract execution statements from the user input data;
[0006] Extract the name field in the execution statement, and query the meta information corresponding to the name field from the meta information library table;
[0007] Generate model prompt words based on user input data and meta-information, call the data diagnosis strategy big model with the model prompt words as input parameters, obtain the result data output by the data diagnosis strategy big model, and if the result data contains a diagnosis statement, execute the diagnosis statement to obtain the query result data;
[0008] Execute a data comparison process based on the query result data and the user input data, and in response to the comparison result being inconsistent, obtain historical conversation data with the data diagnosis strategy large model, and update the model prompt words based on the historical conversation data and the query result data;
[0009] The data diagnosis strategy large model continues to be called based on the updated model prompt word, and in response to reaching the exit condition, the data diagnosis result is output.
[0010] Optionally, a data comparison process is performed based on the query result data and the user input data, including:
[0011] The query result data is compared with the user expected result data in the user input data. If there is inconsistent data, the comparison result is determined to be inconsistent.
[0012] Optionally, extract the name field in the execution statement, including:
[0013] The parser generation tool is called to perform syntax and lexical analysis on the execution statement to extract the name field in the execution statement.
[0014] Optionally, generate model prompt words, including:
[0015] Fill the user input data and meta information into the corresponding placeholders in the template of the information to be diagnosed, so as to obtain the information to be diagnosed;
[0016] Fill the information to be diagnosed into the corresponding placeholders in the model prompt word template to generate the model prompt word.
[0017] Optionally, before outputting the data diagnosis result, the method further includes:
[0018] Obtain new result data output by the data diagnosis large model based on the updated model prompt words;
[0019] If the new result data corresponds to an idea, obtain the corresponding diagnostic strategy;
[0020] In response to the diagnostic policy being a valid policy, parsing the diagnostic policy to execute a corresponding diagnostic statement;
[0021] In response to the diagnosis policy being an invalid policy, the data diagnosis process is terminated.
[0022] Optionally, output data diagnostic results, including:
[0023] In response to the comparison results being consistent, the result data corresponding to no ideas, or the diagnostic steps exceeding a preset number, it is determined that the exit condition is met, and the diagnostic process data and the corresponding problem cause data and repair method data are output.
[0024] In addition, the present application also provides a data diagnosis device, including:
[0025] A first extraction unit is configured to obtain user input data according to the received data diagnosis request and extract execution statements in the user input data;
[0026] The second extraction unit is configured to extract the name field in the execution statement and query the meta information corresponding to the name field from the meta information library table;
[0027] The execution unit is configured to generate a model prompt word based on the user input data and meta information, call the data diagnosis strategy big model with the model prompt word as an input parameter, obtain the result data output by the data diagnosis strategy big model, and if the result data contains a diagnosis statement, execute the diagnosis statement to obtain the query result data;
[0028] A comparison unit is configured to perform a data comparison process based on the query result data and the user input data, and in response to the comparison result being inconsistent, obtain historical conversation data with the data diagnosis strategy large model, and update the model prompt words based on the historical conversation data and the query result data;
[0029] The output unit is configured to continue to call the data diagnosis strategy model based on the updated model prompt word, and output the data diagnosis result in response to reaching the exit condition.
[0030] Optionally, the comparison unit is further configured to:
[0031] The query result data is compared with the user expected result data in the user input data. If there is inconsistent data, the comparison result is determined to be inconsistent.
[0032] Optionally, the second extraction unit is further configured to:
[0033] The parser generation tool is called to perform syntax and lexical analysis on the execution statement to extract the name field in the execution statement.
[0034] Optionally, the execution unit is further configured to:
[0035] Fill the user input data and meta information into the corresponding placeholders in the template of the information to be diagnosed, so as to obtain the information to be diagnosed;
[0036] Fill the information to be diagnosed into the corresponding placeholders in the model prompt word template to generate the model prompt word.
[0037] Optionally, the output unit is further configured to:
[0038] Obtain new result data output by the data diagnosis large model based on the updated model prompt words;
[0039] If the new result data corresponds to an idea, obtain the corresponding diagnostic strategy;
[0040] In response to the diagnostic policy being a valid policy, parsing the diagnostic policy to execute a corresponding diagnostic statement;
[0041] In response to the diagnosis policy being an invalid policy, the data diagnosis process is terminated.
[0042] Optionally, the output unit is further configured to:
[0043] In response to the comparison results being consistent, the result data corresponding to no ideas, or the diagnostic steps exceeding a preset number, it is determined that the exit condition is met, and the diagnostic process data and the corresponding problem cause data and repair method data are output.
[0044] In addition, the present application also provides a data diagnostic electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the data diagnostic method as described above.
[0045] In addition, the present application also provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the data diagnosis method as described above is implemented.
[0046] To achieve the above objective, according to another aspect of the embodiments of the present application, a computer program product is provided.
[0047] A computer program product according to an embodiment of the present application includes a computer program, and when the program is executed by a processor, the data diagnosis method provided by the embodiment of the present application is implemented.
[0048] One embodiment of the above invention has the following advantages or beneficial effects: the present application obtains user input data according to the received data diagnosis request, extracts the execution statement in the user input data; extracts the name field in the execution statement, and queries the meta information corresponding to the name field from the meta information library table; generates model prompt words based on the user input data and meta information, calls the data diagnosis strategy big model with the model prompt words as input parameters, obtains the result data output by the data diagnosis strategy big model, and executes the diagnosis statement if the result data contains the diagnosis statement to obtain the query result data; executes the data comparison process based on the query result data and the user input data, obtains the historical dialogue data with the data diagnosis strategy big model in response to the comparison result being inconsistent, updates the model prompt words based on the historical dialogue data and the query result data; continues to call the data diagnosis strategy big model based on the updated model prompt words, and outputs the data diagnosis result in response to reaching the exit condition. Thus, the efficiency and accuracy of data diagnosis are improved.
[0049] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings are used to better understand the present application and do not constitute an improper limitation on the present application.
[0051] Figure 1 is a schematic diagram of the main process of a data diagnosis method according to an embodiment of the present application;
[0052] Figure 2 is a schematic diagram of the main process of a data diagnosis method according to an embodiment of the present application;
[0053] Figure 3 is a schematic diagram for overall description of an intelligent automatic data diagnosis tool for a data diagnosis method according to an embodiment of the present application;
[0054] Figure 4 This is a schematic diagram of the rule engine logic breakdown of a data diagnosis method according to an embodiment of the present application;
[0055] Figure 5 It is a schematic diagram of training elements of a data diagnosis strategy large model of a data diagnosis method according to an embodiment of the present application;
[0056] Figure 6 is a schematic diagram of main units of a data diagnosis device according to an embodiment of the present application;
[0057] Figure 7 is an exemplary system architecture diagram to which the embodiments of the present application can be applied;
[0058] Figure 8 It is a structural diagram of a computer system of a terminal device or server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION
[0059] The following is an explanation of the exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of known functions and structures is omitted in the following description. It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of the present application are in compliance with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of the present application, certain software, components, models, and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or must have used the solution. In the technical solution of the present application, the collection, collection, update, analysis, processing, use, transmission, storage, etc. of the user personal information involved are in compliance with the provisions of relevant laws and regulations, are used for legal and reasonable purposes, and do not violate public order and good customs, are not shared, leaked or sold outside these legal uses, and are subject to supervision and management by regulatory authorities. Take necessary measures to prevent illegal access to such user personal information data, maintain the security of user personal information, network security and national security, ensure that persons who have access to personal information data comply with relevant laws and regulations, and ensure the security of user personal information. Once such user personal information data is no longer needed, the risk should be minimized by limiting or even prohibiting data collection and / or deleting data.
[0060] When used, including in certain related applications, user privacy is protected by de-identifying data, such as by removing specific identifiers when used, controlling the amount or specificity of data stored, controlling how data is stored, and / or other methods of de-identification.
[0061] Figure 1 is a schematic diagram of the main process of the data diagnosis method according to an embodiment of the present application, such as Figure 1 As shown, the data diagnosis method mainly includes the following steps S101 to S105.
[0062] Step S101 : acquiring user input data according to the received data diagnosis request, and extracting execution statements in the user input data.
[0063] In this embodiment, the execution subject of the data diagnosis method (for example, a rule engine) can receive the data diagnosis request through a wired connection or a wireless connection. After receiving the data diagnosis request, the execution subject can obtain the user input data corresponding to the request, and the user input data can include user problem description, execution statement (i.e., execution SQL), execution result, expected result and other data. Extract the execution statement in the user input data, such as execution SQL.
[0064] Step S102: extract the name field in the execution statement, and query the meta information corresponding to the name field from the meta information library table.
[0065] The meta-information database table is obtained by combining data mining with manual sorting.
[0066] Specifically, extracting the name field in the execution statement includes: calling a parser generation tool to perform syntax and lexical analysis on the execution statement to extract the name field in the execution statement.
[0067] For example, the name field in the extracted execution statement may include an indicator name field, a dimension name field, a data source name field, etc. The embodiment of the present application does not specifically limit the name field in the execution statement.
[0068] In some embodiments, the execution subject may generate query statements based on the name fields to execute the query statements in the meta-information library table to obtain corresponding meta-information, thereby improving the accuracy of querying the meta-information.
[0069] In some embodiments, the execution subject can fill each name field into the corresponding placeholder in the same query statement generation template to generate a query statement, and execute the generated query statement in the meta information library table to quickly and accurately obtain the corresponding meta information, thereby improving the efficiency and accuracy of querying the meta information.
[0070] For example, the meta-information corresponding to the name field in the execution statement obtained by querying from the meta-information repository may include data source details, indicator details, dimension details, etc., wherein the data source details may include data source name, data source description, data source processing SQL, data source field information (field name, field type, field description), upstream data source information, etc., and the indicator details may include standard indicator information (indicator name, indicator description, processing SQL), indicator actual value, indicator expected value, etc. The embodiment of the present application does not specifically limit the meta-information.
[0071] Step S103, based on the user input data and meta-information, generate model prompt words, call the data diagnosis strategy big model with the model prompt words as input parameters, obtain the result data output by the data diagnosis strategy big model, and if the result data contains diagnostic statements, execute the diagnostic statements to obtain the query result data.
[0072] Specifically, the meta information may include data source details and indicator details. Model prompt words are generated according to the execution statements and other parameters in the user input data and in combination with the data source details and indicator details. The model prompt words contain the output format of the expected data diagnosis strategy big model output. The model prompt words are input into the data diagnosis strategy big model, and the result data output by the data diagnosis strategy big model is obtained. If the result data contains a diagnostic statement, the diagnostic statement is executed to obtain the query result data.
[0073] Specifically, the name field (i.e., data source name and indicator name) is obtained by parsing the execution statement (i.e., execution SQL) in the extracted user input data, and then the corresponding meta-information is obtained by querying the meta-information library table. The meta-information may include data source detailed information, indicator detailed information, dimension detailed information, etc., wherein the data source detailed information may include data source name, data source description, data source processing SQL, data source field information (field name, field type, field description), upstream data source information, etc., and the indicator detailed information may include standard indicator information (indicator name, indicator description, processing SQL), indicator actual value, indicator expected value, etc. The embodiment of the present application does not specifically limit the meta-information. The model prompt word is obtained by assembling the meta-information (corresponding to the name field in the execution statement obtained by querying the meta-information library table) and the user input data, and the obtained model prompt word is input into the data diagnosis strategy large model to obtain diagnostic idea data and diagnostic statements (i.e., diagnostic SQL). In the embodiment of the present application, there is a diagnostic statement (i.e., diagnostic SQL) only when there is diagnostic idea data in the result data output by the data diagnosis strategy large model. That is to say, the result data output by the data diagnosis strategy large model corresponds to an idea (i.e., the diagnostic idea data is not empty) and is accompanied by a diagnostic statement (i.e., diagnostic SQL). The function of the diagnostic idea data is to generate a diagnostic statement (i.e., diagnostic SQL). That is to say, the diagnostic statement (i.e., diagnostic SQL) is generated based on the diagnostic idea data, and the diagnostic idea data and the diagnostic statement (i.e., diagnostic SQL) are accompanied by each other. If there is no diagnostic idea data in the result data output by the data diagnosis strategy large model or the result data includes no idea data (no idea data has no corresponding diagnostic SQL, that is, the diagnostic SQL corresponding to the no idea data is empty), it can be understood that the no idea data can be represented by a no idea identifier (e.g., N or 0). When the result data output by the data diagnosis strategy large model contains a no idea identifier, the information that there is no diagnostic idea is returned to the user. The embodiment of the present application helps users automatically generate intelligent diagnostic statements and automatically execute a full set of diagnostic statements by combining the data diagnosis strategy large model and the existing meta information library, accurately and quickly obtains query result data, and improves the efficiency and accuracy of data diagnosis.
[0074] Step S104, executing a data comparison process based on the query result data and the user input data, and in response to the comparison result being inconsistent, obtaining historical conversation data with the data diagnosis strategy large model, and updating the model prompt words based on the historical conversation data and the query result data.
[0075] Specifically, a data comparison process is performed based on the query result data and the user input data, including: comparing the query result data with the user expected result data in the user input data, and if there is inconsistent data, determining that the comparison result is inconsistent.
[0076] Comparing the query result data with the user expected result data in the user input data may be comparing each field in the query result data with each field in the user expected result data in the user input data, and if there is inconsistent field data, determining the comparison result is inconsistent, so as to more accurately compare the data and improve the accuracy of the data comparison.
[0077] If the comparison result is inconsistent, the historical conversation data with the data diagnosis strategy large model is obtained, and new model prompt words are regenerated and updated based on the historical conversation data and query result data until the comparison result is consistent and a diagnosis conclusion (i.e., data diagnosis result) can be obtained.
[0078] Step S105, continue to call the data diagnosis strategy large model based on the updated model prompt word, and output the data diagnosis result in response to reaching the exit condition.
[0079] Specifically, before outputting the data diagnosis result, the method also includes: obtaining new result data output by the data diagnosis large model based on the updated model prompt words; if the new result data corresponds to an idea, obtaining the corresponding diagnosis strategy; in response to the diagnosis strategy being a valid strategy, parsing the diagnosis strategy to execute the corresponding diagnosis statement; in response to the diagnosis strategy being an invalid strategy, ending the data diagnosis process.
[0080] By judging the effectiveness of the diagnostic strategy, we can avoid wasting parsing resources. When the diagnostic strategy is invalid, the data diagnosis process is terminated. When the diagnostic strategy is valid, the diagnostic strategy is parsed and the diagnostic statement corresponding to the diagnostic strategy is executed to improve the efficiency of data diagnosis and save parsing resources.
[0081] Specifically, outputting data diagnosis results includes: in response to the comparison results being consistent, the result data corresponding to no ideas or the diagnosis steps exceeding a preset number, determining that the exit condition is met, outputting the diagnosis process data and the corresponding problem cause data and repair method data.
[0082] This embodiment obtains user input data according to the received data diagnosis request, extracts the execution statement in the user input data; extracts the name field in the execution statement, and queries the meta information corresponding to the name field from the meta information library table; generates model prompt words based on the user input data and meta information, calls the data diagnosis strategy big model with the model prompt words as input parameters, obtains the result data output by the data diagnosis strategy big model, and executes the diagnosis statement if the result data contains the diagnosis statement to obtain the query result data; executes the data comparison process based on the query result data and the user input data, obtains the historical dialogue data with the data diagnosis strategy big model in response to the comparison result being inconsistent, updates the model prompt words based on the historical dialogue data and the query result data; continues to call the data diagnosis strategy big model based on the updated model prompt words, and outputs the data diagnosis result in response to reaching the exit condition. Thus, the efficiency and accuracy of data diagnosis are improved.
[0083] Figure 2 FIG. 1 is a schematic diagram of the main flow of a data diagnosis method according to an embodiment of the present application. Figure 2 As shown, the data diagnosis method mainly includes the following steps S201 to S207.
[0084] Step S201 : acquiring user input data according to the received data diagnosis request, and extracting execution statements from the user input data.
[0085] The user input data may include user problem description, execution statement (i.e., execution SQL), execution result, expected result, etc. The execution subject may identify and extract the execution statement in the user input data, such as execution SQL.
[0086] Step S202: extract the name field in the execution statement, and query the meta information corresponding to the name field from the meta information library table.
[0087] In some embodiments, extracting the name field in the execution statement includes: identifying a separator in the execution statement, determining each branch statement in the execution statement based on the separator; and identifying and extracting the name field in each branch statement, thereby improving the efficiency and accuracy of identifying and extracting the name field.
[0088] The execution subject can cluster the extracted name fields to obtain name field clusters belonging to the same category, generate query statements according to each name field cluster, and execute the generated query statements in the meta information library table to quickly and accurately obtain the corresponding meta information.
[0089] Step S203, filling the user input data and the meta information into the corresponding placeholders in the template of the information to be diagnosed, so as to obtain the information to be diagnosed.
[0090] Different data in the template of the information to be diagnosed have different placeholders. The executing entity can respectively determine the placeholders corresponding to the user input data and the placeholders corresponding to the meta-information, and fill the user input data and the meta-information into the positions of the corresponding placeholders in the template of the information to be diagnosed, so as to replace the corresponding placeholders and obtain the final information to be diagnosed, thereby improving the efficiency and accuracy of generating the information to be diagnosed.
[0091] Step S204: fill the information to be diagnosed into the corresponding placeholders in the model prompt word template to generate model prompt words.
[0092] In some embodiments, a placeholder corresponding to the information to be diagnosed is provided in the model prompt word template, and the final information to be diagnosed is used to replace the corresponding placeholder in the model prompt word template to generate the model prompt word accurately and quickly.
[0093] In some embodiments, the execution subject may also segment the information to be diagnosed according to the data sources involved to obtain segmented information to be diagnosed, and use each segmented information to be diagnosed to replace the placeholder corresponding to the data source corresponding to each segmented information to be diagnosed in the model prompt word template to generate the model prompt word. This improves the accuracy and practicality of the model prompt word, and further improves the accuracy of data diagnosis.
[0094] Step S205, calling the data diagnosis strategy big model with the model prompt word as an input parameter, obtaining the result data output by the data diagnosis strategy big model, and if the result data contains a diagnosis statement, executing the diagnosis statement to obtain the query result data.
[0095] The model prompt words are input into the data diagnosis strategy big model, so that the data diagnosis strategy big model outputs result data based on the model prompt words, and the result data can correspond to having ideas and not having ideas, and will carry corresponding diagnostic statements when there are ideas. The execution subject responds to the result data output by the data diagnosis strategy big model corresponding to having ideas, and can execute the corresponding diagnostic statement to obtain the query result data corresponding to the diagnostic statement.
[0096] Step S206, executing a data comparison process based on the query result data and the user input data, and in response to the comparison result being inconsistent, obtaining historical conversation data with the data diagnosis strategy large model, and updating the model prompt words based on the historical conversation data and the query result data.
[0097] When the query result data is inconsistent with the user input data, the historical conversation data with the data diagnosis strategy large model is reassembled with the query result data to regenerate the model prompt words and update the model prompt words.
[0098] Step S207, continue to call the data diagnosis strategy large model based on the updated model prompt word, and output the data diagnosis result in response to reaching the exit condition.
[0099] The updated model prompt words are re-input into the data diagnosis strategy large model, and the data diagnosis results are output when the exit conditions are met. For example, the exit conditions may include: the comparison results are consistent, the result data corresponds to no ideas, and the diagnosis steps exceed one or more of the preset number.
[0100] Figure 3 It is a schematic diagram of the overall description of the intelligent automatic data diagnosis tool according to the data diagnosis method of an embodiment of the present application. In the embodiment of the present application, data mining: data mining is the process of extracting useful information and patterns from a large amount of data. It combines statistics, machine learning and database technology to discover hidden patterns, relationships and trends in data, and is widely used in market analysis, fraud detection, customer relationship management and other fields. Large model: A large model usually refers to a deep learning model with a large number of parameters and complex structure, which can handle a variety of tasks, such as natural language processing, image recognition, etc. They have strong generalization and transfer learning capabilities by training on large-scale data sets, and are often used in generative AI applications. RAG (Retrieval-Augmented Generation): RAG is a technology that combines information retrieval and generative models to improve the accuracy and relevance of generative AI. By retrieving relevant information from an external knowledge base and then using a generative model to generate answers, the model's knowledge and reasoning ability are enhanced. Prompt: prompt word. Fine-tune: Fine-tuning is the process of further training a pre-trained model to adapt to a specific task. By fine-tuning on a dataset for a specific task, the model can better capture task-related features, thereby improving performance. ANTLR (ANother Tool for Language Recognition): ANTLR is a powerful parser generation tool for generating language recognizers, compilers, and interpreters from grammatical descriptions. It supports multiple programming languages and is widely used to build parsers for programming languages, DSLs, and data formats. Data Engine: A data engine is a software system for storing, processing, and analyzing data. It provides efficient data management and query capabilities, supports real-time processing and analysis of large-scale data, and is often used to build data-driven applications and services.
[0101] The overall mechanism flow of the data diagnosis method is as follows: Figure 3 As shown, the mechanism will be explained step by step as follows:
[0102] Data diagnostic graph construction: Through data mining technology, a data diagnostic graph is constructed from user query logs.
[0103] The data source of data mining is the data engine query log, which is the user's original query log. It can be a txt text, and the content format varies with different engines. The recorded content includes: query date, query ID, query account, query statement, etc.
[0104] The processing methods of data mining are:
[0105] Text preprocessing: Write ETL data processing scripts through manual rules to identify, match, and process the format of source logs to facilitate subsequent processing. Log cleaning: Remove noise characters, punctuation marks, invalid logs, etc. Segmentation: Segment and organize data of different days, hours, and visit times.
[0106] Feature extraction: Use ANTLR to perform syntax analysis and lexical analysis on SQL, and extract query indicators, fields, data sources, execution actions and other information from SQL logs.
[0107] Text mining: Use regular expressions + manual rules to extract non-SQL information, such as query ID, execution time, query person, return results, error log, etc.
[0108] Data modeling and storage: The various data source names, field names, indicator names, indicator calibers, result data, error types and other information used are used to build a data diagnostic map for the diagnostic process. Based on the above data diagnostic map, manual descriptive labeling is performed to supplement the description and cause of the diagnosis. For example, information not included in log mining is completed, such as textual descriptions such as the purpose of data query, cause of error, and diagnostic ideas. Data mining is combined with manual sorting to obtain the meta-information library table. Store in the database: The formatted meta-information library table is stored in the database. The database can be Hive, Mysql, etc.
[0109] By manually organizing and constructing data diagnostic maps, you can manually construct data diagnostic maps for the diagnostic process based on existing troubleshooting experience. For example, you may often encounter problems such as no data, repeated data calculations, and inconsistent indicator calibers. Organize the daily troubleshooting process, ideas, and results into a standardized data diagnostic map, connect it with the data meta-information platform, and obtain various meta-information models. The meta-information model includes models such as data source information, dimension information, and indicator information. It is the data asset information of the enterprise and the basic component of data query SQL. This type of information usually has a meta-information library table maintained in the enterprise. You only need to connect it to use the data diagnostic map it constructs.
[0110] Training diagnostic strategy large model: Through the model prompt word Prompt, the large model can be effectively guided to generate outputs that are more in line with expectations. The principle is to use preset templates and instructions to constrain the generation process of the model, thereby improving the relevance and accuracy of the generated content. The embodiment of the present application first designs a series of standardized model prompt word Prompt templates, which cover different application scenarios and needs. Then, the details of these templates are adjusted through experiments to optimize the response quality of the model. Finally, the effectiveness of the model prompt word Prompt is verified through comparative experiments, which significantly improves the generation effect of the model.
[0111] For example, in the embodiment of the present application, the format of the model prompt word Prompt constructed is: {"definition":"...","requirement":"...","example input":{"current information to be diagnosed input":{"problem description":"...","execution SQL":"...","expected value list":[{"indicator name":"...","indicator actual value":"...","indicator expected value":"..."}],"standard data source information":[{"data source name":"...","data source description":"...","data source processing SQL":"...","data source field information":[{"field name":"...","field type":"...","field description":"..."}],"upstream data source information":[{"data source name":"...","data source description":"...","data source processing SQL":"","data source field information":[{"field name":"...","field type":"...","field description":"..."}]}]}] ,"Standard indicator information":[{"Indicator name":"...","Indicator description":"...","Processing SQL":"..."}]}},"Sample output":{"Any ideas":"...","Diagnostic ideas":"...","Diagnostic SQL":"...","Problem summary":"..."},"Previous diagnosis process record":[{"Input":{},"Output":{}}],"Current information to be diagnosed input":{"Problem description":"","Execution SQL":"","Expected value list":[{"Indicator name":"","Indicator actual value":"","Indicator expected value":""}],"Standard data source information":[{"Data source name":"","Data source description":"","Data source processing SQL":"","Data source field information":[{"Field name":"","Field type":"","Field description":""}],"Upstream data source information":[{}]}],"Standard indicator information":[{"Indicator name":"","Indicator description":"",...}]}}.
[0112] By combining the data diagnostic graph RAG, efficient information retrieval and integration can be achieved. The principle is to use the structured information in the data diagnostic graph to enhance the model's contextual understanding ability, so that more accurate and relevant information can be cited when generating content. The implementation process is as follows:
[0113] Select the constructed data diagnostic map;
[0114] Retrieval mechanism: When the user inputs diagnostic information, the detailed information of the meta-information is retrieved from the meta-information database table based on the keyword. For example, the detailed field information of the data source is retrieved based on the data source name;
[0115] Generation mechanism: The retrieved detailed information is appended to the model prompt and passed to the large model, so that the large model can have more information reference and give more accurate answers.
[0116] By using the data diagnostic graph for fine-tuning, the performance of the data diagnostic strategy large model in specific fields can be further optimized. The principle is to use the rich information in the knowledge graph to fine-tune the model so that it performs better in tasks in specific fields. Use the constructed data diagnostic graph to fine-tune the data diagnostic strategy large model. By adjusting the parameters and training strategy of the model, it can make full use of the information in the data diagnostic graph. Experimental results show that the fine-tuned data diagnostic strategy large model shows higher accuracy and efficiency in tasks in specific fields. When fine-tuning, the data set of the data diagnostic graph is randomly divided into training set, validation set and test set, with a ratio of 80%, 10% and 10%. Their respective functions are: Training Set: Function: Used to train the model so that the model can learn the patterns and features in the data. Importance: The training set is the basis of model learning. The model fits the training data by continuously adjusting internal parameters. Validation Set: Function: Used to evaluate the performance of the model during training and perform hyperparameter tuning. Importance: The validation set helps detect overfitting problems and guides the model tuning process. By observing the performance changes on the validation set, the model's hyperparameters (such as learning rate, regularization coefficient, etc.) can be adjusted to obtain better generalization capabilities. Test Set: Function: Used to perform a final evaluation of the model after model training and tuning are completed. Importance: The test set provides a performance evaluation of the model on unseen data, reflecting the actual application effect of the model. The data in the test set is not used in the training and validation process to ensure the objectivity of the evaluation. The data diagnosis strategy large model can be verified using an accuracy verifier. Specifically, the data diagnosis strategy large model can be subjected to syntax verification ANTLR, meta-information comparison, and manual verification, and the verification results can be fed back to the data diagnosis strategy large model for model parameter optimization to improve the accuracy of the data diagnosis strategy large model output.
[0117] Building a rule engine: The core of the intelligent data diagnostic tool lies in the design and implementation of its rule engine. The engine uses Drools technology to build a policy iteration execution system that can automatically execute complex business rules. By parsing user input, the rule engine extracts the problem description, SQL execution results and expected results, and combines the ANTLR tool to perform SQL syntax and lexical analysis to obtain relevant indicators and data source information. On this basis, the rule engine queries the meta-information library table to obtain detailed information on indicators and data sources, and constructs a model prompt word Prompt suitable for large model interaction. The model prompt word Prompt not only defines the responsibilities of the model, but also provides a standardized input and output format to facilitate the generation of effective diagnostic ideas and SQL for large models.
[0118] The rule engine obtains the diagnosis strategy (for example, including the diagnosis ideas and corresponding SQL) through interaction with the data diagnosis strategy big model, parses the diagnosis strategy, executes the query (that is, executes the SQL corresponding to the diagnosis idea), parses the query results, compares the expected results, compares the SQL execution result data with the user's expected data, and ends the data diagnosis and outputs the data diagnosis results (for example, the cause of the problem, the repair method and the diagnosis process) if the comparison results are consistent. If the comparison results are inconsistent, the input of the data diagnosis strategy big model is constructed with the current diagnosis results and the data diagnosis strategy big model is called to output the diagnosis strategy, and it is determined whether the output diagnosis strategy is a valid strategy. If it is not a valid strategy, the data diagnosis is ended and the data diagnosis results are output. If it is a valid strategy, the diagnosis strategy is parsed and the query is continued to be executed, the query results are parsed, and the expected result data is compared until the comparison results are consistent, then the data diagnosis is ended and the data diagnosis results (for example, the cause of the problem, the repair method and the diagnosis process) are output. For example, when the comparison results of the SQL execution result data and the user's expected data are inconsistent, the historical dialogue and the new diagnosis results are merged, and the big model is continued to be called to make the next decision until the final diagnosis result is obtained. The whole process ensures the automation and efficiency of data diagnosis, and provides a detailed diagnosis report to the user after the diagnosis is completed. In the embodiment of the present application, the diagnosis strategy can also be specified manually.
[0119] RAG (Retrieval-Augmented Generation) is a technology that enhances model performance by integrating external knowledge bases. RAG improves the accuracy of processing domain-specific or highly specialized queries by combining information retrieval mechanisms and contextual learning.
[0120] For example, the user semantic converter is used to parse the user input (such as user TEXT) and extract the key input information required for diagnosis. The key input information is checked for rules and syntax to ensure the input quality. The relevant meta-information is queried from the meta-information library table through RAG technology. The data diagnosis strategy large model prompt word Prompt is constructed using user input and meta-information, and the data diagnosis strategy large model is called. According to the diagnosis strategy, the diagnosis action is executed, and the execution results are compared to see whether they meet the user's expectations. If not, the execution result and the historical dialogue information are used to construct a new model prompt word Prompt to continue calling the data diagnosis strategy large model until the diagnosis conclusion is obtained. The call count threshold X can be set. If no conclusion can be drawn after exceeding X, the call is stopped. The diagnosis process and conclusion are returned to the front end for display.
[0121] The following is an example of data diagnosis execution: parse the user's input and extract information such as user problem description, execution SQL, execution results, and expected results. Use the ANTLR tool to perform syntax and lexical analysis on SQL to obtain relevant indicators, dimensions, and data source names. Query the meta information of relevant indicators, dimensions, and data sources from the meta information library. Including their definitions, Chinese and English names, blood relationships, data types, etc. Combine the meta information and user input to construct the model prompt word Prompt. The role of the model prompt word (Prompt) in the AI model is to guide the model to perform specific tasks or generate specific types of content. Prompt words enhance the performance of the model by inputting specific instructions or questions to the model without adjusting the model structure itself.
[0122] The model prompt word Prompt adds the definition of the model's responsibilities, which is defined as:
[0123] "You are a data diagnosis expert who is good at providing effective diagnostic strategies for data problems. Even if there is no effective strategy, you will provide troubleshooting suggestions. Your task is to tell me whether you have any ideas, diagnostic ideas, diagnostic SQL, and problem summary for the current data problem based on the information to be diagnosed I provide. The diagnostic SQL is the correct execution SQL given according to your diagnostic ideas."
[0124] Add sample input and output to the model prompt word Prompt. The sample input is the standard format of the model prompt, and the output is the output format expected from the large model. Both are json. Use the model prompt word Prompt as the input parameter to call the large model and obtain the return result of the large model. Obtain the diagnostic ideas and diagnostic SQL of the large model from the returned result. If the return shows no ideas, return to the user that there are no diagnostic ideas. If it shows that there are ideas, execute the diagnostic SQL, and then compare the query results with the user's expected results. If they are consistent, end the diagnosis. If they are inconsistent, merge the historical dialogue with the large model with the new diagnostic results and call the large model again. If they are inconsistent, construct a new model prompt word Prompt with the execution result and the historical dialogue information to continue calling the large model until the diagnosis conclusion is obtained. You can set a call count threshold X. If it exceeds X and no conclusion can be drawn, stop calling. Exit condition: the diagnostic result is consistent with the expectation; or the large model shows no ideas; or the diagnostic steps exceed 10. The intermediate ideas, results, final conclusions, and results of the diagnostic process are assembled into formatted statements and returned to the user. End the diagnosis.
[0125] The embodiment of the present application uses a large model and an existing knowledge base to help users automatically generate intelligent diagnostic strategies, and can automatically execute the entire set, avoiding manual step-by-step data diagnosis. By combining the existing knowledge base, as well as the knowledge base and reasoning ability of the large model itself, it can provide diagnostic results with higher accuracy than humans.
[0126] Figure 4 FIG. 1 is a schematic diagram of the rule engine logic breakdown of a data diagnosis method according to an embodiment of the present application. Figure 4 As shown, the execution subject (such as the rule engine) obtains the execution SQL and other parameters in the front-end input data, parses the execution SQL, obtains the data source name and the indicator name, and then retrieves the data source according to the data source name to obtain the data source detailed information, retrieves the indicator according to the indicator name to obtain the indicator detailed information, and assembles the input parameters based on the execution SQL, data source detailed information, indicator detailed information and other parameters, and then calls the data diagnosis strategy big model, and then the data diagnosis strategy big model outputs the diagnosis ideas, diagnosis SQL, and data on whether there are no ideas, executes the diagnosis SQL to obtain the execution result, and compares the execution result with other parameters. If the judgment results are inconsistent, iterative diagnosis is required. Specifically, the data diagnosis strategy big model interface is responsible for assembling the context input parameters to call the data diagnosis strategy big model for iterative diagnosis until the judgment results are consistent, and returns the diagnosis results and outputs them on the front end.
[0127] Specifically, build a rule engine: The core of the intelligent data diagnostic tool lies in the design and implementation of its rule engine. The engine uses Drools technology to build a policy iteration execution system that can automatically execute complex business rules. By parsing user input, the rule engine extracts the problem description, SQL execution results and expected results, and combines the ANTLR tool to perform SQL syntax and lexical analysis to obtain relevant indicators and data source information. On this basis, the rule engine queries the meta-information library table to obtain detailed information on indicators and data sources, and constructs a model prompt word Prompt suitable for large model interaction. The model prompt word Prompt not only defines the responsibilities of the model, but also provides a standardized input and output format to facilitate the large model to generate effective diagnostic ideas and SQL.
[0128] The rule engine obtains the diagnosis strategy (for example, including the diagnosis ideas and corresponding SQL) through interaction with the data diagnosis strategy big model, parses the diagnosis strategy, executes the query (that is, executes the SQL corresponding to the diagnosis idea), parses the query results, compares the expected results, compares the SQL execution result data with the user's expected data, and ends the data diagnosis and outputs the data diagnosis results (for example, the cause of the problem, the repair method and the diagnosis process) if the comparison results are consistent. If the comparison results are inconsistent, the input of the data diagnosis strategy big model is constructed with the current diagnosis results and the data diagnosis strategy big model is called to output the diagnosis strategy, and it is determined whether the output diagnosis strategy is a valid strategy. If it is not a valid strategy, the data diagnosis is ended and the data diagnosis results are output. If it is a valid strategy, the diagnosis strategy is parsed and the query is continued to be executed, the query results are parsed, and the expected result data is compared until the comparison results are consistent, then the data diagnosis is ended and the data diagnosis results (for example, the cause of the problem, the repair method and the diagnosis process) are output. For example, when the comparison results of the SQL execution result data and the user's expected data are inconsistent, the historical dialogue and the new diagnosis results are merged, and the big model is continued to be called to make the next decision until the final diagnosis result is obtained. The whole process ensures the automation and efficiency of data diagnosis, and provides a detailed diagnosis report to the user after the diagnosis is completed. In the embodiment of the present application, the diagnosis strategy can also be specified manually.
[0129] The rule engine is designed to iterate decision-making data diagnosis, so that the tool as a whole has statistical inference capabilities. The principle is to control the data diagnosis decision process by writing manual rules and using some third-party tools, so that each interaction with the big model can become the basis for the next diagnostic strategy decision.
[0130] Figure 5 FIG. 1 is a schematic diagram of training elements of a data diagnosis strategy model of a data diagnosis method according to an embodiment of the present application. Figure 5 As shown in the figure, the Prompt technology of the big model (constructing high-quality prompts: definition: you are an assistant, requirement: to trace the upstream of the data source, example: input: XXX output YYY), RAG technology (searching the database, searching the database for accurate information based on the input keywords, improving the quality of the conversation, calling the database for retrieval based on the user input, and constructing the prompt word Prompt based on the user input), and Fine-tune technology (accumulating sample training: {input: XXX, output: YYY; input: ZZZ, output: VVV}) are integrated and applied to the field of data diagnosis to realize intelligent data diagnosis. It can realize the ability to understand the user's text description and give a textual conclusion.
[0131] The embodiment of the present application enables the tool to automatically replace manual data diagnosis, avoiding manual data troubleshooting for a long time and deviating from the focus of work. Relying on a rich diagnostic knowledge base, the accuracy and comprehensiveness of diagnosis are improved, avoiding the problem of inaccurate and insufficient troubleshooting caused by insufficient manual diagnostic experience.
[0132] Figure 6 Schematic diagram of the main units of the data diagnosis device according to an embodiment of the present application. Figure 6 As shown, the data diagnosis device 600 includes a first extraction unit 601 , a second extraction unit 602 , an execution unit 603 , a comparison unit 604 and an output unit 605 .
[0133] The first extraction unit 601 is configured to obtain user input data according to the received data diagnosis request, and extract execution statements from the user input data.
[0134] The second extraction unit 602 is configured to extract the name field in the execution statement and query the meta information corresponding to the name field from the meta information library table.
[0135] The execution unit 603 is configured to generate model prompt words based on user input data and meta-information, call the data diagnosis strategy big model with the model prompt words as input parameters, obtain the result data output by the data diagnosis strategy big model, and if the result data contains diagnostic statements, execute the diagnostic statements to obtain the query result data.
[0136] The comparison unit 604 is configured to perform a data comparison process based on the query result data and the user input data, and in response to the comparison result being inconsistent, obtain historical conversation data with the data diagnosis strategy large model, and update the model prompt words based on the historical conversation data and the query result data.
[0137] The output unit 605 is configured to continue to call the data diagnosis strategy large model based on the updated model prompt word, and output the data diagnosis result in response to reaching the exit condition.
[0138] In some embodiments, the comparison unit 604 is further configured to: compare the query result data with the user expected result data in the user input data, and if there is inconsistent data, determine that the comparison result is inconsistent.
[0139] In some embodiments, the second extraction unit 602 is further configured to: call a parser generation tool to perform syntax and lexical analysis on the execution statement to extract the name field in the execution statement.
[0140] In some embodiments, the execution unit 603 is further configured to: fill the user input data and meta-information into the corresponding placeholders in the information to be diagnosed template to obtain the information to be diagnosed; fill the information to be diagnosed into the corresponding placeholders in the model prompt word template to generate the model prompt word.
[0141] In some embodiments, the output unit 605 is further configured to: obtain new result data output by the data diagnosis large model based on the updated model prompt words; if the new result data corresponds to an idea, obtain the corresponding diagnosis strategy; in response to the diagnosis strategy being a valid strategy, parse the diagnosis strategy to execute the corresponding diagnosis statement; in response to the diagnosis strategy being an invalid strategy, end the data diagnosis process.
[0142] In some embodiments, the output unit 605 is further configured to: in response to the comparison results being consistent, the result data corresponding to no ideas or the diagnostic steps exceeding a preset number, determine that the exit condition is met, and output the diagnostic process data and the corresponding problem cause data and repair method data.
[0143] It should be noted that the data diagnosis method and the data diagnosis device of the present application have a corresponding relationship in terms of specific implementation contents, so the repeated contents will not be described again.
[0144] Figure 7 An exemplary system architecture 700 to which the data diagnosis method or data diagnosis device according to the embodiment of the present application can be applied is shown.
[0145] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, 703, network 704 and server 705. Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and server 705. Network 704 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0146] The user can use the terminal devices 701, 702, 703 to interact with the server 705 through the network 704 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 701, 702, 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0147] The terminal devices 701 , 702 , and 703 may be various electronic devices having a data diagnosis processing screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0148] Server 705 can be a server that provides various services, such as a background management server that supports data diagnosis requests submitted by users using terminal devices 701, 702, and 703 (only as an example). The background management server can obtain user input data according to the received data diagnosis request, extract the execution statement in the user input data; extract the name field in the execution statement, and query the meta information corresponding to the name field from the meta information library table; generate model prompt words based on the user input data and meta information, call the data diagnosis strategy big model with the model prompt words as input parameters, obtain the result data output by the data diagnosis strategy big model, and if the result data contains a diagnosis statement, execute the diagnosis statement to obtain the query result data; execute the data comparison process based on the query result data and the user input data, and in response to the comparison result being inconsistent, obtain the historical dialogue data with the data diagnosis strategy big model, and update the model prompt words based on the historical dialogue data and the query result data; continue to call the data diagnosis strategy big model based on the updated model prompt words, and output the data diagnosis result in response to reaching the exit condition. Thereby improving the efficiency and accuracy of data diagnosis.
[0149] It should be noted that the data diagnosis method provided in the embodiment of the present application is generally executed by the server 705 , and accordingly, the data diagnosis device is generally set in the server 705 .
[0150] It should be understood that Figure 7 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0151] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of a terminal device suitable for implementing an embodiment of the present application. Figure 8 The terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0152] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the computer system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0153] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.
[0154] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present application are executed.
[0155] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. Computer-readable storage media may include, for example, but are not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0156] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0157] The units involved in the embodiments described in the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes a first extraction unit, a second extraction unit, an execution unit, a comparison unit, and an output unit. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0158] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device obtains user input data according to the received data diagnosis request, extracts the execution statement in the user input data; extracts the name field in the execution statement, and queries the meta information corresponding to the name field from the meta information library table; based on the user input data and meta information, generates a model prompt word, calls the data diagnosis strategy big model with the model prompt word as an input parameter, obtains the result data output by the data diagnosis strategy big model, and if the result data contains a diagnosis statement, executes the diagnosis statement to obtain the query result data; executes the data comparison process based on the query result data and the user input data, obtains the historical dialogue data with the data diagnosis strategy big model in response to the comparison result being inconsistent, and updates the model prompt word based on the historical dialogue data and the query result data; continues to call the data diagnosis strategy big model based on the updated model prompt word, and outputs the data diagnosis result in response to reaching the exit condition.
[0159] The computer program product of the present application includes a computer program, and when the computer program is executed by a processor, the data diagnosis method in the embodiment of the present application is implemented.
[0160] According to the technical solution of the embodiment of the present application, the efficiency and accuracy of data diagnosis can be improved.
[0161] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A data diagnosis method, characterized in that: include: Acquire user input data according to the received data diagnosis request, and extract execution statements from the user input data; Extract the name field in the execution statement, and query the meta information corresponding to the name field from the meta information library table; Generate a model prompt word based on the user input data and the meta information, call the data diagnosis strategy big model with the model prompt word as an input parameter, obtain the result data output by the data diagnosis strategy big model, and if the result data contains a diagnosis statement, execute the diagnosis statement to obtain the query result data; executing a data comparison process based on the query result data and the user input data, and in response to the comparison result being inconsistent, obtaining historical conversation data with the data diagnosis strategy big model, and updating the model prompt words based on the historical conversation data and the query result data; The data diagnosis strategy large model continues to be called based on the updated model prompt word, and in response to reaching the exit condition, the data diagnosis result is output.
2. The method according to claim 1, characterized in that The performing of the data comparison process based on the query result data and the user input data includes: The query result data is compared with the user expected result data in the user input data, and if there is inconsistent data, the comparison result is determined to be inconsistent.
3. The method according to claim 1, characterized in that The extracting the name field in the execution statement includes: A parser generation tool is called to perform syntax and lexical analysis on the execution statement to extract the name field in the execution statement.
4. The method according to claim 1, characterized in that: The generation model prompt words include: Filling the user input data and the meta information into corresponding placeholders in the template of the information to be diagnosed respectively, so as to obtain the information to be diagnosed; The information to be diagnosed is filled into the corresponding placeholder in the model prompt word template to generate the model prompt word.
5. The method according to claim 1, characterized in that Before outputting the data diagnosis result, the method further includes: Acquire new result data output by the data diagnosis macromodel based on updated model prompt words; If the new result data corresponds to an idea, obtaining a corresponding diagnostic strategy; In response to the diagnostic strategy being a valid strategy, parsing the diagnostic strategy to execute a corresponding diagnostic statement; In response to the diagnosis strategy being an invalid strategy, the data diagnosis process is terminated.
6. The method according to any one of claims 1 to 5, characterized in that The output data diagnosis result includes: In response to the comparison results being consistent, the result data corresponding to no ideas or the diagnostic steps exceeding a preset number, it is determined that the exit condition is met, and the diagnostic process data and the corresponding problem cause data and repair method data are output.
7. A data diagnostic device, characterized in that: include: A first extraction unit is configured to obtain user input data according to the received data diagnosis request, and extract execution statements in the user input data; A second extraction unit is configured to extract a name field in the execution statement and query meta information corresponding to the name field from a meta information library table; an execution unit configured to generate a model prompt word based on the user input data and the meta information, call the data diagnosis strategy big model with the model prompt word as an input parameter, obtain result data output by the data diagnosis strategy big model, and if the result data contains a diagnosis statement, execute the diagnosis statement to obtain query result data; a comparison unit configured to perform a data comparison process based on the query result data and the user input data, and in response to a comparison result being inconsistent, obtain historical conversation data with the data diagnosis strategy big model, and update the model prompt word based on the historical conversation data and the query result data; The output unit is configured to continue to call the data diagnosis strategy model based on the updated model prompt word, and output the data diagnosis result in response to reaching the exit condition.
8. A data diagnostic electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.