CN116909875A - Real-time test data generation method, device, computer equipment and storage medium - Google Patents

Real-time test data generation method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116909875A
CN116909875A CN202310661578.0A CN202310661578A CN116909875A CN 116909875 A CN116909875 A CN 116909875A CN 202310661578 A CN202310661578 A CN 202310661578A CN 116909875 A CN116909875 A CN 116909875A
Authority
CN
China
Prior art keywords
model
real
tested
test data
time test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310661578.0A
Other languages
Chinese (zh)
Inventor
王朝阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202310661578.0A priority Critical patent/CN116909875A/en
Publication of CN116909875A publication Critical patent/CN116909875A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • G06N3/0455Auto-encoder networks; Encoder-decoder networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0475Generative networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present application relates to the field of big data technology, and in particular, to a method, an apparatus, a computer device, a storage medium, and a computer program product for generating real-time test data. The method comprises the following steps: in response to configuration operation of selecting a target mode from a global automatic generation mode, a partial manual filling mode and a real-time changing mode, determining the target mode as a generation mode of real-time test data of the model to be tested; carrying out real-time identification on the parameter attribute of the model to be tested to obtain the attribute of each parameter in the model to be tested; determining candidate data of each parameter in the model to be tested based on the attribute of each parameter; and generating real-time test data of the model to be tested according to the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested. By adopting the method, the real-time test data of the model to be tested can be obtained rapidly.

Description

Real-time test data generation method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of big data technology, and in particular, to a method, an apparatus, a computer device, a storage medium, and a computer program product for generating real-time test data.
Background
In the initial development stage under different service scenes or development environments, the data model (to-be-tested model) needs to be changed continuously, and in the process, a large amount of test data is used for testing the performance of the to-be-tested model.
In the conventional technology, in order to improve the development efficiency and reduce the time for preparing test data, performance test is generally performed on a new model by migrating test data of the old model.
However, in the conventional technology, because the model to be tested is changed, the new model and the old test data have an unfit condition, and a great deal of repeated work is required for research and development personnel, for example, the old test data are repeatedly modified in the migration process, so as to obtain real-time test data capable of performing performance test on the new model. That is, in the conventional technology, real-time test data of the model to be tested cannot be obtained quickly.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a real-time test data generating method, apparatus, computer device, computer readable storage medium, and computer program product that can quickly obtain real-time test data of a model to be tested.
In a first aspect, the present application provides a method for generating real-time test data. The method comprises the following steps:
in response to configuration operation of selecting a target mode from a global automatic generation mode, a partial manual filling mode and a real-time changing mode, determining the target mode as a generation mode of real-time test data of the model to be tested;
carrying out real-time identification on the parameter attribute of the model to be tested to obtain the attribute of each parameter in the model to be tested;
determining candidate data of each parameter in the model to be tested based on the attribute of each parameter;
and generating real-time test data of the model to be tested according to the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested.
In one embodiment, generating real-time test data of a model to be tested according to a generation mode of the real-time test data and candidate data of each parameter in the model to be tested includes:
inputting the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested into a data generation model comprising a VAE model and a GAN model; a VAE model in the data generation model for converting data input to the data generation model into vectors of a fixed encoding format and decoding the resulting vectors into output data; the GAN model in the data generation model is used for judging the authenticity of the data output by the VAE model;
and acquiring real-time test data of the model to be tested, which is generated by processing the VAE model and the GAN model in the data generation model.
In one embodiment, generating real-time test data of a model to be tested according to a generation mode of the real-time test data and candidate data of each parameter in the model to be tested includes:
when the generation mode of the real-time test data is a global automatic generation mode, acquiring automatic generation parameters corresponding to the global automatic generation mode;
and generating real-time test data of the model to be tested based on the automatically generated parameters and the candidate data of each parameter in the model to be tested.
In one embodiment, generating real-time test data of a model to be tested according to a generation mode of the real-time test data and candidate data of each parameter in the model to be tested includes:
when the generation mode of the real-time test data is a partial manual filling mode, determining the typing position of parameters to be filled which need to be filled manually;
and responding to the typing operation of the parameters to be filled, and generating real-time test data of the model to be tested by combining the candidate data of each parameter in the model to be tested.
In one embodiment, generating real-time test data of a model to be tested according to a generation mode of the real-time test data and candidate data of each parameter in the model to be tested includes:
when the generation mode of the real-time test data is a real-time change mode, the model to be tested is identified in real time aiming at the model to be tested of the generated real-time test data;
determining the changed attribute in the model to be tested according to the attribute of each parameter in the model to be tested obtained through recognition;
and carrying out real-time change on the generated real-time test data corresponding to the model to be tested based on the changed attribute, and generating updated real-time test data.
In one embodiment, a real-time connection is established with the database, and the generated real-time test data of the model to be tested is imported into the database by using load statements.
In a second aspect, the application further provides a real-time test data generation device. The device comprises:
the generation mode determining module is used for determining the target mode as the generation mode of the real-time test data of the to-be-tested mode in response to the configuration operation of selecting the target mode from the global automatic generation mode, the partial manual filling mode and the real-time change mode;
the attribute identification module is used for carrying out real-time identification on the parameter attributes of the model to be tested to obtain the attributes of all parameters in the model to be tested;
the candidate data determining module is used for determining candidate data of each parameter in the model to be tested based on the attribute of each parameter;
the real-time test data generating module is used for generating real-time test data of the model to be tested according to the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
in response to configuration operation of selecting a target mode from a global automatic generation mode, a partial manual filling mode and a real-time changing mode, determining the target mode as a generation mode of real-time test data of the model to be tested;
carrying out real-time identification on the parameter attribute of the model to be tested to obtain the attribute of each parameter in the model to be tested;
determining candidate data of each parameter in the model to be tested based on the attribute of each parameter;
and generating real-time test data of the model to be tested according to the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
in response to configuration operation of selecting a target mode from a global automatic generation mode, a partial manual filling mode and a real-time changing mode, determining the target mode as a generation mode of real-time test data of the model to be tested;
carrying out real-time identification on the parameter attribute of the model to be tested to obtain the attribute of each parameter in the model to be tested;
determining candidate data of each parameter in the model to be tested based on the attribute of each parameter;
and generating real-time test data of the model to be tested according to the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
in response to configuration operation of selecting a target mode from a global automatic generation mode, a partial manual filling mode and a real-time changing mode, determining the target mode as a generation mode of real-time test data of the model to be tested;
carrying out real-time identification on the parameter attribute of the model to be tested to obtain the attribute of each parameter in the model to be tested;
determining candidate data of each parameter in the model to be tested based on the attribute of each parameter;
and generating real-time test data of the model to be tested according to the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested.
According to the method, the device, the computer equipment, the storage medium and the computer program product for generating the real-time test data, the configuration operation of selecting the target mode from the global automatic generation mode, the partial manual filling mode and the real-time changing mode is responded, the target mode is determined to be the generation mode of the real-time test data of the model to be tested, so that the generation mode of the real-time test data can be selected according to actual configuration requirements, the generation mode of the test data is favorable for improving the generation efficiency of the test data, then the real-time identification of the parameter attribute of each parameter in the model to be tested is carried out, the attribute of each parameter in the model to be tested is obtained, the candidate data of each parameter in the model to be tested is determined based on the attribute of each parameter, and then the real-time test data of the model to be tested are generated according to the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested, and the real-time test data of the model to be tested can be obtained quickly.
Drawings
FIG. 1 is an application environment diagram of a method of generating real-time test data in one embodiment;
FIG. 2 is a flow chart of a method of generating real-time test data in one embodiment;
FIG. 3 is a flow chart of a method for generating real-time test data according to another embodiment;
FIG. 4 is a block diagram of a real-time test data generating device in one embodiment;
fig. 5 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The method for generating the real-time test data provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The server 104 responds to configuration operation of selecting a target mode from a global automatic generation mode, a partial manual filling mode and a real-time changing mode, determines the target mode as a generation mode of real-time test data of the model to be tested, carries out real-time identification on parameter attributes of the model to be tested, obtains the attribute of each parameter in the model to be tested, and determines candidate data of each parameter in the model to be tested based on the attribute of each parameter, so that the real-time test data of the model to be tested are generated according to the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, tablet computers, etc. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, a method for generating real-time test data is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
step 202, in response to a configuration operation of selecting a target mode from the global automatic generation mode, the partial manual filling mode and the real-time changing mode, determining the target mode as a generation mode of real-time test data of the model to be tested.
The global automatic generation mode specifically comprises the following steps: all real-time test data of the model to be tested can be automatically generated according to a default rule, and the method can be applied to a simpler real-time test data generation scene of the model to be tested. The partial manual filling mode specifically comprises the following steps: the method can combine default rules and rules manually set according to actual demands, for example, the default values or the value ranges of part of real-time test data are customized, and when the real-time test data are generated, data positions needing manual typing are prompted to research personnel, data insertion errors caused by large field numbers are avoided, wrong real-time test data are generated, and the method can be applied to scenes with special requirements on the real-time test data. The real-time change mode is specifically: the method can identify the change of the model to be tested, which already has real-time test data, and according to the change of the model to be tested, carry out synchronous real-time change on the real-time test data of the model to be tested, for example, modify part of the real-time test data or regenerate the real-time test data. The configuration operation may specifically be: and the research personnel select the operation of the test data generation mode by combining the actual requirements of the test data.
The real-time test data can be specifically an SQL sentence, and can be understood as the paving data of the model to be tested.
Optionally, the server may respond to a configuration operation of selecting the target mode from the global automatic generation mode, the partial manual filling mode and the real-time changing mode by the target object, and determine the configured target mode as a generation mode of real-time test data of the model to be tested, so as to generate the real-time test data of the model to be tested according to the determined generation mode. The target object may be a developer who performs performance test on the model to be tested.
And 204, carrying out real-time identification on the parameter attribute of the model to be tested to obtain the attribute of each parameter in the model to be tested.
The parameter attribute may specifically be: data type, data name, data value range, data format, etc.
Optionally, the server may perform real-time parameter attribute identification on the model to be tested based on a pre-constructed identification analysis model, so as to obtain attributes of each parameter in the model to be tested.
For example, the server may construct an identification analysis model based on a typeof operator, an instance function, and the like. In this embodiment, the functions involved in constructing the recognition analysis model include, but are not limited to, several of the functions illustrated.
Step 206, determining candidate data of each parameter in the model to be tested based on the attribute of each parameter.
The candidate data of each parameter may specifically be: the possible values of each parameter.
Optionally, the server may determine candidate data of each parameter in the data model to be tested by adopting an enumeration or text recognition mode based on the attribute of each parameter in the data model to be tested.
Illustratively, taking the parameter "user gender" as an example, the server may determine that the candidate data for that parameter is "male" or "female". Taking the parameter "user age" as an example, the server may determine that the candidate data for the parameter is "0 years old to 100 years old".
And step 208, generating real-time test data of the model to be tested according to the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested.
Optionally, the server may select to generate and directly output the real-time test data of the model to be tested according to the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested, or perform real-time change on the real-time test data generated by the model to be tested, so as to generate real-time test data after real-time change.
Taking a to-be-tested model in the field of financial science and technology as an example, the server can determine a generation mode of required real-time test data according to business requirements related to the financial science and technology, and generate the real-time test data of the to-be-tested model by combining the determined generation mode and candidate data of each parameter related to the financial science and technology in the to-be-tested model.
In the method for generating real-time test data, firstly, in response to configuration operation of selecting a target mode from a global automatic generation mode, a partial manual filling mode and a real-time changing mode, the target mode is determined to be a generation mode of the real-time test data of the model to be tested, so that a proper generation mode of the test data can be selected in combination with actual configuration requirements, the generation efficiency of the test data is improved, then, the real-time identification of parameter attributes of the model to be tested is carried out to obtain the attribute of each parameter in the model to be tested, candidate data of each parameter in the model to be tested is determined based on the attribute of each parameter, and then, the real-time test data of the model to be tested is generated according to the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested, so that the real-time test data of the model to be tested can be obtained quickly.
In one embodiment, generating real-time test data of a model to be tested according to a generation mode of the real-time test data and candidate data of each parameter in the model to be tested includes:
inputting the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested into a data generation model comprising a VAE model and a GAN model; a VAE model in the data generation model for converting data input to the data generation model into vectors of a fixed encoding format and decoding the resulting vectors into output data; the GAN model in the data generation model is used for judging the authenticity of the data output by the VAE model;
and acquiring real-time test data of the model to be tested, which is generated by processing the VAE model and the GAN model in the data generation model.
Among them, VAE (deep learning generation model based on variational ideas, variational autoencoder), namely variational self-encoder, is essentially a kind of probability distribution variation. The VAE is generally divided into two parts, namely encoding (decoder) to convert data input to the VAE model into a vector in a fixed encoding format and decoding (decoder) to decode the vector in the fixed encoding format into data to be output. GAN (Generative Adversarial Network) is a countermeasure generation network, namely, growth is carried out in continuous generation and countermeasure, namely, data can mutually influence and mutually evolve, new data are continuously generated in the process, the newly generated data are added into a new round of countermeasure, and the process can simulate the generation process of real data, because the data are mutually influenced rather than being infinitely repeated according to the established rule.
In a data generation model comprising a VAE model and a GAN model, the GAN is similar to a discriminator, the data output by the VAE model is scored, and the subsequent training is influenced according to the score to achieve the effect of antagonism and generation.
Optionally, the server may input the generating manner of the real-time test data and the candidate data of each parameter in the model to be tested into a data generating model including a VAE model and a GAN model, obtain the data output by the VAE model first, obtain a scoring result of the GAN model on the data output by the VAE model, and obtain the real-time test data of the model to be tested generated by processing the VAE model and the GAN model in the data generating model according to the scoring result.
In this embodiment, the VAE model and the GAN model are combined to generate real-time test data of the model to be tested, so that the authenticity of the generated real-time test data can be improved.
In one embodiment, generating real-time test data of a model to be tested according to a generation mode of the real-time test data and candidate data of each parameter in the model to be tested includes:
when the generation mode of the real-time test data is a global automatic generation mode, acquiring automatic generation parameters corresponding to the global automatic generation mode;
and generating real-time test data of the model to be tested based on the automatically generated parameters and the candidate data of each parameter in the model to be tested.
Under the condition that the model to be tested is simpler and no special requirement is made on the real-time test data, the research and development personnel can configure the generation mode of the real-time test data into a global automatic generation mode.
Optionally, when the generation mode of the real-time test data is a global automatic generation mode, the server may obtain, from the database, an automatic generation parameter corresponding to the pre-stored global automatic generation mode, so as to automatically generate all real-time test data of the model to be tested based on the automatic generation parameter and candidate data of each parameter in the model to be tested.
In this embodiment, when there is no special requirement on the real-time test data, the real-time test data of the model to be tested may be generated directly based on the global automatic generation mode according to the preset automatic generation parameters.
In one embodiment, generating real-time test data of a model to be tested according to a generation mode of the real-time test data and candidate data of each parameter in the model to be tested includes:
when the generation mode of the real-time test data is a partial manual filling mode, determining the typing position of parameters to be filled which need to be filled manually;
and responding to the typing operation of the parameters to be filled, and generating real-time test data of the model to be tested by combining the candidate data of each parameter in the model to be tested.
Under the condition that the model to be tested is complex and special requirements are made on the real-time test data, the research and development personnel can configure the generation mode of the real-time test data into a partial manual filling mode.
Optionally, when the generation mode of the real-time test data is a partial manual filling mode, the server may determine a typing position of parameters to be filled which need to be filled manually according to a manual filling requirement configured by a target object (developer), display the position to be filled manually to the target object, avoid excessive fields of the target object, input the parameters to be filled at an incorrect data position, and then obtain a custom parameter input by the target object at the typing position in response to the typing operation of the parameters to be filled by the target object at the typing position, so as to combine candidate data of each parameter in the model to be tested, and generate the real-time test data of the model to be tested.
In this embodiment, when special requirements are made on the real-time test data, the real-time test data of the model to be tested may be generated directly based on a partial manual filling mode according to the manual filling parameters defined by the target object.
In one embodiment, generating real-time test data of a model to be tested according to a generation mode of the real-time test data and candidate data of each parameter in the model to be tested includes:
when the generation mode of the real-time test data is a real-time change mode, the model to be tested is identified in real time aiming at the model to be tested of the generated real-time test data;
determining the changed attribute in the model to be tested according to the attribute of each parameter in the model to be tested obtained through recognition;
and carrying out real-time change on the generated real-time test data corresponding to the model to be tested based on the changed attribute, and generating updated real-time test data.
The real-time change mode can be started for the model to be tested, which has the test data, if the model is changed.
Optionally, when the generation mode of the real-time test data is a real-time change mode, the server may identify the model to be tested for the generated real-time test data in real time, determine the changed attribute in the model to be tested according to the identified attribute of each parameter in the model to be tested, when the proportion of the changed attribute does not exceed the preset threshold, the server may perform real-time change (partial update) on the generated real-time test data based on the changed attribute, generate updated real-time test data, and when the proportion of the changed attribute exceeds the preset threshold, re-generate the real-time test data (total update) of the model to be tested, so as to obtain updated real-time test data.
In this embodiment, the generated real-time test data can be changed in real time according to the change of the model to be tested, without repeated manual modification, and the real-time test data of the model to be tested can be obtained quickly.
In one embodiment, a real-time connection is established with the database, and the generated real-time test data of the model to be tested is imported into the database by using load statements.
The load statement can quickly import the content of one text file into the database.
Optionally, considering the situation that the data size of the real-time test data is large, the server can establish real-time connection with the databases, wherein the number of the databases connected with the server is at least one, and load sentences are adopted to import the generated real-time test data of the model to be tested into the databases in real time, and in the importing process, a multithreading concurrency mode can be adopted to synchronously import the data in a multithreading mode.
In this embodiment, the real-time test data is stored in a warehouse by adopting a mode of connecting the database load in real time, instead of loading and warehousing the generated real-time test data in a unified way, so that the efficiency of storing the real-time test data can be improved.
In one embodiment, the method for generating real-time test data can be applied to the writing of regular expressions, for example, a standard regular expression is used as a model to be tested, and rule/parameter attributes (data types, ranges, names and the like) in the standard regular expression are identified to generate rule-conforming escape regular expression, namely, more bottoming data of the model to be tested.
In the embodiment, the problems that regular expressions are difficult to read, easy to generate errors and low in generation efficiency in the development process can be solved.
In one embodiment, as shown in fig. 3, another method for generating real-time test data is provided, which mainly includes the following procedures:
step 302, in response to a configuration operation of selecting a target mode from a global automatic generation mode, a partial manual filling mode and a real-time changing mode, determining the target mode as a generation mode of real-time test data of a model to be tested;
step 304, carrying out real-time identification on the parameter attribute of the model to be tested to obtain the attribute of each parameter in the model to be tested;
step 306, determining candidate data of each parameter in the model to be tested based on the attribute of each parameter;
step 308, inputting the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested into a data generation model comprising a VAE model and a GAN model, and obtaining the real-time test data of the model to be tested which is generated by processing the VAE model and the GAN model in the data generation model;
and 310, establishing real-time connection with the database, and importing the generated real-time test data of the model to be tested into the database by adopting load sentences.
Optionally, when the generation mode of the real-time test data is the global automatic generation mode, acquiring an automatic generation parameter corresponding to the global automatic generation mode, and generating the real-time test data of the model to be tested based on the automatic generation parameter and the candidate data of each parameter in the model to be tested.
Optionally, when the generating mode of the real-time test data is a partial manual filling mode, determining a typing position of parameters to be filled in, responding to the typing operation of the parameters to be filled in, and generating the real-time test data of the model to be tested by combining candidate data of each parameter in the model to be tested.
Optionally, when the generation mode of the real-time test data is a real-time change mode, identifying the model to be tested in real time according to the generated model to be tested of the generated real-time test data, determining the changed attribute in the model to be tested according to the attribute of each parameter in the identified model to be tested, and carrying out real-time change on the generated real-time test data corresponding to the model to be tested based on the changed attribute to generate updated real-time test data.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a real-time test data generating device for realizing the real-time test data generating method. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation in the embodiment of one or more real-time test data generating apparatus provided below may be referred to the limitation of the real-time test data generating method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 4, there is provided a real-time test data generating apparatus, including: the device comprises a generation mode determining module, an attribute identifying module, a candidate data determining module and a real-time test data generating module, wherein:
the generation mode determining module is used for determining the target mode as the generation mode of the real-time test data of the to-be-tested mode in response to the configuration operation of selecting the target mode from the global automatic generation mode, the partial manual filling mode and the real-time change mode;
the attribute identification module is used for carrying out real-time identification on the parameter attributes of the model to be tested to obtain the attributes of all parameters in the model to be tested;
the candidate data determining module is used for determining candidate data of each parameter in the model to be tested based on the attribute of each parameter;
the real-time test data generating module is used for generating real-time test data of the model to be tested according to the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested.
In the real-time test data generating device, firstly, in response to configuration operation of selecting the target mode from the global automatic generation mode, the partial manual filling mode and the real-time changing mode, the target mode is determined to be the generation mode of the real-time test data of the model to be tested, so that the generation mode of the suitable test data can be selected in combination with actual configuration requirements, the generation efficiency of the test data is improved, then, the real-time identification of the parameter attribute of the model to be tested is carried out, the attribute of each parameter in the model to be tested is obtained, the candidate data of each parameter in the model to be tested is determined based on the attribute of each parameter, and then, the real-time test data of the model to be tested is generated according to the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested, so that the real-time test data of the model to be tested can be obtained quickly.
In one embodiment, the real-time test data generating module is further configured to input the generating mode of the real-time test data and the candidate data of each parameter in the model to be tested into a data generating model including a VAE model and a GAN model, and obtain the real-time test data of the model to be tested generated by processing the VAE model and the GAN model in the data generating model. The VAE model in the data generation model is used for converting the data of the input data generation model into a vector with a fixed coding format and decoding the obtained vector into output data; the GAN model in the data generation model is used for judging the authenticity of the data output by the VAE model.
In one embodiment, the real-time test data generating module is further configured to obtain an automatic generation parameter corresponding to the global automatic generation mode when the generation mode of the real-time test data is the global automatic generation mode, and generate the real-time test data of the model to be tested based on the automatic generation parameter and the candidate data of each parameter in the model to be tested.
In one embodiment, the real-time test data generating module is further configured to determine a typing position of a parameter to be filled in manually when the real-time test data is generated in a partial manual filling mode, and generate real-time test data of the model to be tested by combining candidate data of each parameter in the model to be tested in response to a typing operation of the parameter to be filled in.
In one embodiment, when the generation mode of the real-time test data is a real-time change mode, the real-time test data generation module is further configured to identify the model to be tested for the generated real-time test data in real time, determine the changed attribute in the model to be tested according to the identified attribute of each parameter in the model to be tested, and change the generated real-time test data corresponding to the model to be tested in real time based on the changed attribute, so as to generate updated real-time test data.
In one embodiment, the real-time test data generating device further includes data importing, where the data importing is used to establish real-time connection with the database, and load statements are used to import the generated real-time test data of the model to be tested into the database.
The modules in the real-time test data generating device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing real-time test data generation data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of generating real-time test data.
It will be appreciated by those skilled in the art that the structure shown in FIG. 5 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the data (including, but not limited to, data for analysis, stored data, displayed data, etc.) related to the present application are information and data fully authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method for generating real-time test data, the method comprising:
responding to configuration operation of selecting a target mode from a global automatic generation mode, a partial manual filling mode and a real-time changing mode, and determining the target mode as a generation mode of real-time test data of a model to be tested;
carrying out real-time identification on the parameter attribute of the model to be tested to obtain the attribute of each parameter in the model to be tested;
determining candidate data of each parameter in the model to be tested based on the attribute of each parameter;
and generating the real-time test data of the model to be tested according to the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested.
2. The method according to claim 1, wherein the generating real-time test data of the model to be tested according to the generating manner of the real-time test data and candidate data of each parameter in the model to be tested includes:
inputting the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested into a data generation model comprising a VAE model and a GAN model; the VAE model in the data generation model is used for converting the data input into the data generation model into a vector with a fixed coding format and decoding the obtained vector into output data; the GAN model in the data generation model is used for judging the authenticity of the data output by the VAE model;
and acquiring real-time test data of the model to be tested, which is generated by processing a VAE model and a GAN model in the data generation model.
3. The method according to claim 1, wherein the generating real-time test data of the model to be tested according to the generating manner of the real-time test data and candidate data of each parameter in the model to be tested includes:
when the generation mode of the real-time test data is a global automatic generation mode, acquiring automatic generation parameters corresponding to the global automatic generation mode;
and generating real-time test data of the model to be tested based on the automatically generated parameters and the candidate data of each parameter in the model to be tested.
4. The method according to claim 1, wherein the generating real-time test data of the model to be tested according to the generating manner of the real-time test data and candidate data of each parameter in the model to be tested includes:
when the generation mode of the real-time test data is a partial manual filling mode, determining the typing position of parameters to be filled which need to be filled manually;
and responding to the typing operation of the parameters to be filled, and generating real-time test data of the model to be tested by combining candidate data of each parameter in the model to be tested.
5. The method according to claim 1, wherein the generating real-time test data of the model to be tested according to the generating manner of the real-time test data and candidate data of each parameter in the model to be tested includes:
when the generation mode of the real-time test data is a real-time change mode, aiming at the model to be tested of the generated real-time test data, carrying out real-time identification on the model to be tested;
determining the changed attribute in the model to be tested according to the attribute of each parameter in the identified model to be tested;
and based on the changed attribute, carrying out real-time change on the generated real-time test data corresponding to the model to be tested, and generating updated real-time test data.
6. The method according to claim 1, wherein the method further comprises:
and establishing real-time connection with a database, and importing the generated real-time test data of the model to be tested into the database by adopting load sentences.
7. A real-time test data generation apparatus, the apparatus comprising:
the generation mode determining module is used for determining the target mode as the generation mode of the real-time test data of the model to be tested in response to the configuration operation of selecting the target mode from the global automatic generation mode, the partial manual filling mode and the real-time change mode;
the attribute identification module is used for carrying out real-time identification on the parameter attribute of the model to be tested to obtain the attribute of each parameter in the model to be tested;
the candidate data determining module is used for determining candidate data of each parameter in the model to be tested based on the attribute of each parameter;
and the real-time test data generation module is used for generating the real-time test data of the model to be tested according to the generation mode of the real-time test data and the candidate data of each parameter in the model to be tested.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310661578.0A 2023-06-06 2023-06-06 Real-time test data generation method, device, computer equipment and storage medium Pending CN116909875A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310661578.0A CN116909875A (en) 2023-06-06 2023-06-06 Real-time test data generation method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310661578.0A CN116909875A (en) 2023-06-06 2023-06-06 Real-time test data generation method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116909875A true CN116909875A (en) 2023-10-20

Family

ID=88355350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310661578.0A Pending CN116909875A (en) 2023-06-06 2023-06-06 Real-time test data generation method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116909875A (en)

Similar Documents

Publication Publication Date Title
CN109739995B (en) Information processing method and device
CN114579584B (en) Data table processing method and device, computer equipment and storage medium
CN116795995A (en) Knowledge graph construction method, knowledge graph construction device, computer equipment and storage medium
CN111597336A (en) Processing method and device of training text, electronic equipment and readable storage medium
CN116861107A (en) Business content display method, device, equipment, medium and product
CN116304251A (en) Label processing method, device, computer equipment and storage medium
CN116909875A (en) Real-time test data generation method, device, computer equipment and storage medium
US20140344235A1 (en) Determination of data modification
CN116882408B (en) Construction method and device of transformer graph model, computer equipment and storage medium
CN117933206B (en) Service data processing method, device, equipment, storage medium and program product
CN117217172B (en) Table information acquisition method, apparatus, computer device, and storage medium
CN117852510A (en) Service data processing method, device, computer equipment and storage medium
CN117150311A (en) Data processing method, device, equipment and storage medium
CN117521667A (en) Semantic information processing method, semantic information processing device, computer equipment, storage medium and product
CN116881374A (en) Knowledge graph construction method and device, computer equipment and storage medium
CN118133044A (en) Problem extension method, device, computer equipment, storage medium and product
CN117472431A (en) Code annotation generation method, device, computer equipment, storage medium and product
CN117035264A (en) Post recommendation method, post recommendation device, computer equipment and storage medium
CN117951271A (en) Data analysis method, device, computer equipment and computer readable storage medium
CN117933206A (en) Service data processing method, device, equipment, storage medium and program product
CN117112424A (en) Method, device, equipment, medium and product for generating test case
CN117609210A (en) Data table processing method, device, computer equipment and storage medium
CN113076317A (en) Data processing method, device and equipment based on big data and readable storage medium
CN117435651A (en) Test data processing method, device, computer equipment and storage medium
CN117540915A (en) Big data technology-based selection scheme generation method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination