Intelligent test data generation and management system
Patent Information
- Application Number
- CN202511086313.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-11-28
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN121029587A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of software test data management, and in particular to an intelligent test data generation and management system. BACKGROUND
[0002] In the development and testing process of a software system, the construction and management of test data is a basic link for ensuring test integrity and software quality. With the increase in system complexity and the popularization of test automation, test scenarios tend to be high-dimensional, multi-type and high-concurrent, which puts higher requirements on the structural rationality, coverage breadth and generation efficiency of test data. To meet the growing quality verification needs, software testing is gradually evolving towards structured, model-driven and collaborative management. However, the current generation and management mechanism of test data is still primitive and cannot meet the systematic requirements for high-quality test data in modern software engineering.
[0003] In the existing test process, there are two key problems: the generation of test data mostly relies on manual creation or the use of basic random generators, and there is a lack of systematic modeling of field structure, data dependency and scenario rules, resulting in a lack of diversity and business consistency of data, which cannot effectively support function and boundary verification in complex scenarios; and in the use process of test data, there is generally a lack of unified data version control mechanism, collaboration between testers is prone to data conflicts and cannot be traced back; sensitive information lacks targeted permission control and desensitization processing in multiple environments, and there is a risk of data leakage, making it difficult to meet the compliance, security and controllability requirements in enterprise-level testing processes. SUMMARY
[0004] The purpose of the present application is to provide an intelligent test data generation and management system to solve the two key problems mentioned in the background.
[0005] To achieve the above purpose, the purpose of the present application is to provide an intelligent test data generation and management system, comprising:
[0006] A data model and rule management unit defines field structure, format specification, verification logic and inter-field dependency to construct and maintain data models and generation rules;
[0007] A data generation engine unit generates structure-driven diversified test data by controlling field types, relationship patterns, value ranges and distribution parameters according to data models and generation rules;
[0008] A data version control unit records version information of test data generation and change processes, and manages structure-driven diversified test data throughout the life cycle through version number identification, historical version tracing and rollback operations.
[0009] The Data Privacy and Security Management Unit is used to perform data desensitization processing, access control, and data encryption operations using field desensitization strategy binding mechanisms during the generation, transmission, and storage of structure-driven diverse test data, thereby providing multi-dimensional security protection and privacy compliance control.
[0010] Preferably, the data model and rule management unit is used to establish a corresponding version identifier for each version of the data model and the generated rules, record the change information of field structure, format specifications, verification logic and field dependencies, and support historical tracing and difference comparison of the model and rules based on the version identifier;
[0011] Among them, field structure refers to the basic structural definition of each field in the data model; format specification refers to the data expression format and structural requirements set for each field value; validation logic refers to the set of rules for logically validating the validity of field values; and field dependency refers to the logical relationship between the value of one field and the value of another field.
[0012] Preferably, the data model is used to describe the logical structure, field information, relational schema, and constraint attributes of the test data to be generated as an abstract structure set; the specific components of the data model include a set of fields, field structure, relationships between fields, field attributes, and model hierarchical structure.
[0013] The generation rules are a set of control logics, such as data value selection methods, ranges, dependency logic, and probability distributions, configured for each field or field group based on the fields and structures defined in the data model. These rules guide the system's behavior when automatically generating test data. The specific components of the generation rules include field value ranges, dependency constraints, format expressions, and generation density.
[0014] Preferably, the data generation engine unit includes multi-type generation logic that supports the generation of test data of text type, numerical type, date type and image type. It is used to combine data model and generation rules to generate structure-driven diverse test data and allows configuration of multiple type combinations to match the needs of different test scenarios.
[0015] Preferably, the multi-type generation logic includes a generation control mechanism that generates field values based on the field value range and probability distribution function set by the generation rules;
[0016] The probability distribution function includes normal distribution, uniform distribution, and enumerated set extraction.
[0017] Preferably, the generation control mechanism for field value generation constructs the field generation order based on the dependency relationship between fields, and automatically adjusts the value generation logic of the dependent field when the dependency relationship is established.
[0018] Preferably, the data version control unit includes a state recovery mechanism for performing version rollback operations;
[0019] The state recovery mechanism restores data content based on the version information recorded for each historical version. The version information includes the corresponding data model, generation rules, generated data content, generation time, and operator identifier. Upon receiving a rollback request with a specified version identifier, the mechanism performs a data replacement operation and, after recovery, synchronously updates and appends the current data version identifier to the operation record.
[0020] Preferably, the data version control unit further includes a collaborative management mechanism for version operation control based on user permissions; wherein, the collaborative management mechanism sets permission levels for operating users, including read-only, modify, commit, and rollback, executes a version conflict detection strategy when multiple users operate concurrently, and prompts for version merging and rejects the operation based on operation priority and timestamp when a conflict is detected.
[0021] Preferably, the field desensitization strategy binding mechanism is used to dynamically bind the access permissions of different user roles to the desensitization rules of specified fields, and to mask, replace and obfuscate field values according to the permission configuration of the current user when generating test data.
[0022] Preferably, the data privacy and security management unit also sets access control policies according to the level classification of the current test environment, dividing the test environment into production simulation environment, integration test environment and functional test environment, and configuring different data access permissions and encryption policies for each level environment.
[0023] Compared with the prior art, the above-mentioned technical solution of the present invention has the following beneficial technical effects:
[0024] 1. In this invention, based on a structured data model and generation rule construction mechanism, the test data generation engine can automatically generate test data of multiple types, high consistency, and high coverage, significantly improving the automation level and scenario adaptability of test data construction;
[0025] 2. In this invention, a data version control mechanism and a multi-dimensional permission security policy combination framework are used to realize version traceability, conflict control and de-identification compliance processing of test data in the process of multi-user collaboration and multi-environment deployment, which effectively improves the controllability, security and enterprise-level compliance of test data management. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of an embodiment of the present invention;
[0027] Attached reference numerals: 1. Data model and rule management unit; 2. Data generation engine unit; 3. Data version control unit; 4. Data privacy and security management unit. Detailed Implementation
[0028] Example 1, as Figure 1 As shown, an intelligent test data generation and management system is provided, including: a data model and rule management unit 1, a data generation engine unit 2, a data version control unit 3, and a data privacy and security management unit 4.
[0029] In the data privacy and security management unit 1 of this embodiment, the data model and rule management unit 1 constructs and maintains the data model and generates rules by defining field structure, format specifications, validation logic and inter-field dependencies;
[0030] The data model and rule management unit 1 is used to establish a corresponding version identifier for each version of the data model and the generated rules, record the change information of field structure, format specifications, verification logic and field dependencies, and support historical tracing and difference comparison of the model and rules based on the version identifier;
[0031] Among them, field structure refers to the basic structural definition of each field in the data model; format specification refers to the data expression format and structural requirements set for each field value; validation logic refers to the set of rules for logically validating the validity of field values; and field dependency refers to the logical relationship between the value of one field and the value of another field.
[0032] In this embodiment, the field structure includes elements such as field name, data type, whether it is a primary key / foreign key, and whether it is a required field; the format specifications include string regular expression restrictions, date format requirements, encoding style, unit standards, and language format; the validation logic includes range restrictions, uniqueness constraints, numerical validity judgment, and enumeration value validity; and the range restrictions, uniqueness constraints, numerical validity judgment, and enumeration value validity are used to describe the value generation constraints or condition generation relationships between fields.
[0033] In this embodiment, the data model is used to describe the logical structure, field information, relational schema, and constraint attributes of the test data to be generated as an abstract structure set; the specific components of the data model include a set of fields, field structure, relationships between fields, field attributes, and model hierarchical structure.
[0034] The generation rules are a set of control logics, such as data value selection methods, ranges, dependency logic, and probability distributions, configured for each field or field group based on the fields and structures defined in the data model. These rules guide the system's behavior when automatically generating test data. The specific components of the generation rules include field value ranges, dependency constraints, format expressions, and generation density.
[0035] In this embodiment, the data model determines the structural form of the generated data, provides a binding interface for subsequent generation rules, and is associated with version control to support model evolution traceability; the generation rules determine the generated content and numerical characteristics of the test data, are bound to the data model, take effect for corresponding fields, and can be dynamically adjusted according to test objectives and test case strategies.
[0036] In the data privacy and security management unit 2 of this embodiment, the data generation engine unit 1 generates structure-driven diversified test data by controlling field types, relationship patterns, value ranges and distribution parameters according to the data model and generation rules.
[0037] The data generation engine unit 2 includes multi-type generation logic that supports the generation of test data in text, numerical, date and image types. It is used to combine data models and generation rules to generate structure-driven diverse test data and allows configuration of multiple type combinations to match different test scenario requirements.
[0038] In this embodiment, the multi-type generation logic includes a generation control mechanism that generates field values based on the field value range and probability distribution function set by the generation rules;
[0039] The probability distribution function includes normal distribution, uniform distribution, and enumerated set extraction.
[0040] In this embodiment, the generation control mechanism for field value generation constructs the field generation order based on the dependency relationship between fields, and automatically adjusts the value generation logic of the dependent field when the dependency relationship is established.
[0041] In the data privacy and security management unit 3 of this embodiment, the data version control unit 3 is used to record version information of the test data generation and modification process. By performing version number identification, historical version tracing and rollback operations, the full life cycle management structure drives diverse test data.
[0042] The data version control unit 3 includes a state recovery mechanism for performing version rollback operations;
[0043] The state recovery mechanism restores data content based on the version information recorded for each historical version. The version information includes the corresponding data model, generation rules, generated data content, generation time, and operator identifier. Upon receiving a rollback request with a specified version identifier, the mechanism performs a data replacement operation and, after recovery, synchronously updates and appends the current data version identifier to the operation record.
[0044] In this embodiment, the data version control unit 3 further includes a collaborative management mechanism for version operation control based on user permissions. This mechanism sets permission levels for operating users, including read-only, modify, commit, and rollback. When multiple users operate concurrently, it executes a version conflict detection strategy and, upon detecting a conflict, prompts for version merging and rejects the operation based on operation priority and timestamp. In the data privacy and security management unit 4 of this embodiment, the unit performs data desensitization processing, access control, and data encryption operations using a field desensitization strategy binding mechanism during the generation, transmission, and storage of structure-driven diverse test data, providing multi-dimensional security protection and privacy compliance control.
[0045] The field desensitization strategy binding mechanism is used to dynamically bind the access permissions of different user roles to the desensitization rules of specified fields, and to mask, replace and obfuscate field values according to the permission configuration of the current user when generating test data.
[0046] In this embodiment, the data privacy and security management unit 4 also sets access control policies according to the level classification of the current test environment, dividing the test environment into production simulation environment, integration test environment and functional test environment, and configuring different data access permissions and encryption policies for each level environment.
[0047] In this embodiment, different data access permissions and encryption strategies are configured for each level of environment as follows:
[0048] In the production simulation environment, the access permission policy only authorizes users with system administrator or advanced testing roles to access the site, and by default, it blocks the display of the original values of all sensitive fields. The encryption policy uses AES-256 symmetric encryption to process all fields containing user information, uses HTTPS+Token authentication mechanism to protect the data transmission process, and supports the restriction of decrypting and displaying field-level encrypted content without exporting it.
[0049] In the integrated testing environment, access control policies authorize developers and testers to access the system, and some sensitive fields are displayed in anonymized form. Encryption policies perform field-level fuzzy encryption on specified sensitive fields (such as ID card numbers and bank card numbers), and enable column-level encryption on data stored in the database to prevent data leakage. Data files containing plaintext sensitive fields are not allowed to be exported.
[0050] In the functional testing environment, the access permission policy allows access by all project team members, and the data sample with all fields anonymized is used by default; the encryption policy can be set to disable data encryption and retain only the anonymization process, and the system automatically records all data export behavior and writes it to the audit log.
[0051] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited thereto. Various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention.
Claims
1. An intelligent test data generation and management system, characterized in that, include: The data model and rule management unit (1) constructs and maintains the data model and generates rules by defining field structure, format specifications, validation logic and inter-field dependencies; Data generation engine unit (2), data generation engine unit (1) generates structure-driven diversified test data by controlling field type, relation mode, value range and distribution parameters according to data model and generation rules; The data version control unit (3) is used to record version information of the test data generation and change process. By performing version number identification, historical version tracing and rollback operations, the full life cycle management structure drives diverse test data. The data privacy and security management unit (4) is used to perform data desensitization processing, access control and data encryption operations using field desensitization strategy binding mechanism during the generation, transmission and storage of structure-driven diverse test data, so as to carry out multi-dimensional security protection and privacy compliance control.
2. The intelligent test data generation and management system according to claim 1, characterized in that, The data model and rule management unit (1) is used to establish a corresponding version identifier for each version of the data model and the generated rules, record the change information of field structure, format specifications, verification logic and field dependencies, and support historical tracing and difference comparison of the model and rules based on the version identifier; Among them, field structure refers to the basic structural definition of each field in the data model; format specification refers to the data expression format and structural requirements set for each field value; validation logic refers to the set of rules for logically validating the validity of field values; and field dependency refers to the logical relationship between the value of one field and the value of another field.
3. The intelligent test data generation and management system according to claim 2, characterized in that, The data model is used to describe the logical structure, field information, relational schema, and constraint attributes of the test data to be generated as an abstract structural set; the specific components of the data model include field set, field structure, relationships between fields, field attributes, and model hierarchical structure. The generation rules are a set of control logics, such as data value selection methods, ranges, dependency logic, and probability distributions, configured for each field or field group based on the fields and structures defined in the data model. These rules guide the system's behavior when automatically generating test data. The specific components of the generation rules include field value ranges, dependency constraints, format expressions, and generation density.
4. The intelligent test data generation and management system according to claim 3, characterized in that, The data generation engine unit (2) includes multi-type generation logic that supports the generation of test data of text type, numerical type, date type and image type. It is used to combine data model and generation rules to generate structure-driven diverse test data and allows configuration of multiple type combinations to match different test scenario requirements.
5. The intelligent test data generation and management system according to claim 4, characterized in that, The multi-type generation logic includes a generation control mechanism that generates field values based on the field value range and probability distribution function set by the generation rules; The probability distribution function includes normal distribution, uniform distribution, and enumerated set extraction.
6. The intelligent test data generation and management system according to claim 5, characterized in that, The generation control mechanism for field value generation constructs the field generation order based on the dependency relationship between fields, and automatically adjusts the value generation logic of the dependent field when the dependency relationship is established.
7. The intelligent test data generation and management system according to claim 6, characterized in that, The data version control unit (3) includes a state recovery mechanism for performing version rollback operations; The state recovery mechanism restores data content based on the version information recorded for each historical version. The version information includes the corresponding data model, generation rules, generated data content, generation time, and operator identifier. Upon receiving a rollback request with a specified version identifier, the mechanism performs a data replacement operation and, after recovery, synchronously updates and appends the current data version identifier to the operation record.
8. The intelligent test data generation and management system according to claim 7, characterized in that, The data version control unit (3) further includes a collaborative management mechanism for version operation control based on user permissions; wherein, the collaborative management mechanism sets permission levels for operation users, including read-only, modify, commit and rollback, executes a version conflict detection strategy when multiple users operate concurrently, and prompts for version merging and operation rejection based on operation priority and timestamp when a conflict is detected.
9. The intelligent test data generation and management system according to claim 8, characterized in that, The field desensitization strategy binding mechanism is used to dynamically bind the access permissions of different user roles to the desensitization rules of specified fields, and to mask, replace and obfuscate field values according to the permission configuration of the current user when generating test data.
10. The intelligent test data generation and management system according to claim 9, characterized in that, The data privacy and security management unit (4) also sets access control policies according to the current test environment level classification, divides the test environment into production simulation environment, integration test environment and functional test environment, and configures different data access permissions and encryption policies for each level environment.
