Data testing method and device, equipment, storage medium and program product

By combining field metadata and classification information with a data testing model, test prompts are dynamically constructed, solving the problems of low efficiency and accuracy in data testing and achieving automated and precise data testing.

CN120973790APending Publication Date: 2025-11-18BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511087636.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Data testing efficiency and accuracy are low. Existing automated testing methods suffer from poor accuracy due to fixed threshold limitations and inaccurate data table metadata.

Method used

By combining pre-trained data testing models with field metadata and data testing classification information, test prompts are dynamically constructed, and data test results are automatically identified and generated, avoiding threshold limitations and improving semantic understanding capabilities.

Benefits of technology

It enables automated testing of each field in the target data table, improving testing efficiency and accuracy, and ensuring that test results meet the expected requirements of the current business scenario.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973790A_ABST
    Figure CN120973790A_ABST
Patent Text Reader

Abstract

The invention discloses a data testing method and device, equipment, a storage medium and a program product, and relates to the technical field of data processing and artificial intelligence, and the method comprises the following steps: obtaining field meta-information and data testing classification information corresponding to each field in a target data table; utilizing the data test classification information and the field meta-information to construct test prompt information corresponding to each field; and guiding the data test model to execute the field data test task through the test prompt information, and generating a data test result corresponding to each field. By implementing the technical scheme of the invention, automatic testing of the field data under each field in the target data table is realized, the data testing efficiency is improved, a data testing error caused by unreasonable threshold limit setting is avoided, and the data testing accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of data processing and artificial intelligence, in particular to a data testing method and device, equipment, a storage medium and a program product. BACKGROUND

[0002] Data testing plays an important role in the iteration of business requirements. In the data testing process, the tester will obtain the characteristic value, enumeration value and other information of each field through data exploration to determine whether the field meets the expectation under the specific requirement background and business semantics. Since the analysis process of data exploration is analyzed by artificial means, under the background of rapid iteration of business requirements, there is a problem of low testing efficiency. Although there are some automatic testing methods, they mainly limit each field by fixed threshold, which may cause low testing accuracy in actual business scenarios due to different semantics of different fields of the same type in the business scenario. SUMMARY

[0003] Therefore, the present disclosure provides a data testing method, device, equipment, storage medium and program product to solve the problems of low data testing efficiency and accuracy.

[0004] In a first aspect, the present disclosure provides a data testing method, comprising: obtaining field meta information and data testing classification information corresponding to each field in a target data table; constructing test prompt information corresponding to each field by using the data testing classification information and the field meta information; guiding a data testing model to perform a field data testing task through the test prompt information, and generating data testing results corresponding to each field.

[0005] In a second aspect, the present disclosure provides a data testing device, comprising: an acquisition module configured to acquire field meta information and data testing classification information corresponding to each field in a target data table; a prompt information construction module configured to construct test prompt information corresponding to each field by using the data testing classification information and the field meta information; and a field exploration module configured to guide a data testing model to perform a field data testing task through the test prompt information, and generate data testing results corresponding to each field.

[0006] In a third aspect, the present disclosure provides an electronic device, comprising a memory and a processor, which are in communication connection with each other, and the memory stores computer instructions. The processor executes the computer instructions to perform the data testing method of the first aspect or any of the corresponding embodiments thereof.

[0007] In a fourth aspect, the present disclosure provides a computer-readable storage medium, having stored thereon computer instructions for causing a computer to execute the data testing method of the first aspect or any of its possible implementation forms.

[0008] In a fifth aspect, the present disclosure provides a computer program product comprising computer instructions for causing a computer to execute the data testing method of the first aspect or any of its possible implementation forms.

[0009] The data testing method, apparatus, device, storage medium and program product provided by the embodiments of the present disclosure obtain the field meta information of each field and the data testing classification information required for data testing, construct the test prompt information based on the field meta information and the data testing classification information, and cause the data testing model to analyze the field data under the corresponding field in the target data table according to the test prompt information corresponding to each field, generate the corresponding data testing result, and determine whether the field data under each field can meet the expected requirement through the data testing result. Thus, the automatic testing of the field data under each field in the target data table is realized through the data testing model, and the data testing efficiency is improved. Meanwhile, the semantics of each field of the target data table is understood through the data testing model, the field data under each field is dynamically analyzed in combination with the data testing classification information, the threshold limit of each field does not need to be set in advance, the data testing error caused by unreasonable threshold limit setting is avoided, and the data testing accuracy is effectively improved. BRIEF DESCRIPTION OF DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the specific embodiments or related art of the present disclosure, the drawings needed to be used in the specific embodiments or related art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present disclosure, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0011] Figure 1 is a schematic diagram of an application scenario according to an embodiment of the present disclosure;

[0012] Figure 2 is a flowchart of a data testing method according to an embodiment of the present disclosure;

[0013] Figure 3 is a flowchart of another data testing method according to an embodiment of the present disclosure;

[0014] Figure 4 is a schematic diagram of test prompt information according to an embodiment of the present disclosure;

[0015] Figure 5is a flowchart of another data testing method according to an embodiment of the present disclosure;

[0016] Figure 6 is a flowchart of data exploration according to an embodiment of the present disclosure;

[0017] Figure 7 is a display diagram of field data testing error according to an embodiment of the present disclosure;

[0018] Figure 8 is a display diagram of field data testing correct according to an embodiment of the present disclosure;

[0019] Figure 9 is a diagram of a data testing result notification card according to an embodiment of the present disclosure;

[0020] Figure 10 is a specific flowchart of data testing according to an embodiment of the present disclosure;

[0021] Figure 11 is a structural block diagram of a data testing device according to an embodiment of the present disclosure;

[0022] Figure 12 is a hardware structure diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present disclosure.

[0024] It can be understood that, before using the technical solutions disclosed in the embodiments of the present disclosure, the type, use range, use scenario, etc. of the personal information involved in the present disclosure should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.

[0025] For example, when responding to the active request of the user, prompt information is sent to the user to explicitly prompt the user that the operation requested to be executed will need to obtain and use the personal information of the user. Thus, the user can voluntarily choose whether to provide the personal information to the electronic device, application program, server or storage medium, etc. software or hardware that executes the operation of the technical solutions of the present disclosure according to the prompt information.

[0026] As an optional but non-limiting implementation, in response to receiving the active request of the user, the manner of sending the prompt information to the user may be, for example, a pop-up window manner in which the prompt information may be presented in a textual manner. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0027] It can be understood that the above notification and user authorization process is only illustrative and does not limit the implementation of the present disclosure, and other manners meeting the relevant laws and regulations can also be applied to the implementation of the present disclosure.

[0028] It can be understood that the data involved in the technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of the relevant laws and regulations and the relevant provisions.

[0029] In data testing, a tester will obtain feature values, enumeration values and other information of each field through data exploration, for judging whether the field meets the expectation under a specific demand background and business semantics. The feature values include the maximum value, minimum value, average value, standard deviation value, zero value rate, null value rate, and NULL value rate of the field data. The enumeration values include the occurrence frequency and proportion of each data value.

[0030] Currently, manual data testing is mainly used for the field data obtained through data exploration, but manual testing is low in efficiency. Therefore, automatic testing is mainly used for the field data obtained through data exploration, so as to improve the testing efficiency.

[0031] Among them, one automatic testing mainly configures a threshold value for the feature value of each field, for example, the field A is a string type, the null value rate of which is xx%, and the NULL value rate of which is yy%. Whether the null value rate is greater than xx% and whether the NULL value rate is greater than yy% are identified to determine whether the testing is passed. The main purpose of this manner is to intercept the indicators that may have problems, to help the tester to exclude the fields that meet the expected basic data distribution, and to focus on the fields that do not meet the expected data distribution. Moreover, the special value of the field that does not pass the test may represent a special business semantics, or due to the upstream data, the tolerance of abnormal data in the demand description of the business demand, etc., resulting in a low accuracy. In addition, the field that passes the test only represents that its basic feature value is normal, and there may still be abnormal data (such as negative numbers, non-expected enumeration values, etc.), resulting in a low recall rate. In the actual business testing scene, the tester needs to test again whether the business semantics of the field that passes or does not pass the automatic testing meets the expectation, and due to the accuracy and recall rate, the testing efficiency has not been significantly improved.

[0032] Another, automatic testing is based on expert experience, which is mainly based on field meta information (name, description, etc.), which is divided into business types, and then the threshold value of its characteristic value is configured. The business types include: ID type, Boolean type, enumeration type, amount type, numerical value type, rate value type, string type, date type, time type, and other types. Based on the field meta information division and the threshold value configuration details after the division, as shown in Table 1.

[0033] Table 1: Field type and threshold value configuration

[0034]

[0035]

[0036] Although it classifies each field more finely, the accuracy, recall rate and test efficiency are relatively improved compared with the first automatic test scheme, but based on the fixed rule to classify the field, in the actual business scene, the metadata of the data table may be inaccurate (the note is not clear) and the rule classification error may be caused, thereby causing the test accuracy to be poor.

[0037] Based on this, the technical scheme of the present disclosure combines the understanding ability of the pre-trained data test model for natural language to classify the field type of each field of the data table, and dynamically limits the corresponding threshold value of the field according to the metadata, characteristic value and enumeration value of each field, so that the test process can automatically identify the possible errors of the characteristic value and enumeration value and the error attribution.

[0038] As an optional application scenario of the embodiment of the present disclosure, as shown in Figure 1 The optional application scenario includes an electronic device 101, a data test platform 102, a data exploration engine 103, a database 104 and a data test model 105. The data exploration engine 103 and the data test model 105 are deployed in the data test platform 102, the data test platform 102 is deployed in the electronic device 101, and the database 104 is in communication connection with the electronic device 101. The data test model 105 is a model with language understanding ability and capable of performing a data test task; the database can be any type of database, such as a relational database.

[0039] The data test platform 102 provides an interactive interface in the electronic device 101, through which a tester can input a table name of a data table to be tested, and the data exploration engine 103 in the data test platform 102 can access the database 104 to obtain table data of the data table, and perform field meta information exploration on the table data, and input the explored field meta information to the data test model 105. The data test model 105 can perform data test on the field meta information of each field according to the test prompt information, generate corresponding data test results, and the data test platform can render the data test results to display to the tester.

[0040] The electronic device 101 can be a device with computing capability, for example, the electronic device can be provided with a processor and a memory, etc., and can also be equipped with a special accelerator (such as a graphics processing unit (GPU), etc.). In addition, the electronic device can store and maintain data. Examples of the electronic device can include a supercomputer, a personal computer, a laptop computer, a vehicle-mounted computing device, a mobile device (such as a smartphone, a tablet computer, etc.), or a combination including any one or more of the above devices, etc. It should be understood that the electronic device described herein is only exemplary and not limiting, for example, other different types of electronic devices can also be used.

[0041] According to an embodiment of the present disclosure, a data test method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.

[0042] A data test method is provided in the present embodiment, which can be used in the above-mentioned electronic devices, such as computers, tablet computers, etc. Figure 2 is a flowchart of a data test method according to an embodiment of the present disclosure, as shown in Figure 2 The flowchart includes the following steps:

[0043] In step S201, field meta information corresponding to each field in the target data table and data test classification information are obtained.

[0044] The target data table is a data table currently requiring field data test; each field is used to constitute a different column (or a different row) of the basic structure of the target data table, and each column (or each row) represents a data type of a feature, such as an ID type, a Boolean value type, an enumeration value type, an amount type, a numerical value type, a rate value type, a string type, a date type, a time type, etc.; the field meta information represents key information possessed by the field, such as a field name, a data type, a field description, a field value, etc.

[0045] As described above, a data test platform is deployed in the electronic device, a data exploration engine is deployed in the data test platform, a target data table is input into the data exploration engine, the target data table is parsed by the data exploration engine to obtain each field corresponding to the target data table and field meta information corresponding to each field.

[0046] The data test classification information represents a field type classification to which each field belongs and a problem classification that may exist in the data test process. Specifically, the data test classification information is configured based on a business scenario in which the target data table is located, and distinguishes the data type of the field and the field meta information in combination with expert experience.

[0047] In step S202, test prompt information corresponding to each field is constructed using the data test classification information and the field meta information.

[0048] The test prompt information is used to explicitly describe the data test task required for the field and the output content style of the data test result. Specifically, the field that needs to be currently tested is determined by the field meta information, and the data type to which the field may belong and the problem that may exist under the belonging data type are explicitly described by the data test classification information. For any one field, the data test classification information and the corresponding field meta information are written into the corresponding position in the preset prompt word template, and the test prompt information of the corresponding field is obtained. Among them, the data test classification information of each field of the same target data table is the same.

[0049] In step S203, the data test model is guided to perform the field data test task by the test prompt information, and the data test result corresponding to each field is generated.

[0050] The data test model is a model that is trained in advance to perform field data testing, and the data test model has language understanding capability. Specifically, the data test model can be trained based on a large language model architecture, or can be trained based on a machine learning model architecture, which is not limited here as long as it has data test capability and language understanding capability.

[0051] The data test result is used to represent whether each field meets the business requirements under the current business scenario. Specifically, after the test prompt information is constructed using the data test classification information and the field meta information, the execution target of the field data test task is explicitly described by the test prompt information. At this time, the data test model can be guided to perform the corresponding field data test task for each field by the test prompt information corresponding to each field, and the data test result of each field under the current business scenario is obtained. Whether the data under the corresponding field meets the expectation is represented by the data test result, so as to identify potential problems from the field data that does not meet the expectation.

[0052] The data test method provided in the embodiment can obtain field meta information of each field and data test classification information required for data test, construct test prompt information according to the field meta information and the data test classification information, make the data test model analyze field data under each field in the target data table according to the test prompt information corresponding to each field, generate a corresponding data test result, and determine whether the field data under each field can meet the expected requirement through the data test result. Thus, the data test model is used to realize automatic test on the field data under each field in the target data table, and the data test efficiency is improved. Meanwhile, the data test model is used to understand the semantics of each field in the target data table, dynamically analyze the field data under each field in combination with the data test classification information, and avoid setting unreasonable threshold limits, thereby avoiding data test errors caused by unreasonable threshold limits and effectively improving the data test accuracy.

[0053] In the embodiment, a data test method is provided, which can be used for the electronic device described above, such as a computer, a tablet computer, etc. Figure 3 is a flowchart of the data test method according to the embodiment of the present disclosure, as shown in Figure 3 The flowchart includes the following steps:

[0054] In step S301, field meta information corresponding to each field in a target data table and data test classification information are obtained. For details, refer to the related description of the corresponding step in the above embodiment, which will not be repeated here.

[0055] In step S302, test prompt information corresponding to each field is constructed by using the data test classification information and the field meta information.

[0056] Specifically, step S302 includes the following steps:

[0057] In step S3021, a table name and a table structure of the target data table are obtained.

[0058] The table name is a unique identifier of each data table in a database; and the table structure represents each field in the data table and field attributes thereof. The table name of the target data table can be specified by a tester. Specifically, the tester can input the table name of the target data table through an interactive interface of a data test platform, and accordingly, the data test platform can obtain the table name of the target data table. Meanwhile, a data exploration engine deployed in the data test platform searches for corresponding table data according to the table name, and analyzes the table data to obtain the corresponding table structure.

[0059] In step S3022, in response to a first editing operation on the prompt word template, the data test classification information is fixedly written into the prompt word template to obtain fixed classification prompt information.

[0060] The prompt word template is a template set for the data test model to fill in the prompt description information; and the first editing operation is an operation of the tester editing the data test classification information. Specifically, for each field of the same target data table, the data test classification information is the same, and the tester can write the data test classification information as a fixed input into the prompt word template. Accordingly, by responding to the first editing operation triggered by the tester on the prompt word template, the corresponding fixed classification prompt information can be generated in the prompt word template. The classification information required in the data test process is prompted by the fixed classification information to guide the data test model to perform the classification task.

[0061] In some optional embodiments, the data test classification information includes test question classification information and field type classification information. The test question classification information is used to represent potential problems that may exist in the field, and can specifically include data boundary value anomaly, excessive data abnormal value, data enumeration value anomaly, data description and characteristic value inconsistency, other reasons, etc.; and the field type classification information is used to represent the data type to which the field data belongs, and can specifically include ID type, Boolean value type, enumeration value type, amount type, numerical value type, rate value type, string type, date type, time type, and other types, etc.

[0062] Accordingly, the fixed classification prompt information includes question classification prompt information and type classification prompt information, and the step S3022 includes: in response to the first editing operation on the prompt word template, writing the test question classification information and the field type classification information into a preset position of the prompt word template to generate the question classification prompt information and the type classification prompt information.

[0063] The preset position is an editing position set in the prompt word template for the test question classification information and the field type classification information, such as shown in FIG. 6, the writing position of the test question classification information can be set above the field type classification. Figure 4

[0064] The tester writes the test question classification information into the prompt word template according to the test question classification information editing position set in the prompt word template to obtain the corresponding question classification prompt information, so that the data test model can have the question classification capability. At the same time, the tester writes the field type classification information into the prompt word template according to the field type classification information editing position set in the prompt word template to obtain the corresponding type classification prompt information, so that the data test model can have the field type classification capability.

[0065] ​In the above embodiment, by writing the test question classification information and the field type classification information in the prompt word template, the data test model can be enabled to adaptively determine the field type of each field and determine the test question existing in the field data, thereby improving the data test capability.

[0066] In some optional embodiments, the fixed classification prompt information can further include query statement generation prompt information, which guides the data test model to generate a corresponding query statement to locate the problematic field data when the problematic field data is determined.

[0067] Correspondingly, the step S3021 can further include: in response to a third editing operation on the prompt word template, writing the query statement generation description into the prompt word template to generate the query statement generation prompt information.

[0068] The third editing operation is an operation of editing the statement generation description information by the tester. Specifically, for different fields, the corresponding query logic is the same, and the query statement generation description used to represent the query logic can be written as a fixed input into the prompt word template. Correspondingly, by responding to the third editing operation triggered by the tester on the prompt word template, the corresponding query statement generation prompt information can be generated in the prompt word template. The query statement generation prompt information guides the data test model to perform the query statement generation task, so that the data test model has the query statement generation capability.

[0069] In the above embodiment, by writing the query statement generation description in the prompt word template, the data test model can automatically locate the position of the abnormal field data according to the test question classification, generate a corresponding query statement, and assist the tester in proofreading the data test result.

[0070] In the above embodiment, by writing the query statement generation description in the prompt word template, the data test model can automatically locate the position of the abnormal field data according to the test question classification, generate a corresponding query statement, and assist the tester in proofreading the data test result.

[0071] The second editing operation is an operation of editing the field information by the tester. Specifically, since different fields correspond to different field meta information, it is necessary to create corresponding test data prompt information for each field. For any one field, the tester needs to write the table name, table structure and field meta information corresponding to the field as dynamic input into the prompt word template. Correspondingly, by responding to the second editing operation triggered by the tester on the prompt word template, the test data prompt information corresponding to the field can be generated in the prompt word template. The test data prompt information guides the field data to be probed by the data test model.

[0072] Step S3024, the test data prompt information is spliced with the fixed classification prompt information to generate test prompt information.

[0073] After the editing of the test data prompt information and the fixed classification prompt information is completed, further, the corresponding data output format description is set in the prompt word template, and the test data prompt information, the fixed classification prompt information and the data output format description are spliced to obtain the corresponding test prompt information.

[0074] In one specific example, in order to guide the data test model to accurately perform the field data test task corresponding to each field according to the test prompt information, an example can also be edited in the prompt word template, and the specific field detection prompt information format is as shown in Figure 4

[0075] Step S303, the test prompt information is used to guide the data test model to perform the field data test task, and the data test result corresponding to each field is generated.

[0076] Specifically, the above step S303 includes:

[0077] Step S3031, for any one target field in each field, according to the test prompt information, the data test model is guided to perform the field data test task on the field meta information corresponding to the target field, and it is determined whether the field meta information corresponding to the target field is abnormal.

[0078] Whether the field meta information is abnormal is used to represent whether the field meta information meets the data expectation under the current business scenario, for example, the field data of ID type is not allowed to be NULL value, the field data of amount type is not allowed to be negative, etc. The data test model performs the corresponding field data test task for each field of the target data table in turn to determine whether the field meta information corresponding to each field meets the data expectation demand of the current business scenario. If it does not meet the data expectation demand of the current business scenario, it can be determined that the target field is abnormal.

[0079] Specifically, for any one target field in each field, the data test model performs the corresponding field data test task according to the test prompt information corresponding to the target field to determine the field type to which the target field belongs, and to determine whether the field data of the target field meets the data expectation demand under the field type to which it belongs. If it is determined that the field data of the target field meets the data expectation demand under the field type to which it belongs, it can be determined that the target field has no problem. If it is determined that the field data of the target field does not meet the data expectation demand under the field type to which it belongs, it is determined that the field meta information of the target field is abnormal, and step S3032 is performed.

[0080] ​In step S3032, if the field meta information has an exception, the data test model is used to analyze the exception information in the field meta information, and a data test result corresponding to the exception information is generated.

[0081] When it is determined that the field data under the target field has an exception, the data test model is used to perform data problem exploration under the field classification to which the target field belongs, so as to determine the exception information (i.e., the exception field data) from the field meta information. Then, the potential problem existing in the target field is analyzed according to the exception information, error attribution is performed on the exception information, and a corresponding data test result is generated, wherein the data test result includes the field name, the field type, the field test failure identifier, the test problem classification, and the error attribution of the target field.

[0082] In some optional embodiments, the data test result can further include a query statement for locating the exception information. Specifically, when it is determined that the target field has exception information, the data test model can generate a corresponding query statement according to the exception information, so as to assist the tester in determining whether the data test is correct or not by whether the query statement is correct or not.

[0083] It should be noted that if the field data has no problem, the query statement and the error attribution in the data test result can be empty, and the field name, the field type, and the field test pass identifier of the target field are displayed in the data test result.

[0084] The data test method provided in this embodiment uses the test data prompt information corresponding to each field as dynamic input and uses the data test classification information as fixed input, constructs the test prompt information corresponding to each field, and thus realizes the targeted test of each field. The natural understanding ability of the data test model and the data test classification information are used to perform self-adaptive test on the field data under each field, the field characteristic value of each field is dynamically determined, the test of each field is ensured to conform to the current business scenario, and the test accuracy of the field data is improved. Each field is tested in sequence, and when there is an exception in the field meta information of any target field, the exception information in the field meta information is automatically analyzed, and a corresponding data test result is generated, so as to realize self-adaptive analysis of the exception information and automatic generation of the data test result, and improve the data test efficiency and the data test accuracy.

[0085] In this embodiment, a data test method is provided, which can be used in the electronic device described above, such as a computer, a tablet computer, and the like. Figure 5 The flowchart of the data test method according to the embodiments of the present disclosure is shown in FIG. 3, which includes the following steps: Figure 5

[0086] ​In step S401, field meta information corresponding to each field in the target data table and data test classification information are acquired.

[0087] Specifically, the field meta information includes field metadata, characteristic values, and enumeration information. The field metadata is data of field data, such as a field name, a data type, whether it can be empty, a field default value, a field description, and the like. The characteristic values are used to represent characteristics of field data corresponding to the field, such as a maximum value, a minimum value, an average value, a standard deviation value, a zero value rate, an empty value rate, a NULL value rate (valueless rate), and the like. The enumeration information indicates that field values of the field are limited to a predefined set, such as a number of occurrences of each data value under the field and a proportion of the occurrences.

[0088] Correspondingly, the above step S401 includes:

[0089] In step S4011, table data corresponding to the target data table is queried based on a table name of the target data table.

[0090] As described above, a data test platform is deployed in the electronic device, and the data test platform is provided with an interactive page. Different target data tables have different table names, and the table name can be used as a unique identifier of the target data table. A tester can input a table name of a target data table to be tested through the interactive page. Correspondingly, the data test platform can send the table name of the target data table to the data exploration engine, so that the data exploration engine queries a database based on the table name of the target data table and reads corresponding table data of the target data table from the database.

[0091] In step S4012, data exploration is performed on data corresponding to each field in the table data, and field metadata, characteristic values, and enumeration information corresponding to each field are obtained.

[0092] The table data carries each field of the target data table and field data under each field. By analyzing the table data through the data exploration engine, each field in the table data and the field data under each field are obtained, and data exploration is performed on the field data under each field to obtain a corresponding data table exploration report. In the data table exploration report, the metadata (such as a field name and a field description) of each field, the characteristic values, and the enumeration information (such as enumeration values, a number of occurrences of the enumeration values, and an enumeration number) are recorded, as shown in Table 1. Figure 6

[0093] In step S4013, data test classification information of the target data table is acquired. For details, please refer to the related description of the corresponding step in the above embodiment, which will not be described here.

[0094] ​In some optional embodiments, the step S401 further includes: assembling the field metadata, the feature value and the enumeration information in a preset format to generate target field data in the preset format.

[0095] The preset format is a preset data packaging format to facilitate reading and parsing of a subsequent data test model. The target field data is generated by assembling the field metadata, the feature value and the enumeration information in the preset format. For example, as shown in the following table, after obtaining the field metadata, the feature value and the enumeration information under each field, the field metadata, the feature value and the enumeration information under each field are assembled into target field data in the JSON format through code processing, to serve as input of the subsequent data test model. Figure 5

[0096] In the above embodiments, assembling the field metadata, the feature value and the enumeration information in the preset format is advantageous to improving the parsing accuracy of the field metadata, the feature value and the enumeration information, thereby helping to improve the subsequent data test accuracy.

[0097] In the above embodiments, assembling the field metadata, the feature value and the enumeration information in the preset format is advantageous to improving the parsing accuracy of the field metadata, the feature value and the enumeration information, thereby helping to improve the subsequent data test accuracy.

[0098] In the above embodiments, assembling the field metadata, the feature value and the enumeration information in the preset format is advantageous to improving the parsing accuracy of the field metadata, the feature value and the enumeration information, thereby helping to improve the subsequent data test accuracy.

[0099] In the above embodiments, assembling the field metadata, the feature value and the enumeration information in the preset format is advantageous to improving the parsing accuracy of the field metadata, the feature value and the enumeration information, thereby helping to improve the subsequent data test accuracy.

[0100] The first rendering form is a preset web page rendering manner, such as rendering through a web page plug-in. Specifically, after the data test model outputs the data test result in the preset format (such as JSON), the data test platform can render the data test result of each field to the data test platform in the web page rendering manner, to generate a display page of each field in the data test platform.

[0101] In some optional embodiments, if the data test result represents a test error, the error attribution and the test details are displayed in the display page in a first manner; if the data test result represents a correct test, the test details are displayed in the display page in a second manner.

[0102] ​The first mode is a display mode set for a test error; and the second mode is a display mode set for a test correct. The first mode is different from the second mode to distinguish the test correct and the test error. For example, the display page can use different color title bars to present the field test correct and the field test error.

[0103] The test error attribution is an error cause analysis given to the field with the error; and the test details are detailed exploration results of the field.

[0104] As shown in Figure 7 , if the test result of the ID type data represents a test error, the title bar of the target data table is displayed in the first mode, and the field test failure identification and the corresponding test details of the ID type are displayed in the display page, including the 0 value distribution, the NULL value distribution and each enumeration value under the field of the ID type. If the data test task is executed by the data test model, it is determined that the NULL value under the field of the ID type accounts for xx%, and since the ID value should not exist NULL value, at this time, the data test model can determine that the field of the ID type has a problem, and when the test personnel triggers the NULL value distribution display area, the corresponding error attribution “ID value should not exist NULL value” is displayed for the test personnel to make detailed analysis on the error attribution.

[0105] As shown in Figure 8 , if the test result of the character type data represents a test correct, the title bar of the target data table is displayed in the second mode, and the field test pass identification and the corresponding test details of the character type are displayed in the display page, including the NULL value distribution, the distribution of empty strings and each enumeration value under the field of the ID type.

[0106] In the above embodiment, the test correct and the test error are distinguished by different display modes to assist the test personnel to more intuitively understand the data test result of the field.

[0107] In step S405, the data test result is rendered in a second rendering form to generate an information notification card of the data test result.

[0108] The second rendering form is a rendering mode of the agent notification card preset in advance, such as a chat agent mode to display the field detection result to the test personnel. Specifically, after the data test model outputs the data test result in a preset format (such as JSON), the data test platform can encapsulate and render the data test result of each field into an information notification card in the form of the agent notification card. As shown in Figure 9 , the information notification card includes the table name of the target data table, the field exploration summary data and the field test details not meeting the expectation.

[0109] In step S406, the information notification card is pushed to the application information interface of the target object initiating the data test.

[0110] The data test platform supports communication binding with the application of the target object, and when the data test platform completes rendering and packaging of the data test result of each field, the information notification card generated by the rendering and packaging is pushed to the application of the target object (i.e., the tester initiating the data test). Correspondingly, the application can display the information notification card in the form of an intelligent experience session in the information interface, so as to be viewed by the tester.

[0111] The data test method provided in this embodiment can accurately capture the field data under each field by data exploration on the field metadata, feature values and enumeration information of each field of the target data table, which is beneficial to improving the semantic understanding of the data test model for each field, and improving the field classification accuracy and test question classification accuracy of each field. For the data test result, rendering is supported in different rendering modes, which improves the display diversity of the data test result, and facilitates viewing of the data test result in multiple ways.

[0112] As a specific application embodiment of the present disclosure, as shown in FIG. 8, the data test platform can be applied to a data test platform of a smart terminal application. Figure 10As shown, the data exploration engine generates metadata exploration results (including field metadata, feature values, and enumeration information) for the target data table. The engine also parses the table structure, using the table name, structure, and metadata exploration results as test data. Simultaneously, it pre-acquires problem classification information (abnormal data boundary values, excessive outliers, abnormal enumeration values, inconsistencies between data description and feature values, other reasons) and field type classification information (ID type, Boolean type, enumeration value type, amount type, numeric type, rate type, string type, date type, time type, other types) for the target data table's context. The problem classification information and field type classification information are used as fixed inputs to write prompt words, defining the required classification information for exploration and assisting the data testing model in performing classification-related skills. The target data table name, structure, and metadata exploration results are dynamically written into the prompt words to define the field data to be explored. Corresponding test prompt information is constructed for each field. The data testing model can then sequentially perform data testing tasks for each field, including field type classification, anomaly query generation, and potential problem analysis based on field feature values. Furthermore, through its field type classification capability, the model determines the corresponding field type classification and feature value range for each field; through its query generation capability, it generates corresponding SQL queries for data anomalies for each field; and through its problem analysis capability, it determines whether each field meets expectations under its corresponding field type classification. If it does not meet expectations, it determines the corresponding problem classification and generates error attribution results corresponding to that problem classification.

[0113] Taking the example of a string field XX not meeting expectations, the data testing model can generate the following data test results:

[0114] {"col_name":"XX",

[0115] "type":"String type",

[0116] "is_pass":false,

[0117] "failed_type": "Too many outlier data values",

[0118] "query_sql":"SELECT*FROM table WHERE date='yyyyMMdd'AND email isnull",

[0119] "reason":"Because the semantics of the field are XX, the enumeration values ​​should not contain 'null' values. The probing results show that the distribution of 'null' values ​​is num1%, which does not meet expectations."}

[0120] Taking the numerical field YY meeting expectations as an example, the data testing model can generate the following corresponding data test results:

[0121] {"col_name":"YY",

[0122] "type":"numeric type",

[0123] "is_pass":true,

[0124] "failed_type":"None",

[0125] "query_sql":"None",

[0126] "reason":"The semantics of the field are YY, and the probing results show that the distribution of each value is not abnormal, therefore it meets expectations."}

[0127] This embodiment also provides a data testing device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0128] This embodiment provides a data testing device, such as... Figure 11 As shown, it includes:

[0129] The acquisition module 501 is used to acquire the field metadata and data test classification information corresponding to each field in the target data table.

[0130] The prompt message construction module 502 is used to construct test prompt messages corresponding to each field by utilizing data test classification information and field meta information.

[0131] The field exploration module 503 is used to guide the data testing model to execute field data testing tasks through test prompts and generate data test results for each field.

[0132] In some optional implementations, the field metadata includes field metadata, feature values, and enumeration information; correspondingly, the acquisition module 501 includes:

[0133] The table data query unit is configured to query table data corresponding to the target data table based on the table name of the target data table.

[0134] The field meta information acquisition unit is configured to perform data exploration on data corresponding to each field in the table data, and obtain field metadata, feature values, and enumeration information corresponding to each field.

[0135] In some optional embodiments, the apparatus further includes:

[0136] The format conversion module is configured to assemble the field metadata, the feature values, and the enumeration information in a preset format, and generate target field data in the preset format.

[0137] In some optional embodiments, the prompt information construction module 502 includes:

[0138] The table attribute acquisition unit is configured to acquire the table name and the table structure of the target data table.

[0139] The fixed information writing unit is configured to, in response to a first editing operation on the prompt word template, write the data test classification information into the prompt word template to obtain fixed classification prompt information.

[0140] The exploration data writing unit is configured to, in response to a second editing operation on the prompt word template, write the table name, the table structure, and the field meta information into the prompt word template to obtain test data prompt information.

[0141] The information splicing unit is configured to splice the test data prompt information and the fixed classification prompt information to generate test prompt information.

[0142] In some optional embodiments, the data test classification information includes test question classification information and field type classification information, and the fixed classification prompt information includes question classification prompt information and type classification prompt information.

[0143] Correspondingly, the fixed information writing unit is configured to, in response to a first editing operation on the prompt word template, write the test question classification information and the field type classification information into a preset position of the prompt word template to generate the question classification prompt information and the type classification prompt information.

[0144] In some optional embodiments, the fixed classification prompt information includes query statement generation prompt information. Correspondingly, the fixed information writing unit is configured to, in response to a third editing operation on the prompt word template, write query statement generation description into the prompt word template to generate the query statement generation prompt information.

[0145] In some optional embodiments, the field exploration module 503 includes:

[0146] The judging unit is configured to, for any target field in each field, guide the data test model to perform a field data test task on field meta information corresponding to the target field according to the test prompt information, and determine whether the field meta information corresponding to the target field meets a preset condition;

[0147] The abnormality analyzing unit is configured to, if the field meta information does not meet the preset condition, analyze abnormal information in the field meta information by using the data test model, and generate a data test result corresponding to the abnormal information.

[0148] In some optional embodiments, the apparatus further includes:

[0149] The page rendering module is configured to render the data test result in a first rendering form, and generate a display page of the data test result.

[0150] In some optional embodiments, the page rendering module includes:

[0151] The first display unit is configured to, if the data test result represents a test error, display error attribution and test details in the display page in a first manner.

[0152] The second display unit is configured to, if the data test result represents a test error, display the test details in the display page in a second manner.

[0153] In some optional embodiments, the apparatus further includes:

[0154] The card rendering module is configured to render the data test result in a second rendering form, and generate an information notification card of the data test result.

[0155] The pushing module is configured to push the information notification card to a target object that initiates the data test, and display the information notification card on an application information interface of the target object.

[0156] The data testing device provided by the embodiments of the present disclosure can execute the data testing method provided by any of the embodiments of the present disclosure, and has the corresponding function modules and beneficial effects of the execution method. By obtaining the field meta information of each field and the data testing classification information required for data testing, the test prompt information is constructed based on the field meta information and the data testing classification information, the data testing model analyzes the field data under the corresponding field in the target data table according to the test prompt information corresponding to each field, generates the corresponding data testing result, and determines whether the field data under each field can meet the expected demand through the data testing result. Therefore, the automatic testing of the field data under each field in the target data table is realized through the data testing model, and the data testing efficiency is improved. At the same time, the semantics of each field of the target data table is understood through the data testing model, and the field data under each field is dynamically analyzed in combination with the data testing classification information, without pre-setting the threshold limit of each field, avoiding the data testing error caused by unreasonable threshold limit setting, and effectively improving the data testing accuracy.

[0157] Further function descriptions of the above-mentioned modules and units are the same as those of the corresponding embodiments, and will not be repeated here.

[0158] Figure 12 A structural schematic diagram of an electronic device provided by the embodiments of the present disclosure is provided.

[0159] The following will be specifically described with reference to Figure 12 which shows a structural schematic diagram of an electronic device suitable for implementing the electronic device in the embodiments of the present disclosure. The electronic device can include a processor (such as a central processor, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 602 or programs loaded from a storage 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device are also stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0160] Generally, the following devices can be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 12Electronic devices are shown with various apparatuses, but it should be understood that not all of the illustrated apparatuses are required, and that a greater or lesser number of apparatuses can alternatively be implemented.

[0161] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication apparatus 609, or installed from the memory 608, or installed from the ROM 602. When the computer program is executed by the processor 601, the above-mentioned functions defined in the data testing method of embodiments of the present disclosure are performed.

[0162] Figure 12 The electronic device shown is merely an example and should not impose any limitation on the functions and scope of use of embodiments of the present disclosure.

[0163] Embodiments of the present disclosure also provide a computer-readable storage medium, the above-mentioned method according to embodiments of the present disclosure can be implemented in hardware, firmware, or as computer code recordable on a storage medium, or as computer code originally stored in a remote storage medium or non-transitory machine-readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein can be processed by such software on a storage medium using a general-purpose computer, a special-purpose processor, or programmable or special-purpose hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk or a solid state disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that the computer, processor, microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, processor or hardware, the data testing method shown in the above embodiments is implemented.

[0164] Part of the present disclosure can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, the method and / or technical solutions according to the present disclosure can be invoked or provided. Those skilled in the art should understand that the form of computer program instructions in computer readable medium includes but is not limited to source file, executable file, installation package file and the like, and accordingly, the way of computer program instructions executed by computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.

[0165] Although the embodiments of the present disclosure are described in conjunction with the drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present disclosure, and such modifications and changes fall within the scope defined by the appended claims.

Claims

1. A data testing method, characterized in that, The method includes: Obtain the field metadata and data test classification information for each field in the target data table; Using the data test classification information and the field metadata, construct test prompt information corresponding to each field; The test prompts guide the data test model to perform field data test tasks and generate data test results for each field.

2. The method according to claim 1, characterized in that, The step of obtaining the field metadata corresponding to each field in the target data table includes: Based on the table name of the target data table, query the table data corresponding to the target data table; Data exploration is performed on the data corresponding to each field in the table to obtain the field metadata, feature values ​​and enumeration information corresponding to each field. The field metadata includes the field metadata, the feature value, and the enumeration information.

3. The method according to claim 2, characterized in that, Also includes: The field metadata, the feature values, and the enumeration information are assembled in a preset format to generate the target field data in the preset format.

4. The method according to claim 1, characterized in that, The step of constructing test prompt information corresponding to each field using the data test classification information and the field metadata includes: Obtain the table name and table structure of the target data table; In response to the first editing operation on the prompt word template, the data test classification information is fixedly written into the prompt word template to obtain fixed classification prompt information; In response to the second editing operation on the prompt word template, the table name, the table structure, and the field metadata are written into the prompt word template to obtain test data prompt information; The test data prompt information is concatenated with the fixed category prompt information to generate the test prompt information.

5. The method according to claim 4, characterized in that, The data test classification information includes test question classification information and field type classification information; In response to the first editing operation on the prompt word template, the data test classification information is fixedly written into the prompt word template to obtain fixed classification prompt information, including: In response to the first editing operation on the prompt word template, the test question classification information and the field type classification information are written into the preset position of the prompt word template to generate question classification prompt information and type classification prompt information; The fixed category prompt information includes the problem category prompt information and the type category prompt information.

6. The method according to claim 4 or 5, characterized in that, Also includes: In response to a third editing operation on the prompt word template, a query statement generation description is written into the prompt word template, and a query statement generation prompt message is generated. The fixed category prompt information includes the prompt information generated by the query statement.

7. The method according to claim 1, characterized in that, The process of guiding the data testing model to execute field data testing tasks through the test prompt information and generating data test results for each field includes: For any target field among the various fields, the data testing model is guided to perform field data testing tasks on the field metadata corresponding to the target field according to the test prompt information, in order to determine whether there are any anomalies in the field metadata corresponding to the target field; If the field metadata contains anomalies, the data testing model is used to analyze the anomalies in the field metadata and generate the corresponding data test results.

8. The method according to claim 1, characterized in that, Also includes: The data test results are rendered in a first rendering format to generate a display page for the data test results.

9. The method according to claim 8, characterized in that, Also includes: If the data test results indicate a test error, the error attribution and test details are displayed on the display page in a first manner. If the data test results indicate a test error, the test details will be displayed on the display page in a second manner.

10. The method according to claim 1 or 8, characterized in that, Also includes: The data test results are rendered in a second rendering format to generate an information notification card for the data test results; The information notification card is pushed to the target object that initiates the data test, and the information notification card is displayed in the application information interface of the target object.

11. A data testing device, characterized in that, The device includes: The acquisition module is used to obtain the field metadata and data test classification information corresponding to each field in the target data table. The prompt information construction module is used to construct test prompt information corresponding to each field using the data test classification information and the field meta information; The field exploration module is used to guide the data testing model to execute field data testing tasks based on the test prompt information, and generate data test results corresponding to each field.

12. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the data testing method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the data testing method according to any one of claims 1 to 10.

14. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the data testing method according to any one of claims 1 to 10.