Fuzzy testing method and device based on text recognition

Through the fuzz testing method based on text recognition, the text recognition sub-network and the data generation sub-network are used to generate multiple rounds of test data, which solves the problems of insufficient mining depth and code coverage in the existing technology, and significantly improves the effectiveness of fuzz testing.

CN111858334BActive Publication Date: 2024-10-01BEIJING DINGNIU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010697813.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-20
Publication Date
2024-10-01
Estimated Expiration
2040-07-20

AI Technical Summary

Technical Problem

Existing fuzz testing technology has deficiencies in mining depth and code coverage, resulting in low effectiveness.

Method used

A fuzz testing method based on text recognition is used to generate multiple rounds of test data sets through the test data generation network. The text recognition sub-network and data generation sub-network are used to improve code coverage, and the final test results are determined when the preset coverage threshold is reached.

Benefits of technology

It improves the code coverage and mining depth of fuzz testing, enhances the effectiveness of testing, and can more comprehensively detect vulnerabilities in software or systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111858334B_ABST
    Figure CN111858334B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a fuzzy testing method and device based on text recognition, the method comprising: processing a text to be processed through a test data generation network to generate a first round of test data set for fuzzy testing of a tested object, the test data generation network comprising a text recognition subnetwork and a data generation subnetwork, and the tested object is an executable object corresponding to the text to be processed; performing multiple rounds of fuzzy testing on the tested object according to the first round of test data set and the test data generation network, obtaining intermediate test results of the multiple rounds of fuzzy testing, the intermediate test results comprising code coverage and the running status of the tested object; when the code coverage of the Nth round of fuzzy testing is greater than or equal to a preset coverage threshold, determining the intermediate test result of the Nth round of fuzzy testing as the final test result. The embodiments of the present disclosure can improve the code coverage and mining depth of fuzzy testing and enhance the effectiveness of fuzzy testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a fuzzy testing method and device based on text recognition. Background Art

[0002] Fuzz testing is a software testing technology. Its core idea is to input automatically or semi-automatically generated random data into the target system to find possible errors in the target system. Fuzz testing is usually used to detect security vulnerabilities in software or computer systems. Among the many software vulnerability mining methods, fuzz testing is a relatively mature one. However, fuzz testing generally has problems such as insufficient mining depth and low code coverage, which makes fuzz testing less effective. Summary of the invention

[0003] In view of this, the present disclosure proposes a fuzzy testing technical solution based on text recognition.

[0004] According to one aspect of the present disclosure, a fuzzy testing method based on text recognition is provided, the method comprising:

[0005] The text to be processed is processed by a test data generation network to generate a first round of test data set for fuzz testing of the object to be tested, wherein the test data generation network includes a text recognition subnetwork and a data generation subnetwork, and the object to be tested is an executable object corresponding to the text to be processed;

[0006] According to the first round of test data set and the test data generation network, multiple rounds of fuzz testing are performed on the object under test to obtain intermediate test results of the multiple rounds of fuzz testing, wherein the intermediate test results include code coverage and the running state of the object under test, and the running state includes a normal state and an abnormal state;

[0007] When the code coverage of the Nth round of fuzz testing is greater than or equal to a preset coverage threshold, the intermediate test result of the Nth round of fuzz testing is determined as the final test result, where N is an integer and N≥2.

[0008] In a possible implementation, performing multiple rounds of fuzz testing on the object under test according to the first round of test data set and the test data generation network to obtain intermediate test results of the multiple rounds of fuzz testing includes:

[0009] According to the first round of test data set, the first round of fuzzy testing is performed on the object under test to obtain an intermediate test result of the first round of fuzzy testing;

[0010] When the code coverage of the first round of fuzz testing is less than the coverage threshold, adjusting the network parameters of the test data generation network according to the first round of test data set and the running state of the object under test during the first round of fuzz testing to obtain the first round of adjusted test data generation network;

[0011] The text to be processed is processed through the test data generation network adjusted in the first round to generate a second round of test data set for fuzzy testing of the object under test.

[0012] In a possible implementation, performing multiple rounds of fuzz testing on the object under test according to the first round of test data set and the test data generation network to obtain intermediate test results of the multiple rounds of fuzz testing includes:

[0013] According to the i-th round of test data set, the i-th round of fuzzy testing is performed on the object under test to obtain the intermediate test result of the i-th round of fuzzy testing, where i is an integer and 1≤i <N;

[0014] When the code coverage of the i-th round of fuzz testing is less than the coverage threshold, adjusting the network parameters of the adjusted test data generation network of the i-1th round according to the i-th round of test data set and the running state of the object under test during the i-th round of fuzz testing to obtain the adjusted test data generation network of the i-th round;

[0015] The text to be processed is processed through the test data generation network after the i-th round of adjustment to generate the i+1-th round of test data set for fuzzy testing of the object under test.

[0016] In a possible implementation, the text to be processed is processed by the test data generation network adjusted in the i-th round to generate the i+1-th round test data set for fuzzy testing the object under test, including:

[0017] Through the text recognition sub-network adjusted in the i-th round, feature extraction is performed on the text to be processed to obtain feature information of multiple target objects in the text to be processed;

[0018] According to the feature information of the multiple target objects, the i+1th round of test data set for fuzzy testing of the tested object is generated through the i-th round adjusted data generation sub-network.

[0019] In a possible implementation, generating the (i+1)th round of test data set for fuzzy testing the tested object through the adjusted data generation subnetwork according to the feature information of the multiple target objects includes:

[0020] For any target object, based on the feature information of the target object and the preset data feature set, the i+1th round of test data corresponding to the target object is generated through the i-th round of adjusted data generation subnetwork.

[0021] The data feature set includes a plurality of preset data types and feature information corresponding to each data type.

[0022] In a possible implementation, the method further includes:

[0023] In the final test result, when the running state of the tested object is an abnormal state, the error information in the text to be processed and the test data corresponding to the abnormal state are determined.

[0024] In a possible implementation, the text to be processed includes text consisting of source code, the target object includes a function, the characteristic information includes a function identifier, the number of input parameters of the function and the data type of each input parameter, and the object to be tested includes an executable object generated after compiling the source code.

[0025] According to another aspect of the present disclosure, a fuzzy testing device based on text recognition is provided, the device comprising:

[0026] A test data generation module, used to process the text to be processed through a test data generation network to generate a first round of test data set for fuzzy testing of the object to be tested, wherein the test data generation network includes a text recognition subnetwork and a data generation subnetwork, and the object to be tested is an executable object corresponding to the text to be processed;

[0027] A test execution module, configured to perform multiple rounds of fuzz testing on the object under test according to the first round of test data set and the test data generation network, and obtain intermediate test results of the multiple rounds of fuzz testing, wherein the intermediate test results include code coverage and the running state of the object under test, and the running state includes a normal state and an abnormal state;

[0028] The test result determination module is used to determine the intermediate test result of the Nth round of fuzz testing as the final test result when the code coverage of the Nth round of fuzz testing is greater than or equal to a preset coverage threshold, where N is an integer and N≥2.

[0029] In a possible implementation manner, the device further includes:

[0030] The error information determination module is used to determine the error information in the text to be processed and the test data corresponding to the abnormal state when the running state of the tested object is abnormal in the final test result.

[0031] According to another aspect of the present disclosure, a fuzzy testing device based on text recognition is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the above method.

[0032] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.

[0033] According to an embodiment of the present disclosure, the text to be processed can be processed through a test data generation network to generate a first round of test data set for fuzz testing the object to be tested (corresponding to the text to be processed), and then multiple rounds of fuzz testing are performed on the object to be tested based on the first round of test data set and the test data generation network to obtain intermediate test results of the multiple rounds of fuzz testing, and when the code coverage of the Nth round of fuzz testing is greater than or equal to a preset coverage threshold, the intermediate test result of the Nth round of fuzz testing is determined as the final test result, so that during fuzz testing, a test data set can be generated through a test data generation network including a text recognition subnetwork and a data generation subnetwork, thereby improving the coverage of the test data set, and through multiple rounds of fuzz testing, the code coverage and mining depth of the fuzz test can be improved, thereby improving the efficiency of the fuzz test and enhancing the effectiveness of the fuzz test.

[0034] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.

[0036] Figure 1 A flowchart of a fuzzy testing method based on text recognition according to an embodiment of the present disclosure is shown.

[0037] Figure 2 A schematic diagram showing an input representation of a BERT model according to an embodiment of the present disclosure.

[0038] Figure 3 A schematic diagram showing the processing procedure of a fuzzy testing method based on text recognition according to an embodiment of the present disclosure.

[0039] Figure 4 A block diagram of a fuzzy testing device based on text recognition according to an embodiment of the present disclosure is shown.

[0040] Figure 5A block diagram of a fuzzy testing device based on text recognition according to an embodiment of the present disclosure is shown.

[0041] Figure 6 A block diagram of a fuzzy testing device based on text recognition according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0042] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0043] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0044] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

[0045] Fuzz testing (Fuzzing) described in the embodiments of the present disclosure is a method of discovering vulnerabilities in a target system by providing unexpected inputs to the target system and monitoring abnormal results. That is, during fuzz testing, unexpected inputs (such as random data) can be input into the target system to observe whether the target system is damaged, such as system crashes, memory leaks, assertion failures, etc., so as to discover possible errors in the target system.

[0046] The fuzzy testing method based on text recognition described in the embodiments of the present disclosure can be applied to a processor, which can be a general-purpose processor, such as a CPU (Central Processing Unit), or an artificial intelligence processor (IPU) for performing artificial intelligence operations, such as a GPU (Graphics Processing Unit), an NPU (Neural-Network Processing Unit), a DSP (Digital Signal Process), etc. The present disclosure does not limit the specific type of the processor.

[0047] Figure 1 A flowchart of a fuzzy testing method based on text recognition according to an embodiment of the present disclosure is shown. Figure 1 As shown, the method includes:

[0048] Step S11, processing the text to be processed through a test data generation network to generate a first round of test data set for fuzzy testing of the object to be tested, wherein the test data generation network includes a text recognition subnetwork and a data generation subnetwork, and the object to be tested is an executable object corresponding to the text to be processed;

[0049] Step S12, performing multiple rounds of fuzz testing on the object under test according to the first round test data set and the test data generation network, and obtaining intermediate test results of the multiple rounds of fuzz testing, wherein the intermediate test results include code coverage and the running state of the object under test, and the running state includes a normal state and an abnormal state;

[0050] Step S13, when the code coverage of the Nth round of fuzz testing is greater than or equal to a preset coverage threshold, the intermediate test result of the Nth round of fuzz testing is determined as the final test result, where N is an integer and N≥2.

[0051] According to an embodiment of the present disclosure, the text to be processed can be processed through a test data generation network to generate a first round of test data set for fuzz testing the object to be tested (corresponding to the text to be processed), and then multiple rounds of fuzz testing are performed on the object to be tested based on the first round of test data set and the test data generation network to obtain intermediate test results of the multiple rounds of fuzz testing, and when the code coverage of the Nth round of fuzz testing is greater than or equal to a preset coverage threshold, the intermediate test result of the Nth round of fuzz testing is determined as the final test result, so that during fuzz testing, a test data set can be generated through a test data generation network including a text recognition subnetwork and a data generation subnetwork, thereby improving the coverage of the test data set, and through multiple rounds of fuzz testing, the code coverage and mining depth of the fuzz test can be improved, thereby improving the efficiency of the fuzz test and enhancing the effectiveness of the fuzz test.

[0052] In a possible implementation, the text to be processed may include text composed of source code. Source code refers to code written in assembly language or high-level language, wherein the high-level language may be, for example, C language, Java language, Hypertext Preprocessor (PHP for short, a general scripting language), etc. The source code may be stored as a text file. A collection of source codes of the object under test may be determined as the text to be processed. It should be understood that the present disclosure does not limit the specific programming language used in the source code.

[0053] In a possible implementation, the object to be tested is an executable object corresponding to the text to be processed, and may include an executable object generated by compiling source code in the text to be processed, such as an executable program.

[0054] In a possible implementation, the object to be tested may be system software, application software or other types of executable programs. The system software may include an operating system, a language compiler, a database management program, etc. The application software may include word processing software, media playback software, information management software, etc. The present disclosure does not limit the specific type of the object to be tested.

[0055] In one possible implementation, in step S11, the text to be processed can be processed through a test data generation network to generate a first round of test data set for fuzzy testing of the object to be tested. The test data generation network includes a text recognition subnetwork and a data generation subnetwork. The text recognition subnetwork is used to extract feature information of multiple target objects in the text to be processed.

[0056] In a possible implementation, the test data generation network may include a text recognition subnetwork and a data generation subnetwork, which are used to generate a test data set for fuzzy testing of the test object. The text recognition subnetwork can be used to extract feature information of multiple target objects in the text to be processed, and the data generation subnetwork can be used to generate a test data set for fuzzy testing of the test object based on the feature information of the multiple target objects.

[0057] In a possible implementation, the text recognition subnetwork may be a neural network capable of natural language processing (NLP), such as convolutional neural networks, recurrent neural networks, recursive neural networks, bidirectional encoder representation from transformers (BERT), etc. The present disclosure does not limit the specific type of the text recognition subnetwork.

[0058] In one possible implementation, the text to be processed can be input into a test data generation network for processing, and its text recognition subnetwork can perform feature extraction on the input text to be processed, and identify feature information of multiple target objects in the text to be processed, and its data generation subnetwork can generate the first round of test data set for fuzzy testing of the object to be tested based on the feature information of multiple target objects extracted by the text recognition subnetwork.

[0059] In a possible implementation, the target object may include a function, and the characteristic information of the target object may include a function identifier, the number of input parameters of the function, and the data type of each input parameter. The function is a computer function, which may be a specific program segment or code segment used to implement a specific function and may be called or referenced by other functions; the function identifier may be a function name, number, or other identifier that can uniquely identify the function.

[0060] For example, the target object is F(int a, float b), where F is the name of the function, which can be used as a function identifier, a and b are input parameters of function A, int (integer) is the data type of input parameter a, and float (floating point) is the data type of input parameter b. The characteristic information of the target object includes F (function identifier), 2 (the number of input parameters), and int and float (the data types of input parameters).

[0061] In a possible implementation, the data types of the input parameters may include multiple types, such as integer int, floating point float, character string, file, etc. The present disclosure does not limit the specific data types of the input parameters.

[0062] In a possible implementation, the test data set may include a plurality of test data, each test data corresponds to a target object, and each target object may correspond to at least one test data.

[0063] In a possible implementation, the data generation subnetwork may automatically generate a test data set randomly based on feature information of multiple target objects; or may automatically generate a test data set based on feature information of multiple target objects and preset rules.

[0064] Among them, the preset rules can be set according to actual conditions. For example, when generating test data, the boundary value of the data type of the input parameter can be considered, which may include test data that is less than the boundary value, equal to the boundary value, and greater than the boundary value; when generating test data, the case of data type mismatch can also be considered, that is, the case where the data type of the generated test data does not match the data type of the input parameter. Those skilled in the art can set preset rules according to actual conditions or existing experience, and the present disclosure does not limit this.

[0065] In one possible implementation, after determining the first round of test data set, in step S12, multiple rounds of fuzz testing can be performed on the object under test based on the first round of test data set and the test data generation network to obtain intermediate test results of the multiple rounds of fuzz testing, wherein the intermediate test results include code coverage and the operating status of the object under test, and the operating status includes a normal state and an abnormal state.

[0066] In one possible implementation, a first round of fuzzy testing can be performed on the object under test based on the first round of test data set to obtain an intermediate test result of the first round of fuzzy testing; then a second round of fuzzy testing can be performed on the object under test based on the intermediate test result of the first round of fuzzy testing and the test data generation network to obtain an intermediate test result of the second round of fuzzy testing; and so on and so forth, to obtain intermediate test results of multiple rounds of fuzzy testing.

[0067] In a possible implementation, the intermediate test results may include code coverage and the running status of the object under test. The code coverage may include statement coverage, path coverage, branch coverage, etc. Those skilled in the art may set specific code coverage according to actual conditions, and the present disclosure does not limit this.

[0068] In a possible implementation, the running state of the object under test corresponds to each test data one by one, which may include normal state and abnormal state. During the fuzzy test process, the test data can be input into the object under test respectively, and the running state of the object under test can be determined according to the system resources used by the object under test during operation (such as CPU usage, memory usage, etc.), the system call identifier of the object under test, the execution result of the object under test, and other information. In other words, the running state of the object under test can be monitored during its operation.

[0069] In a possible implementation, the normal state may include the ready state, execution state, and blocking state of the object under test. The abnormal state may include the crash of the object under test (i.e., abnormal exit of the object under test during operation), error in execution result, etc. A flag bit may be set for the operation state of the object under test, and different operation states correspond to different flag bits.

[0070] In a possible implementation, abnormal conditions may also include data access out of bounds (i.e., accessing an array beyond the maximum index of the array), memory leak, stack overflow, use of uninitialized variables, secondary release of memory, and continued use of memory after release.

[0071] There are many types of memory leaks, such as memory leaks caused by applying for memory but not releasing it, or after applying for memory space on the heap (for example, applying for memory through malloc or new), the return pointer of the applied memory is lost, resulting in the inability to release the applied memory, thus causing a memory leak;

[0072] A stack overflow can mean that the data stored in the stack exceeds the memory space of the stack. For example, if the memory space used by a local variable or parameter is larger than the memory space of the stack, storing the local variable or parameter in the stack will cause a stack overflow.

[0073] When a variable is used without initialization, it means that the variable is used directly without assigning an initial value to it. Different variables have different default initial values. For example, the initial value of global variables and static variables is 0, while the initial value of local variables and dynamically applied variables is a random value. If a variable with an initial value of a random number is used, it may cause an exception in the object under test.

[0074] Memory double release means that the same pointer is released twice, that is, after the memory on the heap is released, the pointer pointing to the memory is not cleared to zero, and the memory is released again in other places;

[0075] Use After Free (UAF) means that a piece of memory is used again after being released. The result of the second use is unpredictable and may cause the object under test to crash.

[0076] It should be understood that the abnormal state may also include other states, which can be set according to actual needs, and the present disclosure does not limit this.

[0077] In a possible implementation, during fuzz testing, after executing one test data, the next test data can be automatically executed until all test data in the test data set are executed. In other words, the fuzz test can be automatically executed. In this way, the execution efficiency of the fuzz test can be improved.

[0078] In a possible implementation, in step S13, when the code coverage of the Nth round of fuzz testing is greater than or equal to a preset coverage threshold, the intermediate test result of the Nth round of fuzz testing may be determined as the final test result, where N is an integer and N≥2.

[0079] That is to say, after obtaining the intermediate test results of each round of fuzz testing, we can first determine the relationship between the code coverage of this round of fuzz testing and the preset coverage threshold; when the code coverage of this round of fuzz testing is less than the coverage threshold, execute the next round of fuzz testing; when the code coverage is greater than or equal to the coverage threshold, end the fuzz testing and determine the intermediate test results of this round of fuzz testing as the final test results.

[0080] In a possible implementation, the method may further include: in the final test result, when the operating state of the tested object is an abnormal state, determining error information in the text to be processed and test data corresponding to the abnormal state.

[0081] That is to say, in the final test results, when the operating state of the object under test is abnormal, it can be considered that there are defects or loopholes in the object under test. In this case, the error information in the text to be processed and the test data corresponding to the abnormal state can be determined.

[0082] Among them, abnormal states may include crash of the tested object, data access out of bounds, memory leak, stack overflow, etc.; error information may include information such as the code line, variable, statement, etc. that triggers the defect or vulnerability, such as the line number of the code line, etc. Error information can help determine the specific location of the defect or vulnerability, so as to repair the defect or vulnerability.

[0083] In one possible implementation, the test data corresponding to the abnormal state can be used to perform regression testing after the defect or vulnerability is fixed.

[0084] In this embodiment, when the running state of the object under test is abnormal, the error information in the text to be processed and the test data corresponding to the abnormal state are determined, which can improve the efficiency of repairing defects or vulnerabilities and the efficiency of regression testing.

[0085] In one possible implementation, the text recognition subnetwork may include a bidirectional encoder representation model from transformers, i.e., a BERT model. The BERT model is a language representation model that can capture rich semantic information from input text.

[0086] Figure 2 A schematic diagram showing the input representation of the BERT model according to an embodiment of the present disclosure is shown. Figure 2 As shown in the figure, for the input text "my dog ​​is cute, he likes playing", the BERT model can represent the input through input embedding, which may include tag embedding, segment embedding and position embedding, and the corresponding input representation includes word vector, segment vector and position vector.

[0087] Among them, the token embedding is the information about the word in the BERT model. The input text can be represented as a word vector. For example, the dog in the input text is represented as the word vector E dog , the first token of the token embedding is the [CLS] symbol, which can be used for subsequent classification tasks, and its word vector is E [CLS] , the [SEP] symbol in the token embedding is the end symbol at the end of the sentence, and its word vector is E [SEP] ; Segment embedding can be used for prediction tasks with next sentences in the BERT model. The previous sentence and the next sentence can be concatenated. The previous sentence has the previous sentence segment vector, and the next sentence has the next sentence segment vector, such as Figure 2 In the above example, A is the previous sentence, and its segment vector is E A , B is the next sentence, and its segment vector is E B ; Position embedding is used to represent the position of each word vector, and the position vector is obtained, such as Figure 2 E0, E1, ..., E 10 .

[0088] By concatenating the above word vectors, segment vectors, and position vectors, we can get the input representation of the BERT model. By inputting the input representation into the BERT model for processing, we can get the recognition result of the input text.

[0089] In this embodiment, the text recognition subnetwork uses a transformer-based bidirectional encoder representation model, which can improve the accuracy of identifying the feature information of the target object, thereby improving the coverage of the test data set.

[0090] In a possible implementation, step S12 may include:

[0091] According to the first round of test data set, the first round of fuzzy testing is performed on the object under test to obtain an intermediate test result of the first round of fuzzy testing;

[0092] When the code coverage of the first round of fuzz testing is less than the coverage threshold, adjusting the network parameters of the test data generation network according to the first round of test data set and the running state of the object under test during the first round of fuzz testing to obtain the first round of adjusted test data generation network;

[0093] The text to be processed is processed through the test data generation network adjusted in the first round to generate a second round of test data set for fuzzy testing of the object under test.

[0094] In a possible implementation, a first round of fuzz testing may be performed on the object under test according to the first round of test data set to obtain an intermediate test result of the first round of fuzz testing; then, the relationship between the code coverage rate of the first round of fuzz testing and the coverage rate threshold may be determined;

[0095] When the code coverage of the first round of fuzz testing is less than the coverage threshold, the network parameters of the test data generation network can be adjusted according to the first round of test data set and the running state of the object under test during the first round of fuzz testing to obtain the first round of adjusted test data generation network.

[0096] For example, based on the first round of test data set and the running state of the object under test during the first round of fuzzy testing, the bidirectional joint distribution of multiple test data in the first round and the running state of the object under test can be determined, and based on the bidirectional joint distribution, the network parameters of the test data generation network (including the text recognition subnetwork and the data generation subnetwork) are adjusted to obtain the adjusted test data generation network for the first round.

[0097] Then, the test data generation network adjusted in the first round can be used to process the text to be processed, thereby generating a second round of test data set for fuzz testing of the object under test.

[0098] In a possible implementation, step S12 may include:

[0099] According to the i-th round of test data set, the i-th round of fuzzy testing is performed on the object under test to obtain the intermediate test result of the i-th round of fuzzy testing, where i is an integer and 1≤i <N;

[0100] When the code coverage of the i-th round of fuzz testing is less than the coverage threshold, adjusting the network parameters of the adjusted test data generation network of the i-1th round according to the i-th round of test data set and the running state of the object under test during the i-th round of fuzz testing to obtain the adjusted test data generation network of the i-th round;

[0101] The text to be processed is processed through the test data generation network after the i-th round of adjustment to generate the i+1-th round of test data set for fuzzy testing of the object under test.

[0102] In a possible implementation, the i-th round of fuzzy testing may be performed on the object under test according to the i-th round of test data set to obtain an intermediate test result of the i-th round of fuzzy testing; then, the relationship between the code coverage rate of the i-th round of fuzzy testing and the coverage rate threshold may be determined;

[0103] When the code coverage of the i-th round of fuzz testing is less than the coverage threshold, the network parameters of the adjusted test data generation network in the i-1th round can be adjusted according to the i-th round test data set and the running status of the object under test during the i-th round of fuzz testing to obtain the i-th round adjusted test data generation network.

[0104] For example, based on the i-th round test data set and the running state of the object under test during the i-th round fuzzy testing, the bidirectional joint distribution of multiple test data of the i-th round and the running state of the object under test can be determined, and based on the bidirectional joint distribution, the network parameters of the adjusted test data generation network of the i-1th round are adjusted to obtain the adjusted test data generation network of the i-th round.

[0105] Then, the test data generation network after the i-th round of adjustment can be used to process the text to be processed, and generate the i+1-th round of test data set for fuzzy testing of the object under test.

[0106] In this embodiment, when the code coverage of the i-th round of fuzz testing is less than the coverage threshold, the network parameters of the adjusted test data generation network of the i-1th round can be adjusted according to the i-th round test data set and the running state of the object under test during the i-th round of fuzz testing to obtain the i-th round adjusted test data generation network, and the i+1-th round test data set is generated through the i-th round adjusted test data generation network, so that the coverage of the test data set can be improved by continuously adjusting the test data generation network, thereby improving the code coverage of the fuzzy test.

[0107] In a possible implementation, the generating network of the adjusted test data for the i-th round processes the text to be processed to generate the i+1-th round of test data set for fuzzy testing the object under test, which may include:

[0108] Through the text recognition sub-network adjusted in the i-th round, feature extraction is performed on the text to be processed to obtain feature information of multiple target objects in the text to be processed;

[0109] According to the feature information of the multiple target objects, the i+1th round of test data set for fuzzy testing of the tested object is generated through the i-th round adjusted data generation sub-network.

[0110] In one possible implementation, when the text to be processed is processed by the test data generation network after the i-th round of adjustment, the text to be processed can be input into the test data generation network after the i-th round of adjustment, and the feature extraction of the text to be processed is performed through the text recognition sub-network after the i-th round of adjustment to obtain feature information of multiple target objects in the text to be processed, and then the feature information of the multiple target objects is input into the data generation sub-network after the i-th round of adjustment to generate the i+1th round of test data set for fuzzy testing of the object to be tested.

[0111] In a possible implementation, generating the (i+1)th round of test data set for fuzzy testing the tested object by using the adjusted data generation subnetwork according to the feature information of the multiple target objects may include:

[0112] For any target object, based on the feature information of the target object and a preset data feature set, the test data corresponding to the target object is generated through the data generation subnetwork after the i-th round of adjustment, wherein the data feature set includes multiple preset data types and feature information corresponding to each data type.

[0113] In a possible implementation, the preset data feature set can be determined in the following manner: First, the data input by the user can be obtained. For example, multiple public website source codes (such as code hosting platform GitHub, technical blogs, etc.) can be obtained through crawler technology, and their input interfaces can be analyzed to obtain the data input by the user. Among them, the input interface generally includes obvious identification information, for example: PHP methods for obtaining data include GET method and POST method; C language obtains user input strings through scanf and gets methods; Java Web obtains file upload content through file upload components such as common-fileupload, etc. In addition, the data input by the user can also be obtained through a graphical user interface (Graphical User Interface, referred to as GUI).

[0114] After obtaining the data input by the user, the data type and feature information of the data input by the user can be analyzed according to different programming languages ​​or user interaction interfaces. For example, when the data type of the data input by the user is a string, its feature information may include the length of the string, whether the string contains feature characters, etc.; when the data type of the data input by the user is a file, its feature information may include the file size, file type (such as text file, picture, audio, video, etc.), file format (such as TXT, DOC, JPEG, etc.), etc.

[0115] Then, the multiple data types obtained through analysis and the feature information corresponding to each data type can be determined as a data feature set.

[0116] In a possible implementation, the data feature set may also be determined by other methods, for example, extracted from historical test data, or determined by brainstorming, etc. The present disclosure does not limit the method for determining the data feature set.

[0117] In a possible implementation, for any target object, test data corresponding to the target object can be generated based on the feature information of the target object and a preset data feature set through the data generation subnetwork after the i-th round of adjustment, and the test data can be one or more.

[0118] When the target object is a function, at least one test data of the target object (i.e., function) can be randomly generated according to the number of its input parameters, the data types of each input parameter, and the feature information corresponding to the data types of each input parameter in the preset data feature set. The test data may include normal test data and abnormal test data. For example, when the data type of the input parameter is a file and the file is a picture, the test data may be randomly generated according to the feature information corresponding to the file, and may include normal pictures and deformed pictures.

[0119] In this embodiment, based on the feature information of the target object and the preset data feature set, the test data corresponding to the target object is generated through the data generation subnetwork after the i-th round of adjustment, so that the generated test data has diversity, thereby improving the effectiveness of the fuzzy test.

[0120] In a possible implementation, the method may further include: training the test data generation network according to a preset training set, wherein the training set includes multiple reference texts, feature information of multiple reference objects in each reference text, multiple reference executable objects and a reference coverage threshold.

[0121] During training, for any reference text in the training set, the reference text can be input into the test data generation network for processing, and the text recognition sub-network in the test data generation network can perform feature extraction on the input reference text to obtain feature information of multiple target objects in the reference text; then the feature information of multiple target objects in the reference text is input into the data generation sub-network to generate a reference test data set for fuzzy testing of the reference executable object corresponding to the reference text;

[0122] According to the reference test data set, fuzz testing is performed on the reference executable object to obtain a reference test result, which may include code coverage of the fuzz test and a running state of the reference executable object;

[0123] Then, the difference between the feature information of multiple target objects in the reference text and the feature information of multiple reference objects in the reference text in the training set is determined, and the network loss of the test data generation network is determined based on the difference, the reference test data set and the reference test results; based on the network loss, the network parameters of the test data generation network can be adjusted.

[0124] In a possible implementation, when the test data generation network meets the training end condition, the training can be ended to obtain the trained test data generation network, and the trained test data generation network is used to process the to-be-processed text.

[0125] The training end condition may include that the network loss of the test data generation network is reduced to a certain level or converges within a certain threshold, the training rounds reach a preset round, the code coverage in the reference test results is greater than or equal to the reference coverage threshold or other conditions. Those skilled in the art may set the training end condition according to actual conditions, and the present disclosure does not limit this.

[0126] In this embodiment, the test data generation is trained according to a preset training set, which can improve the accuracy of the test data generation network.

[0127] Figure 3 FIG. 1 is a schematic diagram showing the processing process of the fuzzy testing method based on text recognition according to an embodiment of the present disclosure. Figure 3 As shown, in step S301, the text to be processed can be processed by a test data generation network to generate a first round of test data set for fuzzy testing of the object to be tested, wherein the test data generation network includes a text recognition subnetwork and a data generation subnetwork, the text recognition subnetwork can be a BERT model, and is used to extract feature information of multiple target objects in the text to be processed, the text to be processed corresponds to the object to be tested, including the source code of the object to be tested, the target object is a function in the source code, and the feature information of the target object includes a function identifier, the number of input parameters of the function, and the data type of each input parameter;

[0128] Then, in step S302, the first round of fuzzy testing can be performed on the object under test according to the first round of test data set to obtain the intermediate test results of the first round of fuzzy testing, which include the code coverage rate and the running state of the object under test (including the normal state and the abnormal state), and in step S303, it is determined whether the code coverage rate of the first round of fuzzy testing is greater than or equal to the coverage rate threshold;

[0129] When the code coverage of the first round of fuzz testing is less than the coverage threshold, step S304 is executed to adjust the network parameters of the test data generation network according to the first round of test data set and the running state of the object under test during the first round of fuzz testing to obtain the first round of adjusted test data generation network;

[0130] Then, the second round of fuzz testing is performed, and steps S301, S302 and S303 are re-executed. That is to say, in step S301, the text to be processed can be processed by the test data generation network adjusted in the first round to generate a second round of test data set for fuzz testing the object under test. Then, in step S302, the second round of fuzz testing is performed on the object under test based on the second round of test data set to obtain the intermediate test results of the second round of fuzz testing. In step S303, it is determined whether the code coverage of the second round of fuzz testing is greater than or equal to the coverage threshold.

[0131] When the code coverage is less than the coverage threshold, multiple rounds of testing may be performed, that is, steps S304, S301, S302 and S303 may be re-executed multiple times.

[0132] When the code coverage of the Nth round of fuzz testing is greater than or equal to the preset coverage threshold, in step S305, the intermediate test result of the Nth round of fuzz testing can be determined as the final test result, N is an integer and N≥2, and the fuzzy testing of the object under test is ended.

[0133] According to the embodiments of the present disclosure, during fuzz testing, a test data set can be generated by a test data generation network including a text recognition subnetwork and a data generation subnetwork, thereby improving the coverage of the test data set, and through multiple rounds of fuzz testing, the code coverage and mining depth of the fuzz test can be improved, thereby improving the efficiency of the fuzz test and enhancing the effectiveness of the fuzz test.

[0134] According to an embodiment of the present disclosure, the text recognition subnetwork can be a BERT model. The BERT model is used to extract feature information of multiple target objects in the text to be processed. The advantages of the BERT model in natural language processing tasks can be fully utilized to improve the accuracy of the feature information of multiple target objects. The test data set can be determined based on the feature information, which can improve the coverage of the test data set and further improve the code coverage of the fuzz test.

[0135] It should be noted that, although the above embodiment is used as an example to introduce the fuzzy testing method based on text recognition, those skilled in the art will understand that the present disclosure should not be limited thereto. In fact, the user can flexibly set each step according to personal preferences and / or actual application scenarios, as long as it complies with the technical solution of the present disclosure.

[0136] Figure 4 FIG. 1 is a block diagram of a fuzzy testing device based on text recognition according to an embodiment of the present disclosure. Figure 4 As shown, the device comprises:

[0137] A test data generation module 41 is used to process the text to be processed through a test data generation network to generate a first round of test data set for fuzzy testing of the object to be tested, wherein the test data generation network includes a text recognition subnetwork and a data generation subnetwork, and the object to be tested is an executable object corresponding to the text to be processed;

[0138] A test execution module 42 is used to perform multiple rounds of fuzz testing on the object under test according to the first round of test data set and the test data generation network, and obtain intermediate test results of the multiple rounds of fuzz testing, wherein the intermediate test results include code coverage and the running state of the object under test, and the running state includes a normal state and an abnormal state;

[0139] Test result determination 43 is used to determine the intermediate test result of the Nth round of fuzz testing as the final test result when the code coverage of the Nth round of fuzz testing is greater than or equal to a preset coverage threshold, where N is an integer and N≥2.

[0140] In a possible implementation manner, the device further includes:

[0141] The error information determination module is used to determine the error information in the text to be processed and the test data corresponding to the abnormal state when the running state of the tested object is abnormal in the final test result.

[0142] The present disclosure also proposes a fuzzy testing device based on text recognition, comprising: a processor; a memory for storing processor executable instructions; wherein the processor is configured to: implement the above method.

[0143] The present disclosure also proposes a non-volatile computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above method is implemented.

[0144] Figure 5 A block diagram of a fuzzy testing device 800 based on text recognition according to an embodiment of the present disclosure is shown. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0145] Reference Figure 5 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0146] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0147] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0148] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0149] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0150] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0151] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0152] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0153] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0154] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0155] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions, which can be executed by the processor 820 of the device 800 to perform the above method.

[0156] Figure 6 FIG. 1 is a block diagram of a fuzzy testing device 1900 based on text recognition according to an embodiment of the present disclosure. For example, the device 1900 may be provided as a server. Figure 6, the apparatus 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0157] The device 1900 may also include a power supply component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input / output (I / O) interface 1958. The device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™, or the like.

[0158] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the device 1900 to perform the above method.

[0159] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0160] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0161] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0162] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0163] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0164] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0165] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0166] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0167] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A fuzzy testing method based on text recognition, characterized in that: The method comprises: The text to be processed is processed by a test data generation network to generate a first round of test data set for fuzz testing of the object to be tested, wherein the test data generation network includes a text recognition subnetwork and a data generation subnetwork, and the object to be tested is an executable object corresponding to the text to be processed; According to the first round of test data set and the test data generation network, multiple rounds of fuzz testing are performed on the object under test to obtain intermediate test results of the multiple rounds of fuzz testing, wherein the intermediate test results include code coverage and the running state of the object under test, and the running state includes a normal state and an abnormal state; When the code coverage of the Nth round of fuzz testing is greater than or equal to a preset coverage threshold, the intermediate test result of the Nth round of fuzz testing is determined as the final test result, where N is an integer and N≥2; The step of performing multiple rounds of fuzz testing on the object under test according to the first round test data set and the test data generation network to obtain intermediate test results of the multiple rounds of fuzz testing includes: According to the first round of test data set, the first round of fuzzy testing is performed on the object under test to obtain an intermediate test result of the first round of fuzzy testing; When the code coverage of the first round of fuzz testing is less than the coverage threshold, adjusting the network parameters of the test data generation network according to the first round of test data set and the running state of the object under test during the first round of fuzz testing to obtain the first round of adjusted test data generation network; The text to be processed is processed by the test data generation network adjusted in the first round to generate a second round of test data set for fuzz testing of the object under test; According to the i-th round of test data set, the i-th round of fuzzy test is performed on the object under test to obtain the intermediate test result of the i-th round of fuzzy test, where i is an integer and 1≤i <N; When the code coverage of the i-th round of fuzz testing is less than the coverage threshold, adjusting the network parameters of the adjusted test data generation network of the i-1th round according to the i-th round of test data set and the running state of the object under test during the i-th round of fuzz testing to obtain the adjusted test data generation network of the i-th round; The text to be processed is processed through the test data generation network after the i-th round of adjustment to generate the i+1-th round of test data set for fuzzy testing of the object under test.

2. The method according to claim 1, characterized in that The test data generation network after the i-th round adjustment is used to process the text to be processed, and to generate the i+1-th round test data set for fuzzy testing of the object under test, including: Through the text recognition sub-network adjusted in the i-th round, feature extraction is performed on the text to be processed to obtain feature information of multiple target objects in the text to be processed; According to the feature information of the multiple target objects, the i+1th round of test data set for fuzzy testing of the tested object is generated through the i-th round adjusted data generation sub-network.

3. The method according to claim 2, characterized in that The step of generating an i+1th round of test data set for fuzzy testing the tested object according to the feature information of the multiple target objects through the i-th round adjusted data generation subnetwork includes: For any target object, based on the feature information of the target object and the preset data feature set, the i+1th round of test data corresponding to the target object is generated through the i-th round of adjusted data generation subnetwork. The data feature set includes a plurality of preset data types and feature information corresponding to each data type.

4. The method according to claim 1, characterized in that: The method further comprises: In the final test result, when the running state of the tested object is an abnormal state, the error information in the text to be processed and the test data corresponding to the abnormal state are determined.

5. The method according to claim 2, characterized in that: The text to be processed includes text composed of source code, the target object includes a function, and the characteristic information includes a function identifier, the number of input parameters of the function, and the data type of each input parameter. The object under test includes an executable object generated by compiling the source code.

6. A fuzzy testing device based on text recognition, characterized in that: The device comprises: A test data generation module, used to process the text to be processed through a test data generation network to generate a first round of test data set for fuzzy testing of the object to be tested, wherein the test data generation network includes a text recognition subnetwork and a data generation subnetwork, and the object to be tested is an executable object corresponding to the text to be processed; A test execution module, configured to perform multiple rounds of fuzz testing on the object under test according to the first round of test data set and the test data generation network, and obtain intermediate test results of the multiple rounds of fuzz testing, wherein the intermediate test results include code coverage and the running state of the object under test, and the running state includes a normal state and an abnormal state; A test result determination module, configured to determine the intermediate test result of the Nth round of fuzzy testing as the final test result when the code coverage of the Nth round of fuzzy testing is greater than or equal to a preset coverage threshold, where N is an integer and N≥2; The test execution module is further used for: According to the first round of test data set, the first round of fuzzy testing is performed on the object under test to obtain an intermediate test result of the first round of fuzzy testing; When the code coverage of the first round of fuzz testing is less than the coverage threshold, adjusting the network parameters of the test data generation network according to the first round of test data set and the running state of the object under test during the first round of fuzz testing to obtain the first round of adjusted test data generation network; The text to be processed is processed by the test data generation network adjusted in the first round to generate a second round of test data set for fuzz testing of the object under test; According to the i-th round of test data set, the i-th round of fuzzy test is performed on the object under test to obtain the intermediate test result of the i-th round of fuzzy test, where i is an integer and 1≤i <N; When the code coverage of the i-th round of fuzz testing is less than the coverage threshold, adjusting the network parameters of the adjusted test data generation network of the i-1th round according to the i-th round of test data set and the running state of the object under test during the i-th round of fuzz testing to obtain the adjusted test data generation network of the i-th round; The text to be processed is processed through the test data generation network after the i-th round of adjustment to generate the i+1-th round of test data set for fuzzy testing of the object under test.

7. A fuzzy testing device based on text recognition, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: execute the method described in any one of claims 1 to 5.

8. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.