Configuration method, device, computer equipment and storage medium for algorithm testing
By obtaining and filtering production environment data, and using algorithm service identification and matching, the problem of low test data accuracy and update efficiency is solved, and more efficient algorithm testing is achieved.
Patent Information
- Application Number
- CN202111136233.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-27
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-09-27
AI Technical Summary
In existing algorithm testing, the accuracy of test data is low and the update efficiency is low, which affects the accuracy of the algorithm.
By obtaining data in the production environment, filtering and marking based on data rules, calling algorithm services to identify and match data, generating test results, using blockchain storage and temporary databases to optimize data management, and improve data update frequency and efficiency.
It improves the accuracy and update efficiency of test data and ensures the accuracy and efficiency of algorithm testing.
Smart Images

Figure CN113886230B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of algorithm testing, and in particular to a configuration method, device, computer equipment and storage medium for algorithm testing. Background Art
[0002] With the development of Internet technology, data push is achieved by developing different artificial intelligence algorithms and applying them to different scenarios. Algorithms need to be tested before and after application. Currently, most algorithm tests are conducted by manually establishing test sets. The data in the test set cannot be updated continuously and automatically, and is separated from the actual application environment, resulting in low accuracy of the test data, which in turn affects the accuracy of the algorithm. Summary of the invention
[0003] The main purpose of this application is to provide a configuration method, device, computer equipment and storage medium for algorithm testing, aiming to solve the current problems of low accuracy and low updating efficiency of test data.
[0004] In order to achieve the above-mentioned invention object, the present application proposes a configuration method for algorithm testing, including:
[0005] Acquire first data in a production environment; the first data is data associated with a specified algorithm;
[0006] Acquire data rules of the specified algorithm, remove invalid data that does not meet the specified data type and erroneous data whose data value does not meet the specified value range in the first data based on the data rules to filter the first data, and obtain test data that meets the data rules in the first data;
[0007] Acquire tag information of the test data, and add the tag information as a first newly added field to the test data;
[0008] Calling the algorithm service of the specified algorithm to identify the test data, obtaining the identification result of the test data, and adding the identification result as the second newly added field to the test data; the algorithm service of the specified algorithm is an algorithm container in the development and testing environment, and one algorithm container is used to execute one specified algorithm;
[0009] The first newly added field and the second newly added field of the test data are matched to obtain a matching result, and a test result of the specified algorithm is generated according to the matching result.
[0010] Furthermore, before obtaining the data rule of the specified algorithm, the method further includes:
[0011] Obtaining initial test data for the specified algorithm;
[0012] Identify several feature information of the initial test data based on a natural language algorithm;
[0013] Counting the relevance of the feature information;
[0014] Target feature information is filtered from the feature information according to the degree of association, and a data rule of the designated algorithm is generated according to the target feature information.
[0015] Further, after obtaining the test data satisfying the data rule in the first data, the method further includes:
[0016] Identifying the test data and determining the classification dimension of the test data;
[0017] Determining the business corresponding to the test data according to the classification dimension;
[0018] The test data is associated with the corresponding business and stored to generate test data for the corresponding business.
[0019] Furthermore, the obtaining of the first data in the production environment includes:
[0020] Get the second data in the production environment;
[0021] An update time of the second data is obtained, a preset number of target second data are selected according to the update time, and first data are generated according to the target second data.
[0022] Furthermore, the acquiring the update time of the second data, selecting a preset number of target second data according to the update time, and generating the first data according to the target second data further includes:
[0023] storing the first data in a temporary database;
[0024] After filtering the first data based on the data rule to obtain the test data in the first data that meets the data rule, the method further includes:
[0025] The test data is stored in the test library and written into the blockchain, and the corresponding first data in the temporary database is deleted.
[0026] Further, the obtaining of the tag information of the test data includes:
[0027] Send a labeling request for test data to the user;
[0028] Receiving the marking content of the test data by the user based on the marking request;
[0029] The marking information of the test data is generated according to the marking content.
[0030] Further, the test data includes a plurality of sub-data; the first newly added field and the second newly added field of the test data are matched to obtain a matching result, and after the test result of the specified algorithm is generated according to the matching result, the method includes:
[0031] Counting the matching rate of the test data according to the matching result of each sub-data;
[0032] Determining the accuracy of the test data according to the matching rate;
[0033] If the accuracy is lower than a preset threshold, the test result is sent to a preset warning channel.
[0034] The present application also provides a configuration device for algorithm testing, including:
[0035] A data acquisition module, used to acquire first data in a production environment; the first data is data associated with a specified algorithm;
[0036] A data filtering module, used to obtain data rules of the specified algorithm, remove invalid data that does not meet the specified data type and erroneous data whose data value does not meet the specified value range in the first data based on the data rules to filter the first data, and obtain test data that meets the data rules in the first data;
[0037] A data marking module, used for obtaining marking information of the test data, and adding the marking information as a first newly added field to the test data;
[0038] A data identification module is used to call the algorithm service of the specified algorithm to identify the test data, obtain the identification result of the test data, and add the identification result as a second newly added field to the test data; the algorithm service of the specified algorithm is an algorithm container in the development and testing environment, and one algorithm container is used to execute one specified algorithm;
[0039] The data matching module is used to match the first newly added field and the second newly added field of the test data to obtain a matching result, and generate a test result of the specified algorithm according to the matching result.
[0040] The present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the configuration method of the algorithm test described in any one of the above items are implemented.
[0041] The present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the configuration method of the algorithm test described in any one of the above items are implemented.
[0042] The present application example provides a method for configuring a test for an artificial intelligence algorithm, firstly obtaining first data in a production environment; the first data is data associated with a specified algorithm, obtaining data rules of the specified algorithm, filtering the first data based on the data rules, obtaining test data in the first data that meets the data rules, and then obtaining tag information of the test data, wherein the tag information represents a standard classification of the test data, and at the same time adding the tag information as a first newly added field to the test data, so that each test data at this time contains the corresponding tag information, calling the algorithm service of the specified algorithm to identify the test data, obtaining a recognition result of the test data, and adding the recognition result to the test data. The identification result is added to the test data as a second newly added field, and the first newly added field of the test data is matched with the second newly added field to determine whether the first newly added field matches the second newly added field. After the first newly added field of all the test data is compared with the second newly added field to obtain a matching result, a matching ratio between the first newly added field and the second newly added field of the test data is generated, and a test result of the specified algorithm is generated according to the matching ratio. The specified algorithm is tested by continuously obtaining data from the production environment, so as to solve the current problems of low test data update frequency and small amount of updated data, improve the frequency and efficiency of test data update, and improve the efficiency of algorithm testing, so as to obtain the test result of the algorithm more accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flowchart of an embodiment of a configuration method for algorithm testing of the present application;
[0044] Figure 2 A schematic diagram of the structure of an embodiment of a configuration device for algorithm testing of the present application;
[0045] Figure 3 This is a schematic block diagram of the structure of an embodiment of a computer device of the present application.
[0046] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. Figure 1 An embodiment of the present application provides a configuration method for an algorithm test, including steps S10-S60. The detailed description of each step of the configuration method for the algorithm test is as follows.
[0049] S10. Acquire first data in a production environment; the first data is data associated with a specified algorithm.
[0050] This embodiment is applied to the test scenario of artificial intelligence algorithms. With the continuous development of digitalization, different outputs for different inputs are realized by developing different artificial intelligence algorithms. In the present invention, the first data in the production environment is obtained. The first data is the data associated with the specified algorithm. The specified algorithm can be applied to the application. The first data in the production environment is the user data generated by the user in the real scene, and the user data is associated with the specified algorithm. For example, in the intention recognition scenario, when the input data is XXX, the output result data YY1 is calculated by the specified algorithm SSS, and the XXX and YY1 are used as the data associated with the specified algorithm SSS. In one embodiment, by pre-implementing the point-tracking operation at the specified algorithm in the application, that is, in the process of application development, the input and output of the specified algorithm are embedded, and the data collection function is added to the application, so that the data collection function and the business function in the application are developed synchronously, and the data associated with the specified algorithm can be collected by embedding the points, and the stability and accuracy of data collection are higher by embedding the points.
[0051] S20. Obtain data rules of the specified algorithm, and based on the data rules, remove invalid data that does not satisfy the specified data type and erroneous data whose data values do not satisfy the specified value range in the first data to filter the first data, and obtain test data that satisfies the data rules in the first data.
[0052] In this embodiment, after obtaining the first data in the production environment, different specified algorithms have different rules for test data, and in order to remove redundant data irrelevant to the algorithm test, the data rules of the specified algorithm are obtained, the data rules include limiting rules for the input data of the specified algorithm, including the data type of the input data, the corresponding value ranges of different data types, etc. The data rules also include limiting rules for the output data of the specified algorithm, including the data type of the output data, the corresponding value ranges of different data types. The data rules can be obtained from a pre-configured rule library, and the pre-configured rule library is configured with data rules of different algorithms. The data rules can be configured manually, or based on historical big data collection and statistics of data of different algorithms, that is, the data generated by different algorithms collected historically through big data statistics are used, and then the characteristics of the data are identified. In one embodiment, by counting the data types contained in the data, when the proportion of a data type appears exceeds a preset proportion, the data type is determined to be a data feature of the algorithm. In addition, by counting the probabilities of different values under different data types, the value whose probability meets the preset probability is used as the value under the corresponding data type, which is also determined to be a data feature of the algorithm. The first data is then filtered based on the data rules, including deleting data corresponding to unnecessary data types in the first data, deleting data with empty values in the first data, and deleting data in the first data that does not satisfy the corresponding data type values, so as to obtain data that meets the data rules, and define the filtered data as test data, that is, obtaining test data in the first data that meets the data rules.
[0053] S30: Obtain tag information of the test data, and add the tag information as a first newly added field to the test data.
[0054] In this embodiment, after filtering the first data based on the data rules and obtaining the test data in the first data that meets the data rules, tag information of the test data is obtained, and the tag information represents the standard classification of the test data. At the same time, the tag information is added to the test data as a first new field, so that each test data at this time contains the corresponding tag information. The tag information can not only be used as a standard for classifying each test data, but also as a standard for judging the running result of the specified algorithm.
[0055] S40, calling the algorithm service of the specified algorithm to identify the test data, obtaining the identification result of the test data, and adding the identification result as the second newly added field to the test data; the algorithm service of the specified algorithm is an algorithm container in the development test environment, and one algorithm container is used to execute one specified algorithm.
[0056] In this embodiment, in order to test the algorithm, the algorithm service of the specified algorithm is called to identify the test data. The algorithm service of the specified algorithm is an independent algorithm module, which can receive data as the input of the algorithm module, thereby outputting the calculation result of the algorithm module, that is, after the test data is input into the algorithm module, the test data is calculated based on the logic of the algorithm module to obtain the output result of the test data, which is defined as the recognition result of the test data, thereby obtaining the recognition result of the test data. In one embodiment, the algorithm service of the specified algorithm is an algorithm container under the development and testing environment. One algorithm container is used to execute a specified algorithm. By inputting the test data screened in the production environment into the algorithm service of the specified algorithm under the development and testing environment, the execution result of the specified algorithm under the development and testing environment can be obtained. Furthermore, the recognition result is added to the test data as a second newly added field, so that each test data at this time contains corresponding tag information and recognition results.
[0057] S50. Match the first newly added field with the second newly added field of the test data to obtain a matching result, and generate a test result of the specified algorithm according to the matching result.
[0058] In this embodiment, after adding the first newly added field and the second newly added field to the test data, each data in the test data is configured with the corresponding first newly added field and second newly added field, and then the first newly added field and the second newly added field of the test data are compared to determine whether the first newly added field matches the second newly added field. If they match, it is determined that after the test data is input into the algorithm service of the specified algorithm, the output result meets the preset correct result. When the first newly added field and the second newly added field of all data in the test data are compared to obtain a matching result, the test result of the specified algorithm is generated according to the matching result, thereby completing the test of the specified algorithm.
[0059] The present embodiment provides a method for configuring a test for an artificial intelligence algorithm, firstly obtaining first data in a production environment; the first data is data associated with a specified algorithm, obtaining a data rule of the specified algorithm, filtering the first data based on the data rule, obtaining test data in the first data that satisfies the data rule, and then obtaining tag information of the test data, wherein the tag information represents a standard classification of the test data, and at the same time adding the tag information as a first newly added field to the test data, so that each test data at this time contains the corresponding tag information, calling the algorithm service of the specified algorithm to identify the test data, obtaining a recognition result of the test data, and adding the recognition result to the test data. The result is added to the test data as a second newly added field, and the first newly added field of the test data is matched with the second newly added field to determine whether the first newly added field matches the second newly added field. After comparing the first newly added field with the second newly added field of all test data to obtain a matching result, a matching ratio between the first newly added field and the second newly added field of the test data is generated, and a test result of the specified algorithm is generated according to the matching ratio. The specified algorithm is tested by continuously obtaining data from the production environment to solve the current problems of low test data update frequency and small amount of updated data, increase the frequency and efficiency of test data updating, and improve the efficiency of algorithm testing to obtain more accurate test results of the algorithm.
[0060] In one embodiment, obtaining the first data in the production environment includes:
[0061] Get the second data in the production environment;
[0062] An update time of the second data is obtained, a preset number of target second data are selected according to the update time, and first data are generated according to the target second data.
[0063] In this embodiment, in the process of acquiring the first data in the production environment, the second data in the production environment is acquired, the second data is the production data continuously obtained from the production environment, and then the update time of the second data is acquired, and a preset number of second data are selected as the target second data in the order of the update time. In one implementation, N second data are selected in sequence as the target second data in the order of the update time, and then the first data is generated according to the target second data, thereby realizing orderly and batch management of the second data, continuously acquiring the second data, and then selecting the second data in batches as the first data for data testing, thereby reasonably allocating test resources, avoiding the excessive amount of first data processed at the same time to reduce the efficiency of data testing, and improving resource utilization.
[0064] In one embodiment, before obtaining the data rule of the specified algorithm, the method further includes:
[0065] Obtaining initial test data for the specified algorithm;
[0066] Identify several feature information of the initial test data based on a natural language algorithm;
[0067] Counting the relevance of the feature information;
[0068] Target feature information is filtered from the feature information according to the degree of association, and a data rule of the designated algorithm is generated according to the target feature information.
[0069] In this embodiment, before obtaining the data rules of the specified algorithm, the data rules of each algorithm are configured through the initial test data of each algorithm. Specifically, the initial test data of the specified algorithm is obtained, and the initial test data is the test data configured before each algorithm is applied to the production environment. Then, based on the natural language algorithm, the feature information of the initial test data is identified, and the feature information contained in the initial test data is identified. The feature to be repaired includes the data type contained in the initial test data and the data range of each data type. Then, the correlation of the feature information is counted. The correlation includes counting the probability of occurrence of each feature information and the probability of occurrence of different feature information association. The correlation of the feature information is generated according to the probability. The target feature information is filtered from the feature information according to the correlation. The data rules of the specified algorithm are generated according to the target feature information. The data rules include the data type that the data of the specified algorithm needs to include and the data range of each data type. The data rules of the specified algorithm are obtained through the initial test data, so that the data rules of the specified algorithm can be quickly and accurately configured, so as to filter out the test data that meets the requirements of the specified algorithm based on the data rules, thereby improving the efficiency and accuracy of algorithm testing.
[0070] In one embodiment, after obtaining the test data satisfying the data rule in the first data, the method further includes:
[0071] Identifying the test data and determining the classification dimension of the test data;
[0072] Determining the business corresponding to the test data according to the classification dimension;
[0073] The test data is associated with the corresponding business and stored to generate test data for the corresponding business.
[0074] In this embodiment, after filtering the first data based on the data rule and obtaining the test data that meets the data rule in the first data, the test data is identified and the classification dimension of the test data is determined. Specifically, the classification dimension of the test data is determined by identifying whether the test data contains a specified field. For example, when the test data contains field A, the classification dimension of the test data is determined to be the "question and answer" dimension, and when the test data contains field B, the classification dimension of the test data is determined to be the "chat" dimension. Then, the business corresponding to the test data is determined based on the classification dimension. Different businesses may use the same set of algorithms. For example, business A and business B both use NLP algorithms to identify text data. The test data under different businesses are highly specific. Therefore, the test data is associated with the corresponding business and stored to generate test data for the corresponding business, so that the accuracy of the algorithms under different businesses can be tested and the efficiency of algorithm testing under different businesses can be improved.
[0075] In one embodiment, the obtaining of the update time of the second data, selecting a preset number of target second data according to the update time, and generating the first data according to the target second data further includes:
[0076] storing the first data in a temporary database;
[0077] After filtering the first data based on the data rule to obtain the test data in the first data that meets the data rule, the method further includes:
[0078] The test data is stored in the test library and written into the blockchain, and the corresponding first data in the temporary database is deleted.
[0079] In this embodiment, after obtaining the update time of the second data, selecting a preset number of target second data according to the update time, and generating the first data according to the target second data, in order to avoid the first data in the production environment occupying too much storage space, the first data is stored in a temporary database, and a predetermined period is configured for the temporary database to perform automatic cleaning. Furthermore, after filtering the first data based on the data rule and obtaining the test data in the first data that meets the data rule, the test data is stored in a test library, which is a non-temporary database, and the test data is written to the blockchain. The test data is data that meets the algorithm test requirements. The test data can be traced conveniently through the blockchain, thereby improving the traceability of the algorithm test data. At the same time, the corresponding first data in the temporary database is deleted, thereby improving the utilization rate of storage resources.
[0080] In one embodiment, obtaining the tag information of the test data includes:
[0081] Send a labeling request for test data to the user;
[0082] Receiving the marking content of the test data by the user based on the marking request;
[0083] The marking information of the test data is generated according to the marking content.
[0084] In this embodiment, an implementation process for obtaining the marking information of the test data is that the user independently marks the test data, that is, a marking request for the test data is sent to the user, requesting the user to classify and mark the test data, and then receiving the marking content of the test data based on the marking request. In one implementation, a visual interactive interface is provided for the user to input. After the user enters relevant content on the visual interactive interface, the marking content of the test data based on the marking request is obtained, and then the marking information of the test data is generated according to the marking content, so that the marking information is added to the test data as the first newly added field, and the marking content is used as the standard classification result of the test data to verify the correctness of the algorithm output.
[0085] In one embodiment, the test data includes a plurality of sub-data; and after matching the first newly added field with the second newly added field according to the test data to obtain a matching result, the method includes:
[0086] Counting the matching rate of the test data according to the matching result of each sub-data;
[0087] Determining the accuracy of the test data according to the matching rate;
[0088] If the accuracy is lower than a preset threshold, the test result is sent to a preset warning channel.
[0089] In this embodiment, the test data includes several sub-data, and the process of matching the first newly added field and the second newly added field of the test data to obtain the matching result, statistically calculating the matching rate of the test data according to the matching result of each sub-data, and then determining the accuracy of the test data according to the matching rate, to obtain the sub-data that can match each other in the test result and the number of sub-data, and quickly find the sub-data that match each other and the sub-data that do not match each other. Based on the unmatched sub-data, it is possible to analyze whether the test algorithm has an error. If the accuracy is lower than a preset threshold, the test result is sent to a preset early warning channel to notify the tester to maintain the specified algorithm or the test data, thereby improving the efficiency of algorithm testing and maintenance.
[0090] Reference Figure 2 , the present application also provides a configuration device for algorithm testing, including:
[0091] The data acquisition module 10 is used to acquire first data in a production environment; the first data is data associated with a specified algorithm;
[0092] A data filtering module 20 is used to obtain data rules of the specified algorithm, and remove invalid data that does not meet the specified data type and erroneous data whose data value does not meet the specified value range in the first data based on the data rules to filter the first data, and obtain test data that meets the data rules in the first data;
[0093] A data marking module 30, configured to obtain marking information of the test data, and add the marking information as a first newly added field to the test data;
[0094] The data identification module 40 is used to call the algorithm service of the specified algorithm to identify the test data, obtain the identification result of the test data, and add the identification result as the second newly added field to the test data; the algorithm service of the specified algorithm is an algorithm container in the development and testing environment, and one algorithm container is used to execute one specified algorithm;
[0095] The data matching module 50 is used to match the first newly added field and the second newly added field of the test data to obtain a matching result, and generate a test result of the specified algorithm according to the matching result.
[0096] As described above, it can be understood that the various components of the algorithm test configuration device proposed in the present application can realize the functions of any of the algorithm test configuration methods described above.
[0097] In one embodiment, before the data filtering module 20 executes the data rule of obtaining the specified algorithm, it also includes executing:
[0098] Obtaining initial test data for the specified algorithm;
[0099] Identify several feature information of the initial test data based on a natural language algorithm;
[0100] Counting the relevance of the feature information;
[0101] Target feature information is filtered from the feature information according to the degree of association, and a data rule of the designated algorithm is generated according to the target feature information.
[0102] In one embodiment, after the data filtering module 20 obtains the test data satisfying the data rule in the first data, it further includes executing:
[0103] Identifying the test data and determining the classification dimension of the test data;
[0104] Determining the business corresponding to the test data according to the classification dimension;
[0105] The test data is associated with the corresponding business and stored to generate test data for the corresponding business.
[0106] In one embodiment, the data acquisition module 10 acquires the first data in the production environment, including executing:
[0107] Get the second data in the production environment;
[0108] An update time of the second data is obtained, a preset number of target second data are selected according to the update time, and first data are generated according to the target second data.
[0109] In one embodiment, the data acquisition module 10 acquires the update time of the second data, selects a preset number of target second data according to the update time, and generates the first data according to the target second data, and further comprises executing:
[0110] storing the first data in a temporary database;
[0111] After filtering the first data based on the data rule to obtain the test data in the first data that meets the data rule, the method further includes:
[0112] The test data is stored in the test library and written into the blockchain, and the corresponding first data in the temporary database is deleted.
[0113] In one embodiment, the data marking module 30 performs the steps of obtaining the marking information of the test data, including:
[0114] Send a labeling request for test data to the user;
[0115] Receiving the marking content of the test data by the user based on the marking request;
[0116] The marking information of the test data is generated according to the marking content.
[0117] In one embodiment, the test data includes a plurality of sub-data; the data matching module performs matching according to the first newly added field and the second newly added field of the test data to obtain a matching result, and after generating the test result of the specified algorithm according to the matching result, further comprises executing:
[0118] Counting the matching rate of the test data according to the matching result of each sub-data;
[0119] Determining the accuracy of the test data according to the matching rate;
[0120] If the accuracy is lower than a preset threshold, the test result is sent to a preset warning channel.
[0121] Reference Figure 3 In the embodiment of the present application, a computer device is also provided. The computer device may be a mobile terminal, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface, a display device and an input device connected through a system bus. Among them, the network interface of the computer device is used to communicate with an external terminal through a network connection. The input device of the computer device is used to receive user input. The processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a storage medium. The storage medium stores an operating system, a computer program and a database. The database of the computer device is used to store data. When the computer program is executed by the processor, a configuration method for algorithm testing is implemented.
[0122] The above-mentioned processor executes the above-mentioned configuration method of the algorithm test, including: obtaining first data in a production environment; the first data is data associated with a specified algorithm; obtaining data rules of the specified algorithm, removing invalid data that does not satisfy the specified data type and erroneous data whose data values do not satisfy the specified value range in the first data based on the data rules to filter the first data, and obtaining test data that satisfies the data rules in the first data; obtaining tag information of the test data, and adding the tag information as a first newly added field to the test data; calling the algorithm service of the specified algorithm to identify the test data, obtaining the recognition result of the test data, and adding the recognition result as a second newly added field to the test data; matching the first newly added field with the second newly added field of the test data to obtain a matching result, and generating the test result of the specified algorithm according to the matching result.
[0123] The computer device provides a method for configuring a test for an artificial intelligence algorithm, firstly obtaining first data in a production environment; the first data is data associated with a specified algorithm, obtaining a data rule of the specified algorithm, filtering the first data based on the data rule, obtaining test data in the first data that meets the data rule, and then obtaining tag information of the test data, wherein the tag information represents a standard classification of the test data, and at the same time, adding the tag information as a first newly added field to the test data, so that each test data at this time contains the corresponding tag information, calling the algorithm service of the specified algorithm to identify the test data, obtaining the identification result of the test data, and then The recognition result is added to the test data as a second newly added field, and the first newly added field of the test data is matched with the second newly added field to determine whether the first newly added field matches the second newly added field. After comparing the first newly added field with the second newly added field of all test data to obtain a matching result, a matching ratio between the first newly added field and the second newly added field of the test data is generated, and a test result of the specified algorithm is generated based on the matching ratio. The specified algorithm is tested by continuously obtaining data from the production environment to solve the current problems of low test data update frequency and small amount of updated data, increase the frequency and efficiency of test data updating, and improve the efficiency of algorithm testing to obtain more accurate test results of the algorithm.
[0124] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by the processor, a configuration method for algorithm testing is implemented, including the following steps: obtaining first data in a production environment; the first data is data associated with a specified algorithm; obtaining data rules of the specified algorithm, removing invalid data that does not satisfy a specified data type and erroneous data whose data values do not satisfy a specified value range in the first data based on the data rules to filter the first data, and obtaining test data that satisfies the data rules in the first data; obtaining tag information of the test data, and adding the tag information as a first newly added field to the test data; calling the algorithm service of the specified algorithm to identify the test data, and obtaining an identification result of the test data, and adding the identification result as a second newly added field to the test data; matching the first newly added field with the second newly added field of the test data to obtain a matching result, and generating a test result of the specified algorithm based on the matching result.
[0125] The computer-readable storage medium provides a method for configuring a test for an artificial intelligence algorithm, firstly obtaining first data in a production environment; the first data is data associated with a specified algorithm, obtaining data rules of the specified algorithm, filtering the first data based on the data rules, obtaining test data in the first data that meets the data rules, and then obtaining tag information of the test data, wherein the tag information represents a standard classification of the test data, and at the same time adding the tag information as a first newly added field to the test data, so that each test data at this time contains the corresponding tag information, calling the algorithm service of the specified algorithm to identify the test data, obtaining the identification result of the test data, and The recognition result is added to the test data as a second newly added field, and the first newly added field of the test data is matched with the second newly added field to determine whether the first newly added field matches the second newly added field. After comparing the first newly added field with the second newly added field of all test data to obtain a matching result, a matching ratio between the first newly added field and the second newly added field of the test data is generated, and a test result of the specified algorithm is generated based on the matching ratio. The specified algorithm is tested by continuously obtaining data from a production environment to solve the current problems of low test data update frequency and small amount of updated data, increase the frequency and efficiency of test data updates, and improve the efficiency of algorithm testing to obtain more accurate test results of the algorithm.
[0126] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0127] Any reference to memory, storage, database, or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory.
[0128] Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0129] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, device, article or method including the element.
[0130] The above description is only a preferred embodiment of the present application and does not limit the patent scope of the present application.
[0131] Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are similarly included in the scope of patent protection of this application.
Claims
1. A configuration method for algorithm testing, characterized in that: include: Get the first data in the production environment; The first data is data associated with the specified algorithm; Acquire data rules of the specified algorithm, remove invalid data that does not meet the specified data type and erroneous data whose data value does not meet the specified value range in the first data based on the data rules to filter the first data, and obtain test data that meets the data rules in the first data; Acquire tag information of the test data, where the tag information represents a standard classification of the test data, and add the tag information as a first newly added field to the test data; Calling the algorithm service of the specified algorithm to identify the test data, obtaining the identification result of the test data, and adding the identification result as the second newly added field to the test data; the algorithm service of the specified algorithm is an algorithm container in the development and testing environment, and one algorithm container is used to execute one specified algorithm; Matching the first newly added field and the second newly added field of the test data to obtain a matching result, and generating a test result of the specified algorithm according to the matching result; Before obtaining the data rule of the specified algorithm, the method further includes: Obtaining initial test data for the specified algorithm; Identify several feature information of the initial test data based on a natural language algorithm; Counting the relevance of the feature information; Filtering target feature information from the feature information according to the degree of association, and generating data rules of the specified algorithm according to the target feature information; The obtaining of first data in the production environment includes: Get the second data in the production environment; Acquire an update time of the second data, select a preset number of target second data according to the update time, and generate first data according to the target second data; The test data includes a plurality of sub-data; after matching the first newly added field with the second newly added field according to the test data to obtain a matching result, and generating the test result of the specified algorithm according to the matching result, the method further includes: Counting the matching rate of the test data according to the matching result of each sub-data; Determining the accuracy of the test data according to the matching rate; If the accuracy is lower than a preset threshold, the test result is sent to a preset warning channel.
2. The configuration method for algorithm testing according to claim 1, characterized in that: After obtaining the test data satisfying the data rule in the first data, the method further includes: Identifying the test data and determining the classification dimension of the test data; Determining the business corresponding to the test data according to the classification dimension; The test data is associated with the corresponding business and stored to generate test data for the corresponding business.
3. The configuration method for algorithm testing according to claim 1, characterized in that: After obtaining the update time of the second data, selecting a preset number of target second data according to the update time, and generating the first data according to the target second data, the method further includes: storing the first data in a temporary database; After filtering the first data to obtain test data satisfying the data rule in the first data, the method further includes: The test data is stored in the test library and written into the blockchain, and the corresponding first data in the temporary database is deleted.
4. The configuration method for algorithm testing according to claim 1, characterized in that: The obtaining of the marking information of the test data includes: Send a labeling request for test data to the user; Receiving the marking content of the test data by the user based on the marking request; The marking information of the test data is generated according to the marking content.
5. A configuration device for algorithm testing, characterized in that: A configuration method for implementing an algorithm test as claimed in any one of claims 1 to 4, comprising: A data acquisition module, used to acquire first data in a production environment; the first data is data associated with a specified algorithm; A data filtering module, used to obtain data rules of the specified algorithm, remove invalid data that does not meet the specified data type and erroneous data whose data value does not meet the specified value range in the first data based on the data rules to filter the first data, and obtain test data that meets the data rules in the first data; A data marking module, used for obtaining marking information of the test data, and adding the marking information as a first newly added field to the test data; A data identification module is used to call the algorithm service of the specified algorithm to identify the test data, obtain the identification result of the test data, and add the identification result as a second newly added field to the test data; the algorithm service of the specified algorithm is an algorithm container in the development and testing environment, and one algorithm container is used to execute one specified algorithm; The data matching module is used to match the first newly added field and the second newly added field of the test data to obtain a matching result, and generate a test result of the specified algorithm according to the matching result.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the configuration method of the algorithm test in any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the configuration method of the algorithm test in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Test method and device, electronic equipment and storage medium
CN111427791A
Target variable distribution-based acceptance of machine learning test data sets
US10726356B1
