Data generation method, system and related device
By generating the number factors, their value ranges, and mapping relationships in the template file, test data is automatically generated, solving the problem of cumbersome acquisition of real business data and improving testing efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-04-24
- Publication Date
- 2026-05-15
AI Technical Summary
In existing technologies, obtaining real business data for testing business systems is cumbersome and inefficient, especially when confidential data exists, requiring multiple levels of approval, which affects testing efficiency.
By generating the data generation factors and their value ranges included in the template file, and combining the mapping relationship and related fields, test data is automatically generated to ensure that the data conforms to the actual business distribution.
This improved the efficiency and accuracy of test data generation, ensuring that the test data conforms to the actual business operation and enhancing the accuracy of the testing system.
Smart Images

Figure CN2025090953_15052026_PF_FP_ABST
Abstract
Description
A data generation method, system, and related equipment
[0001] This application claims priority to Chinese Patent Application No. 202410537936.1, filed on April 29, 2024, entitled “A Data Generation Method, System and Related Equipment”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of computer technology, and in particular to the design of a data generation method, system and related equipment. Background Technology
[0003] With the development and popularization of computer technology, business systems used for reviewing and processing business data have gradually replaced manual processes, achieving automation and intelligence in data review and processing. For a completed business system, its various functions are tested to determine whether it can achieve the pre-designed functions.
[0004] When testing a business system, testers need to request data from business personnel based on testing requirements. They obtain real business data generated during system operation, input this data into the system, and then determine whether the system's functionality meets the requirements based on the output. However, the process of obtaining real business data from business personnel can be quite cumbersome. For example, if the data has confidentiality requirements, it may require multiple levels of approval, leading to low testing efficiency. Therefore, how to quickly obtain test data for testing business systems is a problem that needs to be solved. Summary of the Invention
[0005] This application provides a data generation method, system, and related equipment that can quickly obtain test data related to the business system under test when test data is needed, thereby improving testing efficiency.
[0006] Firstly, this application provides a data generation method, which includes: a data generation system acquiring a data generation request, the data generation request including a template file and multiple data generation factors, and then generating test data based on these multiple data generation factors and the value range corresponding to each data generation factor. The template file includes fields related to a business scenario, and the multiple data generation factors are some fields in the template file; the test data includes the multiple data generation factors and the value corresponding to each data generation factor, and the test data is used to test a business system related to the business scenario. After passing the test, the system under test is used to process data generated by a business activity within the business scenario.
[0007] In this application, the business system under test is used to process business data generated by a business in a business scenario. When testing a business system under test, a template file related to the business scenario is obtained. This template file includes fields related to the aforementioned business scenario, that is, the template file includes the fields included in the business data generated during business operation. The business data generated by this business is the data that the business system under test will process after passing the test. Then, some fields in the template file are used as data generation factors, and the value range of each data generation factor is obtained according to the value range of each field in the business data generated during actual business operation. Finally, test data is generated based on the value range of each data generation factor. This method can improve the efficiency of obtaining test data, and the value range of the data generation factors is consistent with the value range of the business data generated during actual business operation. Therefore, the obtained test data is more consistent with the data generated during actual business operation, which can improve the accuracy of the generated test data and thus improve the accuracy of testing the business system under test.
[0008] In one possible implementation, the above-mentioned generation of test data based on multiple number-generating factors and the value range corresponding to each number-generating factor includes: obtaining the value range of two number-generating factors; arranging and combining the values corresponding to the value range of the two number-generating factors to obtain the combined data corresponding to the two number-generating factors; and generating the test data based on the combined data corresponding to the two number-generating factors.
[0009] Based on the value range of the two factor generation factors, determine the possible values of each factor. Then, arrange and combine the possible values of each factor to generate multiple distinct combination data. For more than two factors, the method of generating combination data based on the two factors can be used sequentially to ultimately generate multiple sets of data corresponding to each factor.
[0010] In one possible implementation, the aforementioned multiple data generation factors include row factors and head factors. When generating test data based on the multiple data generation factors and the value range corresponding to each data generation factor, multiple rows of data can be generated based on the value range of each data generation factor included in the row factors. Multiple header data can also be generated based on the value range of each data generation factor included in the head factors, where each header data corresponds to a header identifier. The multiple header data are then combined with each row data to obtain combined data corresponding to the head factors and row factors. Finally, test data is generated based on the combined data corresponding to the head factors and row factors.
[0011] Each header data entry corresponds to a header identifier. Each header data entry forms a combined data entry with each row data entry, ensuring that the number of data entries corresponding to each identifier is the same as the number of rows. For example, if there are two row factors, each with three possible values, then nine rows can be obtained based on the row factors. If there are two header factors, each with two possible values, then four header data entries can be obtained. Each header data entry is assigned a unique identifier, ID1-ID4. Thus, based on the header and row data, 36 combined data entries can be obtained. Of these 36 combined data entries, nine have the identifier ID1 (where the two values in the header data portion of each entry are identical), and nine have the identifier ID2. In some scenarios, multiple business data entries actually belong to a single data entry. When the business system needs to process this data, it needs to retrieve all of these data entries simultaneously. In this application, by assigning identifiers to the header data in the test data generation method described above, when multiple data entries need to be input together into the system under test for processing, these multiple data entries can be retrieved using a single identifier.
[0012] In one possible implementation, the test data further includes associated fields, which are some fields in the template file and are fields that are related to the data generation factors. The data generation request also includes a mapping relationship, which includes the correspondence between the associated fields and the data generation factors. Generating test data based on multiple data generation factors and the value range corresponding to each data generation factor includes: generating the test data based on multiple data generation factors, the value range corresponding to each data generation factor, and the mapping relationship.
[0013] In actual business data generated from business operations, a data table may contain related fields. For example, if a data generation factor includes a field called "salary," and another field in the template file is "tax amount," then if the tax amount is determined based on the salary, there is a relationship between the tax amount field and the salary field. The mapping record contains the field names of the two related fields and the correspondence between their values. After generating the values corresponding to each data generation factor in each test data set, this application, for a related field in a test data set, obtains the value of that related field based on the value of the field with a mapping relationship to that related field. That is, the value of the related field is not randomly generated or randomly selected from a range of values, but determined based on its associated data generation factor. Once the value of a data generation factor is determined, the value of the related field with that factor is also determined, thus making the generated test data more consistent with the actual distribution of business data generated during actual business operations.
[0014] In one possible implementation, the number generation factors and mapping relationships are determined based on a preset method, which may be configured by the user according to the business scenario or obtained from other application programming interfaces.
[0015] In one possible implementation, the test data further includes fixed-value fields. Generating test data based on multiple data generation factors and the value range corresponding to each factor includes: determining fixed-value fields based on a template file, multiple data generation factors, and associated fields; the fixed-value fields being a subset of fields in the template file; and generating the test data based on multiple data generation factors, the value range corresponding to each factor, the mapping relationship, and the fixed-value segments. In this application, the test data should include all fields of the business data generated during business operation and generate values for each field to avoid the test data being identified as unqualified by the system under test due to incompleteness.
[0016] Secondly, this application provides a data generation apparatus, comprising: an acquisition module for acquiring a data generation request, the data generation request including a template file and multiple data generation factors; wherein the template file includes fields related to a business scenario, and the multiple data generation factors are some fields in the template file; and a processing module for generating test data based on the multiple data generation factors and the value range corresponding to each data generation factor; the test data includes the multiple data generation factors and the values corresponding to the multiple data generation factors, and the test data is used to test a business system under test related to a business scenario.
[0017] In one possible implementation, the above processing module is specifically used to: obtain the value range of the two number generation factors, arrange and combine the values corresponding to the value range of the two number generation factors to obtain the combined data corresponding to the two number generation factors; and then generate the above test data based on the combined data corresponding to the two number generation factors.
[0018] In one possible implementation, the aforementioned multiple data generation factors include row factors and head factors; the row factors include one or more of the data generation factors, and the head factors include one or more of the data generation factors. The processing module generates test data based on the aforementioned multiple data generation factors and the value range corresponding to each data generation factor. Specifically, it generates multiple rows of data based on the value range of each data generation factor included in the row factors; it generates multiple header data based on the value range of each data generation factor included in the head factors, wherein each header data corresponds to a header identifier; it combines the multiple header data with the row data respectively to obtain combined data corresponding to the head factors and row factors; and then generates the aforementioned test data based on the combined data corresponding to the head factors and row factors.
[0019] In one possible implementation, the test data also includes associated fields, which are some fields in the template file. The data generation request also includes mapping relationships, which include the correspondence between associated fields and multiple data generation factors. The processing module is specifically used to generate test data based on multiple data generation factors, the value range of each data generation factor, and the mapping relationships.
[0020] In one possible implementation, the aforementioned number generation factors and mapping relationships are determined based on a preset method, which may include user configuration based on business scenarios or acquisition from other application programming interfaces.
[0021] In one possible implementation, the test data further includes a fixed value field; the apparatus further includes: a parsing module, used to determine the fixed value field in the template file based on the template file, multiple number generation factors, and associated fields; the fixed value field is a subset of fields in the template file; the processing module is specifically used to: generate test data based on multiple number generation factors, the value range corresponding to each number generation factor, the above mapping relationship, and the fixed value segment.
[0022] Thirdly, this application provides a computing device including a processor and a memory, the memory being used to store instructions, and the processor being used to execute the instructions stored in the memory to implement the method as described in the first aspect or any possible implementation thereof.
[0023] Fourthly, this application provides a computing device cluster, which includes at least one computing device, each computing device including a processor and a memory, wherein the processor of each computing device is used to execute instructions stored in the memory to enable the computing device cluster to implement the method as described in the first aspect or any possible implementation thereof.
[0024] Fifthly, this application provides a computer-readable storage medium including computer program instructions that, when executed by a cluster of computing devices, cause the computing devices to implement the method described in the first aspect or any possible implementation thereof.
[0025] In a sixth aspect, this application provides a computer program product, which includes a computer program that, when run by a cluster of computing devices, implements the method described in the first aspect or any possible implementation of the first aspect.
[0026] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description
[0027] Figure 1 is a schematic diagram of a data processing system provided in this application;
[0028] Figure 2 is a flowchart illustrating a data generation method provided in this application;
[0029] Figure 3 is a schematic diagram of a configuration interface provided in this application;
[0030] Figure 4 is a schematic diagram of a number factor configuration interface provided in this application;
[0031] Figure 5 is a schematic diagram of a combined data generation process provided in this application;
[0032] Figure 6 is a schematic diagram of another combined data generation process provided in this application;
[0033] Figure 7 is a schematic diagram of another combined data generation process provided in this application;
[0034] Figure 8 is a schematic diagram of another data processing system provided in this application;
[0035] Figure 9 is a schematic diagram of a computing device provided in this application;
[0036] Figure 10 is a schematic diagram of the network connection between two computing devices provided in this application. Detailed Implementation
[0037] A business system is a system for reviewing, validating, and processing data generated from a specific business transaction. Different business transactions differ, resulting in varying fields in the generated data. Therefore, different business systems need to be developed based on the specific requirements of each business transaction. After the business system is developed, its various functions need to be tested to determine if it can fulfill its designed functionalities.
[0038] When testing business systems, testers need to request data from business personnel based on testing requirements. They obtain real business data generated during system operation, input this data into the business system, and then determine whether the system's functionality meets the requirements based on the output. However, the process of providing real business data can be quite cumbersome. For example, the data may be confidential and require multiple levels of approval; or the business personnel may need to screen the data to prevent leaks, leading to low testing efficiency. Furthermore, different business systems generate different business data. If data requests are required after each business system is developed, it will severely impact testing efficiency. Therefore, finding a way to quickly obtain data for testing business systems is a problem that needs to be solved.
[0039] This application provides a data generation method for generating test data. The test data is used to test a business system under test. In other words, the test data includes the fields and values of each field in the business data processed by the business system under test after the test is passed. The business data is data generated by a business during actual operation.
[0040] When testing a business system, the data generation system first obtains a template file. This template file includes the fields in the business data processed by the system after successful testing; in other words, it includes fields related to the business scenario. Then, based on the data generation factors and their corresponding value ranges, multiple combined data entries are generated for each factor. The data generation factors are some fields in the template file, and the combined data includes the values corresponding to each factor; that is, the combined data is a portion of the final generated test data. Besides the data generation factors, the template file also includes other fields, including related fields that map to the factors. After obtaining the values corresponding to the factors, the values of each related field are generated based on the factors and the mapping relationships. Finally, for the fixed-value fields in the template file other than the factors and related fields, values are randomly generated to produce the aforementioned test data.
[0041] The mapping relationships described above include the associations between fields and the correspondences between the values of fields with associations. For example, the "Company Code" field is a data factor, and the "Company Chinese Name" field is an associated field. The mapping relationships include the association between the "Company Code" and "Company Chinese Name" fields, as well as the correspondence between the values of the "Company Code" field and the values of the "Company Chinese Name" field. For instance, if the value of "Company Code" is 001, the corresponding value of "Company Chinese Name" is "Company A"; if the value of "Company Code" is 002, the corresponding value of "Company Chinese Name" is "Company B".
[0042] The data generation method and data generation system provided in this application are described below with reference to the accompanying drawings.
[0043] Referring to Figure 1, which is a schematic diagram of a data processing system provided in this application, the data processing system includes a data generation system 100, a client 200, and a storage system. The data generation system 100, the client 200, and the storage system are interconnected. The client 200 that establishes a communication connection with the data generation system 100 can be one or more, and this application does not impose specific limitations on this.
[0044] The data generation system 100 can be deployed on a single computing device or in a cluster of computing devices, which can be servers, virtual machines, containers, or edge computing devices. A virtual machine refers to a complete computer system simulated by software, possessing full hardware system functionality and running in a completely isolated environment. Any task that can be performed on a physical computer can also be performed in a virtual machine. When creating a virtual machine on a computing device, a portion of the physical machine's hard drive and memory capacity is used as the virtual machine's hard drive and memory capacity. Each virtual machine has an independent basic input / output system, hard drive, and operating system, and can be operated like a physical machine. A container is a portable software unit that can combine an application and all its dependencies into a single software package. This package is not limited by the underlying host operating system, thus eliminating the need to build complex environments and simplifying the application development and deployment process. Edge computing devices refer to devices that are closer to the data source and end users, featuring low latency and high bandwidth, such as intelligent routers and edge servers. A computing device cluster can include multiple of the above-mentioned computing devices; this application does not specifically limit this.
[0045] The aforementioned computing devices can be computing devices in cloud data centers, edge servers, or local servers in enterprise local data centers; this application does not impose any specific limitations.
[0046] Client 200 is deployed on a terminal device to enable human-computer interaction. Client 200 can be software or an application running on the terminal device, such as a client for a personal computer (PC), a browser-based client or browser plugin, an application (APP) running on a mobile terminal, or a console for a cloud platform; this application does not specifically limit its scope. Terminal devices include personal computers, smartphones, wearable devices, handheld processing devices, tablets, mobile laptops, augmented reality (AR) devices, virtual reality (VR) devices, smart conferencing devices, etc., and are not specifically limited here.
[0047] In one possible implementation, client 200 is a cloud platform client provided by a cloud service provider, used to offer various cloud services to users. Users can purchase or rent cloud services through client 200. The data generation method provided in this application can be one of these cloud services. The aforementioned data generation system 100 is deployed on computing equipment in a cloud data center to provide users with data generation cloud services. Users can use the data generation cloud service through client 200 to produce test data.
[0048] In another possible implementation, the data generation system 100 is deployed on a server in the enterprise's local data center. The data generation system 100 is a solution provided by the enterprise itself or a third party for generating test data. The client is deployed on user terminal devices within the enterprise, such as desktop computers and laptops. Users can use the cloud services provided by the data generation system 100 through the client 200 to generate test data.
[0049] In another possible implementation, the data generation system 100 and the client 200 can also be deployed on a computing device, which is the terminal device used by testers to test the business system. The data generation system 100 and the client can provide data generation services offline.
[0050] The storage system is used to store the data received by the data generation system 100, such as the aforementioned data generation factors, mapping relationships, and test data generated based on the data generation factors and mapping relationships. The storage system includes storage devices, which can be hard disk drives (HDDs), solid-state drives (SSDs), mechanical hard disks (HDDs), USB flash drives (Universal Serial Bus, USB), flash memory, SD cards (Secure Digital Memory Cards, SD cards), etc., and this application does not impose specific limitations. The storage array can be a redundant array of independent disks (RAID), network attached storage (NAS), storage area network (SAN), etc., and this application does not impose specific limitations.
[0051] The client 200 provides a configuration interface to the user and receives configuration parameters input by the user. The user operates on the configuration interface of the client 200, configuring the aforementioned data generation factors, mapping relationships, etc. After detecting the user's operation, the client generates a data generation request based on the user's operation and sends the data generation request to the data generation system 100 through the terminal device where the client 200 is located. After receiving the data generation request, the data generation system 100 generates the corresponding test data based on the data generation request.
[0052] The data generation method provided in this application is implemented in detail below with reference to the accompanying drawings. See Figure 2, which is a flowchart illustrating a data generation method provided in this application.
[0053] S201. The client obtains a template file, which includes fields related to the business scenario.
[0054] In this application, for a business system, a template file corresponding to the business system can be generated based on the fields included in the business data processed by the business system. This template file includes all the fields included in the business data; that is, the template file includes all the fields of the business data, which is the data generated during actual business operation. The aforementioned template file can be a table file, a JSON file, etc., and the table file can be, for example, an Excel file; this application does not impose any specific limitations.
[0055] When a business system needs to be tested, the client obtains the template file corresponding to the business system to be tested, and determines all the fields included in the test data to be generated based on the fields included in the template file.
[0056] In one possible implementation, see Figure 3, which is a schematic diagram of a configuration interface provided in this application. When a user needs to generate test data for a business system under test through a data generation system, the user can select a template file through the client's configuration interface. For example, the user triggers the "Load Template" button on the configuration interface and selects a file from local files as the template file. After detecting the template file selected by the user, the client loads and caches the template file, for example, by caching the template file in the memory of the terminal device where the client is located.
[0057] In another possible implementation, the client can also obtain the template file from other systems. For example, for the system under test, after passing the test, it is used to process business data generated by a business. The database storing this business data contains metadata of the business data, which includes all fields included in the business data, the field type of each field, and the value range of each field. The client can obtain the metadata from the database and then obtain the template file based on all fields included in the business data.
[0058] S202. The client obtains the number factors and the value range corresponding to each number factor.
[0059] During the testing of a business system, it is not necessary to test all fields of the test data each time. For example, a business system includes multiple functional modules, each of which typically processes only a subset of fields in the business data. For a given functional module, the specific fields in the business data it processes are those that influence the result of that function. Therefore, when testing a functional module of the business system, only these specific fields of the test data are needed to test the function. In this application, when testing a functional module of the business system, the fields in the full set of business data that influence the test result of that functional module are referred to as data creation factors. That is, data creation factors include a subset of the full set of fields in the test data.
[0060] In this application, the client provides a configuration interface for the user, allowing the user to input data generation factors according to testing requirements. When the user needs to test a functional module of the business system, after obtaining the template file, the user can trigger the "Import Factors" button (Figure 3). Upon detecting this, the client retrieves all fields from the template file and displays them in the data generation factor configuration interface (Figure 4). Option boxes are provided for the user to select data generation factors for testing the business system based on their testing needs. As shown in Figure 4, the user selects fields A, B, C, E, and H as data generation factors in the configuration interface and configures the value range for each factor. The value range of a data generation factor may be a discrete numerical value, a continuous value interval, or a string, etc. For example, if a factor is a company code, its value range is a discrete numerical value; if a factor is salary, its value range is a range of values; if a factor is the company's Chinese name, its value range is a string. This application does not impose specific limitations on this. As shown in Figure 4, the value range of field A is the four values in the set {1,2,4,5}, and the value range of field B is a value greater than or equal to 1000 and less than or equal to 9000.
[0061] After the user selects the number generation factors and configures the value range for each factor, the user triggers the "Confirm" button on the number generation factor configuration interface. After the client detects the user's confirmation operation, it obtains the number generation factors entered by the user and the value range corresponding to each factor, records the number generation factors and their corresponding value ranges, and displays the number generation factors and their corresponding value ranges on the number generation factor interface shown on the right side of Figure 4.
[0062] In one possible implementation, users can also modify the data generation factors or their corresponding value ranges within the data generation factor interface. For example, they can modify the field name of a data generation factor, delete a data generation factor, or add a data generation factor. As shown in Figure 3 or Figure 4, the configuration interface also includes a "Modify Data Generation Factor" button. After triggering this button, if the user needs to modify the field name of a data generation factor, they can select that field name in the data generation factor interface to edit it, thus performing the modification operation.
[0063] In one possible implementation, the client can also obtain the value range of each data generation factor from other systems. For example, for the system under test, which, after passing the test, is used to process business data generated by a business, the database storing this business data contains metadata of the business data. This metadata includes all fields included in the business data, the field type of each field, the value range of each field, etc. The client can obtain the metadata from the database to obtain the value range of each of the aforementioned data generation factors.
[0064] S203. The client obtains the mapping relationship between the number generation factor and the associated field.
[0065] In this application, the full set of fields in the test data includes fields other than the number generation factor. If one of the other fields is related to one of the number generation factors, that field is called the associated field. After configuring the number generation factor and its value range, the mapping relationship between the fields is configured based on the number generation factor and the other fields. Configuring the mapping relationship between the fields includes recording the field names of two related fields and configuring the correspondence between the values of the two related fields.
[0066] For example, if the data generation factor includes a field called "Salary" and another field called "Tax Amount," and the tax amount is determined based on the salary, then there is a correlation between the tax amount field and the salary field. In a test dataset, for the tax amount field, if the value of the salary field is determined, the value of the tax amount field can be determined based on the value of the salary field. When configuring the mapping relationship between the data generation factor and the associated fields, record the correlation between the "Salary" field and the "Tax Amount" field, and configure the correspondence between the values of the salary field and the values of the tax amount field.
[0067] In this application, the client can also provide a mapping relationship configuration interface. The user enters the field name of the number generation factor that has an association relationship and the field name of an associated field in the mapping relationship configuration interface, and then configures the correspondence between the value of the number generation factor and the value of the associated field.
[0068] The above correspondence can be a one-to-one correspondence between field values. For example, if the data creation factor is the company code and the associated field is the company's Chinese name, then for each value of the data creation factor, the company name corresponds to a unique value. The correspondence can also be between two value ranges. For example, if the data creation factor is height and the associated field is weight, then one height range corresponds to one weight range. Furthermore, the correspondence can be between a field value and a value range. For example, if the data creation factor is employee level and the associated field is salary, then one employee level corresponds to one salary range. The correspondence can also be expressed through formulas. For example, if the data creation factor is sales revenue and the associated field is tax amount, sales revenue includes multiple ranges, and each range of sales revenue corresponds to a formula for calculating the tax amount. Once the sales revenue is determined, the tax amount can be calculated according to the corresponding formula.
[0069] S204. The client generates a data generation request and sends the data generation request to the data generation system. The data generation request includes the aforementioned template file, data generation factors, the value range of the data generation factors, and the mapping relationship.
[0070] After configuring the template file, data generation factors, value ranges of the data generation factors, and mapping relationships on the client side, the user generates a data generation request based on the configuration information and sends it to the data generation system. The data generation system then generates test data based on the data generation request. This data generation request includes the aforementioned template file, data generation factors, value ranges of the data generation factors, and mapping relationships.
[0071] It should be understood that after each configuration step is completed, the client will save the user's configuration information to the terminal device where the client is located. For example, after the user configures the above-mentioned data generation factors and the value range of each data generation factor, the data generation factors and the corresponding value range of each data generation factor will be saved to the storage space of the terminal device. After the user completes the configuration information of the above-mentioned template file, data generation factors, value range of data generation factors and mapping relationship, the configuration information is retrieved from the storage space and a data generation request is generated.
[0072] For example, after the user completes the configuration, the user triggers the "Execute Program" button shown in Figure 4. After the client detects that the user has triggered the "Execute Program" operation, it retrieves the above-mentioned template file, number generation factor, value range of the number generation factor, and mapping relationship from the storage space, and then generates the above-mentioned number generation request.
[0073] S205. The data generation system generates multiple combined data based on the value range of each factor.
[0074] After obtaining the generation factors and their value ranges, the data generation system generates multiple combined data entries based on the generation factors and their corresponding value ranges. Each combined data entry includes one value corresponding to each generation factor.
[0075] In this application, when generating combined data based on the value ranges corresponding to multiple factorials, firstly, based on the value ranges of two factorials, multiple combined data corresponding to these two factorials are generated by arranging and combining the values of the two factorials. In any two combined data sets, the values of the two factorials are not identical. For example, if the first value range of the first factorial includes m values and the value range of the second factorial includes n values, then m*n combined data sets can be generated based on the first and second factorials.
[0076] If the test data includes other data-generating factors, such as a third data-generating factor, then after generating multiple combined data based on the value ranges of the first and second data-generating factors, the first and second data-generating factors are treated as a single combined data-generating factor. The m*n combined data generated based on these two factors are then used as the value ranges corresponding to the combined data-generating factor. Further, multiple combined data are generated by permuting and combining the value ranges of the combined data-generating factor and the third data-generating factor. This process continues until all data-generating factors are combined, resulting in multiple combined data generated from all data-generating factors.
[0077] For example, as shown in Figure 5, which is a schematic diagram of a combined data generation process provided by this application, the value ranges of the first number-generating factor form a set X = {a, b, c}, and the value ranges of the second number-generating factor form a set Y = {d, e}. Based on the first and second number-generating factors, six combined data can be obtained: (a, d), (b, d), (c, d), (a, e), (b, e), and (c, e). Therefore, the value ranges of the above combined number-generating factors are {(a, d), (a, e), (b, d), (b, e), (c, d), and (c, e)}. If the value ranges of the third number-generating factor form a set Z = {f, g}, then based on the combined number-generating factors and the third set of number-generating factors, twelve combined data can be obtained, as shown in Figure 5.
[0078] It should be noted that the above example uses discrete values for the number factor. If the number factor has a range of values, then when generating a combined data, any value is randomly selected from the range of values corresponding to the number factor as the value of the number factor.
[0079] In one possible implementation, for multiple data generation factors, the multiple data generation factors can be divided into multiple subsets according to the characteristics of business data. Each subset includes at least one data generation factor, and the data generation factors included in each subset belong to the same dimension.
[0080] When generating combination data based on the factorization factors, for each subset of factorization factors, firstly, based on the value range corresponding to each factorization factor in that subset, multiple combination data entries are generated for that subset. Then, for each subset of combination data entries, the value range corresponding to each subset is taken as a combination factorization factor, and compared with the value ranges of combination factorization factors in other subsets, and multiple combination data entries are obtained again using the above method.
[0081] For example, see Figure 6, which is a schematic diagram of another combined data generation process provided in this application. In Figure 6, the aforementioned multiple number factors are divided into three subsets: the first subset, the second subset, and the third subset. The third subset includes three number factors, whose possible values are h, i, and j, respectively; the second subset includes two number factors, whose possible values are p and q, respectively; and the first subset includes three number factors, whose possible values are r, s, and t, respectively. When generating combined data, firstly, for each number factor in each subset, multiple combined data are generated according to the above method. Specifically, the number of combined data generated in the third subset is k = h*i*j, the number of combined data generated in the second subset is m = p*q, and the number of combined data generated in the first subset is n = r*s*t. Then, based on the m combined data corresponding to the second subset and the k combined data corresponding to the third subset, m*k combined data are generated, and then combined with the n combined data corresponding to the first subset, n*m*k combined data are generated.
[0082] Optionally, the above subsets have a hierarchical relationship. When generating combined data, for each combined data item other than the lowest-level subset, an identifier is also generated. For example, if the number of combined data items generated by the second subset is m, each of these m combined data items corresponds to an identifier.
[0083] Referring to Figure 7, which is a schematic diagram of another combined data generation process provided in this application, the factors included in the first subset are called batch factors, the factors included in the second subset are called head factors, and the factors included in the third subset are called row factors. Row factors have the lowest level, and batch factors have the highest level. When generating combined data, firstly, k row data are generated based on the row factors; m header data are generated based on the head factors, and each header data is assigned a unique header identifier, for example, head ID1 to head IDm; n batch data are generated based on the head factors, and each batch data is assigned a unique batch identifier, for example, batch ID1 to batch IDn. Then, the k row data are combined with the m header data to obtain m*k combined data. Each head ID corresponds to k combined data, meaning that if a query is performed on the test data using a head ID, k data can be retrieved. Then, these m*k combined data are combined with the n batch data to obtain each n*m*k combined data. In this set of n*m*k combined data, each batch ID corresponds to m*k combined data. That is, if a query is performed in the test data using a batch ID, m*k data can be retrieved.
[0084] S206. The data generation system determines the value of each associated field in each piece of test data based on the combined data and mapping relationships.
[0085] In this application, if the data generation system generates K combined data points based on the number generation factors and the value range corresponding to each number generation factor, then the final generated test data includes K test data points. After obtaining the K combined data points, the data generation system determines the value of each associated field in each test data point based on the combined data and the mapping relationship. Therefore, each test data point ultimately includes one combined data point and the value corresponding to each associated field. Specifically, the combined data in each test data point includes one value corresponding to each number generation factor.
[0086] For a related field, such as the first related field, the number factors associated with the related field are determined based on the name of the first related field and the above mapping relationship. Then, for the i-th test data, the value of the first related field in the i-th test data is determined based on the value of the number factors associated with the first related field in the i-th test data and the mapping relationship.
[0087] For example, if a data factor is sales revenue and there is a correlation between sales revenue and tax amount, for the value of the tax amount field in the i-th test data, the value of the tax amount field in the i-th test data is determined based on the value of the sales revenue field in the i-th test data and the mapping relationship between sales revenue and tax amount.
[0088] In actual business data generated from business operations, a data table may contain fields with interrelated relationships. For example, if a data generation factor includes a field called "Job Level," and another field in the template file is a "Base Salary" field, and the base salary is determined based on the job level, then there is an interrelated relationship between the job level field and the base salary field. The mapping relationship record contains the field names of the two interrelated fields and the correspondence between their values. After generating the values corresponding to each data generation factor in each test data set using the data generation factor, this application, for an interrelated field in a test data set, obtains the value of that interrelated field based on the value of the field in that test data set that has a mapping relationship with it. That is, the value of the interrelated field is not randomly generated or randomly selected from a range of values, but determined based on its associated data generation factor. Once the value of a data generation factor is determined, the value of the interrelated field that has an interrelated relationship with it is also determined, thus enabling the generated test data to better reflect the actual distribution of business data generated during actual business operations.
[0089] For example, in actual business operations, the base salary for a level 1 employee is 1,000 yuan, and the base salary for a level 2 employee is 2,000 yuan. The range of values for the "job level" field is level 1 and level 2, and the range of values for the "base salary" field is 1,000 yuan and 2,000 yuan. If we disregard the relationship between these two fields, we can obtain two combined data sets: "level 1, base salary 2,000 yuan" and "level 2, base salary 1,000 yuan." However, these combined data sets do not exist in the actual business data generated. Therefore, by obtaining the above mapping relationship, identifying the related fields that are associated with the data generation factor, and then determining the values of the related fields based on the value of the data generation factor, the generated test data fields have stronger correlations and better reflect the actual distribution of business data generated during actual operation. This avoids errors that occur when testing a system under test due to generating test data that does not conform to business realities.
[0090] S207. The data generation system generates test data based on the above-mentioned multiple combined data and the value of each associated field.
[0091] In this application, if S205 generates K combined data entries, the final generated test data includes K test data entries, each including one combined data entry and the value corresponding to each associated field. In S206, the data generation system, based on the mapping relationship and the i-th combined data entry, can obtain the values of each associated field included in the i-th test data entry, thereby obtaining the i-th test data entry. Through the above method, K test data entries can be obtained.
[0092] In one possible implementation, the data generation system determines the fields other than the data generation factors and related fields based on the full range of fields, data generation factors, and related fields included in the template file. In this application, the fields other than the data generation factors and related fields are referred to as fixed value fields. To ensure the consistency between the fields included in the test data and the business data, as well as the integrity of the test data, it is also necessary to generate the value of each fixed value field in each piece of test data. The value of each fixed value field in each piece of test data can be randomly generated.
[0093] In this application, after generating test data, the data generation system sends the generated test data to the target business system to test whether the functionality of a functional module of the business system under test meets the design requirements. Specifically, after the data generation system completes the generation of test data, it sends a completion message to the client. The client displays the completion message on the configuration interface to notify the user that the test data generation is complete. After confirming that the test data has been generated, the user selects the target business system on the client and confirms the sending of the test data. After detecting the user's confirmation, the client sends a request message to the data generation system. This request message includes the identifier or address information of the target business system, and is used to request the data generation system to send the test data to the target business system. Upon receiving the request message, the data generation system sends the test data to the target business system according to the identifier or address information of the target business system in the request message.
[0094] In one possible implementation, the aforementioned data generation request includes the identifier of the target business system or the address information of the target business system. After generating the test data, the data generation system can send the test data to the target business system based on the identifier of the target business system or the address information of the target business system.
[0095] For the sake of simplicity, the above method embodiments are described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to this application. Other reasonable combinations of steps that those skilled in the art can conceive of based on the above description also fall within the scope of protection of this application.
[0096] For example, in one possible implementation, the test data may not include associated fields. In this case, the process does not include S203 and S206 in Figure 2, the data generation request in S204 does not include mapping relationships, and the test data does not need to be obtained based on the value of each associated field in S207.
[0097] In one possible implementation, the template file may include not only all fields of the test data but also the aforementioned mapping relationships. For example, the template file may record a correspondence between the value of field A and the value of field B. Therefore, if the template file contains such mapping relationships, the data generation method may not include S203, and the mapping relationships are determined by the data generation system based on the file and the data generation factor.
[0098] In this application, after the business system under test passes testing, it is used to process business data generated by a business activity within a specific business scenario. When testing a business system under test, a template file related to that business scenario is obtained. This template file includes fields relevant to the business scenario, specifically the fields included in the business data generated during actual business operation. This generated business data is the data that the system under test will process after passing the test. Then, some fields from the template file are used as data generation factors. The value range of each data generation factor is obtained, and this range is consistent with the value range of each field in the business data generated during actual business operation. Finally, test data is generated based on the value range of each data generation factor. This method improves the efficiency of obtaining test data, and because the value range of the data generation factors is consistent with the value range of the business data generated during actual business operation, the obtained test data is more consistent with the data generated during actual business operation, improving the accuracy of the generated test data and thus improving the accuracy of testing the system under test.
[0099] The data processing method to be protected in this application has been described in detail above with reference to Figures 1 to 7. Next, the data processing system, computing device and computing device cluster to be protected in this application will be further described with reference to Figures 8 to 10.
[0100] Referring to Figure 8, which is a schematic diagram of a data processing system provided in this application, the data processing system includes a data generation system 100, a client 200, and a storage system 300. The data generation system 100 is used to implement the relevant methods executed by the data generation system in the embodiment corresponding to Figure 2. As shown in Figure 8, the data generation system 100 includes a data generation device, which includes an acquisition module 110, a processing module 120, and a parsing module 130.
[0101] The acquisition module 110 is used to acquire a data generation request, which includes a template file and multiple data generation factors. The template file includes fields related to the business scenario, and the multiple data generation factors are some of the fields in the template file. The template file and data generation factors can be selected and configured by the user. The selection and configuration of the template file can be referred to the relevant descriptions in S201 and S202 above, and will not be repeated here.
[0102] Processing module 120 is used to generate test data based on the multiple data generation factors and the corresponding value range of each factor. The template file includes fields related to the business scenario, and the multiple data generation factors are some of the fields in the template file. The test data includes the multiple data generation factors and the corresponding values for each factor. The test data is used to test the business system under test related to the business scenario. After passing the test, the system under test is used to process data generated by one of the business processes in the business scenario. The method by which processing module 120 generates combined data based on the data generation factors can be referred to the relevant description in S205.
[0103] The aforementioned test data also includes associated fields, which are some fields in the template file and are fields that are related to the number generation factors. For an explanation of the associated fields and mapping relationships, please refer to the description in S203 above. The method by which processing module 120 generates the values of the associated fields based on the number generation factors and mapping relationships can be found in the relevant description in S206 above.
[0104] The aforementioned test data also includes fixed-value fields, which are fields in the template file other than the generation factor and associated fields. After obtaining the template file and generation factor, if the template file includes the association relationship between the generation factor and the associated fields, the parsing module 130 determines the associated fields based on all fields and generation factor included in the template file, generates the aforementioned mapping relationship, and saves the generation factor, associated fields, and mapping relationship to the storage system 300. For example, the generation factor field and fixed-value fields are saved to memory, and the mapping relationship is saved to storage. After obtaining the associated fields, the parsing module 130 is also used to determine the fixed-value fields based on all fields, generation factor, and associated fields included in the template file, and save the fixed-value fields to the storage system.
[0105] If the above mapping relationship is configured by the user through the client, after obtaining the template file, the number factor and the mapping relationship, the parsing module 130 determines the fixed value field based on the full range of fields included in the template file, the number factor and the associated fields in the mapping relationship.
[0106] In this application, the process of generating test data by the data generation system 100 can be referred to the description in Figure 2 and its related embodiments above, and will not be repeated here.
[0107] The acquisition module 110, processing module 120, and parsing module 130 described above can all be implemented in software or in hardware. For example, the implementation of processing module 120 will be described below; the implementation of other units can refer to the implementation of processing module 120.
[0108] Processing module 120, as an example of a software functional unit, includes code running on a computing instance. The computing instance includes at least one of a physical host (computing device), a virtual machine, and a container. Further, the aforementioned computing instance can be one or more. For example, processing module 120 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code can be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code can be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple geographically proximate data centers. A region may include multiple AZs.
[0109] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.
[0110] As an example of a hardware functional unit, the processing module 120 may include at least one computing device, such as a server. Alternatively, the processing module 120 may be implemented using a central processing unit (CPU), an application-specific integrated circuit (ASIC), or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a neural network processing unit (NPU), a system-on-chip (SoC), an offload card, an accelerator card, or any combination thereof.
[0111] The processing module 120 includes multiple computing devices that can be distributed within the same region or in different regions. Similarly, the processing module 120 can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the processing module 120 can be distributed within the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, GALs, DPUs, NPUs, SoCs, offloading cards, and accelerator cards.
[0112] It should be noted that in other embodiments, the processing module 120 can be used to execute any step of the data generation system in the embodiment shown in FIG2, and the parsing module 130 can be used to execute any step of the data generation system in the embodiment shown in FIG2. The steps implemented by the processing module 120 and the parsing module 130 can be specified as needed. All the functions implemented by the data generation system in the embodiment shown in FIG2 are implemented by the processing module 120 and the parsing module 130 respectively.
[0113] Storage system 300 may include volatile memory, such as random access memory (RAM). Storage system 300 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD). Furthermore, memory 906 may also be implemented using storage class memory (SCM), phase change memory (PCM), or other types of storage media.
[0114] Referring to Figure 9, which is a schematic diagram of a computing device provided in this application, the computing device 900 includes a bus 902, a processor 904, a memory 906, and a communication interface 908. The processor 904, the memory 906, and the communication interface 908 communicate with each other via the bus 902. The computing device 900 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 900. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a desktop computer, a laptop computer, or a smartphone, etc.
[0115] Bus 902 can be a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a Unified Bus (Ubus or UB), a Compute Express Link (CXL), a Cache Coherent Interconnect for Accelerators (CCIX), etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 9 uses only one line, but this does not imply that there is only one bus or one type of bus. Bus 902 can include pathways for transmitting information between various components of computing device 900 (e.g., memory 906, processor 904, communication interface 908). The Unified Bus can also be called a Lingqu Bus.
[0116] The processor 904 may include any one or more computing devices such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP) or a digital signal processor (DSP), an ASIC, an FPGA, a CPLD, an NPU, a SoC, an offload card, or an accelerator card.
[0117] Memory 906 may include volatile memory, such as random access memory (RAM). Memory 906 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD). Furthermore, memory 906 may also be implemented using storage class memory (SCM), phase change memory (PCM), or other types of storage media.
[0118] It should be noted that the same type of storage medium can be configured in the same computing device to realize the function of memory 906, or two or more types of storage media can be configured to realize the function of memory 906. This application does not limit this.
[0119] The memory 906 stores executable program code, which the processor 904 executes to implement the functions of the data generation system, thereby generating a method for generating test data. That is, the memory 906 stores instructions for executing the test data generation method implemented by the data generation system in the embodiment corresponding to Figure 2.
[0120] The communication interface 908 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 900 and other devices or communication networks.
[0121] As one possible implementation, the computing device 900 may also include a chip system, which includes a processor and a power supply circuit. The power supply circuit supplies power to the processor, and the processor executes the operation steps corresponding to the credit management method. For simplicity, further details are omitted here. The processor can be implemented using a CPU, or it can be implemented using computing devices or AI chips such as GPUs, DPUs, NPUs, XPUs, SoCs, offloading cards, or accelerator cards.
[0122] As one possible implementation, the computing device 900 may include multiple types of processors 904, meaning the computing device 900 is a heterogeneous device. For example, the computing device 900 may include a CPU and a GPU, and at least one of the processors 1304 may execute the operation steps corresponding to the credit management method. For the sake of brevity, further details will not be elaborated here.
[0123] This application also provides a computing device cluster. The computing device cluster includes at least one computing device as shown in FIG9. The memory 906 of one or more computing devices 900 in the computing device cluster may store identical instructions for executing the data generation method implemented by the data generation system in the embodiment corresponding to FIG2.
[0124] In some possible implementations, the memory 906 of one or more computing devices 900 in the computing device cluster may also store partial instructions for executing the data generation method. In other words, a combination of one or more computing devices 900 can jointly execute instructions for implementing the data generation method.
[0125] It should be noted that the memory 906 in different computing devices 900 within the computing device cluster can store different instructions, each used to implement a portion of the functions of the data generation system. That is, the instructions stored in the memory 906 of different computing devices 900 can implement the functions of one or more modules among the acquisition module 110, processing module 120, and parsing module 130.
[0126] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN). Figure 10 is a schematic diagram of a network connection between two computing devices provided in this application, illustrating one possible implementation. As shown in Figure 10, two computing devices 900A and 900B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this type of possible implementation, the memory 906 in computing device 900A stores instructions for executing the functions of processing module 120. Simultaneously, the memory 906 in computing device 900B stores instructions for executing the functions of parsing module 130.
[0127] It should be understood that the functions of computing device 900A shown in Figure 10 can also be performed by multiple computing devices 900. Similarly, the functions of computing device 900B can also be performed by multiple computing devices 900.
[0128] This application also provides a computer program product containing instructions, which may be a software or program product containing instructions capable of running on a computing device or stored on any available medium. When the computer program product is run on at least one computing device, the at least one computing device performs the method implemented by the data generation system in the embodiment corresponding to FIG2 above.
[0129] This application also provides a computer-readable storage medium, which can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium, or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the method implemented by the data generation system in the embodiments corresponding to point 2 above.
[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data generation method, characterized in that, include: Obtain a data generation request, which includes a template file and multiple data generation factors; wherein, the template file includes fields related to the business scenario, and the multiple data generation factors are some fields in the template file; Test data is generated based on the plurality of data generation factors and the value range corresponding to each data generation factor; the test data includes the plurality of data generation factors and the values corresponding to the plurality of data generation factors, and the test data is used to test the business system to be tested related to the business scenario.
2. The method according to claim 1, characterized in that, The step of generating test data based on the plurality of number generation factors and the value range corresponding to each number generation factor includes: Obtain the value range of two number generation factors, and arrange and combine the values corresponding to the value range of the two number generation factors to obtain the combined data corresponding to the two number generation factors; The test data is generated based on the combined data corresponding to the two factor generation factors.
3. The method according to claim 1, characterized in that, The multiple number generation factors include row factors and head factors; The step of generating test data based on the plurality of number generation factors and the value range corresponding to each number generation factor includes: Multiple rows of data are generated based on the value range of each factor included in the row factor; Multiple header data entries are generated based on the value range of each number generation factor included in the header factor, wherein each header data entry corresponds to a header identifier; The multiple header data are combined with the row data respectively to obtain the combined data corresponding to the header factor and the row factor; The test data is generated based on the combined data corresponding to the head factor and the row factor.
4. The method according to any one of claims 1-3, characterized in that, The test data also includes associated fields, which are some fields in the template file. The data generation request also includes a mapping relationship, which includes the correspondence between the associated fields and the multiple data generation factors. The step of generating test data based on the plurality of number generation factors and the value range corresponding to each number generation factor includes: The test data is generated based on the plurality of generation factors, the value range corresponding to each generation factor, and the mapping relationship.
5. The method according to claim 4, characterized in that, The number generation factor and the mapping relationship are determined based on a preset method, which includes user configuration based on business scenarios or acquisition from other application programming interfaces.
6. The method according to claim 4 or 5, characterized in that, The test data also includes fixed-value fields; The step of generating test data based on the plurality of number generation factors and the value range corresponding to each number generation factor includes: The fixed value field is determined based on the template file, the multiple data generation factors, and the associated fields; the fixed value field is a subset of the fields in the template file. The test data is generated based on the plurality of data generation factors, the value range corresponding to each data generation factor, the mapping relationship, and the fixed value range.
7. A data generation apparatus, characterized in that, include: The acquisition module is used to acquire a data generation request, which includes a template file and multiple data generation factors; wherein, the template file includes fields related to the business scenario, and the multiple data generation factors are some fields in the template file; The processing module is used to generate test data based on the plurality of data generation factors and the value range corresponding to each data generation factor; the test data includes the plurality of data generation factors and the values corresponding to the plurality of data generation factors, and the test data is used to test the business system to be tested related to the business scenario.
8. The apparatus according to claim 7, characterized in that, The processing module is specifically used for: Obtain the value range of two number generation factors, and arrange and combine the values corresponding to the value range of the two number generation factors to obtain the combined data corresponding to the two number generation factors; The test data is generated based on the combined data corresponding to the two factor generation factors.
9. The apparatus according to claim 7, characterized in that, The multiple number generation factors include row factors and head factors; The processing module is specifically used for: Multiple rows of data are generated based on the value range of each factor included in the row factor; Multiple header data entries are generated based on the value range of each number generation factor included in the header factor, wherein each header data entry corresponds to a header identifier; The multiple header data are combined with the row data respectively to obtain the combined data corresponding to the header factor and the row factor; The test data is generated based on the combined data corresponding to the head factor and the row factor.
10. The apparatus according to any one of claims 7-9, characterized in that, The test data also includes associated fields, which are some fields in the template file. The data generation request also includes a mapping relationship, which includes the correspondence between the associated fields and the multiple data generation factors. The processing module is specifically used for: The test data is generated based on the plurality of generation factors, the value range corresponding to each generation factor, and the mapping relationship.
11. The apparatus according to claim 10, characterized in that, The number generation factor and the mapping relationship are determined based on a preset method, which includes user configuration based on business scenarios or acquisition from other application programming interfaces.
12. The apparatus according to claim 10 or 11, characterized in that, The test data also includes fixed-value fields; The device further includes: The parsing module is used to determine the fixed value field based on the template file, the multiple number generation factors, and the associated fields; the fixed value field is a subset of fields in the template file. The processing module is specifically used to generate the test data based on the plurality of data generation factors, the value range corresponding to each data generation factor, the mapping relationship, and the fixed value range.
13. A computing device, characterized in that, The computing device includes a processor and a memory, the memory being used to store instructions, and the processor being used to execute the instructions stored in the memory to implement the method as described in any one of claims 1-6.
14. A computer-readable storage medium, characterized in that, Includes computer program instructions, which, when executed by a cluster of computing devices, implement the method as described in any one of claims 1-6.
15. A computer program product containing instructions, characterized in that, When the instructions are executed by a cluster of computing devices, the cluster of computing devices implements the method as described in any one of claims 1-6.