Performance testing method, device, equipment and storage medium based on intent recognition

Through the performance testing method based on intent recognition, the test framework is used to conduct intent testing and performance testing, which solves the problems of low efficiency and poor stability of traditional testing methods, and realizes the performance testing and intent recognition of the test framework while improving the stability of the test framework Sex and efficiency.

CN112579450BActive Publication Date: 2024-12-10CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011500602.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-18
Publication Date
2024-12-10
Estimated Expiration
2040-12-18

AI Technical Summary

Technical Problem

Traditional intent recognition testing methods are inefficient and cannot test intention recognition results during performance testing, and the assertion and calculation results of stress testing tool JMeter are unstable.

Method used

Provide a performance testing method based on intent identification. By obtaining and preprocessing the data to be tested, analyzing the configuration files to generate test request data and stress testing configurations, using the testing framework for intent testing and performance testing, covering the automatic generation and testing of test data. A complete link to scenario construction, intent testing and performance testing, and improves the stability of the test framework when asserting and computing.

Benefits of technology

It realizes testing the performance of the test framework while intent testing, improves the pressure measurement stability when asserting testing and calculating the performance of the test framework, and improves the testing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112579450B_ABST
    Figure CN112579450B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of cloud technology, and discloses a performance testing method, device, equipment and storage medium based on intent recognition, which are used to perform performance testing of a test framework while performing intent testing, and are also used to improve the stability of stress testing when asserting the performance of a test framework and calculating the performance of a test framework. The performance testing method based on intent recognition includes: obtaining data to be tested, preprocessing the data to be tested, and obtaining a plurality of processed data to be tested; parsing based on the plurality of processed data to be tested and preset configuration files to obtain a plurality of test request data and a plurality of stress testing configurations; performing intent testing on the plurality of test request data through a test framework to obtain a plurality of intent test data; performing performance testing on the test framework based on the plurality of stress testing configurations, the plurality of test request data and the plurality of intent test data to obtain a test result. In addition, the present invention also relates to blockchain technology, and the plurality of intent test data can be stored in the blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud testing technology, and in particular to a performance testing method, device, equipment and storage medium based on intent recognition. Background Art

[0002] With the development of artificial intelligence technology, all walks of life have applied artificial intelligence technology to various scenarios, such as customer service robots, outbound call robots, assistant robots, etc. For natural language processing human-computer interaction robots, improving the accuracy and performance of artificial intelligence robot intention recognition is the key to improving user experience, and testing for intention recognition is also one of the core tests of this type of product.

[0003] Traditional intent recognition testing methods mainly include manual functional testing and JMeter performance testing. JMeter is a stress testing tool. Manual functional testing is inefficient and has testing blind spots. The stress testing tool JMeter itself is mainly used for performance testing. It cannot test intent recognition results while performing performance testing, and the stress testing is unstable when asserting and calculating results. Summary of the invention

[0004] The present invention provides a performance testing method, device, equipment and storage medium based on intent recognition, which realizes the performance testing of the test framework while performing the intent testing, and improves the stability of the stress testing when asserting the performance of the test framework and calculating the performance of the test framework.

[0005] A first aspect of the present invention provides a performance testing method based on intent recognition, including: obtaining data to be tested, preprocessing the data to be tested, and obtaining multiple processed data to be tested; parsing based on the multiple processed data to be tested and a preset configuration file to obtain multiple test request data and multiple stress testing configurations; performing intent testing on the multiple test request data through a preset test framework to obtain multiple intent test data; performing performance testing on the test framework based on the multiple stress testing configurations, the multiple test request data, and the multiple intent test data to obtain test results.

[0006] Optionally, in a first implementation method of the first aspect of the present invention, the acquiring of the data to be tested, preprocessing the data to be tested, and obtaining a plurality of processed data to be tested include: acquiring the data to be tested, performing array anti-overflow processing on the data to be tested, and obtaining anti-overflow test data; using a preset cutting function to cut the anti-overflow test data into a plurality of small sample data, and obtaining a plurality of processed data to be tested.

[0007] Optionally, in a second implementation method of the first aspect of the present invention, the parsing based on the multiple processed data to be tested and the preset configuration files to obtain multiple test request data and multiple stress testing configurations includes: parsing each of the processed data to be tested, generating test request data corresponding to each processed data to be tested, and obtaining multiple test request data; performing interface parsing in combination with each test request data and the preset configuration file, generating a request interface corresponding to each test request data, and obtaining multiple request interfaces; extracting the stress testing configuration corresponding to each request interface, and obtaining multiple stress testing configurations.

[0008] Optionally, in a third implementation method of the first aspect of the present invention, the performance test of the test framework is performed based on the multiple stress testing configurations, the multiple test request data and the multiple intention test data to obtain the test results, including: reading the corresponding duration parameter and the corresponding throughput parameter from each stress testing configuration, and creating the corresponding concurrent thread object and the corresponding data request object with reference to the duration parameter and the throughput parameter of each stress testing configuration; testing the multiple test request data according to the multiple intention test data, the multiple concurrent thread objects and the multiple data request objects to obtain multiple test data, each test data including at least accuracy data, success rate data and a time type data; asserting and calculating the performance of the test framework according to the multiple test data to obtain the test results.

[0009] Optionally, in a fourth implementation manner of the first aspect of the present invention, the reading of the corresponding duration parameter and the corresponding throughput parameter from each stress testing configuration, and creating the corresponding concurrent thread object and the corresponding data request object with reference to the duration parameter and the throughput parameter of each stress testing configuration respectively includes: reading the corresponding duration parameter and the corresponding throughput parameter from each stress testing configuration, creating the corresponding concurrent thread object with reference to the duration parameter and the throughput parameter of each stress testing configuration, and obtaining multiple concurrent thread objects; creating the corresponding data request object through the corresponding concurrent thread object with reference to the duration parameter and the throughput parameter of each stress testing configuration, and obtaining multiple data request objects.

[0010] Optionally, in a fifth implementation manner of the first aspect of the present invention, the multiple test request data are tested according to the multiple intention test data, the multiple concurrent thread objects and the multiple data request objects to obtain multiple test data, each test data includes at least accuracy data, success rate data and a moment type data including: obtaining sample data corresponding to the target test request data from the corresponding request interface through each data request object, the sample data being data stored in the memory in advance; calculating the accuracy and success rate of the target sample data and the corresponding target intention test data through each concurrent thread object, generating corresponding accuracy data and success rate data, and obtaining multiple accuracy data and multiple success rate data, the target intention test data and the target test request data correspond to each other; counting the moment type data of each test request data through each concurrent thread object to obtain multiple moment type data, the multiple accuracy data, the multiple success rate data and the multiple moment type data constitute multiple test data.

[0011] Optionally, in a sixth implementation of the first aspect of the present invention, after performing performance testing on the test framework based on the multiple stress testing configurations, the multiple test request data and the multiple intent test data to obtain test results, the performance testing method based on intent recognition also includes: transmitting the test results to a preset target terminal.

[0012] The second aspect of the present invention provides a performance testing device based on intent recognition, including: a preprocessing module, used to obtain data to be tested, preprocess the data to be tested, and obtain multiple processed data to be tested; a parsing module, used to parse based on the multiple processed data to be tested and a preset configuration file, to obtain multiple test request data and multiple stress testing configurations; an intent testing module, used to perform intent testing on the multiple test request data through a preset test framework, to obtain multiple intent test data; a performance testing module, used to perform performance testing on the test framework based on the multiple stress testing configurations, the multiple test request data and the multiple intent test data, to obtain test results.

[0013] Optionally, in a first implementation method of the second aspect of the present invention, the preprocessing module is specifically used to: obtain the data to be tested, perform array anti-overflow processing on the data to be tested, and obtain anti-overflow test data; use a preset cutting function to cut the anti-overflow test data into multiple small sample data to obtain multiple processed data to be tested.

[0014] Optionally, in a second implementation method of the second aspect of the present invention, the parsing module is specifically used to: parse each processed data to be tested, generate test request data corresponding to each processed data to be tested, and obtain multiple test request data; perform interface parsing in combination with each test request data and a preset configuration file, generate a request interface corresponding to each test request data, and obtain multiple request interfaces; extract the stress testing configuration corresponding to each request interface, and obtain multiple stress testing configurations.

[0015] Optionally, in a third implementation method of the second aspect of the present invention, the performance testing module includes: a creation unit, used to read the corresponding duration parameter and the corresponding throughput parameter from each stress testing configuration, and create the corresponding concurrent thread object and the corresponding data request object respectively with reference to the duration parameter and the throughput parameter of each stress testing configuration; a testing unit, used to test the multiple test request data according to the multiple intention test data, the multiple concurrent thread objects and the multiple data request objects to obtain multiple test data, each test data includes at least accuracy data, success rate data and a time class data; an assertion and calculation unit, used to assert and calculate the performance of the test framework according to the multiple test data to obtain a test result.

[0016] Optionally, in a fourth implementation method of the second aspect of the present invention, the creation unit is specifically used to: read the corresponding duration parameter and the corresponding throughput parameter from each stress testing configuration, create a corresponding concurrent thread object with reference to the duration parameter and throughput parameter of each stress testing configuration, and obtain multiple concurrent thread objects; create a corresponding data request object through the corresponding concurrent thread object with reference to the duration parameter and throughput parameter of each stress testing configuration, and obtain multiple data request objects.

[0017] Optionally, in a fifth implementation manner of the second aspect of the present invention, the test unit is specifically used to: obtain sample data corresponding to the target test request data from the corresponding request interface through each data request object, the sample data being data stored in the memory in advance; calculate the accuracy and success rate of the target sample data and the corresponding target intention test data through each concurrent thread object, generate corresponding accuracy data and success rate data, and obtain multiple accuracy data and multiple success rate data, and the target intention test data corresponds to the target test request data; count the moment class data of each test request data through each concurrent thread object to obtain multiple moment class data, and the multiple accuracy data, the multiple success rate data and the multiple moment class data constitute multiple test data.

[0018] Optionally, in a fifth implementation of the second aspect of the present invention, the performance test based on intent recognition includes: a transmission module, used to transmit the test result to a preset target terminal.

[0019] The third aspect of the present invention provides a performance testing device based on intent recognition, comprising: a memory and at least one processor, the memory storing instructions, the memory and the at least one processor being interconnected through lines; the at least one processor calling the instructions in the memory so that the performance testing device based on intent recognition executes the above-mentioned performance testing method based on intent recognition.

[0020] A fourth aspect of the present invention provides a computer-readable storage medium, in which instructions are stored, which, when executed on a computer, enable the computer to execute the above-mentioned performance testing method based on intent recognition.

[0021] In the technical solution provided by the present invention, the data to be tested is obtained, and the data to be tested is preprocessed to obtain a plurality of processed data to be tested; the data to be tested is parsed based on the plurality of processed data to be tested and a preset configuration file to obtain a plurality of test request data and a plurality of stress test configurations; the plurality of test request data is subjected to an intent test through a preset test framework to obtain a plurality of intent test data; the test framework is performance tested based on the plurality of stress test configurations, the plurality of test request data and the plurality of intent test data to obtain a test result. In an embodiment of the present invention, the data to be tested is processed into a plurality of test request data, and then the configuration file is parsed into a plurality of stress test configurations, and the test request data is subjected to an intent test and a performance test at the same time. This process covers the complete coverage link of test data automatic generation, test scenario construction, intent test and performance test, and realizes the performance test of the test framework at the same time as the intent test; and when the test framework is subjected to a performance test, the performance test is performed based on the stress test configuration, which improves the stability of the stress test when asserting the performance of the test framework and calculating the performance of the test framework. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A schematic diagram of an embodiment of a performance testing method based on intent recognition in an embodiment of the present invention;

[0023] Figure 2 A schematic diagram of another embodiment of a performance testing method based on intent recognition in an embodiment of the present invention;

[0024] Figure 3 A schematic diagram of an embodiment of a performance testing device based on intent recognition in an embodiment of the present invention;

[0025] Figure 4It is a schematic diagram of another embodiment of a performance testing device based on intent recognition in an embodiment of the present invention;

[0026] Figure 5 A schematic diagram of an embodiment of a performance testing device based on intent recognition in an embodiment of the present invention;

[0027] Figure 6 Schematic diagram of the architecture of the test framework in an embodiment of the present invention. DETAILED DESCRIPTION

[0028] Embodiments of the present invention provide a performance testing method, apparatus, device and storage medium based on intent recognition, which are used to perform performance testing of a test framework while performing intent testing, and are also used to improve the stability of stress testing when asserting the performance of a test framework and calculating the performance of a test framework.

[0029] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of a performance testing method based on intent recognition in an embodiment of the present invention includes:

[0031] 101. Acquire data to be tested, and pre-process the data to be tested to obtain a plurality of processed data to be tested;

[0032] The server obtains the data to be tested, and then pre-processes the data to be tested to obtain a plurality of processed data to be tested.

[0033] For example, the test data obtained from multiple terminals are "Are you Mr. Zhang? Do you have time to answer the phone? Are you satisfied with the service? Do you need to consult other matters?", etc. The server processes "Are you Mr. Zhang? Do you have time to answer the phone? Are you satisfied with the service? Do you need to consult other matters?" into corresponding multiple processed test data.

[0034] It should be noted that the data to be tested is the conversation data of the artificial intelligence robot, which is a large sample data. Large sample data usually has the problem of data overflow. In order to prevent this problem, before performing intent testing and performance testing based on the data to be tested, the server needs to perform anti-overflow processing on the data to be tested to obtain multiple processed data to be tested.

[0035] It is understandable that the execution subject of the present invention may be a module deployment device based on configuration requirements, or may be a terminal or a server, which is not specifically limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.

[0036] 102. Perform parsing based on a plurality of processed test data and a preset configuration file to obtain a plurality of test request data and a plurality of stress test configurations;

[0037] The server parses the performance test data to obtain a plurality of test request data, and then parses the data based on a preset configuration file to obtain a plurality of stress test configurations including at least a duration parameter and a throughput parameter.

[0038] The server parses multiple processed test data. Assume that the processed test data are "Are you Mr. Zhang?", "Do you have time to answer the phone?", "Are you satisfied with the service?" and "Need to consult other matters." The server parses the processed performance data "Are you Mr. Zhang?" and generates the test request data of "Are you Mr. Zhang?"; the server parses the processed performance data "Do you have time to answer the phone?" and generates the test request data of "Do you have time?"; the server parses the processed performance data "Are you satisfied with the service?" and generates the test request data of "Are you satisfied with the service?"; the server parses the processed performance data "Need to consult other matters?" and generates the test request data of "Consult other matters." And extract these test request data into the preset memory space. Then the server parses based on multiple test request data and corresponding configuration files to obtain multiple stress test configurations. The time parameter can be understood as the duration threshold, for example, 5s, that is, the running time of the server executing the task cannot exceed 5s; the throughput parameter can be understood as the throughput threshold, for example, 50, the total number of tasks that the server can run cannot exceed 50.

[0039] 103. Performing intent testing on multiple test request data through a preset test framework to obtain multiple intent test data;

[0040] The server obtains the data to be tested including multiple test requests, and performs an intent test on the data to be tested through a preset test framework to obtain the intent test data.

[0041] The server performs intent testing on multiple test request data through a preset test framework. Intent testing is also called functional testing. The specific contents of intent testing are as follows: the rule engine function is used to determine whether the test request data has corresponding engine rules. If so, the intent test is performed on the test request data based on the corresponding engine rules to obtain intent test data; if the rule engine function determines that the data to be tested does not have corresponding engine rules, the similarity between the data to be tested and the preset intent data is calculated based on the matching model to obtain recognition similarity, and the intent data with similarity greater than the similarity threshold is determined as intent test data. When the preset engine rules are used to identify the intent of the data to be tested, the accuracy of the server intent test is higher and the response time is shorter; when the matching model is used to identify the intent of the data to be tested, the accuracy of the server intent test is lower than that of the engine rule test and the response time is longer.

[0042] For example, assuming that the test request data is "Excuse me, are you Mr. Zhang?", the server performs an intent test on the test request data and obtains the intent test data as "confirm identity".

[0043] 104. Perform performance testing on the test framework based on multiple stress testing configurations, multiple test request data, and multiple intent test data to obtain test results.

[0044] The server creates a test object for performance testing based on each stress testing configuration, and uses the test object to perform performance testing on the test framework for each test request data and the corresponding intent test data to obtain the test results.

[0045] It should be noted that performance testing can be understood as simulating a large number of virtual users to generate load to the server under certain software, hardware and network environments, so that the resources of the test framework are under extreme conditions and run continuously for a long time to test whether the test framework can work stably under high load conditions. The objectives and scenarios of performance testing are mainly determined based on information such as the number of users, call volume and data volume of the production environment. In this embodiment, the performance test of the test framework obtains test data including at least request time, response time, response success rate, response accuracy and throughput. Through these performance test indicators, the test results are statistically obtained, and developers can determine sample branches and locate problems through the logs corresponding to the test results, which is convenient for R&D personnel to comprehensively evaluate the performance of the test framework in a more comprehensive manner.

[0046] For example, a short response time, a high response success rate, a high response accuracy rate, and a large throughput rate indicate that the test performance of the test framework is good, whereas a short response time indicates that the test performance of the test framework is poor. The test performance of the test framework is good and the test performance of the test framework is poor are test results. In more embodiments, the test results may also include the test framework having good accuracy performance, the test framework having poor response performance, the test framework having good throughput performance, and the like.

[0047] In an embodiment of the present invention, the data to be tested is processed into multiple test request data, and then the configuration file is parsed into multiple stress testing configurations, and the test request data is subjected to intent testing and performance testing at the same time. This process covers the complete coverage link of automatic generation of test data, construction of test scenarios, intent testing and performance testing, and realizes performance testing of the test framework at the same time as the intent testing; and when the performance testing of the test framework is performed, the performance testing is performed based on the stress testing configuration, which improves the stability of the stress testing when asserting the performance of the test framework and calculating the performance of the test framework.

[0048] See also Figure 2 Another embodiment of the performance testing method based on intent recognition in the embodiment of the present invention includes:

[0049] 201. Acquire the data to be tested, perform array overflow prevention processing on the data to be tested, and obtain overflow prevention test data;

[0050] The server obtains the data to be tested, and then processes the data to be tested into anti-overflow test data.

[0051] Array overflow can be understood as array out of bounds. Assuming that the array has only ten elements from 0 to 9, and the elements in the array are eleven from 0 to 10, array out of bounds will occur and the compiler will report an error. Therefore, the server needs to perform anti-overflow processing on the test data. In this embodiment, the specific function of array anti-overflow processing is as follows:

[0052] xlfile, input_num

[0053] _init_()

[0054] Run()

[0055] The overflow prevention test data obtained after array overflow prevention processing will no longer have the problem of array out of bounds.

[0056] 202. Using a preset cutting function to cut the anti-overflow test data into a plurality of small sample data, to obtain a plurality of processed data to be tested;

[0057] The server uses a preset cutting function to cut the anti-overflow test data to obtain a plurality of processed test data.

[0058] For example, the anti-overflow test data is "Excuse me, are you Mr. Zhang? Do you have time to answer the phone? Are you satisfied with the service? Do you need to consult other matters?" The server uses a preset cutting function to process the above anti-overflow test data into processed test data 1 of "Excuse me, are you Mr. Zhang?", processed test data 2 of "Do you have time to answer the phone?", processed test data 3 of "Are you satisfied with the service?" and processed test data 4 of "Need to consult other matters."

[0059] 203. Performing analysis based on the processed data to be tested and the preset configuration files to obtain multiple test request data and multiple stress testing configurations;

[0060] The server parses the performance test data to obtain multiple test request data, and then parses them based on the preset configuration files to obtain multiple stress test configurations.

[0061] Specifically, the server parses each processed data to be tested, generates test request data corresponding to each processed data to be tested, and obtains multiple test request data, where the test request data can be each question text in the intelligent dialogue text; then the server performs interface parsing in combination with each test request data and the corresponding preset configuration file, generates a request interface corresponding to each test request, and obtains multiple request interfaces; finally, the server extracts the stress testing configuration corresponding to each request interface, and obtains multiple stress testing configurations.

[0062] When the server parses the configuration file, the function used is as follows:

[0063] base,conf

[0064] _int_()

[0065] getInterfaceByName()

[0066] For example, based on the test request data "Is it Mr. Zhang?", the server parses the configuration file to obtain the request interface A1 corresponding to "Is it Mr. Zhang?", and then the server parses the configuration file to obtain multiple request interfaces such as A2, A3, A4, and A5 based on other test request data. Finally, the server obtains the corresponding stress test configuration B1 based on the request interface A1, and then obtains the corresponding stress test configurations B2, B3, B4, and B5 based on other request interfaces A2, A3, A4, and A5.

[0067] It should be noted that the preset configuration file at least includes request processing method parameters, request address parameters, concurrency parameters, sample parameters, assembly time parameters, request interface parameters, etc. The preset configuration file can parse different target request interfaces, and can also process different request methods, different request addresses, different concurrency numbers, different sample numbers, and different assembly times through the configuration file, so as to support fast access of various interfaces. While providing public toolkits such as test data reading, test result saving, thread management, hypertext transfer protocol (HTTP) request sending, HTTP return result assertion and analysis, accuracy and performance index calculation, it also provides an interface parent class. Each access interface only needs to inherit the parent class and customize the parameters of the interface.

[0068] 204. Performing an intent test on the multiple test request data through a preset test framework to obtain multiple intent test data;

[0069] The server obtains data to be tested including multiple test requests, and performs intent testing on the data to be tested through a test framework to obtain intent test data.

[0070] It should be noted that when generating intent test data, a status code is also generated. The status code can be 200, HTTP-404, HTTP-500, etc.

[0071] 205. Perform performance testing on the test framework based on multiple stress testing configurations, multiple test request data, and multiple intent test data to obtain test results.

[0072] The server creates a test object for performance testing based on each stress testing configuration, and uses the test object to perform performance testing on the test framework for each test request data and the corresponding intent test data to obtain the test results.

[0073] It should be noted that performance testing can be understood as simulating a large number of virtual users to generate load to the server under certain software, hardware and network environments, so that the resources of the test framework are under extreme conditions and run continuously for a long time to test whether the test framework can work stably under high load conditions. The objectives and scenarios of performance testing are mainly determined based on information such as the number of users, call volume and data volume of the production environment. In this embodiment, the performance test of the test framework obtains test data, and the test data at least includes request time, response time, response success rate, response accuracy and throughput. Through these performance test indicators, the test results are statistically obtained, and developers can determine sample branches and locate problems through the logs corresponding to the test results, which is convenient for R&D personnel to comprehensively evaluate the performance of the test framework in a more comprehensive manner.

[0074] For example, a short response time, a high response success rate, a high response accuracy rate, and a large throughput rate indicate that the test performance of the test framework is good, whereas a short response time indicates that the test performance of the test framework is poor. The test performance of the test framework is good and the test performance of the test framework is poor are test results. In more embodiments, the test results may also include the test framework having good accuracy performance, the test framework having poor response performance, the test framework having good throughput performance, and the like.

[0075] Specifically, the corresponding duration parameter and the corresponding throughput parameter are read from each stress testing configuration, and the corresponding concurrent thread object is created with reference to the duration parameter and the throughput parameter of each stress testing configuration to obtain multiple concurrent thread objects; the corresponding data request object is created through the corresponding concurrent thread object with reference to the duration parameter and the throughput parameter of each stress testing configuration to obtain multiple data request objects.

[0076] First, the server creates a corresponding concurrent thread object (Concurrencythread object) and a corresponding data request object (Httpcaller object) according to each stress test configuration. Since there are multiple stress test configurations, the server obtains multiple concurrent thread objects (Concurrencythread objects) and multiple data request objects (Httpcaller objects); assuming that the concurrent thread object corresponding to the stress test configuration C1 is the Concurrencythread object C2, and the corresponding data request object is the Httpcaller object C3, then the server uses the Concurrencythread object C2 and the Httpcaller object C3 to perform performance testing on the test request data corresponding to the stress test configuration and the corresponding intent test data to obtain test data D4, and obtains other test data in the above manner, and finally asserts and calculates based on multiple test data to obtain test results. The process of asserting and calculating based on multiple test data is: calculate multiple test data of each type in the multiple test data to obtain multiple types of test values, and then assert the performance in combination with the threshold of each type of test value to obtain the test result. For example, if the success rate test value is higher than the success rate test value threshold, the accuracy test value is higher than the accuracy test value threshold, the time test value is lower than the time test value threshold, and the throughput test value is higher than the throughput test value threshold, the test result of the test box is asserted, and the test result at this time is good test performance.

[0077] In one embodiment, the server creates a corresponding concurrent thread object and a corresponding data request object based on each stress test configuration, and the specific process of obtaining multiple concurrent thread objects and multiple data request objects is as follows:

[0078] The server creates a thread object corresponding to each stress test configuration, generates a concurrent thread object, and obtains multiple concurrent thread objects; the server creates a corresponding data request object through each concurrent thread object, and obtains multiple data request objects.

[0079] The server creates a concurrent thread object corresponding to the stress test configuration C1 and generates a Concurrencythread object C2; then the server creates a corresponding data request object through the Concurrencythread object C2 and generates an Httpcaller object C3. According to the above method, the server can create Concurrencythread objects D2 and Httpcaller objects D3 based on the stress test configuration D1; the server can create Concurrencythread objects E2 and Httpcaller objects E3 based on the stress test configuration E1.

[0080] In another embodiment, the server tests multiple test request data according to multiple intention test data, multiple concurrent thread objects and multiple data request objects, and the specific process of obtaining multiple test data is as follows;

[0081] The server obtains sample data corresponding to the target test request data from the corresponding request interface through each data request object. The sample data is data stored in memory in advance; for example, the sample data corresponding to the target test request data "Excuse me, are you Mr. Zhang?" is "Confirm identity". The server calculates the accuracy data and success rate data of the target sample data and the corresponding target intent test data through each concurrent thread object, and obtains multiple accuracy data and multiple success rate data; the server counts the moment data of each test request data through each concurrent thread object, and obtains multiple moment data. The moment data may include request time and response time. When a problem occurs in the test, the corresponding log is quickly located through the request time and response time, and the staff conducts problem troubleshooting on the log. In addition, the response time is also one of the indicators for evaluating performance testing. The shorter the response time, the better the test performance. The server integrates multiple accuracy data, multiple success rate data, and multiple moment data to obtain multiple test data. Each test data includes at least accuracy data, success rate data, and one moment data.

[0082] Specifically,

[0083] Accuracy test data = the ratio of the intended test data to the sample data;

[0084] Success rate test data = the proportion of return status code 200 during intent testing.

[0085] It should be noted that, for the status code, please refer to the description of 204. The throughput data is the statistical throughput data, and the time data is the average value of the statistical response time. When the accuracy test data is higher than the accuracy threshold, the success rate data is higher than the accuracy threshold, the throughput data is higher than the throughput threshold, and the time data is less than the response time threshold, the test result is obtained, and the test result asserted at this time is that the test performance of the test framework is good. In other embodiments, the test result can also be other, for example, the test performance of the test framework is not good.

[0086] In this embodiment, the time data can be understood as the response time when the target test request data is tested. In addition, in other embodiments, the test data can also include throughput data, and the throughput can be understood as the number of client requests processed by the server per unit time.

[0087] It should be noted that each test data includes at least accuracy data, success rate data and a time data. Then, the test results are sorted based on the test data. For example, when the accuracy and success rate are high and the time data is small, it means that the test performance is good, and a test result with high accuracy, high success rate and short response time is obtained. On the contrary, a test result with low accuracy, low success rate and long response time is obtained.

[0088] Performance testing methods based on intent recognition also include:

[0089] The server transmits the test results to a preset target terminal for data display.

[0090] In an embodiment of the present invention, the data to be tested is processed into multiple test request data, and then the configuration file is parsed into multiple stress testing configurations, and the test request data is subjected to intent testing and performance testing at the same time. This process covers the complete coverage link of automatic generation of test data, construction of test scenarios, intent testing and performance testing, and realizes performance testing of the test framework at the same time as the intent testing; and when the performance testing of the test framework is performed, the performance testing is performed based on the stress testing configuration, which improves the stability of the stress testing when asserting the performance of the test framework and calculating the performance of the test framework.

[0091] The above describes the performance testing method based on intent recognition in the embodiment of the present invention. The following describes the performance testing device based on intent recognition in the embodiment of the present invention. Figure 3 , an embodiment of a performance testing device based on intent recognition in an embodiment of the present invention includes:

[0092] The preprocessing module 301 is used to obtain the data to be tested, and preprocess the data to be tested to obtain a plurality of processed data to be tested;

[0093] The parsing module 302 is used to parse the processed test data and the preset configuration files to obtain multiple test request data and multiple stress testing configurations;

[0094] The intention testing module 303 is used to perform an intention test on the multiple test request data through a preset test framework to obtain multiple intention test data;

[0095] The performance testing module 304 is used to perform a performance test on the test framework based on the multiple stress testing configurations, the multiple test request data and the multiple intended test data to obtain a test result.

[0096] In an embodiment of the present invention, the data to be tested is processed into multiple test request data, and then the configuration file is parsed into multiple stress testing configurations, and the test request data is subjected to intent testing and performance testing at the same time. This process covers the complete coverage link of automatic generation of test data, construction of test scenarios, intent testing and performance testing, and realizes performance testing of the test framework at the same time as the intent testing; and when the performance testing of the test framework is performed, the performance testing is performed based on the stress testing configuration, which improves the stability of the stress testing when asserting the performance of the test framework and calculating the performance of the test framework.

[0097] See also Figure 4 Another embodiment of the performance testing device based on intent recognition in the embodiment of the present invention includes:

[0098] The preprocessing module 301 is used to obtain the data to be tested, and preprocess the data to be tested to obtain a plurality of processed data to be tested;

[0099] The parsing module 302 is used to parse the processed test data and the preset configuration files to obtain multiple test request data and multiple stress testing configurations;

[0100] The intention testing module 303 is used to perform an intention test on the multiple test request data through a preset test framework to obtain multiple intention test data;

[0101] The performance testing module 304 is used to perform a performance test on the test framework based on the multiple stress testing configurations, the multiple test request data and the multiple intended test data to obtain a test result.

[0102] Optionally, the preprocessing module 301 may also be specifically used for:

[0103] Acquire data to be tested, and perform array overflow prevention processing on the data to be tested to obtain overflow prevention test data;

[0104] The anti-overflow test data is cut into a plurality of small sample data using a preset cutting function to obtain a plurality of processed data to be tested.

[0105] Optionally, the parsing module 302 may also be specifically used for:

[0106] Parsing each processed data to be tested, generating test request data corresponding to each processed data to be tested, and obtaining a plurality of test request data;

[0107] Performing interface parsing in combination with each test request data and a preset configuration file, generating a request interface corresponding to each test request data, and obtaining multiple request interfaces;

[0108] Extract the stress testing configuration corresponding to each request interface to obtain multiple stress testing configurations.

[0109] Optionally, the performance testing module 304 includes:

[0110] The creation unit 3041 is used to read the corresponding duration parameter and the corresponding throughput parameter from each stress test configuration, and create the corresponding concurrent thread object and the corresponding data request object respectively with reference to the duration parameter and the throughput parameter of each stress test configuration;

[0111] The testing unit 3042 is used to test the multiple test request data according to the multiple intention test data, the multiple concurrent thread objects and the multiple data request objects to obtain multiple test data, each of which includes at least accuracy data, success rate data and a time type data;

[0112] The assertion and calculation unit 3043 is used to assert and calculate the performance of the test framework according to the multiple test data to obtain a test result.

[0113] Optionally, the creating unit 3041 may also be specifically configured to:

[0114] Read the corresponding duration parameter and the corresponding throughput parameter from each stress test configuration, create the corresponding concurrent thread object with reference to the duration parameter and the throughput parameter of each stress test configuration, and obtain multiple concurrent thread objects;

[0115] Refer to the duration parameters and throughput parameters of each stress test configuration, create corresponding data request objects through corresponding concurrent thread objects, and obtain multiple data request objects.

[0116] Optionally, the testing unit 3042 may also be specifically used for:

[0117] Obtain sample data corresponding to the target test request data from the corresponding request interface through each data request object, where the sample data is data stored in memory in advance;

[0118] Through each concurrent thread object, the accuracy and success rate of the target sample data and the corresponding target intent test data are calculated to generate corresponding accuracy data and success rate data, and a plurality of accuracy data and a plurality of success rate data are obtained, wherein the target intent test data and the target test request data correspond to each other;

[0119] By counting the time data of each test request data through each concurrent thread object, a plurality of time data are obtained, and the plurality of accuracy data, the plurality of success rate data and the plurality of time data constitute a plurality of test data.

[0120] Optionally, the performance testing device based on intent recognition also includes:

[0121] The transmission module 305 is used to transmit the test result to a preset target terminal.

[0122] In an embodiment of the present invention, the data to be tested is processed into multiple test request data, and then the configuration file is parsed into multiple stress testing configurations, and the test request data is subjected to intent testing and performance testing at the same time. This process covers the complete coverage link of automatic generation of test data, construction of test scenarios, intent testing and performance testing, and realizes performance testing of the test framework at the same time as the intent testing; and when the performance testing of the test framework is performed, the performance testing is performed based on the stress testing configuration, which improves the stability of the stress testing when asserting the performance of the test framework and calculating the performance of the test framework.

[0123] above Figure 3 and Figure 4 The performance testing device based on intent recognition in the embodiment of the present invention is described in detail from the perspective of modular functional entities, and the performance testing device based on intent recognition in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0124] Figure 5: is a structural schematic diagram of a performance test device based on intent recognition provided by an embodiment of the present invention. The performance test device 500 based on intent recognition may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 533 or data 532. Among them, the memory 520 and the storage medium 530 can be short-term storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the performance test device 500 based on intent recognition. Furthermore, the processor 510 can be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the performance test device 500 based on intent recognition.

[0125] The performance testing device 500 based on intent recognition may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 5 The structure of the intent recognition-based performance testing device shown does not constitute a limitation of the intent recognition-based performance testing device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0126] Please refer to Figure 6 , Figure 6 This is an architectural diagram of the test framework, in which the running entry includes the interface interpretation base class, the intent recognition interface test class, the online conflict analysis interface test class, and the global conflict analysis interface test class; the programming control includes the concurrent thread controller Concontroller, the thread logic definition Concurrencythread, and the interface request management Httpcaller; the data processing includes the large sample file preprocessing Tdhandler, the sample data parsing Testdatahandler, the configuration file parsing Confhandler, and the test result analysis processing and summary Resulthandler; the resources include configuration files, test sample files, temporary sample files, and test result files.

[0127] Furthermore, the computer-usable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0128] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the performance testing method based on intent recognition.

[0129] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0130] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0131] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0132] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A performance testing method based on intent recognition, characterized in that: The performance testing method based on intent recognition includes: Acquire data to be tested, and pre-process the data to be tested to obtain a plurality of processed data to be tested; Parse each processed data to be tested, generate test request data corresponding to each processed data to be tested, and obtain multiple test request data; perform interface parsing in combination with each test request data and a preset configuration file, generate a request interface corresponding to each test request data, and obtain multiple request interfaces; extract the stress test configuration corresponding to each request interface, and obtain multiple stress test configurations; Performing intent testing on the multiple test request data through a preset test framework to obtain multiple intent test data; Read the corresponding duration parameter and throughput parameter from each stress test configuration, and create the corresponding concurrent thread object and data request object respectively based on the duration parameter and throughput parameter of each stress test configuration; Read the corresponding duration parameter and the corresponding throughput parameter from each stress test configuration, create the corresponding concurrent thread object with reference to the duration parameter and the throughput parameter of each stress test configuration, and obtain multiple concurrent thread objects; Refer to the duration parameters and throughput parameters of each stress test configuration, create corresponding data request objects through corresponding concurrent thread objects, and obtain multiple data request objects; Testing multiple test request data according to the multiple intention test data, the multiple concurrent thread objects and the multiple data request objects to obtain multiple test data, each test data at least including accuracy data, success rate data and a time type data; The performance of the test framework is asserted and calculated according to the multiple test data to obtain a test result.

2. The performance testing method based on intent recognition according to claim 1 is characterized in that: The obtaining of the data to be tested and preprocessing the data to be tested to obtain a plurality of processed data to be tested comprises: Acquire data to be tested, and perform array overflow prevention processing on the data to be tested to obtain overflow prevention test data; The anti-overflow test data is cut into a plurality of small sample data using a preset cutting function to obtain a plurality of processed data to be tested.

3. The performance testing method based on intent recognition according to claim 1 is characterized in that: The multiple test request data are tested according to the multiple intention test data, the multiple concurrent thread objects and the multiple data request objects to obtain multiple test data, each test data at least including accuracy data, success rate data and a time type data including: Obtain sample data corresponding to the target test request data from the corresponding request interface through each data request object, where the sample data is data stored in memory in advance; Through each concurrent thread object, the accuracy and success rate of the target sample data and the corresponding target intent test data are calculated to generate corresponding accuracy data and success rate data, and a plurality of accuracy data and a plurality of success rate data are obtained, wherein the target intent test data and the target test request data correspond to each other; By counting the time data of each test request data through each concurrent thread object, a plurality of time data are obtained, and the plurality of accuracy data, the plurality of success rate data and the plurality of time data constitute a plurality of test data.

4. According to the performance testing method based on intent recognition in claim 1, after asserting and calculating the performance of the test framework according to the plurality of test data to obtain the test results, the performance testing method based on intent recognition further comprises: The test result is transmitted to a preset target terminal.

5. A performance testing device based on intent recognition, characterized in that: The performance testing device based on intention recognition comprises: A preprocessing module is used to obtain the data to be tested, preprocess the data to be tested, and obtain a plurality of processed data to be tested; The parsing module is used to parse each processed data to be tested, generate test request data corresponding to each processed data to be tested, and obtain multiple test request data; perform interface parsing in combination with each test request data and a preset configuration file, generate a request interface corresponding to each test request data, and obtain multiple request interfaces; extract the stress test configuration corresponding to each request interface, and obtain multiple stress test configurations; An intention testing module, used to perform an intention test on the multiple test request data through a preset test framework to obtain multiple intention test data; A performance testing module is used to read the corresponding duration parameter and the corresponding throughput parameter from each stress testing configuration, and create the corresponding concurrent thread object and the corresponding data request object respectively with reference to the duration parameter and throughput parameter of each stress testing configuration; read the corresponding duration parameter and the corresponding throughput parameter from each stress testing configuration, and create the corresponding concurrent thread object with reference to the duration parameter and throughput parameter of each stress testing configuration to obtain multiple concurrent thread objects; create the corresponding data request object through the corresponding concurrent thread object with reference to the duration parameter and throughput parameter of each stress testing configuration to obtain multiple data request objects; test the multiple test request data according to the multiple intention test data, the multiple concurrent thread objects and the multiple data request objects to obtain multiple test data, each test data at least including accuracy data, success rate data and a time type data; assert and calculate the performance of the test framework according to the multiple test data to obtain test results.

6. A performance testing device based on intent recognition, characterized in that: The performance testing device based on intent recognition comprises: a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instructions in the memory so that the intent recognition-based performance testing device executes the intent recognition-based performance testing method as described in any one of claims 1-4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the performance testing method based on intent recognition as described in any one of claims 1 to 4.