Test data generation method and device, equipment and storage medium
Through the user demand analysis model based on historical user needs and preset vector databases, the test data set is automatically generated, which solves the problems of high communication costs for testers and complexity of data generation, and improves the efficiency and quality of test work.
Patent Information
- Application Number
- CN202411123209.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-12-13
AI Technical Summary
Testers need to invest a lot of time and energy to communicate with relevant departments to obtain personalized test data, resulting in low efficiency and quality of test work, and as the complexity of business system increases, the complexity of the generation of test data is also increasing.
By obtaining the user's number requirements of the target user, input it into the user's requirement analysis model trained based on the historical user's number requirements and preset vector database, a test data set is generated, and personalized test data is automatically generated using the application programming interface.
It realizes efficient and automated generation of personalized test data, reduces the communication costs between testers and relevant departments, reduces the complexity of test data generation, and improves the efficiency and quality of test work.
Smart Images

Figure CN119127674A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data generation, and in particular to a test data generation method, device, equipment and storage medium. Background Art
[0002] In today's information age, testing work plays a vital role in software development and systems. The quality and efficiency of test data directly affect the stability of software products and user experience. Especially in the fields of natural language processing (NLP), artificial intelligence (AI) and big data analysis, testing work requires a large amount of personalized test data to ensure the accuracy and reliability of the system.
[0003] However, testers need to invest a lot of time and energy in communicating with relevant departments to obtain the necessary personalized test data. For example, they need to find the corresponding supporter first, and then learn in detail the use of the OPENAPI provided by the supporter. Only after fully understanding the characteristics and usage of the API can testers prepare corresponding data according to actual needs. At the same time, as the correlation of business systems becomes more and more complex, the demand for composite data across multiple systems in testing work is also increasing, which makes the complexity of number creation (i.e. generating test data) also increasing.
[0004] Therefore, there is an urgent need for a method that can efficiently and automatically generate personalized test data to reduce the communication costs between testers and relevant departments, reduce the complexity of data generation, and improve the efficiency and quality of testing work. Summary of the invention
[0005] The main purpose of this application is to provide a test data generation method, device, equipment and storage medium, aiming to generate personalized test data efficiently and automatically, while reducing the communication costs between testers and relevant departments, reducing the complexity of number generation, and improving the efficiency and quality of testing work.
[0006] To achieve the above purpose, the present application proposes a test data generation method, the method comprising:
[0007] Obtain the user number-generating requirements corresponding to the target users;
[0008] Inputting the user's number-making demand into a user demand analysis model to obtain a number-making demand analysis result output by the user demand analysis model, wherein the user demand analysis model is trained based on historical user number-making demands and a preset vector database;
[0009] Based on the number-generating requirement analysis result, an application programming interface is called to generate a test data set.
[0010] In one embodiment, the training process of the user demand analysis model includes:
[0011] Obtain historical user data generation needs;
[0012] Based on the preset vector database, knowledge is injected into the initial user demand analysis model;
[0013] The historical user numerical requirements are input into the initial user requirements analysis model after knowledge injection for iterative training to obtain the user requirements analysis model.
[0014] In one embodiment, the user demand analysis model includes a preset vector database;
[0015] The step of inputting the user's number-making requirements into a user requirement analysis model to obtain a number-making requirements analysis result output by the user requirement analysis model includes:
[0016] Performing similarity matching between the user's numerical requirements and a preset vector database in the user's requirements analysis model to obtain a plurality of requirements matching results, and determining a similarity ranking of each of the requirements matching results;
[0017] Analyze and integrate the demand matching results within the preset sorting;
[0018] The demand matching results after analysis and integration are input into the user demand analysis model to obtain the numerical demand analysis results output by the user demand analysis model.
[0019] In one embodiment, after inputting the user's number-making demand into a user demand analysis model and obtaining a number-making demand analysis result output by the user demand analysis model, the method further includes:
[0020] If the number generation requirement analysis result is an analysis failure result, analyzing the number generation requirement analysis result to determine the reason for the analysis failure;
[0021] Associating and combining the number generation requirement analysis result, the analysis failure reason and the user number generation requirement to generate a number generation failure record;
[0022] The record of the failed number generation is pushed to the management personnel so that the management personnel can perform manual number generation.
[0023] In one embodiment, the number generation requirement analysis result includes an application coding interface identification number, a test environment, and number generation step information;
[0024] The step of calling an application programming interface to generate a test data set based on the number generation requirement analysis result includes:
[0025] Determine the application coding interface corresponding to the application coding interface identification number based on a preset relational database, and call the application coding interface based on the test environment and the number generation step information;
[0026] Recording a number of test data generated after the application coding interface is called;
[0027] The test data are associated and combined to generate a test data set.
[0028] In one embodiment, the obtaining of the user number creation requirement corresponding to the target user includes:
[0029] Obtain the business needs of target users;
[0030] The business requirement is adapted to a preset requirement format rule library to obtain the user number-making requirement.
[0031] In one embodiment, after generating a test data set based on the number generation requirement analysis result, the method further includes:
[0032] Pushing the test data set to the target user for the target user to view;
[0033] Obtaining data quality feedback information of the test data set;
[0034] Based on the data quality feedback information, the user demand analysis model and the preset vector database are adjusted.
[0035] In addition, to achieve the above purpose, the present application also proposes a test data generating device, the test data generating device comprising:
[0036] The acquisition module is used to obtain the user number-generating requirements corresponding to the target user;
[0037] An output module, used to input the user's number-making requirements into a user requirement analysis model to obtain a number-making requirement analysis result output by the user requirement analysis model, wherein the user requirement analysis model is trained based on historical user number-making requirements and a preset vector database;
[0038] A generation module is used to call an application programming interface to generate a test data set based on the number generation requirement analysis result.
[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes a test data generation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the test data generation method described above.
[0040] In addition, to achieve the above objectives, the present application also proposes a storage medium, which is a computer-readable storage medium, and stores a computer program on the storage medium. When the computer program is executed by a processor, the steps of the test data generation method described above are implemented.
[0041] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the test data generating method described above are implemented.
[0042] The present application provides a test data generation method, apparatus, device and storage medium. The test data generation method obtains the user number-making requirements corresponding to the target user, and then inputs the user number-making requirements into a user requirement analysis model to obtain the number-making requirements analysis results output by the user requirement analysis model, wherein the user requirement analysis model is trained based on historical user number-making requirements and a preset vector database, and then based on the number-making requirements analysis results, an application programming interface is called to generate a test data set, thereby being able to efficiently and automatically generate personalized test data, while reducing the communication costs between testers and relevant departments, reducing the complexity of number-making, and improving the efficiency and quality of testing work. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0045] Figure 1 A flowchart of the first embodiment of the test data generation method of the present application is provided;
[0046] Figure 2 A flowchart of the second embodiment of the test data generation method of the present application is provided;
[0047] Figure 3 A flowchart of the third embodiment of the test data generation method of the present application is provided;
[0048] Figure 4 A flowchart of the fourth embodiment of the test data generation method of the present application is provided;
[0049] Figure 5This is a schematic diagram of the module structure of the test data generating device according to an embodiment of the present application;
[0050] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the test data generation method in the embodiment of the present application.
[0051] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0052] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0053] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0054] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a big data service platform, a test data generation system, etc. The following takes the test data generation system as an example to illustrate this embodiment and the following embodiments.
[0055] Based on this, the present application embodiment provides a test data generation method, referring to Figure 1 , Figure 1 A flowchart of the first embodiment of the test data generation method of the present application is provided.
[0056] In this embodiment, the test data generating method includes steps S11 to S13:
[0057] Step S11, obtaining the user number-generating requirements corresponding to the target user;
[0058] It should be noted that the target user refers to a user who needs to generate a test data set, such as a software tester, etc., and is not limited here. In addition, the user's data generation requirements refer to the demand response obtained after adapting the user's business requirements to the preset relational database, which can be directly input into the large model for analysis. The response information (prompt) includes test scenarios, test data types (such as input data, configuration data, boundary conditions, etc.), data formats and structures (such as data organization, field definitions, data types, etc.), business logic, scenario simulation (such as user operation paths, trigger conditions for specific business processes), and environment configuration (such as the database version used, operating system environment), etc. In addition, there are also requirements for data confidentiality, security, or special requirements for data generation speed, etc., which are intended to ensure that specific functions or modules of the software system can work as expected. There is no limitation here and it can be set according to actual conditions.
[0059] Specifically, the business requirements of the target users are obtained, and then the business requirements are adapted to a preset requirement format rule library to obtain the user number-generating requirements.
[0060] Step S12, inputting the user's number-making demand into a user demand analysis model to obtain a number-making demand analysis result output by the user demand analysis model, wherein the user demand analysis model is trained based on historical user number-making demands and a preset vector database;
[0061] It should be noted that the user demand analysis model is used to analyze the number-making needs of the target users and output number-making needs analysis results corresponding to the user's number-making needs, wherein the number-making needs analysis results refer to the results obtained after analyzing the number-making needs proposed by the user, including the application coding interface identification number, the test environment, number-making step information, test data requirements, data generation strategies, data relationships and constraints (i.e., the possible correlations and dependencies between the test data, and the specific constraints that need to be met) and analysis result verification (such as the verification method and results for the correctness and effectiveness of the analysis results), etc., which are not limited here, so as to ensure that the generation of test data can meet the actual needs of users and improve the efficiency and quality of the testing business. At the same time, through the verification and evaluation of the analysis results, it can be ensured that the subsequent testing work can be carried out based on accurate test data, thereby improving the effectiveness and reliability of the test.
[0062] Step S13: Based on the number generation requirement analysis result, an application programming interface is called to generate a test data set.
[0063] It should be noted that the application programming interface refers to the interface for communication between different software components, namely API (Application Programming Interface), where each API needs to set the business steps it represents, such as issuing credit cards, activating credit cards, canceling credit cards, etc., which are used to split the steps during subsequent large model recognition.
[0064] It should be further explained that the test data set refers to a test data set that is finally generated and meets the user's needs, so as to meet the user's business needs and improve user satisfaction.
[0065] Specifically, based on a preset relational database, the application coding interface corresponding to the application coding interface identification number is determined, and based on the test environment and the number-generating step information, the application coding interface is called, and then a number of test data generated after the application coding interface is called are recorded, so that each of the test data is associated and combined to generate a test data set.
[0066] This embodiment obtains the user number-making requirements corresponding to the target user, and then inputs the user number-making requirements into the user requirement analysis model to obtain the number-making requirements analysis results output by the user requirement analysis model, wherein the user requirement analysis model is trained based on historical user number-making requirements and a preset vector database, and then based on the number-making requirements analysis results, an application programming interface is called to generate a test data set, thereby being able to efficiently and automatically generate personalized test data, while reducing the communication costs between testers and relevant departments, reducing the complexity of number-making, and improving the efficiency and quality of testing work.
[0067] Based on this, the present application embodiment provides a test data generation method, referring to Figure 2 , Figure 2 A flowchart diagram of the second embodiment of the test data generation method of the present application is provided.
[0068] In a feasible implementation manner, the training process of the user demand analysis model includes:
[0069] Step S21, obtaining historical user number-making requirements;
[0070] It should be noted that the historical user data generation needs refer to the historical demand responses obtained after adapting the user's business needs with the preset relational database, which can be directly input into the large model for analysis Response information (prompt), including test scenarios, test data types (such as input data, configuration data, boundary conditions, etc.), data formats and structures (such as data organization, field definitions, data types, etc.), business logic, scenario simulation (such as user operation paths, trigger conditions for specific business processes) and environmental configuration (such as the database version used, operating system environment), etc. In addition, there are also requirements for data confidentiality, security or special requirements for data generation speed, etc., which aim to ensure that specific functions or modules of the software system can work as expected. There is no restriction here and it can be set according to actual conditions.
[0071] Specifically, historical user number-making demands may be obtained through historical number-making records and the like. In addition, corresponding number-making demands may also be obtained through other channels to increase the richness of the data. No limitation is imposed here and it may be set according to actual conditions.
[0072] Step S22, based on the preset vector database, knowledge injection is performed on the initial user demand analysis model;
[0073] It should be noted that the preset vector database mainly includes an API information table, an API field information table, etc., wherein the API information table includes the API ID, name, etc.; the API input field table includes the field name, Chinese description and value meaning, associated fields, etc.; the API output field table includes the field name, Chinese description and value meaning, etc. For example, the API information table stores a data of "apiID=1, name=credit card issuance, credit card issuance... (multiple interpretations)". At the same time, the preset vector database supports addition and update, etc., to improve data quality and ensure the accuracy and richness of the data.
[0074] It should be further explained that the initial user demand analysis model refers to an initial template framework that has not been trained, and is used to obtain a user demand analysis model after iterative training.
[0075] Specifically, the preset vector database is injected into the initial user demand analysis model through a supervised learning algorithm, wherein prompt words can be generated based on knowledge, and prompt words and answer pairs can be designed to be fed into the large model. There is no limitation here, and it can be set according to actual conditions, so as to integrate specific domain knowledge or external knowledge into the pre-trained model, so that the model can achieve excellent training results in specific tasks or fields, thereby improving the model's understanding of domain terms, concepts and relationships, thereby improving the generalization ability and robustness of model training.
[0076] Step S23, inputting the historical user numerical requirements into the initial user requirement analysis model after knowledge injection for iterative training to obtain the user requirement analysis model.
[0077] Specifically, the historical user number-making requirements and the sample labels corresponding to the historical user number-making requirements are subjected to data preprocessing, such as data cleaning and normalization, so that the historical user number-making requirements and the sample labels corresponding to the historical user number-making requirements are input into the initial user demand analysis model after knowledge injection, and the predicted value output by the initial user demand analysis model after knowledge injection is obtained, and then the model loss value is calculated based on the predicted value and the sample labels, and the loss function is used to calculate the model loss value. In this embodiment, the loss function can be set according to actual needs and is not specifically limited here. After the model loss value is calculated, the training process ends, and the error back propagation algorithm is used to update the model parameters in the initial user demand analysis model after knowledge injection, and then the next training is carried out. During the training process, it is determined whether the updated initial user demand analysis model after knowledge injection meets the preset training end condition. If it meets the condition, the updated initial user demand analysis model after knowledge injection is used as the pending user demand analysis model. If it does not meet the condition, the model training continues, wherein the preset training end condition includes loss convergence and reaching the maximum iteration number threshold.
[0078] This embodiment obtains historical user number-making demands, and then, based on a preset vector database, performs knowledge injection into the initial user demand analysis model, thereby inputting the historical user number-making demands into the initial user demand analysis model after knowledge injection for iterative training to obtain the user demand analysis model, thereby significantly improving the quality, accuracy, efficiency, compliance, and consistency of user number-making demand generation. Moreover, through knowledge injection, the model can learn the characteristics and writing styles of different types of user number-making demands, thereby better adapting to specific needs in different scenarios, generating user number-making demands that better meet user needs, and improving user satisfaction.
[0079] Based on this, the present application embodiment provides a test data generation method, referring to Figure 3 , Figure 3 A flowchart diagram of the third embodiment of the test data generation method of the present application is provided.
[0080] In a feasible implementation manner, the user demand analysis model includes a preset vector database; the step of inputting the user's number-making demand into the user demand analysis model to obtain a number-making demand analysis result output by the user demand analysis model includes:
[0081] Step S31, performing similarity matching between the user's numerical requirements and a preset vector database in the user's requirements analysis model, obtaining a plurality of requirements matching results, and determining a similarity ranking of each of the requirements matching results;
[0082] It should be noted that the demand matching result refers to the matching degree or conformity result obtained after comparing and evaluating the similarity between the user's number-making demand and the preset vector database. In addition, the similarity sorting refers to the sorting result of the data according to the similarity between the data.
[0083] Specifically, the user's number-making demand is vectorized, wherein the vectorization can be performed through a bag-of-words model or the like, which is not limited here, and then the vectorized user's number-making demand is similarly matched with a preset vector database in the user demand analysis model. For example, similarity matching can be performed by comparing the accuracy or range of numerical data, comparing the word frequency, semantics or structure of text data, and comparing the similarity of data structures, which is not limited here and can be set according to actual conditions to obtain a number of demand matching results, and determine the similarity ranking of each of the demand matching results.
[0084] Step S32, analyzing and integrating the demand matching results within the preset sorting;
[0085] It should be noted that the preset sorting refers to a pre-set sorting value, such as selecting the top five demand matching results for analysis and integration, etc., and there is no limitation here.
[0086] Specifically, the demand matching results within the preset sorting are analyzed and integrated, wherein the analysis and integration can be achieved through semantic analysis and other methods, which are not limited here.
[0087] Step S33, inputting the analyzed and integrated demand matching results into the user demand analysis model to obtain the numerical demand analysis results output by the user demand analysis model.
[0088] This embodiment obtains a number of requirement matching results by performing similarity matching between the user's number-making requirements and a preset vector database in the user requirement analysis model, and determines a similarity ranking of each of the requirement matching results, and then analyzes and integrates the requirement matching results in the preset ranking, thereby inputting the analyzed and integrated requirement matching results into the user requirement analysis model to obtain the number-making requirement analysis results output by the user requirement analysis model, thereby improving the quality and practicality of the generated data and enhancing the comprehensiveness and coverage of the test data.
[0089] Based on this, the present application embodiment provides a test data generation method, referring to Figure 4 , Figure 4A flowchart diagram of the fourth embodiment of the test data generation method of the present application is provided.
[0090] In a feasible implementation manner, after inputting the user's number-making demand into a user demand analysis model and obtaining a number-making demand analysis result output by the user demand analysis model, the method further includes:
[0091] Step S41, if the number generation requirement analysis result is an analysis failure result, the number generation requirement analysis result is analyzed to determine the reason for the analysis failure;
[0092] It should be noted that the analysis failure result refers to the failure to correctly parse or process the requirements during the numerical requirements analysis process for some reason, resulting in the analysis failing to achieve the expected goal or failing to generate correct test data. In addition, the reasons for the analysis failure include misunderstanding of requirements, data parsing errors, model analysis errors, system limitations or bugs, and external factors (such as data source problems, network problems, and other external factors), etc., which are not limited here and can be set according to actual conditions.
[0093] Specifically, if the number-making requirement analysis result is an analysis failure result, the number-making requirement analysis result is analyzed to determine the cause of the analysis failure, wherein system detection tools can be used to assist in the analysis, such as source tracing analysis and log analysis, so as to improve the efficiency of determining the cause of the analysis failure.
[0094] Step S42, associating and combining the number generation requirement analysis result, the analysis failure reason and the user number generation requirement to generate a number generation failure record;
[0095] It should be noted that the number generation failure record refers to a record that records the analysis failure reasons, number generation requirement analysis results, and related information of the user's number generation requirements, including the analysis failure reasons, user number generation requirements, failure details (such as the time of failure, the steps of failure, the scope of impact, and other related information) and subsequent processing suggestions (such as solutions to the failure reasons or suggestions for manual number generation), etc. There is no restriction here and it can be set according to actual conditions.
[0096] Step S43, pushing the number generation failure record to the management personnel so that the management personnel can perform manual number generation.
[0097] Specifically, the number generation failure record is pushed to the management personnel, wherein the push can be made through public accounts, apps, mini-programs, and emails, etc., without limitation, so that the management personnel can manually generate numbers based on the number generation failure record, thereby preventing the target user from being unable to return to the test data set during the number generation process, and at the same time customizing a personalized test data set for the user, thereby improving user satisfaction.
[0098] In this embodiment, if the number-making requirement analysis result is an analysis failure result, the number-making requirement analysis result is analyzed to determine the analysis failure reason, and then the number-making requirement analysis result, the analysis failure reason and the user number-making requirement are associated and combined to generate a number-making failure record, and then the number-making failure record is pushed to the management personnel for the management personnel to perform manual number-making, and then the reason for the analysis failure is quickly located, professional advice is provided to the management personnel, and an optimized data basis is provided for subsequent monitoring of the number-making generation method, thereby effectively improving work efficiency and expanding the number-making generation range.
[0099] In a feasible implementation manner, the number generation requirement analysis result includes an application coding interface identification number, a test environment, and number generation step information; and the calling of the application coding interface to generate a test data set based on the number generation requirement analysis result includes:
[0100] Step S51, determining the application coding interface corresponding to the application coding interface identification number based on a preset relational database, and calling the application coding interface based on the test environment and the number generation step information;
[0101] It should be noted that the preset relational database is used to store information such as API ID, URL, message template, input field, assembly requirements, etc. under different test environments. The application coding interface identification number refers to the API ID.
[0102] It should be further explained that the test environment refers to a computer system environment set up for testing to simulate some or all conditions of the actual operating environment, including hardware configuration, software configuration, test data types, permissions and user roles, and dependent services (such as third-party services or APIs that are the same as the target production environment), etc., which are not limited here. The number generation step information refers to the steps and related information required to generate test data in the test environment.
[0103] Specifically, the application coding interface identification number is matched with a preset relational database, and then the application coding interface corresponding to the application coding interface identification number is determined, so as to configure and call the application coding interface according to the test environment and the number generation step information.
[0104] Step S52, recording a number of test data generated after the application coding interface is called;
[0105] It should be noted that the test data refers to data used to test the functions, performance and stability of the application program. The specific content can be set according to user needs and is not limited here.
[0106] Step S53: associate and combine the test data to generate a test data set.
[0107] It should be noted that after the test data set is generated, a format detection tool may be used to detect and verify the test data set to prevent data errors and the like from occurring in the test data set.
[0108] This embodiment determines the application coding interface corresponding to the application coding interface identification number based on a preset relational database, and calls the application coding interface based on the test environment and the number generation step information, and then records a number of test data generated by the application coding interface after the call, so as to associate and combine the test data to generate a test data set, thereby achieving efficient and automated test data generation, while improving the comprehensiveness and coverage of the test, reducing labor costs and human errors, and more comprehensively covering various test data that may appear in the test, while reducing the communication costs between testers and relevant departments, reducing the complexity of number generation, and improving the efficiency and quality of testing work.
[0109] In a feasible implementation manner, the obtaining of the user number-generating requirement corresponding to the target user includes:
[0110] Step S61, obtaining the business needs of the target user;
[0111] It should be noted that the business requirements refer to the requirements put forward by users to generate specific types of test data in order to conduct testing activities, including test requirements, test scenarios, and test business steps, etc., which are not limited here.
[0112] Specifically, the business needs of the target user can be directly obtained through the input request of the target user. For example, the target user enters "I want to issue a credit card with a home address in Hangzhou in the UAT environment, and then cancel it after activation" on the web page. The business needs can be directly obtained through the user input. The business needs can also be generated by extracting keywords and then associating and combining them through the conversation between the voice chat robot and the target user. There is no restriction on the way of obtaining business needs, which can be set according to actual conditions.
[0113] Step S62, adapting the business requirement to a preset requirement format rule library to obtain the user number generation requirement.
[0114] It should be noted that the preset requirement format rule base refers to a pre-set rule database for storing business logic step formats and related information, wherein the preset requirement format rule base can be continuously updated and adjusted to improve the accuracy and efficiency of user number generation requirement adaptation.
[0115] Specifically, the business demand is adapted to the preset demand format rule library to obtain the user number-making demand. For example, when there is a rule in the preset demand format rule library that is "Please split the original text according to the steps based on the information in the step table, and output the content of each step in the reference format: 'Step X: <Step Type> - I want to complete: XXX operation in XX environment; requirement: XXX; result: XXX'", then the rule is adapted to the business demand, wherein the business demand is "I want to issue a credit card with a home address in Hangzhou in the UAT environment, and then cancel it after activation", then according to the rule, the business demand can be converted into: "Step 1: Issue a credit card - I want to complete: Issue a credit card in the ST environment, requirement: Home address in Hangzhou; Step 2: Credit card activation - I want to complete: Credit card activation in the ST environment, requirement: None; Step 3: Credit card cancellation - I want to complete: Credit card cancellation in the ST environment", which can be set according to actual conditions, and there is no restriction on the adaptation method here.
[0116] This embodiment obtains the business needs of the target users, and then adapts the business needs to a preset demand format rule library to obtain the user's number-making needs, thereby converting the original needs input by the user into an information format that can be directly input into the big model for analysis, thereby reducing misunderstandings and misinterpretations of user needs, ensuring that the needs are accurately conveyed to the model, and improving the accuracy of the big model in identifying number-making needs, thereby improving data processing efficiency and accuracy.
[0117] In a feasible implementation manner, after generating a test data set based on the number generation requirement analysis result, the method further includes:
[0118] Step S71, pushing the test data set to the target user for the target user to view;
[0119] Specifically, the test data set is pushed to the target user for viewing by the target user, wherein the push can be performed through a variety of channels such as APP, mini-program, QR code, website, and email push, etc., which are not limited here and can be set according to actual conditions.
[0120] In addition, during the target user's viewing process, if the target user finds errors in the data set, he or she can directly modify the corresponding content or add revisions in the editing module in the current push page, thereby reducing data errors and improving data quality.
[0121] Step S72, obtaining data quality feedback information of the test data set;
[0122] It should be noted that the data quality feedback information refers to the specific opinions and evaluations on the quality of the data set provided by users, including content information in the form of online surveys, questionnaires, scoring systems, direct error reports, etc., so that testers can collect and analyze feedback data, and then optimize user demand analysis models and tools or generation processes such as preset vector databases.
[0123] Specifically, data quality feedback information can be directly obtained through online surveys, questionnaires, scoring systems, error log reports, etc., which are not limited here.
[0124] Step S73: adjusting the user demand analysis model and the preset vector database based on the data quality feedback information.
[0125] Specifically, semantic analysis is performed on the data quality feedback information, and then feedback classification is performed on the data quality feedback information after the semantic analysis, and the proportion of each category in the feedback classification is calculated, so as to adjust the user demand analysis model and the preset vector database according to the proportion of each category, such as adjusting the model parameters or the data structure of the vector database, thereby effectively improving the accuracy and efficiency of the model and the vector database.
[0126] This embodiment pushes the test data set to the target user for viewing, thereby obtaining data quality feedback information of the test data set, and then adjusts the user demand analysis model and the preset vector database based on the data quality feedback information, thereby improving the data quality and the quality of the model and vector database, while enhancing data security and compliance.
[0127] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0128] This application also provides a test data generation device, please refer to Figure 5 , the test data generating device comprises:
[0129] An acquisition module 51 is used to acquire a user number-generating requirement corresponding to a target user;
[0130] An output module 52, used for inputting the user's number-making demand into a user demand analysis model to obtain a number-making demand analysis result output by the user demand analysis model, wherein the user demand analysis model is trained based on historical user number-making demands and a preset vector database;
[0131] The generating module 53 is used to call the application programming interface to generate a test data set based on the number generation requirement analysis result.
[0132] The test data generating device is also used for:
[0133] Obtain historical user data generation needs;
[0134] Based on the preset vector database, knowledge is injected into the initial user demand analysis model;
[0135] The historical user numerical requirements are input into the initial user requirements analysis model after knowledge injection for iterative training to obtain the user requirements analysis model.
[0136] The test data generating device is also used for:
[0137] Performing similarity matching between the user's numerical requirements and a preset vector database in the user's requirements analysis model to obtain a plurality of requirements matching results, and determining a similarity ranking of each of the requirements matching results;
[0138] Analyze and integrate the demand matching results within the preset sorting;
[0139] The demand matching results after analysis and integration are input into the user demand analysis model to obtain the numerical demand analysis results output by the user demand analysis model.
[0140] The test data generating device is also used for:
[0141] If the number generation requirement analysis result is an analysis failure result, analyzing the number generation requirement analysis result to determine the reason for the analysis failure;
[0142] Associating and combining the number generation requirement analysis result, the analysis failure reason and the user number generation requirement to generate a number generation failure record;
[0143] The record of the failed number generation is pushed to the management personnel so that the management personnel can perform manual number generation.
[0144] The test data generating device is also used for:
[0145] Determine the application coding interface corresponding to the application coding interface identification number based on a preset relational database, and call the application coding interface based on the test environment and the number generation step information;
[0146] Recording a number of test data generated after the application coding interface is called;
[0147] The test data are associated and combined to generate a test data set.
[0148] The test data generating device is also used for:
[0149] Obtain the business needs of target users;
[0150] The business requirement is adapted to a preset requirement format rule library to obtain the user number-making requirement.
[0151] The test data generating device is also used for:
[0152] Pushing the test data set to the target user for the target user to view;
[0153] Obtaining data quality feedback information of the test data set;
[0154] Based on the data quality feedback information, the user demand analysis model and the preset vector database are adjusted.
[0155] The test data generation device provided by the present application adopts the test data generation method in the above embodiment, and can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the test data generation device provided by the present application are the same as the beneficial effects of the test data generation method provided by the above embodiment, and other technical features in the test data generation device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0156] The present application provides a test data generating device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the test data generating method in the above-mentioned embodiment 1.
[0157] Reference below Figure 6 , which shows a schematic diagram of the structure of a test data generating device suitable for implementing the embodiment of the present application. The test data generating device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The test data generating device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0158] like Figure 6As shown, the test data generating device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the test data generating device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the test data generation device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a test data generation device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0159] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0160] The test data generation device provided by the present application adopts the test data generation method in the above embodiment, which can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the test data generation device provided by the present application are the same as the beneficial effects of the test data generation method provided by the above embodiment, and the other technical features in the test data generation device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0161] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0162] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0163] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the test data generating method in the above-mentioned embodiment.
[0164] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0165] The computer-readable storage medium may be included in the test data generating device; or may exist independently without being assembled into the test data generating device.
[0166] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the test data generating device, the test data generating device:
[0167] Obtain the user number-generating requirements corresponding to the target users;
[0168] Inputting the user's number-making demand into a user demand analysis model to obtain a number-making demand analysis result output by the user demand analysis model, wherein the user demand analysis model is trained based on historical user number-making demands and a preset vector database;
[0169] Based on the number-generating requirement analysis result, an application programming interface is called to generate a test data set.
[0170] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through 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., via the Internet using an Internet service provider).
[0171] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite 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 a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0172] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0173] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned test data generation method, and can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the test data generation method provided by the above-mentioned embodiment, and will not be repeated here.
[0174] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the test data generating method as described above when the computer program is executed by a processor.
[0175] The computer program product provided in this application can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of this application are the same as the beneficial effects of the test data generation method provided in the above embodiment, which will not be repeated here.
[0176] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A test data generation method, It is characterized in that include: Obtain the user data generation requirements corresponding to the target users; Inputting the user's number-making demand into a user demand analysis model to obtain a number-making demand analysis result output by the user demand analysis model, wherein the user demand analysis model is trained based on historical user number-making demands and a preset vector database; Based on the number-generating requirement analysis result, an application programming interface is called to generate a test data set.
2. The test data generating method according to claim 1, It is characterized in that The training process of the user demand analysis model includes: Obtain historical user data generation needs; Based on the preset vector database, knowledge is injected into the initial user demand analysis model; The historical user numerical requirements are input into the initial user requirement analysis model after knowledge injection for iterative training to obtain the user requirement analysis model.
3. The test data generating method according to claim 1, It is characterized in that The user demand analysis model includes a preset vector database; The step of inputting the user's number-making requirements into a user requirement analysis model to obtain a number-making requirements analysis result output by the user requirement analysis model includes: Performing similarity matching between the user's numerical requirements and a preset vector database in the user's requirements analysis model to obtain a plurality of requirements matching results, and determining a similarity ranking of each of the requirements matching results; Analyze and integrate the demand matching results within the preset sorting; The demand matching results after analysis and integration are input into the user demand analysis model to obtain the numerical demand analysis results output by the user demand analysis model.
4. The test data generating method according to claim 1, It is characterized in that After inputting the user's number-making demand into the user demand analysis model and obtaining the number-making demand analysis result output by the user demand analysis model, the method further includes: If the number generation requirement analysis result is an analysis failure result, analyzing the number generation requirement analysis result to determine the reason for the analysis failure; Associating and combining the number generation requirement analysis result, the analysis failure reason and the user number generation requirement to generate a number generation failure record; The record of the failed number generation is pushed to the management personnel so that the management personnel can perform manual number generation.
5. The test data generating method according to claim 1, It is characterized in that The number generation requirement analysis result includes the application coding interface identification number, the test environment and the number generation step information; The step of calling an application programming interface to generate a test data set based on the number generation requirement analysis result includes: Determine the application coding interface corresponding to the application coding interface identification number based on a preset relational database, and call the application coding interface based on the test environment and the number generation step information; Recording a number of test data generated after the application coding interface is called; The test data are associated and combined to generate a test data set.
6. The test data generating method according to claim 1, It is characterized in that The obtaining of the user number creation requirement corresponding to the target user includes: Obtain the business needs of target users; The business requirement is adapted to a preset requirement format rule library to obtain the user number-making requirement.
7. The test data generating method according to claim 1, It is characterized in that After generating a test data set based on the number generation requirement analysis result, the method further includes: Pushing the test data set to the target user for the target user to view; Obtaining data quality feedback information of the test data set; Based on the data quality feedback information, the user demand analysis model and the preset vector database are adjusted.
8. A test data generating device, It is characterized in that include: The acquisition module is used to obtain the user number-generating requirements corresponding to the target user; An output module, used to input the user's number-making requirements into a user requirement analysis model to obtain a number-making requirement analysis result output by the user requirement analysis model, wherein the user requirement analysis model is trained based on historical user number-making requirements and a preset vector database; A generation module is used to call an application programming interface to generate a test data set based on the number generation requirement analysis result.
9. A test data generating device, It is characterized in that The test data generating device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the test data generating method according to any one of claims 1 to 7.
10. A storage medium, It is characterized in that The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the test data generating method according to any one of claims 1 to 7 are implemented.
