Big data testing method, device, electronic equipment and medium based on artificial intelligence

Through the big data testing method based on artificial intelligence, the task to be tested is analyzed, the path to be extracted, the script is extracted and the target table name of the data table is detected, which solves the problem that the existing test platform needs to pre-deploy the environment and data not ensured before testing, and realizes an efficient and accurate testing process.

CN114328267BActive Publication Date: 2025-05-02PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210033883.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-12
Publication Date
2025-05-02
Estimated Expiration
2042-01-12

AI Technical Summary

Technical Problem

The existing test platform needs to pre-deploy the test environment before conducting testing, and cannot ensure the correctness of the data to be tested, resulting in low test accuracy and efficiency.

Method used

Using a big data testing method based on artificial intelligence, we analyze the tasks to be tested, identify the extraction path in the script-associated server, extract the script to be tested, and map the processing tasks to be tested according to the target table name of the source table for detection to ensure data accuracy.

Benefits of technology

Improve the detection efficiency and accuracy, ensure the accuracy of the script to be tested, avoid the inefficiency of testing caused by configuration document errors, and improve the testing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114328267B_ABST
    Figure CN114328267B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and provides a big data testing method, device, electronic device and medium based on artificial intelligence, the method comprising: parsing a received task to be tested to obtain an extraction path of a script to be tested; when an extraction path of the script to be tested exists in a preset script association server, extracting the script to be tested based on the extraction path of the script to be tested; parsing the script to be tested to obtain a target table name of a data table; mapping a corresponding processing task based on the target table name of a source table, detecting the script to be tested according to the processing task, and obtaining a detection result; testing the script to be tested based on the detection result. The present invention detects the corresponding processing task based on the target table name of the source table, thereby improving detection efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an artificial intelligence-based big data testing method, device, electronic equipment and medium. Background Art

[0002] In the process of software development, the development process adopted is mostly to analyze requirements first, then design and code, and finally test. At present, most software development is carried out in a continuous integration manner, that is, developers frequently integrate their work, and each integration is automated testing, so as to find problems in the development process as early as possible.

[0003] However, the existing test platform needs to deploy the test environment on the test machine in advance according to the test items before testing, and it is impossible to know whether the data to be tested is correct, which leads to low test accuracy and efficiency. Summary of the invention

[0004] In view of the above, it is necessary to propose a big data testing method, device, electronic equipment and medium based on artificial intelligence, which improves the detection efficiency and accuracy by reversing the corresponding processing tasks according to the target table name of the source table.

[0005] A first aspect of the present invention provides a big data testing method based on artificial intelligence, the method comprising:

[0006] Parse the received task to be tested and obtain the extraction path of the script to be tested;

[0007] Identify whether there is an extraction path for the script to be tested in a preset script association server;

[0008] When the preset script association server has an extraction path for the script to be tested, extracting the script to be tested based on the extraction path for the script to be tested;

[0009] Parsing the script to be tested to obtain a target table name of a data table, wherein the data table includes a source table and a target table;

[0010] Mapping a corresponding processing task based on the target table name of the source table, and detecting the script to be tested according to the processing task to obtain a detection result;

[0011] The script to be tested is tested based on the detection result.

[0012] Optionally, parsing the script to be tested to obtain a target table name of a data table includes:

[0013] Preprocessing the script to be tested to obtain a preprocessed script to be tested;

[0014] Detecting the preset key fields in the preprocessed script to be tested, and extracting the table name of the data table according to the detected preset key fields;

[0015] The table name is detected, and the target table name of the data table is determined according to the detection result.

[0016] Optionally, the detecting the table name and determining the target table name of the data table according to the detection result includes:

[0017] When it is detected that the table name is a variable name, a key value corresponding to the variable name is searched in a preset dictionary, and the searched key value is determined as a target table name of the data table; or

[0018] When it is detected that the length of the table name after the null removal process satisfies a preset table name determination condition, the table name is determined as the target table name of the data table; or

[0019] When it is detected that the table name contains brackets, it is determined that the table name is not a target table name.

[0020] Optionally, after extracting the script to be tested based on the extraction path of the script to be tested, the method further includes:

[0021] Detecting a plurality of preset script elements in the script to be tested.

[0022] Optionally, the detecting a plurality of preset script elements in the script to be tested includes:

[0023] Detecting the scheduling time in the script to be tested; or

[0024] Detecting the task type in the script to be tested; or

[0025] Detect the target table in the script to be tested.

[0026] Optionally, detecting the scheduling time in the script to be tested includes:

[0027] Detecting the lengths of multiple first tasks in the scheduled time to obtain a first detection result, and sending the first detection result to the client, wherein the first task includes a daily task, a monthly task, a weekly task, and a yearly task, wherein the detecting the lengths of multiple first tasks in the scheduled time to obtain the first detection result includes:

[0028] Determining whether the length of each of the plurality of first tasks meets the length requirement of the corresponding task;

[0029] When the length of each of the plurality of first tasks meets the length requirement of the corresponding task, detecting whether the value of each of the plurality of first tasks meets the value requirement of the corresponding task;

[0030] When the value of each of the plurality of first tasks meets the value requirement of the corresponding task, determining that the first detection result is that the scheduling time is correct; or

[0031] When the value of any one of the plurality of first tasks does not meet the value requirement of the corresponding task, it is determined that the first detection result is that the scheduling time is abnormal.

[0032] Optionally, the testing the script to be tested according to the processing task to obtain the test result includes:

[0033] Obtaining the first document content corresponding to the processing task, and reading the script to be tested to obtain the corresponding second document content;

[0034] sequentially comparing the first sub-content in each column of the first document content with the second sub-content in the corresponding column of the second document content;

[0035] When the first sub-content in each column of the first document content is consistent with the second sub-content in the corresponding column of the second document content, determining that the detection result is that the script is normal; or

[0036] When the first sub-content in each column of the first document content is inconsistent with the second sub-content in the corresponding column of the second document content, it is determined that the detection result is a script anomaly.

[0037] A second aspect of the present invention provides a big data testing device based on artificial intelligence, the device comprising:

[0038] A first parsing module is used to parse the received task to be tested to obtain an extraction path of the script to be tested, wherein the task to be tested includes a configuration file;

[0039] An identification module, used to identify whether there is an extraction path of the script to be tested in a preset script association server;

[0040] An extraction module, configured to extract the script to be tested based on the extraction path of the script to be tested when the extraction path of the script to be tested exists in the preset script association server;

[0041] A second parsing module is used to parse the script to be tested to obtain a target table name of a data table, wherein the data table includes a source table and a target table;

[0042] A first testing module is used to map a corresponding processing task based on the target table name of the source table, and detect the script to be tested according to the processing task to obtain a detection result;

[0043] The second testing module is used to test the script to be tested based on the detection result.

[0044] A third aspect of the present invention provides an electronic device, comprising a processor and a memory, wherein the processor is used to implement the artificial intelligence-based big data testing method when executing a computer program stored in the memory.

[0045] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and the computer program, when executed by a processor, implements the artificial intelligence-based big data testing method.

[0046] In summary, the big data testing method, device, electronic device and medium based on artificial intelligence described in the present invention, by parsing the received task to be tested, obtains the extraction path of the script to be tested and identifies it. When the extraction path of the script to be tested exists in the preset script association server, it is determined that the extraction path of the script to be tested is correct, and the corresponding script to be tested is extracted through the correct extraction path, thereby improving the accuracy of the extracted script to be tested. Parse the script to be tested extracted by the extraction path, obtain the target table name of the data table, map the corresponding processing task based on the target table name of the source table, detect the script to be tested according to the processing task, and find out the corresponding processing task in the task management platform according to the target table name of the source table. Since the first document content corresponding to the processing task is the expected content to be filled, that is, the standard content, and the second document content is the content actually filled in when the developer configures the document in the early stage, the second content is detected based on the first content, thereby ensuring the accuracy of the detection result. Test the script to be tested based on the detection result, and test it on the premise that the test result is a normal script, thereby improving the test efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a flowchart of the big data testing method based on artificial intelligence provided in Example 1 of the present invention.

[0048] Figure 2 It is a structural diagram of a big data testing device based on artificial intelligence provided in Example 2 of the present invention.

[0049] Figure 3 It is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0050] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.

[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0052] Embodiment 1

[0053] Figure 1 It is a flowchart of the big data testing method based on artificial intelligence provided in Example 1 of the present invention.

[0054] In this embodiment, the artificial intelligence-based big data testing method can be applied to electronic devices. For electronic devices that need to perform artificial intelligence-based big data testing, the artificial intelligence-based big data testing function provided by the method of the present invention can be directly integrated into the electronic device, or run in the electronic device in the form of a software development kit (Software Development Kit, SDK).

[0055] like Figure 1 As shown, the big data testing method based on artificial intelligence specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some can be omitted.

[0056] S11, parsing the received task to be tested to obtain an extraction path of the script to be tested.

[0057] In this embodiment, the task to be tested includes a configuration document, and the client uploads the configuration document of the task to be tested to the server, wherein the configuration document includes configuration resources such as log data, required data tables, and table names of data tables. Specifically, during the process of uploading the configuration document of the task to be tested, the client can upload it through the corresponding test interface of the server. By uploading the configuration document through the corresponding test interface, the upload speed and the security of the configuration document can be ensured.

[0058] In other optional embodiments, the client may upload the configuration document of the task to be tested through a web page. When uploading the configuration document through a web page.

[0059] In this embodiment, when the server receives the configuration document of the file to be tested and parses the configuration document, the extraction path of the script to be tested is obtained according to the parsing result.

[0060] In an optional embodiment, parsing the received task to be tested to obtain an extraction path of the script to be tested includes:

[0061] Parse the configuration document in the task to be tested to obtain the path and splicing rules filled in the configuration document;

[0062] The filled paths are spliced ​​according to the splicing rules, and the spliced ​​paths are determined as the extraction paths of the script to be tested.

[0063] In this embodiment, when confirming the extraction path of the script to be tested, a path extraction rule may be preset, and the filled path may be extracted from the parsed configuration document according to the preset path extraction rule, wherein the filled path may be one or more.

[0064] S12, identifying whether there is an extraction path of the script to be tested in a preset script association server.

[0065] In this embodiment, a script-associated server may be predetermined, wherein the script-associated server stores an extraction path of the script to be tested.

[0066] In an optional embodiment, the step of identifying whether an extraction path of the script to be tested exists in a preset script association server includes:

[0067] Matching the extraction path of the script to be tested with the extraction path in the preset script association server;

[0068] When the extraction path of the script to be tested completely matches any extraction path in the preset script-associated server, determining that the extraction path of the script to be tested exists in the preset script-associated server; or

[0069] When the extraction path of the script to be tested does not completely match each extraction path in the preset script-associated server, it is determined that the extraction path of the script to be tested does not exist in the preset script-associated server.

[0070] Furthermore, the method further comprises:

[0071] When the extraction path of the script to be tested does not exist in the preset script association server, an error result of the extraction path of the script to be tested is sent to the client.

[0072] In this embodiment, by identifying whether the extraction path of the script to be tested exists in the preset script association server, when the extraction path of the script to be tested exists in the preset script association server, it is determined that the extraction path of the script to be tested is correct, and the corresponding script to be tested is extracted through the correct extraction path, thereby improving the accuracy of the extracted script to be tested.

[0073] S13, when the extraction path of the script to be tested exists in the preset script association server, extracting the script to be tested based on the extraction path of the script to be tested.

[0074] In this embodiment, the script to be tested refers to a script to be detected as an abnormal script, wherein the script refers to an executable file written in a specific descriptive language according to a certain format.

[0075] In this embodiment, in terms of automated testing, each time a large number of big data programs are launched, data testing alone cannot discover all problems. For example, the configuration documents filled out by developers in the early stage of deployment often contain low-level errors, and deployment problems will occur when the filled-in configuration documents are subsequently used for task processing testing. When deployment problems occur, the test is stopped and the document needs to be reconfigured for secondary testing, resulting in low efficiency of script testing.

[0076] In this embodiment, before executing the test task, the accuracy of the script to be tested is ensured by detecting the script to be tested, avoiding the problem of slow script testing efficiency due to the need to redeploy configuration due to incorrect configuration documents, and improving script testing efficiency.

[0077] In other optional embodiments, after extracting the script to be tested based on the extraction path of the script to be tested, the method further includes:

[0078] Detecting a plurality of preset script elements in the script to be tested.

[0079] Specifically, the detecting of the plurality of preset script elements in the script to be tested includes:

[0080] Detecting the scheduling time in the script to be tested; or

[0081] Detecting the task type in the script to be tested; or

[0082] Detect the target table in the script to be tested.

[0083] In this embodiment, the multiple script elements may include other script elements that need to be detected, such as scheduling time, task type, and target table.

[0084] Further, the detecting the scheduling time in the script to be tested includes:

[0085] Detect the lengths of multiple first tasks in the scheduled time, obtain a first detection result, and send the first detection result to the client, wherein the first task includes a daily task, a monthly task, a weekly task, and a yearly task.

[0086] Specifically, detecting the lengths of the plurality of first tasks in the scheduling time to obtain a first detection result includes:

[0087] Determining whether the length of each of the plurality of first tasks meets the length requirement of the corresponding task;

[0088] When the length of each of the plurality of first tasks meets the length requirement of the corresponding task, detecting whether the value of each of the plurality of first tasks meets the value requirement of the corresponding task;

[0089] When the value of each of the plurality of first tasks meets the value requirement of the corresponding task, determining that the first detection result is that the scheduling time is correct; or

[0090] When the value of any one of the plurality of first tasks does not meet the value requirement of the corresponding task, it is determined that the first detection result is that the scheduling time is abnormal.

[0091] Furthermore, the method further comprises:

[0092] When the length of any one of the plurality of first tasks does not meet the length requirement of the corresponding task, it is determined that the first detection result is that the scheduling time is abnormal.

[0093] For example, the length requirement of the daily task can be set to 4 digits; the length requirement of the monthly task can be set to 6 digits, and the length of the weekly task can be set to 4 digits; the length of the annual task can be set to 8 digits; the numerical requirement of the daily task can be set to include hours and minutes, and the first two digits must satisfy the numerical range of 0-24, and the last two digits must satisfy the numerical range of 0-59; the data requirement of the monthly task can be set to the first two digits must satisfy the numerical range of 1-28.

[0094] Further, the detecting the task type in the script to be tested includes:

[0095] It is detected whether the scheduling time corresponding to the task type in the script to be tested is legal, and a second detection result is obtained.

[0096] Further, the detecting whether the scheduling time corresponding to the task type in the script to be tested is legal, and obtaining the second detection result includes:

[0097] Initialize the scheduling time corresponding to the task type in the script to be tested, and obtain the target scheduling time corresponding to the task type;

[0098] Detecting whether the target scheduling time corresponding to the task type meets the preset format requirements;

[0099] When the target scheduling time corresponding to the task type meets the preset format requirement, the scheduling time corresponding to the task type in the script to be tested is legal, and it is determined that the second detection result is that the task type in the script to be tested is normal; or

[0100] When the target scheduling time corresponding to the task type does not meet the preset format requirement, the scheduling time corresponding to the task type in the script to be tested is illegal, and the second detection result is determined to be that the task type in the script to be tested is abnormal.

[0101] Exemplarily, by initializing the day, month, week, and year in the scheduling time corresponding to the task type in the script to be tested, corresponding to D, M, W1-W7, Y, and 0 respectively, the preset format requirement is: YYYYMMDD. If the initialized target scheduling time satisfies YYYYMMDD, it is determined that the task type in the script to be tested is normal.

[0102] Further, the detecting the target table in the script to be tested includes:

[0103] According to the preset target table detection rule, the script to be tested is matched using a regular expression to obtain a first target table;

[0104] Extracting a filled second target table from the configuration document;

[0105] Detecting whether the first target table matches the second target table;

[0106] When the first target table and the second target table completely match, determining that the detection result is that the target table in the script to be tested is normal; or

[0107] When the first target table does not completely match the second target table, it is determined that the detection result is that the target table in the script to be tested is abnormal.

[0108] In this embodiment, the first target table is a target table matched by regular expressions by parsing the script to be tested according to preset target table detection rules, and the second target table is a target table actually filled in during configuration.

[0109] In this embodiment, by matching the first target table with the second target table, it can be quickly determined whether the target table in the script to be tested is filled in correctly, thereby further ensuring the accuracy of the script to be tested.

[0110] In this embodiment, in order to further ensure the accuracy of the script to be tested, by detecting multiple preset script elements in the script to be tested, the detected abnormal results are sent to the client in a timely manner. The client maintains the script to be tested based on the detected abnormal results, thereby improving the maintenance efficiency of the script to be tested.

[0111] S14, parsing the script to be tested to obtain a target table name of a data table, wherein the data table includes a source table and a target table.

[0112] In an optional embodiment, parsing the script to be tested to obtain the target table name of the data table includes:

[0113] Preprocessing the script to be tested to obtain a preprocessed script to be tested;

[0114] Detecting the preset key fields in the preprocessed script to be tested, and extracting the table name of the data table according to the detected preset key fields;

[0115] The table name is detected, and the target table name of the data table is determined according to the detection result.

[0116] In this embodiment, the program code in the script to be tested is read to perform program parsing, and the table name of the data table is extracted according to preset keywords, wherein the preset key fields may be key fields such as from and join.

[0117] Exemplarily, if the data table name is an independent string, and there are spaces or line breaks before and after the independent string, and the table name is preceded by the from keyword, then the data table is a source table; if the data table name is an independent string, and there are spaces or line breaks before and after the independent string, and the table name is preceded by a non-from keyword, then the data table is a target table.

[0118] In an optional embodiment, the preprocessing of the script to be tested includes:

[0119] The script to be tested is processed by removing blanks and comments.

[0120] In this embodiment, by removing spaces and comments from the script to be tested, interference from space scripts and comment scripts is reduced, thereby improving the test efficiency and accuracy of subsequent scripts to be tested.

[0121] Furthermore, the detecting the table name and determining the target table name of the data table according to the detection result includes:

[0122] When it is detected that the table name is a variable name, a key value corresponding to the variable name is searched in a preset dictionary, and the searched key value is determined as a target table name of the data table; or

[0123] When it is detected that the length of the table name after the null removal process satisfies a preset table name determination condition, the table name is determined as the target table name of the data table.

[0124] In this embodiment, before determining the table name of the data table, all variables and the corresponding table names are stored in the form of key-value pairs to create a dictionary. When it is detected that the table name is a variable name, the table name corresponding to the variable name can be quickly detected in the created dictionary, thereby improving the efficiency and accuracy of table name confirmation.

[0125] Furthermore, the method further comprises:

[0126] When it is detected that the length of the table name after the null removal process does not meet the preset table name determination condition, the table name is abandoned.

[0127] In this embodiment, a table name determination condition may be preset, for example, the table name determination condition may be preset as a character length greater than or equal to 4 and containing a descender. When the length of the table name after the space removal process is less than 4, or does not contain a descender, it is determined that the table name may be in the next line, and the table name is discarded.

[0128] Furthermore, the method further comprises:

[0129] When it is detected that the table name contains brackets, the table name is not the target table name, the table name is determined to be a false table name, and the table name is abandoned.

[0130] In this embodiment, when extracting the table name of the data table, multiple aspects such as the keywords, table name length, and variable names in the script to be tested are taken into consideration to determine the target table name of the data table, thereby improving the accuracy of the target table name, facilitating the subsequent use of the correct target table name for testing the script to be tested, improving the detection accuracy of the script to be tested, and further improving the accuracy of subsequent script testing.

[0131] S15, mapping a corresponding processing task based on the target table name of the source table, and detecting the script to be tested according to the processing task to obtain a detection result.

[0132] In this embodiment, when detecting the script to be tested, a reverse search is performed on the task management platform according to the target table name of the source table to obtain the processing task corresponding to the target table name of the source table, and the script to be tested is detected according to the processing task.

[0133] In an optional embodiment, the step of testing the script to be tested according to the processing task to obtain a test result includes:

[0134] Obtaining the first document content corresponding to the processing task, and reading the script to be tested to obtain the corresponding second document content;

[0135] sequentially comparing the first sub-content in each column of the first document content with the second sub-content in the corresponding column of the second document content;

[0136] When the first sub-content in each column of the first document content is consistent with the second sub-content in the corresponding column of the second document content, determining that the detection result is that the script is normal; or

[0137] When the first sub-content in each column of the first document content is inconsistent with the second sub-content in the corresponding column of the second document content, it is determined that the detection result is a script anomaly.

[0138] In this embodiment, the first document content refers to the content expected to be filled in the configuration document when processing the task, the first sub-content refers to the content corresponding to each column in the first document content, and the second document content refers to the content actually filled in when deploying the configuration document of the script to be tested, and the second sub-content refers to the content corresponding to each column in the second document content, wherein there is a corresponding relationship between the first document content and each column in the second document content.

[0139] In this embodiment, the first sub-content in each column of the first document content is compared with the second sub-content in the corresponding column of the second document content in turn, and it is determined whether there is an abnormal script based on the comparison result. When an abnormal script exists, it is determined that errors such as wrong filling, missing filling, and over-filling may have occurred in the script to be tested.

[0140] In this embodiment, the corresponding processing task is retrieved on the task management platform according to the target table name of the source table. Since the first document content corresponding to the processing task is the expected content to be filled in, that is, the standard content, and the second document content is the content actually filled in by the developer when configuring the document in the early stage, the second content is detected based on the first content, thereby ensuring the accuracy of the detection result. At the same time, since there is a corresponding relationship between the first document content and each column in the second document content, by relying on the comparison of each column of the first document content and the second document content, it is quickly determined whether there is an abnormal script in the script to be tested according to the comparison result, thereby avoiding the problem of missed detection and improving the detection accuracy.

[0141] S16: Testing the script to be tested based on the detection result.

[0142] In this embodiment, in order to ensure the efficiency and accuracy of subsequent tests, after obtaining the test results, it is determined whether to test the script to be tested according to the test results.

[0143] In an optional embodiment, the testing the script to be tested based on the detection result includes:

[0144] When the detection result is that the script is normal, executing the test of the script to be tested; or

[0145] When the detection result is that the script is abnormal, the test of the script to be tested is rejected.

[0146] In this embodiment, when the detection result is a script exception, the script to be tested is determined to be an abnormal script. The script exception refers to the presence of abnormal data in the script to be tested, that is, there is erroneous data in the configuration document, and the configuration document needs to be re-maintained. The script to be tested is rejected and the abnormal script is sent to the client. The client corrects the configuration document according to the abnormal information in the abnormal script without reconfiguring the configuration document, which facilitates the subsequent use of the correct configuration document for script testing, thereby improving the efficiency and accuracy of script testing.

[0147] In this embodiment, the test is performed when the test result shows that the script is normal, which solves the problem of low accuracy of the test result due to errors in the configuration document and improves the test efficiency and accuracy.

[0148] In summary, the big data testing method based on artificial intelligence described in this embodiment, by parsing the received task to be tested, obtains the extraction path of the script to be tested and identifies it. When the extraction path of the script to be tested exists in the preset script association server, it is determined that the extraction path of the script to be tested is correct, and the corresponding script to be tested is extracted through the correct extraction path, thereby improving the accuracy of the extracted script to be tested. Parse the script to be tested extracted by the extraction path, obtain the target table name of the data table, map the corresponding processing task based on the target table name of the source table, detect the script to be tested according to the processing task, and find out the corresponding processing task on the task management platform according to the target table name of the source table. Since the first document content corresponding to the processing task is the expected content to be filled in, that is, the standard content, and the second document content is the content actually filled in when the developer configures the document in the early stage, the second content is detected based on the first content, thereby ensuring the accuracy of the detection result. Test the script to be tested based on the detection result, and test it on the premise that the test result is a normal script, thereby improving the test efficiency and accuracy.

[0149] Embodiment 2

[0150] Figure 2 It is a structural diagram of a big data testing device based on artificial intelligence provided in Example 2 of the present invention.

[0151] In some embodiments, the artificial intelligence-based big data testing device 20 may include a plurality of functional modules composed of program code segments. The program code of each program segment in the artificial intelligence-based big data testing device 20 may be stored in a memory of an electronic device and executed by the at least one processor to execute (see Figure 1 Description) Functions of big data testing based on artificial intelligence.

[0152] In this embodiment, the big data testing device 20 based on artificial intelligence can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a first parsing module 201, an identification module 202, an extraction module 203, a second parsing module 204, a first test module 205 and a second test module 206. The module referred to in the present invention refers to a series of computer-readable instruction segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0153] The first parsing module 201 is used to parse the received task to be tested and obtain an extraction path of the script to be tested.

[0154] In this embodiment, the task to be tested includes a configuration document, and the client uploads the configuration document of the task to be tested to the server, wherein the configuration document includes configuration resources such as log data, required data tables, and table names of data tables. Specifically, during the process of uploading the configuration document of the task to be tested, the client can upload it through the corresponding test interface of the server. By uploading the configuration document through the corresponding test interface, the upload speed and the security of the configuration document can be ensured.

[0155] In other optional embodiments, the client may upload the configuration document of the task to be tested through a web page. When uploading the configuration document through a web page.

[0156] In this embodiment, when the server receives the configuration document of the file to be tested and parses the configuration document, the extraction path of the script to be tested is obtained according to the parsing result.

[0157] In an optional embodiment, the first parsing module 201 parses the received task to be tested, and obtains the extraction path of the script to be tested, including:

[0158] Parse the configuration document in the task to be tested to obtain the path and splicing rules filled in the configuration document;

[0159] The filled paths are spliced ​​according to the splicing rules, and the spliced ​​paths are determined as the extraction paths of the script to be tested.

[0160] In this embodiment, when confirming the extraction path of the script to be tested, a path extraction rule may be preset, and the filled path may be extracted from the parsed configuration document according to the preset path extraction rule, wherein the filled path may be one or more.

[0161] The identification module 202 is used to identify whether there is an extraction path of the script to be tested in a preset script association server.

[0162] In this embodiment, a script-associated server may be predetermined, wherein the script-associated server stores an extraction path of the script to be tested.

[0163] In an optional embodiment, the identification module 202 identifies whether there is an extraction path of the script to be tested in a preset script association server, including:

[0164] Matching the extraction path of the script to be tested with the extraction path in the preset script association server;

[0165] When the extraction path of the script to be tested completely matches any extraction path in the preset script-associated server, determining that the extraction path of the script to be tested exists in the preset script-associated server; or

[0166] When the extraction path of the script to be tested does not completely match each extraction path in the preset script-associated server, it is determined that the extraction path of the script to be tested does not exist in the preset script-associated server.

[0167] Furthermore, when the extraction path of the script to be tested does not exist in the preset script association server, an error result of the extraction path of the script to be tested is sent to the client.

[0168] In this embodiment, by identifying whether the extraction path of the script to be tested exists in the preset script association server, when the extraction path of the script to be tested exists in the preset script association server, it is determined that the extraction path of the script to be tested is correct, and the corresponding script to be tested is extracted through the correct extraction path, thereby improving the accuracy of the extracted script to be tested.

[0169] The extraction module 203 is configured to extract the script to be tested based on the extraction path of the script to be tested when the extraction path of the script to be tested exists in the preset script association server.

[0170] In this embodiment, the script to be tested refers to a script to be detected as an abnormal script, wherein the script refers to an executable file written in a specific descriptive language according to a certain format.

[0171] In this embodiment, in terms of automated testing, each time a large number of big data programs are launched, data testing alone cannot discover all problems. For example, the configuration documents filled out by developers in the early stage of deployment often contain low-level errors, and deployment problems will occur when the filled-in configuration documents are subsequently used for task processing testing. When deployment problems occur, the test is stopped and the document needs to be reconfigured for secondary testing, resulting in low efficiency of script testing.

[0172] In this embodiment, before executing the test task, the accuracy of the script to be tested is ensured by detecting the script to be tested, avoiding the problem of slow script testing efficiency due to the need to redeploy configuration due to incorrect configuration documents, and improving script testing efficiency.

[0173] In other optional embodiments, after the extraction module 203 extracts the script to be tested based on the extraction path of the script to be tested, a plurality of preset script elements in the script to be tested are detected.

[0174] Specifically, the detecting of the plurality of preset script elements in the script to be tested includes:

[0175] Detecting the scheduling time in the script to be tested; or

[0176] Detecting the task type in the script to be tested; or

[0177] Detect the target table in the script to be tested.

[0178] In this embodiment, the multiple script elements may include other script elements that need to be detected, such as scheduling time, task type, and target table.

[0179] Further, the detecting the scheduling time in the script to be tested includes:

[0180] Detect the lengths of multiple first tasks in the scheduled time, obtain a first detection result, and send the first detection result to the client, wherein the first task includes a daily task, a monthly task, a weekly task, and a yearly task.

[0181] Specifically, detecting the lengths of the plurality of first tasks in the scheduling time to obtain a first detection result includes:

[0182] Determining whether the length of each of the plurality of first tasks meets the length requirement of the corresponding task;

[0183] When the length of each of the plurality of first tasks meets the length requirement of the corresponding task, detecting whether the value of each of the plurality of first tasks meets the value requirement of the corresponding task;

[0184] When the value of each of the plurality of first tasks meets the value requirement of the corresponding task, determining that the first detection result is that the scheduling time is correct; or

[0185] When the value of any one of the plurality of first tasks does not meet the value requirement of the corresponding task, it is determined that the first detection result is that the scheduling time is abnormal.

[0186] Further, when the length of any one of the multiple first tasks does not meet the length requirement of the corresponding task, it is determined that the first detection result is that the scheduling time is abnormal.

[0187] For example, the length requirement of the daily task can be set to 4 digits; the length requirement of the monthly task can be set to 6 digits, and the length of the weekly task can be set to 4 digits; the length of the annual task can be set to 8 digits; the numerical requirement of the daily task can be set to include hours and minutes, and the first two digits must satisfy the numerical range of 0-24, and the last two digits must satisfy the numerical range of 0-59; the data requirement of the monthly task can be set to the first two digits must satisfy the numerical range of 1-28.

[0188] Further, the detecting the task type in the script to be tested includes:

[0189] It is detected whether the scheduling time corresponding to the task type in the script to be tested is legal, and a second detection result is obtained.

[0190] Further, the detecting whether the scheduling time corresponding to the task type in the script to be tested is legal, and obtaining the second detection result includes:

[0191] Initialize the scheduling time corresponding to the task type in the script to be tested, and obtain the target scheduling time corresponding to the task type;

[0192] Detecting whether the target scheduling time corresponding to the task type meets the preset format requirements;

[0193] When the target scheduling time corresponding to the task type meets the preset format requirement, the scheduling time corresponding to the task type in the script to be tested is legal, and it is determined that the second detection result is that the task type in the script to be tested is normal; or

[0194] When the target scheduling time corresponding to the task type does not meet the preset format requirement, the scheduling time corresponding to the task type in the script to be tested is illegal, and the second detection result is determined to be that the task type in the script to be tested is abnormal.

[0195] Exemplarily, by initializing the day, month, week, and year in the scheduling time corresponding to the task type in the script to be tested, corresponding to D, M, W1-W7, Y, and 0 respectively, the preset format requirement is: YYYYMMDD. If the initialized target scheduling time satisfies YYYYMMDD, it is determined that the task type in the script to be tested is normal.

[0196] Further, the detecting the target table in the script to be tested includes:

[0197] According to the preset target table detection rule, the script to be tested is matched using a regular expression to obtain a first target table;

[0198] Extracting a filled second target table from the configuration document;

[0199] Detecting whether the first target table matches the second target table;

[0200] When the first target table and the second target table completely match, determining that the detection result is that the target table in the script to be tested is normal; or

[0201] When the first target table does not completely match the second target table, it is determined that the detection result is that the target table in the script to be tested is abnormal.

[0202] In this embodiment, the first target table is a target table matched by regular expressions by parsing the script to be tested according to preset target table detection rules, and the second target table is a target table actually filled in during configuration.

[0203] In this embodiment, by matching the first target table with the second target table, it can be quickly determined whether the target table in the script to be tested is filled in correctly, thereby further ensuring the accuracy of the script to be tested.

[0204] In this embodiment, in order to further ensure the accuracy of the script to be tested, by detecting multiple preset script elements in the script to be tested, the detected abnormal results are sent to the client in a timely manner. The client maintains the script to be tested based on the detected abnormal results, thereby improving the maintenance efficiency of the script to be tested.

[0205] The second parsing module 204 is used to parse the script to be tested to obtain a target table name of a data table, wherein the data table includes a source table and a target table.

[0206] In an optional embodiment, the second parsing module 204 parses the script to be tested to obtain the target table name of the data table, including:

[0207] Preprocessing the script to be tested to obtain a preprocessed script to be tested;

[0208] Detecting the preset key fields in the preprocessed script to be tested, and extracting the table name of the data table according to the detected preset key fields;

[0209] The table name is detected, and the target table name of the data table is determined according to the detection result.

[0210] In this embodiment, the program code in the script to be tested is read to perform program parsing, and the table name of the data table is extracted according to preset keywords, wherein the preset key fields may be key fields such as from and join.

[0211] Exemplarily, if the data table name is an independent string, and there are spaces or line breaks before and after the independent string, and the table name is preceded by the from keyword, then the data table is a source table; if the data table name is an independent string, and there are spaces or line breaks before and after the independent string, and the table name is preceded by a non-from keyword, then the data table is a target table.

[0212] In an optional embodiment, the preprocessing of the script to be tested includes:

[0213] The script to be tested is processed by removing blanks and comments.

[0214] In this embodiment, by removing spaces and comments from the script to be tested, interference from space scripts and comment scripts is reduced, thereby improving the test efficiency and accuracy of subsequent scripts to be tested.

[0215] Furthermore, the detecting the table name and determining the target table name of the data table according to the detection result includes:

[0216] When it is detected that the table name is a variable name, a key value corresponding to the variable name is searched in a preset dictionary, and the searched key value is determined as a target table name of the data table; or

[0217] When it is detected that the length of the table name after the null removal process satisfies a preset table name determination condition, the table name is determined as the target table name of the data table.

[0218] In this embodiment, before determining the table name of the data table, all variables and the corresponding table names are stored in the form of key-value pairs to create a dictionary. When it is detected that the table name is a variable name, the table name corresponding to the variable name can be quickly detected in the created dictionary, thereby improving the efficiency and accuracy of table name confirmation.

[0219] Further, when it is detected that the length of the table name after the null removal process does not meet the preset table name determination condition, the table name is abandoned.

[0220] In this embodiment, a table name determination condition may be preset, for example, the table name determination condition may be preset as a character length greater than or equal to 4 and containing a descender. When the length of the table name after the space removal process is less than 4, or does not contain a descender, it is determined that the table name may be in the next line, and the table name is discarded.

[0221] Further, when it is detected that the table name contains brackets, the table name is not the target table name, the table name is determined to be a false table name, and the table name is abandoned.

[0222] In this embodiment, when extracting the table name of the data table, multiple aspects such as the keywords, table name length, and variable names in the script to be tested are taken into consideration to determine the target table name of the data table, thereby improving the accuracy of the target table name, facilitating the subsequent use of the correct target table name for testing the script to be tested, improving the detection accuracy of the script to be tested, and further improving the accuracy of subsequent script testing.

[0223] The first testing module 205 is used to map a corresponding processing task based on the target table name of the source table, and detect the script to be tested according to the processing task to obtain a detection result.

[0224] In this embodiment, when detecting the script to be tested, a reverse search is performed on the task management platform according to the target table name of the source table to obtain the processing task corresponding to the target table name of the source table, and the script to be tested is detected according to the processing task.

[0225] In an optional embodiment, the first testing module 205 detects the script to be tested according to the processing task, and the detection result obtained includes:

[0226] Obtaining the first document content corresponding to the processing task, and reading the script to be tested to obtain the corresponding second document content;

[0227] sequentially comparing the first sub-content in each column of the first document content with the second sub-content in the corresponding column of the second document content;

[0228] When the first sub-content in each column of the first document content is consistent with the second sub-content in the corresponding column of the second document content, determining that the detection result is that the script is normal; or

[0229] When the first sub-content in each column of the first document content is inconsistent with the second sub-content in the corresponding column of the second document content, it is determined that the detection result is a script anomaly.

[0230] In this embodiment, the first document content refers to the content expected to be filled in the configuration document when processing the task, the first sub-content refers to the content corresponding to each column in the first document content, and the second document content refers to the content actually filled in when deploying the configuration document of the script to be tested, and the second sub-content refers to the content corresponding to each column in the second document content, wherein there is a corresponding relationship between the first document content and each column in the second document content.

[0231] In this embodiment, the first sub-content in each column of the first document content is compared with the second sub-content in the corresponding column of the second document content in turn, and it is determined whether there is an abnormal script based on the comparison result. When an abnormal script exists, it is determined that errors such as wrong filling, missing filling, and over-filling may have occurred in the script to be tested.

[0232] In this embodiment, the corresponding processing task is retrieved on the task management platform according to the target table name of the source table. Since the first document content corresponding to the processing task is the expected content to be filled in, that is, the standard content, and the second document content is the content actually filled in by the developer when configuring the document in the early stage, the second content is detected based on the first content, thereby ensuring the accuracy of the detection result. At the same time, since there is a corresponding relationship between the first document content and each column in the second document content, by relying on the comparison of each column of the first document content and the second document content, it is quickly determined whether there is an abnormal script in the script to be tested according to the comparison result, thereby avoiding the problem of missed detection and improving the detection accuracy.

[0233] The second testing module 206 is used to test the script to be tested based on the detection result.

[0234] In this embodiment, in order to ensure the efficiency and accuracy of subsequent tests, after obtaining the test results, it is determined whether to test the script to be tested according to the test results.

[0235] In an optional embodiment, the second testing module 206 tests the script to be tested based on the detection result, including:

[0236] When the detection result is that the script is normal, executing the test of the script to be tested; or

[0237] When the detection result is that the script is abnormal, the test of the script to be tested is rejected.

[0238] In this embodiment, when the detection result is a script exception, the script to be tested is determined to be an abnormal script. The script exception refers to the presence of abnormal data in the script to be tested, that is, there is erroneous data in the configuration document, and the configuration document needs to be re-maintained. The script to be tested is rejected and the abnormal script is sent to the client. The client corrects the configuration document according to the abnormal information in the abnormal script without reconfiguring the configuration document, which facilitates the subsequent use of the correct configuration document for script testing, thereby improving the efficiency and accuracy of script testing.

[0239] In this embodiment, the test is performed when the test result shows that the script is normal, which solves the problem of low accuracy of the test result due to errors in the configuration document and improves the test efficiency and accuracy.

[0240] In summary, the big data testing device based on artificial intelligence described in this embodiment obtains the extraction path of the script to be tested and identifies it by parsing the received task to be tested. When the extraction path of the script to be tested exists in the preset script association server, it is determined that the extraction path of the script to be tested is correct, and the corresponding script to be tested is extracted through the correct extraction path, thereby improving the accuracy of the extracted script to be tested. The script to be tested extracted through the extraction path is parsed to obtain the target table name of the data table, and the corresponding processing task is mapped based on the target table name of the source table. The script to be tested is detected according to the processing task, and the corresponding processing task is reversely checked on the task management platform according to the target table name of the source table. Since the first document content corresponding to the processing task is the expected content to be filled in, that is, the standard content, and the second document content is the content actually filled in when the developer configures the document in the early stage, the second content is detected based on the first content, thereby ensuring the accuracy of the detection result. The script to be tested is tested based on the detection result, and the test is performed on the premise that the test result is a normal script, thereby improving the test efficiency and accuracy.

[0241] Embodiment 3

[0242] See also Figure 3 FIG. 2 is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. In a preferred embodiment of the present invention, the electronic device 3 includes a memory 31 , at least one processor 32 , at least one communication bus 33 and a transceiver 34 .

[0243] Those skilled in the art should understand that Figure 3 The structure of the electronic device shown does not constitute a limitation of the embodiments of the present invention, and may be a bus structure or a star structure. The electronic device 3 may also include more or less other hardware or software than shown in the figure, or a different component arrangement.

[0244] In some embodiments, the electronic device 3 is an electronic device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The electronic device 3 may also include client devices, which include but are not limited to any electronic product that can interact with a client through a keyboard, mouse, remote control, touchpad, or voice-controlled device, such as a personal computer, tablet computer, smart phone, digital camera, etc.

[0245] It should be noted that the electronic device 3 is only an example, and other existing or future electronic products that are suitable for the present invention should also be included in the protection scope of the present invention and included here by reference.

[0246] In some embodiments, the memory 31 is used to store program codes and various data, such as the artificial intelligence-based big data testing device 20 installed in the electronic device 3, and to achieve high-speed and automatic access to programs or data during the operation of the electronic device 3. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0247] In some embodiments, the at least one processor 32 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The at least one processor 32 is the control core (Control Unit) of the electronic device 3, and uses various interfaces and lines to connect various components of the entire electronic device 3, and executes various functions and processes data of the electronic device 3 by running or executing programs or modules stored in the memory 31, and calling data stored in the memory 31.

[0248] In some embodiments, the at least one communication bus 33 is configured to implement connection and communication between the memory 31 and the at least one processor 32, etc.

[0249] Although not shown, the electronic device 3 may also include a power source (such as a battery) for supplying power to each component. Optionally, the power source may be logically connected to the at least one processor 32 through a power management device, so that the power management device can manage charging, discharging, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 3 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0250] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0251] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, electronic device, or network device, etc.) or a processor to execute a part of the method described in each embodiment of the present invention.

[0252] In a further embodiment, in combination Figure 2 The at least one processor 32 can execute the operating device of the electronic device 3 and various installed application programs (such as the artificial intelligence-based big data testing device 20), program codes, etc., for example, the above-mentioned modules.

[0253] The memory 31 stores program codes, and the at least one processor 32 can call the program codes stored in the memory 31 to execute related functions. For example, Figure 2 The various modules described are program codes stored in the memory 31 and are executed by the at least one processor 32, thereby realizing the functions of the various modules to achieve the purpose of big data testing based on artificial intelligence.

[0254] Exemplarily, the program code may be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 32 to complete the present application. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the program code in the electronic device 3. For example, the program code may be divided into a first parsing module 201, an identification module 202, an extraction module 203, a second parsing module 204, a first test module 205, and a second test module 206.

[0255] In one embodiment of the present invention, the memory 31 stores a plurality of computer-readable instructions, and the plurality of computer-readable instructions are executed by the at least one processor 32 to implement the function of big data testing based on artificial intelligence.

[0256] Specifically, the specific implementation method of the at least one processor 32 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0257] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0258] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0259] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0260] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "including" does not exclude other units or, and the singular does not exclude the plural. The multiple units or devices stated in the present invention can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0261] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A big data testing method based on artificial intelligence, characterized in that: The method comprises: Parsing the received task to be tested to obtain the extraction path of the script to be tested, including: parsing the configuration document in the task to be tested to obtain the path and splicing rules filled in the configuration document; splicing the filled path according to the splicing rule, and determining the spliced ​​path as the extraction path of the script to be tested; Identifying whether an extraction path of the script to be tested exists in a preset script-associated server, comprising: matching the extraction path of the script to be tested with an extraction path in the preset script-associated server; when the extraction path of the script to be tested completely matches any one of the extraction paths in the preset script-associated server, determining that the extraction path of the script to be tested exists in the preset script-associated server; or, when the extraction path of the script to be tested does not completely match each extraction path in the preset script-associated server, determining that the extraction path of the script to be tested does not exist in the preset script-associated server; When the preset script association server has an extraction path for the script to be tested, extracting the script to be tested based on the extraction path for the script to be tested; Parsing the script to be tested to obtain a target table name of a data table, wherein the data table includes a source table and a target table; Mapping a corresponding processing task based on the target table name of the source table, and detecting the script to be tested according to the processing task to obtain a detection result; The script to be tested is tested based on the detection result.

2. The big data testing method based on artificial intelligence as claimed in claim 1, characterized in that: The step of parsing the script to be tested and obtaining the target table name of the data table includes: Preprocessing the script to be tested to obtain a preprocessed script to be tested; Detecting the preset key fields in the preprocessed script to be tested, and extracting the table name of the data table according to the detected preset key fields; The table name is detected, and the target table name of the data table is determined according to the detection result.

3. The big data testing method based on artificial intelligence as claimed in claim 2, characterized in that: The detecting the table name and determining the target table name of the data table according to the detection result comprises: When it is detected that the table name is a variable name, a key value corresponding to the variable name is searched in a preset dictionary, and the searched key value is determined as a target table name of the data table; or When it is detected that the length of the table name after the null removal process satisfies a preset table name determination condition, the table name is determined as the target table name of the data table; or When it is detected that the table name contains brackets, it is determined that the table name is not a target table name.

4. The big data testing method based on artificial intelligence as claimed in claim 1, characterized in that: After extracting the script to be tested based on the extraction path of the script to be tested, the method further includes: Detecting a plurality of preset script elements in the script to be tested.

5. The big data testing method based on artificial intelligence as claimed in claim 4, characterized in that: The detecting of the plurality of preset script elements in the script to be tested comprises: Detecting the scheduling time in the script to be tested; or Detecting the task type in the script to be tested; or Detect the target table in the script to be tested.

6. The big data testing method based on artificial intelligence as claimed in claim 5, characterized in that: The detecting of the scheduling time in the script to be tested comprises: Detecting the lengths of multiple first tasks in the scheduled time to obtain a first detection result, and sending the first detection result to the client, wherein the first task includes a daily task, a monthly task, a weekly task, and a yearly task, wherein the detecting the lengths of multiple first tasks in the scheduled time to obtain the first detection result includes: Determining whether the length of each of the plurality of first tasks meets the length requirement of the corresponding task; When the length of each of the plurality of first tasks meets the length requirement of the corresponding task, detecting whether the value of each of the plurality of first tasks meets the value requirement of the corresponding task; When the value of each of the plurality of first tasks meets the value requirement of the corresponding task, determining that the first detection result is that the scheduling time is correct; or When the value of any one of the plurality of first tasks does not meet the value requirement of the corresponding task, it is determined that the first detection result is that the scheduling time is abnormal.

7. The big data testing method based on artificial intelligence as claimed in claim 1, characterized in that: The testing of the script to be tested according to the processing task to obtain the testing result includes: Obtaining the first document content corresponding to the processing task, and reading the script to be tested to obtain the corresponding second document content; sequentially comparing the first sub-content in each column of the first document content with the second sub-content in the corresponding column of the second document content; When the first sub-content in each column of the first document content is consistent with the second sub-content in the corresponding column of the second document content, determining that the detection result is that the script is normal; or When the first sub-content in each column of the first document content is inconsistent with the second sub-content in the corresponding column of the second document content, it is determined that the detection result is a script anomaly.

8. A big data testing device based on artificial intelligence, characterized in that: The device is used to implement the big data testing method based on artificial intelligence as described in any one of claims 1 to 7, and the device includes: A first parsing module is used to parse the received task to be tested to obtain an extraction path of the script to be tested, wherein the task to be tested includes a configuration file; An identification module, used to identify whether there is an extraction path of the script to be tested in a preset script association server; An extraction module, configured to extract the script to be tested based on the extraction path of the script to be tested when the extraction path of the script to be tested exists in the preset script association server; A second parsing module is used to parse the script to be tested to obtain a target table name of a data table, wherein the data table includes a source table and a target table; A first testing module is used to map a corresponding processing task based on the target table name of the source table, and detect the script to be tested according to the processing task to obtain a detection result; The second testing module is used to test the script to be tested based on the detection result.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory, and the processor is used to implement the artificial intelligence-based big data testing method as described in any one of claims 1 to 7 when executing the computer program stored in the memory.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the artificial intelligence-based big data testing method as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Cloud network vulnerability discovery method, apparatus, electronic device, and medium

    WO2021135532A1

  • Testing method, device, terminal apparatus, and storage medium

    WO2021135809A1