Artificial intelligence-based automated testing method, apparatus, device, and storage medium

By using AI-based automated testing methods, the structure and procedural standardization of data systems are automatically evaluated, solving the problem of low efficiency caused by reliance on manual testing in existing methods and achieving efficient and accurate test results.

CN114756472BActive Publication Date: 2026-02-24CHINA PING AN LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210447294.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-26
Publication Date
2026-02-24
Estimated Expiration
2042-04-26

AI Technical Summary

Technical Problem

Existing data system testing methods rely on the technical skills of testers, resulting in low testing efficiency.

Method used

An AI-based automated testing method is adopted. By constructing the directory structure and program standardization indicators of the data system under test, the standardization of the data system is automatically evaluated using scheduling documents and deployment documents, and quantitative system standardization indicators are obtained to evaluate the test results.

Benefits of technology

It enables all testing tasks to be completed automatically without the need for developers to conduct manual testing, thereby improving testing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114756472B_ABST
    Figure CN114756472B_ABST
Patent Text Reader

Abstract

The application provides an artificial intelligence-based automatic testing method and device, electronic equipment and storage medium. The artificial intelligence-based automatic testing method comprises the following steps: constructing a data system to be tested on a test platform according to a preset document, wherein the preset document comprises a scheduling document and a deployment document; obtaining a structure specification index by comparing the deployment document and the directory structure of the data system to be tested; constructing a program specification index based on the scheduling document and the data system; calculating the confidence of the structure specification index and the program specification index to obtain the data system specification index; and evaluating the data system to be tested based on the data system specification index to obtain a test result. The method can calculate the structure specification and the program specification of the data system respectively, and calculate the specification index of the data system according to the confidence of the structure specification and the program specification, thereby improving the accuracy of the data system test result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to an automated testing method, apparatus, electronic device and storage medium based on artificial intelligence. Background Technology

[0002] As digitalization progresses, data systems are becoming increasingly important in enterprise operations. Before a data system goes live, it needs to be tested, which is crucial for assessing its stability.

[0003] Existing testing methods typically involve testers manually testing a data system built on a physical computer, and the test results depend on the testers' technical skills, resulting in low testing efficiency. Summary of the Invention

[0004] In view of the above, it is necessary to provide an automated testing method, apparatus, equipment and storage medium based on artificial intelligence to solve the technical problem of how to improve the testing efficiency of data systems.

[0005] This application provides an automated testing method based on artificial intelligence, the method comprising:

[0006] The data system to be tested is built on the test platform according to the preset documents. The preset documents include a scheduling document and a deployment document. The scheduling document is used to store the names of the scheduling tasks in the data system and the script code corresponding to each scheduling task. The deployment document is used to store the code instructions corresponding to each step in the data system building process.

[0007] The structural standardization index is obtained by comparing the directory structure of the deployment document and the data system to be tested.

[0008] Based on the scheduling document and the data system, construct program standardization indicators;

[0009] Calculate the confidence levels of the structural standardization index and the procedural standardization index to obtain the system standardization index;

[0010] The data system under test is evaluated based on the data system standardization index to obtain test results.

[0011] The aforementioned AI-based automated testing method obtains quantified system standardization indicators by conducting targeted tests on the structure and internal programs of the data system under test. The data system is then evaluated based on these quantified system standardization indicators to obtain test results. According to this method, developers do not need to manually test the data system; all testing tasks can be completed automatically, reducing testing time and improving testing efficiency.

[0012] In some embodiments, the construction of the data system to be tested on the test platform according to a preset document, wherein the preset document includes a scheduling document and a deployment document, includes:

[0013] A test platform is constructed based on preset components to serve as the carrier of the data system; the components include various data processing programs.

[0014] The code in the preset document is sequentially input into the carrier to build the data system to be tested.

[0015] Thus, a test platform for the data system under test is built based on the aforementioned components, allowing developers to customize the structure and functions of the data system under test, which is more flexible than the traditional method of building a data system under test based on a physical computer.

[0016] In some embodiments, obtaining the structural standardization index by comparing the directory structure of the deployment document and the data system under test includes:

[0017] The deployment document is traversed to obtain the directory structure of the data system designed according to the deployment document, and a first structure is constructed based on the directory structure;

[0018] Test the data system under test to obtain the second structure;

[0019] The structural normalization index is obtained by comparing the first structure and the second structure. The structural normalization index is used to represent the degree of normalization of the structure in the data system.

[0020] In this way, by comparing the directory structure in the deployment document with the directory structure in the data system, the structure standardization index is obtained. This quantitative data characterizes the standardization of the data system's directory structure, which can improve the accuracy of subsequent test results.

[0021] In some embodiments, the standardization metrics for constructing programs based on the scheduling document and the data system include:

[0022] The encoding standardization degree is obtained by querying the program encoding format in the data system, and the encoding standardization degree is used to represent the degree of standardization of the program encoding format in the data system;

[0023] The program names in the data system are compared with the task names in the scheduling document to obtain the functional matching degree, which is used to indicate the standardization of the program names in the data system.

[0024] The degree of difference of the programs in the data system is calculated to obtain the merge complexity, which is used to represent the complexity of the programs in the data system;

[0025] The program standardization index is obtained by integrating the coding standardization, functional matching degree, and merging complexity based on the custom segmentation model.

[0026] In this way, by testing each program in the data system, the coding standardization, functional matching degree, and merging complexity of each program are obtained. Based on the custom segmentation model, the coding standardization, functional matching degree, and merging complexity are integrated to obtain the program standardization index. This allows for the evaluation of programs in the data system from multiple perspectives, improving the accuracy of subsequent test results.

[0027] In some embodiments, the custom segmentation model conforms to the following relationship:

[0028]

[0029] Wherein, T represents the program standardization index, and the value range of T is [-1, 1]; A represents the coding standardization; B represents the functional matching degree, and the value range of B is [0, 1]; C represents the merge complexity, and the value range of C is [0, 1]; α1 and α2 represent user-defined harmonic constants; β1 and β2 represent preset target values.

[0030] Thus, by using the value of the coding standardization degree as a segmentation condition and defining the value of the harmonic constant in the model, and further integrating the functional matching degree and the merging complexity based on the harmonic constant, and using a unified index to characterize the standardization degree of the program in the data system, the calculation can be simplified, thereby improving the testing efficiency.

[0031] In some embodiments, calculating the confidence levels of the structural standardization index and the procedural standardization index to obtain the system standardization index includes:

[0032] Calculate the information entropy of the structural standardization index and the program standardization index;

[0033] The information entropy is calculated according to a preset standardization algorithm to obtain normalized weights;

[0034] The structural standardization index and the program standardization index are updated according to the normalized weights to obtain the system standardization index.

[0035] Thus, by analyzing the influencing factors of the structural standardization index and the procedural standardization index, the confidence level calculation method was formulated, and the confidence levels of the structural standardization index and the procedural standardization index were obtained according to the confidence level calculation method. Furthermore, the standardization method was used to reduce the influence of the dimensions on the confidence level, thereby improving the accuracy of the system indicators.

[0036] In some embodiments, evaluating the data system under test based on the data system standardization index to obtain test results includes:

[0037] A grade sequence is constructed based on a preset first threshold;

[0038] Match the grade sequence with the system standardization index to obtain the test grade of the data system;

[0039] The test results are obtained by comparing the test level with the preset second threshold.

[0040] In this way, the system standardization index of the system under test is evaluated based on the custom threshold, and the system level and test results are obtained. This method is more accurate and efficient than the traditional manual testing method by developers.

[0041] This application also provides an automated testing device based on artificial intelligence, the device comprising:

[0042] The setup unit is used to build a data system based on a preset document, which includes a scheduling document and a deployment document. The scheduling document is used to store the names of the scheduling tasks in the data system and the script code corresponding to each scheduling task. The deployment document is used to store the code instructions corresponding to each step in the setup process of the data system.

[0043] A design unit is used to compare the directory structure of the deployment document and the data system under test to obtain a structural standardization index.

[0044] The construction unit is used to construct program standardization indicators based on the scheduling document and the data system;

[0045] A calculation unit is used to calculate the confidence levels of the structural standardization index and the program standardization index to obtain the system standardization index;

[0046] An evaluation unit is used to evaluate the data system under test based on the data system standardization index to obtain test results.

[0047] This application embodiment also provides an electronic device, the electronic device comprising:

[0048] Memory, which stores computer-readable instructions; and

[0049] The processor executes computer-readable instructions stored in the memory to implement the AI-based automated testing method.

[0050] This application also provides a computer-readable storage medium storing computer-readable instructions, which are executed by a processor in an electronic device to implement the AI-based automated testing method. Attached Figure Description

[0051] Figure 1 This is a flowchart of a preferred embodiment of the AI-based automated testing method involved in this application.

[0052] Figure 2 This is a flowchart of a preferred embodiment of obtaining a structural standardization index by comparing the directory structure of the deployment document and the data system under test, as involved in this application.

[0053] Figure 3 This is a flowchart of a preferred embodiment of the standardization index of the data system construction procedure involved in this application.

[0054] Figure 4 This is a flowchart of a preferred embodiment of calculating the confidence levels of the structural standardization index and the procedural standardization index to obtain the system standardization index, as involved in this application.

[0055] Figure 5 This is a flowchart of a preferred embodiment of the method for evaluating the data system under test based on the data system standardization index to obtain test results, as described in this application.

[0056] Figure 6 This is a functional component diagram of a preferred embodiment of the AI-based automated testing device involved in this application.

[0057] Figure 7 This is a schematic diagram of the structure of an electronic device that is a preferred embodiment of the AI-based automated testing method involved in this application. Detailed Implementation

[0058] To better understand the purpose, features, and advantages of this application, a detailed description of the application is provided below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of this application can be combined with each other. Numerous specific details are set forth in the following description to provide a thorough understanding of this application; the described embodiments are only a part of the embodiments of this application, and not all of them.

[0059] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.

[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0061] This application provides an automated testing method based on artificial intelligence, which can be applied to one or more electronic devices. The electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0062] The electronic device can be any electronic product that can interact with the user, such as a personal computer, tablet computer, smartphone, personal digital assistant (PDA), game console, interactive network television (IPTV), smart wearable device, etc.

[0063] The electronic device may also include network devices and / or user devices. The network devices include, but are not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers.

[0064] The networks in which the electronic devices are located include, but are not limited to, the Internet, wide area networks, metropolitan area networks, local area networks, and virtual private networks (VPNs).

[0065] like Figure 1The diagram shown is a flowchart of a preferred embodiment of the AI-based automated testing method of this application. The order of the steps in this flowchart can be changed, and some steps can be omitted, depending on different requirements.

[0066] S10, construct the data system to be tested on the test platform according to the preset document. The preset document includes a scheduling document and a deployment document. The scheduling document is used to store the names of the scheduling tasks in the data system and the script code corresponding to each scheduling task. The deployment document is used to store the code instructions corresponding to each step in the construction process of the data system.

[0067] In an optional embodiment, the data system to be tested is built on a test platform according to a preset document, which includes a scheduling document and a deployment document. The scheduling document stores the names of the scheduled tasks in the data system and the script code corresponding to each scheduled task. The deployment document stores the code instructions corresponding to each step in the data system building process, including:

[0068] S101, a test platform is constructed based on preset components as the carrier of the data system, and the components include a variety of data processing programs.

[0069] In this optional embodiment, the preset components include a data I / O component, a data transmission component, a data storage component, and a data analysis component. The relationship between the components in the test platform is as follows: the user inputs the user's requirement information into the data I / O component; the data I / O component transmits the user's requirement information to the data transmission component; the data transmission component transmits the user's requirement information to the data storage component; the required data is obtained from the data storage component based on the user's requirement information; the data transmission component transmits the required data to the data analysis component to obtain the data analysis results; and the data transmission component transmits the data analysis results to the information I / O component to display the data analysis results to the user.

[0070] In this optional embodiment, the data I / O component includes VUE and element. VUE is a web-based application framework for building user interfaces. Its main function is to provide users with a complete solution for building web pages based on user needs. Element is a set of user page components implemented based on VUE that do not depend on business logic.

[0071] In this optional embodiment, the data transmission component includes a web server and a web gateway interface. For example, the web server can be built based on Nginx, which is a lightweight web server / reverse proxy server and email proxy server. The web gateway interface can be UWSGI, which stands for WebServerGatewayInterface. Its main function is to transmit data between the web server and the web application or framework.

[0072] In this optional embodiment, the data storage component may be the Ping An Padis cloud container platform. The full name of Padis is PingAnDistribution, which means Ping An Distributed Platform. Its main functions include adding, deleting, modifying, and querying data.

[0073] In this optional embodiment, the data analysis component includes a web application framework, a message queue middleware, and a task distribution component. The web application framework can be Django, an open-source web application framework written in Python, whose main function is to create dynamic web applications. The message queue middleware can be the RabbitMQ framework, an open-source message broker software that implements the Advanced Message Queuing Protocol, whose main functions include data distribution, peak flow control, and log collection. The task distribution component can be Celery, a distributed asynchronous message task queue developed based on Python, whose main function is to implement asynchronous task processing.

[0074] In this optional embodiment, the data I / O component, data transmission component, data storage component, and data analysis component can be combined according to the relationship between each component to serve as the test platform for the data system.

[0075] S102, the code in the preset document is sequentially input into the carrier to build the data system to be tested.

[0076] In this optional embodiment, the data system setup process and the code instructions corresponding to each step in the process are stored in the deployment document. The deployment document can be in TXT format, which is a common file format that Microsoft provides on operating systems. Developers can input scripts from the deployment document into the user-side website page to deploy the database and directory structure in the data system. Developers can also input scripts from the scheduling document into the user-side page to build and name task modules in the data system. The scheduling document includes the names of the scheduled tasks in the data system and the script code corresponding to each scheduled task.

[0077] In this optional embodiment, the collection of the database, directory structure, and task modules can be used as the data system.

[0078] Thus, a test platform for the data system under test is built based on the aforementioned components. Testers can deploy the system under test, enter requirement information, and obtain data analysis results through the web page in the data I / O component, which can improve the testing efficiency of the data system and allow developers to customize the structure and function of the data system under test. Compared with the traditional method of building the data system under test based on a physical computer, this method is more flexible.

[0079] S11. Compare the directory structure of the deployment document and the data system to be tested to obtain the structural standardization index.

[0080] Please see Figure 2 In an optional embodiment, obtaining the structural standardization index by comparing the directory structure of the deployment document and the data system under test includes:

[0081] S111, traverse the deployment document to obtain the directory structure of the data system designed according to the deployment document, and construct the first structure according to the directory structure.

[0082] In this optional embodiment, the deployment document can be traversed according to a preset program to obtain the directory structure of the data system designed according to the deployment document, and a first structure can be constructed according to the directory structure. For example, the preset program can be a script written in Python. The deployment document can be input into the preset program to obtain the return value of the preset program, and the return value can be used as the directory structure of the data system designed according to the deployment document.

[0083] In this optional embodiment, a tree data structure can be used to store the directory structure. The tree data structure is a commonly used traversable data structure whose function is to store data using nodes in the tree. The tree data structure can be named "Tree". The data contained in each node of the Tree is a string. The string contained in the root node is used to represent the name of the root directory of the data system designed in the deployment document. The strings contained in the child nodes of the root node are used to represent the names of the subdirectories of the root directory.

[0084] In this optional embodiment, the tree structure represented by the Tree can be used as the first structure.

[0085] S112, Test the data system under test to obtain the second structure.

[0086] In this optional embodiment, the directory structure of the constructed data system to be tested can be queried according to a preset SQL statement, and the directory names in the data system can be stored in a tree data structure. The tree data structure can be named "Tree_test". The data contained in each node of Tree_test is a string. The string contained in the root node represents the name of the root directory of the data system, and the strings contained in the child nodes of the root node represent the names of the subdirectories of the root directory.

[0087] In this optional embodiment, the tree structure represented by Tree_test can be used as the second structure.

[0088] S113, compare the first structure and the second structure to obtain the structure normalization index, which is used to represent the degree of normalization of the structure in the data system.

[0089] In this optional embodiment, Tree_test and Tree can be traversed simultaneously to mark nodes according to a preset traversal algorithm. "Traversal" refers to the process of querying, data collection, and marking. For example, the preset traversal algorithm can be a depth-first search algorithm, and the specific implementation steps of the depth-first search algorithm are as follows:

[0090] Simultaneously, traverse the tree_test and tree root nodes to obtain the directory names contained in the nodes at the same position in the two trees during each iteration;

[0091] Mark the traversed nodes as "traversed" and record the directory name data contained in the current node;

[0092] Further traverse the leftmost child node of the current node until the current node is a leaf node (without child nodes);

[0093] Backtrack to the parent node of the current node and traverse the remaining child nodes;

[0094] Repeat the above steps until all nodes in the tree are marked as "traversed".

[0095] In this optional embodiment, the string contained in the node of Tree that is traversed each time can be denoted as string, and the string contained in the node of Tree_test that is traversed can be denoted as string_test. The similarity between string and string_test is calculated using a preset string comparison method to characterize the accuracy of the directory in the data system under test.

[0096] In this optional embodiment, the implementation steps of the preset string verification method are as follows:

[0097] The lengths of string and string_test are calculated according to a preset program, with len_s representing the length of string and len_st representing the length of string_test;

[0098] Simultaneously, the string and string_test are traversed sequentially, and the characters encountered in each traversal are compared to see if they are the same. The sequential traversal is from left to right. The variable count represents the number of the same characters in the two strings. count can be initially set to 0.

[0099] If two characters at the same position are the same, the count value is incremented by 1; otherwise, the count value is not changed.

[0100] The string verification method ends when both string and string_test have been traversed, and the value of count is retained.

[0101] In this optional embodiment, the similarity between string and string_test can be denoted as Nv, and its calculation formula is as follows:

[0102] Nv=count / max(len_s,len_st),0<=Nv<=1

[0103] Where max(len_s,len_st) means taking the maximum value between len_s and len_st, and the value range of Nv is [0,1].

[0104] For example, when count = 2, len_s = 5, and len_st = 7, the calculation method for Nv is as follows:

[0105]

[0106] The value of Nv is then 0.29.

[0107] In this optional embodiment, the string similarity represented by Nv can be used as the structural normality index.

[0108] In this way, by comparing the directory structure in the deployment document with the directory structure in the data system, the structure standardization index is obtained. This quantitative data characterizes the standardization of the data system's directory structure, which can improve the accuracy of subsequent test results.

[0109] S12, construct a program standardization index based on the scheduling document and the data system.

[0110] Please see Figure 3 In an optional embodiment, a program compliance metric is constructed based on the scheduling document and the data system. This program compliance metric characterizes the degree to which programs in the data system conform to specifications, including:

[0111] S121, query the program encoding format in the data system to obtain the encoding standardization degree, which is used to represent the degree of standardization of the program encoding format in the data system.

[0112] In this optional embodiment, the task name and the corresponding code in the scheduling document can be extracted according to a preset program. The task name can be used as a "key" and recorded as Hash_key, and the content of the code can be used as a "value" and recorded as Hash_value. The task name and the script content can be matched one-to-one and stored together to construct a "key-value pair". Further, a task logical hash table can be constructed based on the "key-value pair" to store task and script information. This hash table can be named "Hash".

[0113] In this optional embodiment, a preset SQL script can be run in the data system to check whether the Hash_value conforms to UTF-8 encoding. Taking SQL, a commonly used database scripting language, as an example, the preset SQL script can be "Hash_valuelike'%utf8%'". The return value of the script is in the format of a string. Let the name of the return value be Rv. Then Rv can be either YES or NO. If it conforms to the encoding rules, "Yes" is returned; otherwise, "No" is returned.

[0114] In this optional embodiment, the Rv can be used as the coding canonicity.

[0115] S122, compare the program names in the data system with the task names in the scheduling document to obtain the functional matching degree, wherein the functional matching degree is used to indicate the standardization of the program names in the data system.

[0116] In this optional embodiment, the specific steps for obtaining the functional matching degree are as follows:

[0117] The hash can be traversed in order to obtain each key-value pair, which includes a hash_key and a hash_value.

[0118] The Hash_value can be parsed according to a preset program to obtain the program name in the data system, and the program name can be stored in the form of a string;

[0119] The matching degree between the Hash_key and the script name is calculated based on the string verification method, and the matching degree is denoted as Dv, where the value of Dv is in the range of [0,1].

[0120] In this optional embodiment, the matching degree represented by Dv can be used as the functional matching degree.

[0121] S123, calculate the difference degree of the program in the data system to obtain the merge complexity, the merge complexity being used to represent the complexity of the program in the data system.

[0122] In this optional embodiment, the data system may have a code merging problem. The code merging problem refers to the fact that when multiple testers edit and modify the internal program of the data system, the same program may have multiple different versions, thus causing code conflicts.

[0123] In this optional embodiment, the programs in the data system are traversed sequentially, and each traversed program is taken as the target program. The different versions of the target program can be parsed according to a preset program to obtain the string format code of the target program. The similarity between any two versions of the program is calculated based on the string comparison method and denoted as Sv, with a value range of [0,1].

[0124] In this optional embodiment, if the same program has k versions, the number of pairwise combinations of the scripts from the k versions is denoted as e, and its calculation method is as follows:

[0125]

[0126] in, This represents selecting any two data points from k data points and combining them, where k! represents the factorial of k. For k versions of the program, e similarity data points can be obtained based on the string verification method described above, and the mean of these e similarity data points is denoted as Avg. e The Avg e The calculation method is as follows:

[0127]

[0128] Where the subscript i represents the similarity index, Avg e The value range is [0,1].

[0129] For example, when e = 3, Sv1 = 0.5, Sv2 = 0.7, and Sv3 = 0.4, the Avg... e The calculation method is as follows:

[0130]

[0131] Then the Avg e The value is 0.53.

[0132] In this optional embodiment, the Avg can be e The mean of the similarity data is used as the merging complexity.

[0133] S124, Based on the custom segmentation model, integrate the coding standardization, functional matching degree and merging complexity to obtain the program standardization index.

[0134] In this optional embodiment, the custom segmentation model satisfies the following relationship:

[0135]

[0136] Wherein, T represents the program standardization index, and the value range of T is [-1, 1]; A represents the coding standardization; B represents the functional matching degree, and the value range of B is [0, 1]; C represents the merge complexity, and the value range of C is [0, 1]; α1 and α2 represent user-defined harmonic constants; β1 and β2 represent preset target values. When β1 = YES, α1 = 1; when β2 = NO, α2 = -1.

[0137] In this optional embodiment, the result T of the custom segmentation model can be used as the program standardization index. The program standardization index is used to characterize the degree to which the program in the data system conforms to the standard. The higher the program standardization index, the more the program in the data system conforms to the standard and the better the program performance.

[0138] In this way, by testing each program in the data system, the coding standardization, functional matching degree, and merging complexity of each program are obtained. Based on the custom segmentation model, the coding standardization, functional matching degree, and merging complexity are integrated to obtain the program standardization index. This allows for the evaluation of programs in the data system from multiple perspectives, improving the accuracy of subsequent test results.

[0139] S13, calculate the confidence levels of the structural standardization index and the procedural standardization index to obtain the system standardization index.

[0140] Please see Figure 4 In an optional embodiment, calculating the confidence levels of the structural standardization index and the procedural standardization index to obtain the system standardization index includes:

[0141] S131, calculate the confidence levels of the structural standardization index and the procedural standardization index respectively.

[0142] In this optional embodiment, the confidence level is used to characterize the reliability of the structural normalization index. The reciprocal of the degree of the tree-like data structure represented by the Tree can be used as the confidence level of the structural normalization index. The degree of the tree-like data structure refers to the total number of levels in the tree-like data structure. The confidence level characterizes the reliability of the structural normalization index. If the Tree has fewer levels, the directory structure of the data system is simpler, and the reliability of the structural normalization index is higher, thus the confidence level is higher. Conversely, if the Tree has more levels, the confidence level of the structural normalization index is lower. Let the degree of the tree-like data structure represented by the Tree be L, then the confidence level of the structural normalization index is denoted as 1 / L.

[0143] In this optional embodiment, the confidence level of the program standardization index can be calculated based on the information entropy algorithm. The program standardization index for each application in the data system can be calculated to obtain a program standardization dataset. Furthermore, the information entropy of the program standardization dataset can be calculated as the weight of the program standardization index. The method for calculating the information entropy of the program standardization dataset is as follows:

[0144]

[0145] Where E represents the information entropy of the program standardization dataset, q represents the number of data in the program standardization dataset, and P(T) i ) represents the probability of the program standardization index of the i-th program in the data system appearing.

[0146] In this optional embodiment, 1 / L and E can be used as the confidence level.

[0147] S132, calculate the confidence scores of the structural standardization index and the program standardization index respectively according to the preset standardization algorithm to obtain the normalized confidence scores.

[0148] In this optional embodiment, the confidence scores of the structural normalization index and the program normalization index can be calculated separately according to a preset standardization algorithm to obtain a normalized confidence score. The preset standardization algorithm can be a maximization method, and the calculation method of the maximization method is as follows:

[0149]

[0150]

[0151] Wherein, α1 represents the normalized confidence level of the structural standardization index, α2 represents the normalized confidence level of the program standardization index, L represents the number of levels in the directory structure of the data system, E represents the information entropy of the program standardization index, and H represents the maximum value of 1 / L and E.

[0152] In this optional embodiment, α1 and α2 can be used as the normalized confidence levels.

[0153] S133, update the structural normalization index and the program normalization index based on the normalized confidence level to obtain the data system normalization index.

[0154] In this optional embodiment, the structural normalization index and the program normalization index can be updated based on the normalized confidence level to obtain the system normalization index, and the system normalization index is calculated according to the following formula:

[0155] Z = α1·Nv + α2·T mean

[0156] Where Z represents the system standardization index, Nv represents the structural standardization index, and T mean α1 and α2 represent the mean of the program standardization index, and α1 and α2 represent the normalized confidence levels.

[0157] In this optional embodiment, Z can be used as the system normality index.

[0158] Thus, by analyzing the influencing factors of the structural standardization index and the procedural standardization index, the confidence level calculation method was formulated, and the confidence levels of the structural standardization index and the procedural standardization index were obtained according to the confidence level calculation method. Furthermore, the standardization method was used to reduce the influence of the dimensions on the confidence level, thereby improving the accuracy of the system indicators.

[0159] S14, Evaluate the data system to be tested based on the data system standardization index to obtain test results.

[0160] Please see Figure 5In an optional embodiment, evaluating the data system under test based on the data system standardization index to obtain test results includes:

[0161] S141, construct a level sequence based on a preset first threshold.

[0162] In this optional embodiment, the preset first threshold can be a sequence. For example, the first threshold can be [-0.5, 0, 0.5]. The method for constructing the level sequence based on the preset first threshold is as follows: when the system normalization index Z is less than the first element of the first threshold sequence -0.5, the data system is recorded as level1; when the system normalization index is greater than or equal to -0.5 and less than 0, the data system can be recorded as level2; when the system normalization index is greater than or equal to 0 and less than 0.5, the data system can be recorded as level3; and when the system normalization index is greater than 0.5, the data system can be recorded as level4.

[0163] In this optional embodiment, level1, level2, level3 and level4 can be used as the level sequence.

[0164] S142, Match the level sequence and the system standardization index to obtain the test level of the data system.

[0165] In this optional embodiment, the system standardization index and the elements in the first threshold can be compared to obtain the level of the data system. For example, the level of the data system can be level2.

[0166] S143, compare the test level with the preset second threshold to obtain the test result.

[0167] In this optional embodiment, the preset second threshold is a level data, which can be compared with the test level of the data system to obtain the test result. For example, the second threshold can be level 3. When the level of the data system is less than the second threshold, it means that the data system is unqualified. When the level of the data system is not less than the second threshold, it means that the data system is qualified.

[0168] In this way, the system standardization index of the system under test is evaluated based on the custom threshold, and the system level and test results are obtained. This method is more accurate and efficient than the traditional manual testing method by developers.

[0169] The aforementioned AI-based automated testing method obtains quantified system standardization indicators by conducting targeted tests on the structure and internal programs of the data system under test. The data system is then evaluated based on these quantified system standardization indicators to obtain test results. According to this method, developers do not need to manually test the data system; all testing tasks can be completed automatically, reducing testing time and improving testing efficiency.

[0170] like Figure 6 The diagram shown is a functional component diagram of a preferred embodiment of the AI-based automated testing device provided in this application. The AI-based automated testing device 11 includes a setup unit 110, a design unit 111, a construction unit 112, a calculation unit 113, and an evaluation unit 114. The components / units referred to in this application are a series of computer program segments that can be executed by the processor 13 and perform a fixed function, stored in the memory 12. In this embodiment, the functions of each component / unit will be described in detail in subsequent embodiments.

[0171] In an optional embodiment, the acquisition unit 110 is used to build a data system to be tested on a test platform according to a preset document. The preset document includes a scheduling document and a deployment document. The scheduling document is used to store the names of the scheduling tasks in the data system and the script code corresponding to each scheduling task. The deployment document is used to store the code instructions corresponding to each step in the data system building process.

[0172] In this optional embodiment, the data system to be tested is constructed on the test platform according to a preset document, the preset document including a scheduling document and a deployment document, including:

[0173] A test platform is constructed based on preset components to serve as the carrier of the data system; the components include various data processing programs.

[0174] The code in the preset document is sequentially input into the carrier to build the data system to be tested.

[0175] In this optional embodiment, the preset components include a data I / O component, a data transmission component, a data storage component, and a data analysis component. The relationship between the components in the test platform is as follows: the user inputs the user's requirement information into the data I / O component; the data I / O component transmits the user's requirement information to the data transmission component; the data transmission component transmits the user's requirement information to the data storage component; the required data is obtained from the data storage component based on the user's requirement information; the data transmission component transmits the required data to the data analysis component to obtain the data analysis results; and the data transmission component transmits the data analysis results to the information I / O component to display the data analysis results to the user.

[0176] In this optional embodiment, the data I / O component includes VUE and element. VUE is a web-based application framework for building user interfaces. Its main function is to provide users with a complete solution for building web pages based on user needs. Element is a set of user page components implemented based on VUE that do not depend on business logic.

[0177] In this optional embodiment, the data transmission component includes a web server and a web gateway interface. For example, the web server can be built based on Nginx, which is a lightweight web server / reverse proxy server and email proxy server. The web gateway interface can be UWSGI, which stands for WebServerGatewayInterface. Its main function is to transmit data between the web server and the web application or framework.

[0178] In this optional embodiment, the data storage component may be the Ping An Padis cloud container platform. The full name of Padis is PingAnDistribution, which means Ping An Distributed Platform. Its main functions include adding, deleting, modifying, and querying data.

[0179] In this optional embodiment, the data analysis component includes a web application framework, a message queue middleware, and a task distribution component. The web application framework can be Django, an open-source web application framework written in Python, whose main function is to create dynamic web applications. The message queue middleware can be the RabbitMQ framework, an open-source message broker software that implements the Advanced Message Queuing Protocol, whose main functions include data distribution, peak flow control, and log collection. The task distribution component can be Celery, a distributed asynchronous message task queue developed based on Python, whose main function is to implement asynchronous task processing.

[0180] In this optional embodiment, the data I / O component, data transmission component, data storage component, and data analysis component can be combined according to the relationship between each component to serve as the test platform for the data system.

[0181] In this optional embodiment, the data system setup process and the code instructions corresponding to each step in the process are stored in the deployment document. The deployment document can be in TXT format, which is a common file format that Microsoft provides on operating systems. Developers can input scripts from the deployment document into the user-side website page to deploy the database and directory structure in the data system. Developers can also input scripts from the scheduling document into the user-side page to build and name task modules in the data system. The scheduling document includes the names of the scheduled tasks in the data system and the script code corresponding to each scheduled task.

[0182] In this optional embodiment, the collection of the database, directory structure, and task modules can be used as the data system.

[0183] In an optional embodiment, classification unit 111 is used to compare the directory structure of the deployment document and the data system under test to obtain a structural standardization index.

[0184] In this optional embodiment, obtaining the structural standardization index by comparing the directory structure of the deployment document and the data system under test includes:

[0185] The deployment document is traversed to obtain the directory structure of the data system designed according to the deployment document, and a first structure is constructed based on the directory structure;

[0186] Test the data system under test to obtain the second structure;

[0187] The structural normalization index is obtained by comparing the first structure and the second structure. The structural normalization index is used to represent the degree of normalization of the structure in the data system.

[0188] In this optional embodiment, the deployment document can be traversed according to a preset program to obtain the directory structure of the data system designed according to the deployment document, and a first structure can be constructed according to the directory structure. For example, the preset program can be a script written in Python. The deployment document can be input into the preset program to obtain the return value of the preset program, and the return value can be used as the directory structure of the data system designed according to the deployment document.

[0189] In this optional embodiment, a tree data structure can be used to store the directory structure. The tree data structure is a commonly used traversable data structure whose function is to store data using nodes in the tree. The tree data structure can be named "Tree". The data contained in each node of the Tree is a string. The string contained in the root node is used to represent the name of the root directory of the data system designed in the deployment document. The strings contained in the child nodes of the root node are used to represent the names of the subdirectories of the root directory.

[0190] In this optional embodiment, the tree structure represented by the Tree can be used as the first structure.

[0191] In this optional embodiment, the directory structure of the constructed data system to be tested can be queried according to a preset SQL statement, and the directory names in the data system can be stored in a tree data structure. The tree data structure can be named "Tree_test". The data contained in each node of Tree_test is a string. The string contained in the root node represents the name of the root directory of the data system, and the strings contained in the child nodes of the root node represent the names of the subdirectories of the root directory.

[0192] In this optional embodiment, the tree structure represented by Tree_test can be used as the second structure.

[0193] In this optional embodiment, Tree_test and Tree can be traversed simultaneously to mark nodes according to a preset traversal algorithm. "Traversal" refers to the process of querying, data collection, and marking. For example, the preset traversal algorithm can be a depth-first search algorithm, and the specific implementation steps of the depth-first search algorithm are as follows:

[0194] Simultaneously, traverse the tree_test and tree root nodes to obtain the directory names contained in the nodes at the same position in the two trees during each iteration;

[0195] Mark the traversed nodes as "traversed" and record the directory name data contained in the current node;

[0196] Further traverse the leftmost child node of the current node until the current node is a leaf node (without child nodes);

[0197] Backtrack to the parent node of the current node and traverse the remaining child nodes;

[0198] Repeat the above steps until all nodes in the tree are marked as "traversed".

[0199] In this optional embodiment, the string contained in the node of Tree that is traversed each time can be denoted as string, and the string contained in the node of Tree_test that is traversed can be denoted as string_test. The similarity between string and string_test is calculated using a preset string comparison method to characterize the accuracy of the directory in the data system under test.

[0200] In this optional embodiment, the implementation steps of the preset string verification method are as follows:

[0201] The lengths of string and string_test are calculated according to a preset program, with len_s representing the length of string and len_st representing the length of string_test;

[0202] Simultaneously, the string and string_test are traversed sequentially, and the characters encountered in each traversal are compared to see if they are the same. The sequential traversal is from left to right. The variable count represents the number of the same characters in the two strings. count can be initially set to 0.

[0203] If two characters at the same position are the same, the count value is incremented by 1; otherwise, the count value is not changed.

[0204] The string verification method ends when both string and string_test have been traversed, and the value of count is retained.

[0205] In this optional embodiment, the similarity between string and string_test can be denoted as Nv, and its calculation formula is as follows:

[0206] Nv=count / max(len_s,len_st),0<=Nv<=1

[0207] Where max(len_s,len_st) means taking the maximum value between len_s and len_st, and the value range of Nv is [0,1].

[0208] In this optional embodiment, the string similarity represented by Nv can be used as the structural normality index.

[0209] In an optional embodiment, regression unit 112 is used to construct a program compliance index based on the scheduling document and the data system, the program compliance index being used to characterize the degree to which programs in the data system conform to specifications.

[0210] In this optional embodiment, the program standardization index built based on the scheduling document and the data system includes:

[0211] The encoding standardization degree is obtained by querying the program encoding format in the data system, and the encoding standardization degree is used to represent the degree of standardization of the program encoding format in the data system;

[0212] The program names in the data system are compared with the task names in the scheduling document to obtain the functional matching degree, which is used to indicate the standardization of the program names in the data system.

[0213] The degree of difference of the programs in the data system is calculated to obtain the merge complexity, which is used to represent the complexity of the programs in the data system;

[0214] The program standardization index is obtained by integrating the coding standardization, functional matching degree, and merging complexity based on the custom segmentation model.

[0215] In this optional embodiment, the task name and the corresponding code in the scheduling document can be extracted according to a preset program. The task name can be used as a "key" and recorded as Hash_key, and the content of the code can be used as a "value" and recorded as Hash_value. The task name and the script content can be matched one-to-one and stored together to construct a "key-value pair". Further, a task logical hash table can be constructed based on the "key-value pair" to store task and script information. This hash table can be named "Hash".

[0216] In this optional embodiment, a preset SQL script can be run in the data system to check whether the Hash_value conforms to UTF-8 encoding. Taking SQL, a commonly used database scripting language, as an example, the preset SQL script can be "Hash_valuelike'%utf8%'". The return value of the script is in the format of a string. Let the name of the return value be Rv. Then Rv can be either YES or NO. If it conforms to the encoding rules, "Yes" is returned; otherwise, "No" is returned.

[0217] In this optional embodiment, the Rv can be used as the coding canonicity.

[0218] In this optional embodiment, the specific steps for obtaining the functional matching degree are as follows:

[0219] The hash can be traversed in order to obtain each key-value pair, which includes a hash_key and a hash_value.

[0220] The Hash_value can be parsed according to a preset program to obtain the program name in the data system, and the program name can be stored in the form of a string;

[0221] The matching degree between the Hash_key and the script name is calculated based on the string verification method, and the matching degree is denoted as Dv, where the value of Dv is in the range of [0,1].

[0222] In this optional embodiment, the matching degree represented by Dv can be used as the functional matching degree.

[0223] In this optional embodiment, the data system may have a code merging problem. The code merging problem refers to the fact that when multiple testers edit and modify the internal program of the data system, the same program may have multiple different versions, thus causing code conflicts.

[0224] In this optional embodiment, the programs in the data system are traversed sequentially, and each traversed program is taken as the target program. The different versions of the target program can be parsed according to a preset program to obtain the string format code of the target program. The similarity between any two versions of the program is calculated based on the string comparison method and denoted as Sv, with a value range of [0,1].

[0225] In this optional embodiment, if the same program has k versions, the number of pairwise combinations of the scripts from the k versions is denoted as e, and its calculation method is as follows:

[0226]

[0227] in, This represents selecting any two data points from k data points and combining them, where k! represents the factorial of k. For k versions of the program, e similarity data points can be obtained based on the string verification method described above, and the mean of these e similarity data points is denoted as Avg. e The Avg e The calculation method is as follows:

[0228]

[0229] Where the subscript i represents the similarity index, Avg e The value range is [0,1].

[0230] In this optional embodiment, the Avg can be e The mean of the similarity data is used as the merging complexity.

[0231] In this optional embodiment, the custom segmentation model satisfies the following relationship:

[0232]

[0233] Wherein, T represents the program standardization index, and the value range of T is [-1, 1]; A represents the coding standardization; B represents the functional matching degree, and the value range of B is [0, 1]; C represents the merge complexity, and the value range of C is [0, 1]; α1 and α2 represent user-defined harmonic constants; β1 and β2 represent preset target values. When β1 = YES, α1 = 1; when β2 = NO, α2 = -1.

[0234] In this optional embodiment, the result T of the custom segmentation model can be used as the program standardization index. The program standardization index is used to characterize the degree to which the program in the data system conforms to the standard. The higher the program standardization index, the more the program in the data system conforms to the standard and the better the program performance.

[0235] In an optional embodiment, the calculation unit 113 is used to calculate the confidence levels of the structural standardization index and the program standardization index to obtain the system standardization index.

[0236] In this optional embodiment, calculating the confidence levels of the structural standardization index and the procedural standardization index to obtain the system standardization index includes:

[0237] Calculate the confidence levels of the structural standardization index and the procedural standardization index respectively;

[0238] The confidence scores of the structural standardization index and the program standardization index are calculated according to a preset standardization algorithm to obtain normalized confidence scores.

[0239] The structural normalization index and the program normalization index are updated based on the normalized confidence level to obtain the system normalization index.

[0240] In this optional embodiment, the confidence level is used to characterize the reliability of the structural normalization index. The reciprocal of the degree of the tree-like data structure represented by the Tree can be used as the confidence level of the structural normalization index. The degree of the tree-like data structure refers to the total number of levels in the tree-like data structure. The confidence level characterizes the reliability of the structural normalization index. If the Tree has fewer levels, the directory structure of the data system is simpler, and the reliability of the structural normalization index is higher, thus the confidence level is higher. Conversely, if the Tree has more levels, the confidence level of the structural normalization index is lower. Let the degree of the tree-like data structure represented by the Tree be L, then the confidence level of the structural normalization index is denoted as 1 / L.

[0241] In this optional embodiment, the confidence level of the program standardization index can be calculated based on the information entropy algorithm. The program standardization index for each application in the data system can be calculated to obtain a program standardization dataset. Furthermore, the information entropy of the program standardization dataset can be calculated as the weight of the program standardization index. The method for calculating the information entropy of the program standardization dataset is as follows:

[0242]

[0243] Where E represents the information entropy of the program standardization dataset, q represents the number of data in the program standardization dataset, and P(T) i ) represents the probability of the program standardization index of the i-th program in the data system appearing.

[0244] In this optional embodiment, 1 / L and E can be used as the confidence level.

[0245] In this optional embodiment, the confidence scores of the structural normalization index and the program normalization index can be calculated separately according to a preset standardization algorithm to obtain a normalized confidence score. The preset standardization algorithm can be a maximization method, and the calculation method of the maximization method is as follows:

[0246]

[0247]

[0248] Where α1 represents the normalized confidence level of the structural standardization index, α2 represents the normalized confidence level of the program standardization index, L represents the number of levels in the directory structure of the data system, E represents the information entropy of the program standardization index, and H represents the... The maximum value in E.

[0249] In this optional embodiment, α1 and α2 can be used as the normalized confidence levels.

[0250] In this optional embodiment, the structural normalization index and the program normalization index can be updated based on the normalized confidence level to obtain the system normalization index, and the system normalization index is calculated according to the following formula:

[0251] Z = α1·Nv + α2·T mean

[0252] Where Z represents the system standardization index, Nv represents the structural standardization index, and T mean α1 and α2 represent the mean of the program standardization index, and α1 and α2 represent the normalized confidence levels.

[0253] In this optional embodiment, Z can be used as the system normality index.

[0254] In an optional embodiment, the evaluation unit 115 is used to evaluate the data system under test based on the data system standardization index to obtain test results.

[0255] In this optional embodiment, evaluating the data system under test based on the data system standardization index to obtain test results includes:

[0256] A grade sequence is constructed based on a preset first threshold;

[0257] Match the grade sequence with the system standardization index to obtain the test grade of the data system;

[0258] The test results are obtained by comparing the test level with the preset second threshold.

[0259] In this optional embodiment, the normalized values ​​of the original detection data corresponding to the obtained significant reference variables are substituted into the ecological environment early warning model to calculate the corresponding assessment results.

[0260] In this optional embodiment, the preset first threshold can be a sequence. For example, the first threshold can be [-0.5, 0, 0.5]. The method for constructing the level sequence based on the preset first threshold is as follows: when the system normalization index Z is less than the first element of the first threshold sequence -0.5, the data system is recorded as level1; when the system normalization index is greater than or equal to -0.5 and less than 0, the data system can be recorded as level2; when the system normalization index is greater than or equal to 0 and less than 0.5, the data system can be recorded as level3; and when the system normalization index is greater than 0.5, the data system can be recorded as level4.

[0261] In this optional embodiment, level1, level2, level3 and level4 can be used as the level sequence.

[0262] In this optional embodiment, the system standardization index and the elements in the first threshold can be compared to obtain the level of the data system. For example, the level of the data system can be level2.

[0263] In this optional embodiment, the preset second threshold is a level data, which can be compared with the test level of the data system to obtain the test result. For example, the second threshold can be level 3. When the level of the data system is less than the second threshold, it means that the data system is unqualified. When the level of the data system is not less than the second threshold, it means that the data system is qualified.

[0264] The aforementioned AI-based automated testing method obtains quantified system standardization indicators by conducting targeted tests on the structure and internal programs of the data system under test. The data system is then evaluated based on these quantified system standardization indicators to obtain test results. According to this method, developers do not need to manually test the data system; all testing tasks can be completed automatically, reducing testing time and improving testing efficiency.

[0265] like Figure 7 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this application. The electronic device 1 includes a memory 12 and a processor 13. The memory 12 stores computer-readable instructions, and the processor 13 executes the computer-readable instructions stored in the memory to implement the artificial intelligence-based automated testing method of any of the above embodiments.

[0266] In an optional embodiment, the electronic device 1 further includes a bus and a computer program stored in memory 12 and executable on processor 13, such as an AI-based automated test program.

[0267] Figure 7 Only the electronic device 1 with components 12-13 is shown; those skilled in the art will understand that... Figure 7 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0268] Combination Figure 1 The memory 12 in electronic device 1 stores multiple computer-readable instructions to implement an artificial intelligence-based automated testing method, and the processor 13 can execute multiple instructions to achieve:

[0269] The data system to be tested is built on the test platform according to the preset documents. The preset documents include a scheduling document and a deployment document. The scheduling document is used to store the names of the scheduling tasks in the data system and the script code corresponding to each scheduling task. The deployment document is used to store the code instructions corresponding to each step in the data system building process.

[0270] The structural standardization index is obtained by comparing the directory structure of the deployment document and the data system to be tested.

[0271] Based on the scheduling document and the data system, construct program standardization indicators;

[0272] Calculate the confidence levels of the structural standardization index and the procedural standardization index to obtain the system standardization index;

[0273] The data system under test is evaluated based on the data system standardization index to obtain test results.

[0274] Specifically, the processor 13's implementation method for the above instructions can be found in [reference needed]. Figure 1 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0275] Those skilled in the art will understand that the schematic diagram is merely an example of electronic device 1 and does not constitute a limitation on electronic device 1. Electronic device 1 can be either a bus topology or a star topology. Electronic device 1 may also include more or fewer other hardware or software than shown in the diagram, or different component arrangements. For example, electronic device 1 may also include input / output devices, network access devices, etc.

[0276] It should be noted that electronic device 1 is only an example. Other existing or future electronic products that are suitable for this application should also be included within the scope of protection of this application and are incorporated herein by reference.

[0277] The memory 12 includes at least one type of readable storage medium, which can be non-volatile or volatile. The readable storage medium includes flash memory, portable hard drives, multimedia cards, card-type memory (e.g., SD or DX memory), magnetic storage, magnetic disks, optical disks, etc. In some embodiments, the memory 12 can be an internal storage unit of the electronic device 1, such as a portable hard drive of the electronic device 1. In other embodiments, the memory 12 can be an external storage device of the electronic device 1, such as a plug-in portable hard drive, SmartMediaCard (SMC), SecureDigital (SD) card, FlashCard, etc., equipped on the electronic device 1. Furthermore, the memory 12 can include both internal storage units and external storage devices of the electronic device 1. The memory 12 can be used not only to store application software and various types of data installed on the electronic device 1, such as the code of an AI-based automated testing program, but also to temporarily store data that has been output or will be output.

[0278] In some embodiments, the processor 13 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 13 is the control unit of the electronic device 1, connecting various components of the electronic device 1 through various interfaces and lines. It executes programs or components stored in the memory 12 (e.g., executing AI-based automated testing programs) and calls data stored in the memory 12 to perform various functions and process data in the electronic device 1.

[0279] Processor 13 executes the operating system of electronic device 1 and various installed applications. Processor 13 executes these applications to implement the steps described in the various AI-based automated testing method embodiments above, for example... Figures 1 to 5 The steps are shown.

[0280] For example, the computer program may be divided into one or more components / units, which are stored in memory 12 and executed by processor 13 to complete this application. The one or more components / units may be a series of computer-readable instruction segments capable of performing a specific function, which describe the execution process of the computer program in electronic device 1. For example, the computer program may be divided into a building unit 110, a design unit 111, a construction unit 112, a calculation unit 113, and an evaluation unit 114.

[0281] The integrated unit implemented as a software functional component described above can be stored in a computer-readable storage medium. This software functional component, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, computer equipment, or network device, etc.) or processor to execute portions of the artificial intelligence-based automated testing methods described in the various embodiments of this application.

[0282] If the components / units integrated in electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware devices. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above.

[0283] The computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory, and other memory.

[0284] Furthermore, the computer-readable storage medium may primarily include a stored program area and a stored data area, wherein the stored program area may store the operating system, an application program required for at least one function, etc.; and the stored data area may store data created based on the use of blockchain nodes, etc.

[0285] The blockchain referred to in this application is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.

[0286] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, in... Figure 7 The symbol is represented by only one arrow, but this does not indicate that there is only one bus or one type of bus. The bus is configured to enable communication between the memory 12 and at least one processor 13, etc.

[0287] Although not shown, electronic device 1 may also include a power supply (such as a battery) to power various components. Preferably, the power supply can be logically connected to the at least one processor 13 via a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power sources, a recharging device, a power fault detection circuit, a power converter or inverter, a power status indicator, or any other components. Electronic device 1 may also include various sensors, Bluetooth components, Wi-Fi components, etc., which will not be described in detail here.

[0288] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the electronic device 1 and other electronic devices.

[0289] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device 1 and to display a visual user interface.

[0290] This application also provides a computer-readable storage medium (not shown), which stores computer-readable instructions. These computer-readable instructions are executed by a processor in an electronic device to implement the artificial intelligence-based automated testing method described in any of the above embodiments.

[0291] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.

[0292] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of components is only a logical functional division, and other division methods may be used in actual implementation.

[0293] The components described as separate parts may or may not be physically separate. The components shown as components may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the components can be selected to achieve the purpose of this embodiment according to actual needs.

[0294] Furthermore, the functional components in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional components.

[0295] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices described in the specification may also be implemented by a single unit or device through software or hardware. Terms such as "first," "second," etc., are used to indicate names and do not indicate any specific order.

[0296] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.

Claims

1. An automated testing method based on artificial intelligence, characterized in that, The method includes: The data system to be tested is built on the test platform according to the preset documents. The preset documents include a scheduling document and a deployment document. The scheduling document is used to store the names of the scheduling tasks in the data system and the script code corresponding to each scheduling task. The deployment document is used to store the code instructions corresponding to each step in the data system building process. The method of obtaining a structural standardization index by comparing the deployment document and the directory structure of the data system to be tested includes: traversing the deployment document to obtain the directory structure of the data system designed according to the deployment document, and constructing a first structure based on the directory structure; testing the data system to be tested to obtain a second structure; and comparing the first structure and the second structure to obtain the structural standardization index, wherein the structural standardization index is used to represent the degree of standardization of the structure in the data system. Constructing a program standardization index based on the scheduling document and the data system includes: querying the program encoding format in the data system to obtain encoding standardization, whereby the encoding standardization represents the degree of standardization of the program encoding format in the data system; comparing the program names in the data system with the task names in the scheduling document to obtain functional matching degree, whereby the functional matching degree represents the degree of standardization of the program names in the data system; calculating the difference degree of the programs in the data system to obtain merge complexity, whereby the merge complexity represents the complexity of the programs in the data system; and integrating the encoding standardization, functional matching degree, and merge complexity according to a custom segmentation model to obtain the program standardization index; wherein, the custom segmentation model conforms to the following relationship: Where T represents the program standardization index, and the value range of T is [-1, 1]; A represents the coding standardization; B represents the functional matching degree, and the value range of B is [0, 1]; C represents the merge complexity, and the value range of C is [0, 1]. and Represents a custom harmonic constant; and This represents the preset target value; Calculate the confidence levels of the structural standardization index and the procedural standardization index to obtain the data system standardization index; The data system under test is evaluated based on the data system standardization index to obtain test results.

2. The automated testing method based on artificial intelligence as described in claim 1, characterized in that, The data system to be tested is constructed on the test platform according to a preset document, which includes a scheduling document and a deployment document. A test platform is constructed based on preset components to serve as the carrier of the data system; the components include various data processing programs. The code in the preset document is sequentially input into the carrier to build the data system to be tested.

3. The automated testing method based on artificial intelligence as described in claim 1, characterized in that, The calculation of the confidence levels of the structural standardization index and the procedural standardization index to obtain the data system standardization index includes: Calculate the confidence levels of the structural standardization index and the procedural standardization index respectively; The confidence scores of the structural standardization index and the program standardization index are calculated according to a preset standardization algorithm to obtain normalized confidence scores. The structural normalization index and the program normalization index are updated based on the normalized confidence level to obtain the data system normalization index.

4. The automated testing method based on artificial intelligence as described in claim 1, characterized in that, The process of evaluating the data system under test based on the data system standardization index to obtain test results includes: A grade sequence is constructed based on a preset first threshold; Match the grade sequence with the system standardization index to obtain the test grade of the data system; The test results are obtained by comparing the test level with the preset second threshold.

5. An automated testing device based on artificial intelligence, characterized in that, The apparatus includes units for implementing the method as described in any one of claims 1 to 4, the apparatus comprising: The setup unit is used to build the data system to be tested according to the preset documents. The documents include a scheduling document and a deployment document. The scheduling document is used to store the names of the scheduling tasks in the data system and the script code corresponding to each scheduling task. The deployment document is used to store the code instructions corresponding to each step in the setup process of the data system. A design unit is used to compare the directory structure of the deployment document and the data system under test to obtain a structural standardization index. The construction unit is used to construct program standardization indicators based on the scheduling document and the data system; A calculation unit is used to calculate the confidence levels of the structural standardization index and the program standardization index to obtain the system standardization index; An evaluation unit is used to evaluate the data system under test based on the data system standardization index to obtain test results.

6. An electronic device, characterized in that, The electronic device includes: Memory, which stores computer-readable instructions; and The processor executes computer-readable instructions stored in the memory to implement the AI-based automated testing method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, which are executed by a processor in an electronic device to implement the AI-based automated testing method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • System acceptance method and device based on artificial intelligence, computer equipment and medium

    CN113886245A

  • Method and system for testing artificial intelligence algorithm model based on Kubernetes system

    CN114116481A