Test data preparation method and device, equipment, medium and program product
By obtaining and sorting the data preparation interface of the target application module, and automatically calling the data preparation interface based on the existing functional dependencies and communication fields, the problem of difficulty and time-consuming preparation of test data in distributed business systems is solved, and efficient and automated test data preparation is achieved.
Patent Information
- Application Number
- CN202411868396.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-05-09
AI Technical Summary
During the adaptability testing process of distributed business systems, it is difficult and time-consuming to prepare test data, resulting in compression of the test cycle, low data accuracy and low efficiency.
By obtaining the application data preparation interface of the target application module selected by the user, the target data preparation function is obtained; when the target data preparation function belongs to the existing application data preparation function, the application data preparation interface of the target data preparation function is sorted based on the existing function dependency to obtain the target application interface priority; then, based on the target application interface priority and the existing function communication field, the application data preparation interface of the target data preparation function is called to prepare the corresponding test data of the target application module.
It realizes efficient data preparation across applications in an adaptive testing environment, and one-stop data preparation without manual participation, which improves the efficiency of test data preparation and reduces the time for test data preparation.
Smart Images

Figure CN119961150A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of distributed and cross-application data preparation, and more specifically to a test data preparation method, apparatus, device, medium, and program product. Background Art
[0002] In the process of adaptability testing of the technical transformation of business systems based on distributed platform architecture, business systems usually contain many complex functional modules. Accurate test data is crucial to verify the accuracy of system functions. Only by preparing appropriate and sufficient test data can we fully simulate the real business scenario and check whether each function can correctly process data and provide expected output. If the data is not prepared sufficiently, some functions may be missed in the test.
[0003] There are many applications in the distributed business system. When testing a certain function, it is usually necessary to call the data of multiple applications. In the process of preparing test data, there are problems such as high difficulty and time-consuming data preparation, which seriously compresses the test cycle. Because test data often involves multiple application associations, related tools are located on platforms developed by different technical departments according to tool-associated applications, and some core applications (such as personal finance, credit cards, customer information) have inconsistent data recovery strategies and unstable data synchronization links, before automated testing and adaptive testing, it is necessary to repeatedly jump between various platforms to find available data, resulting in insufficient prepared test data and low data accuracy, which leads to time-consuming and inefficient preparation of business test data. Summary of the invention
[0004] In view of at least one aspect of the above problems, embodiments of the present disclosure provide a test data preparation method, apparatus, device, medium, and program product for improving the efficiency of preparing test data.
[0005] According to the first aspect of the present disclosure, a test data preparation method is provided, including: obtaining an application data preparation interface of a target application module selected by a user to obtain a target data preparation function; when the target data preparation function belongs to an existing application data preparation function, sorting the application data preparation interface of the target data preparation function based on the existing function dependency to obtain a target application interface priority; wherein the existing function dependency is obtained by performing a category relationship analysis on the existing application data preparation interface; and based on the target application interface priority and an existing function communication field, calling the application data preparation interface of the target data preparation function to prepare test data corresponding to the target application module; wherein the existing function communication field is generated by performing an interface communication area analysis on the existing application data preparation function.
[0006] According to an embodiment of the present disclosure, the stock function communication field includes a stock interface communication field and a stock communication area core field. The stock function communication field is generated by performing an interface communication area analysis on the stock application data preparation function, including: obtaining the intersection of the application data fields between every two functions in the stock application data preparation function to obtain the stock interface communication field; and analyzing the core field of each application data preparation interface in the stock application data preparation function to select the stock communication area core field.
[0007] According to an embodiment of the present disclosure, the stock function dependency is obtained by performing a category relationship analysis on the stock application data preparation interface, including: functionally classifying the stock application data preparation interface to obtain the stock application data preparation function; and analyzing the data dependency between the stock application data preparation functions to obtain the stock function dependency.
[0008] According to an embodiment of the present disclosure, the functional classification of the existing application data preparation interface to obtain the existing application data preparation function includes: taking an application data preparation interface in the existing application data preparation interface as a data point; based on key business fields, selecting k data points of different types to obtain k initial cluster center points; k is an integer greater than 1; based on the application interface data volume, calculating the Euclidean distance between the non-cluster center data point and the cluster center point, and assigning the functional category of the non-cluster center data point according to the Euclidean distance; calculating the average value of all data points in each functional category to update the cluster center point of each functional category; based on the updated cluster center point, continuously reallocating the functional category to which each data point belongs, and updating the cluster center point position until the clustering end condition is met to obtain the existing application data preparation function.
[0009] According to an embodiment of the present disclosure, the calling of the application data preparation interface of the target data preparation function based on the target application interface priority and the stock function communication field to prepare the test data corresponding to the target application module includes: acquiring the target function communication field corresponding to the target data preparation function based on the stock function communication field; calling the application data preparation interface of the target data preparation function through the target function communication field based on the target application interface priority to prepare the test data corresponding to the target application module;
[0010] According to an embodiment of the present disclosure, the target function communication field includes a target interface communication field and a target communication area core field; based on the target application interface priority, the application data preparation interface of the target data preparation function is called through the target function communication field to prepare the test data corresponding to the target application module, including: using the target communication area core field to connect the application data preparation interface in series under the target data preparation function; using the target interface communication field to connect every two target data preparation functions in series; and based on the target application interface priority, calling the application data preparation interface of the target data preparation function after connection in series to prepare the test data corresponding to the target application module.
[0011] According to an embodiment of the present disclosure, the method also includes: when the target data preparation function does not belong to the existing application data preparation function, performing a category relationship analysis on the application data preparation interface of the target data preparation function and the current existing application data preparation interface to update the existing application data preparation function and the existing function dependency relationship; and performing an interface communication area analysis on the updated existing application data preparation function to update the existing function communication field.
[0012] According to an embodiment of the present disclosure, the method also includes: regularly counting the data hit rate of the prepared test data; and when the data hit rate is lower than a preset threshold, according to preset rules, using the application data recovery strategy, calling the data recovery interface to restore the production data of the application module.
[0013] According to an embodiment of the present disclosure, the method further includes: preparing test data for n target application modules selected by a user to obtain test data corresponding to the n target application modules; n is an integer greater than 1.
[0014] The second aspect of the present disclosure provides a test data preparation device, including: a target function acquisition module, used to acquire an application data preparation interface of a target application module selected by a user to obtain a target data preparation function; a function combination module, used to sort the application data preparation interfaces of the target data preparation function based on the stock function dependency relationship when the target data preparation function belongs to an existing application data preparation function to obtain a target application interface priority; a function classification module, used to obtain the stock function dependency relationship by performing a category relationship analysis on the stock application data preparation interface; and a data preparation module, used to call the application data preparation interface of the target data preparation function based on the target application interface priority and the stock function communication field to prepare test data corresponding to the target application module; an interface communication area generation module, used to generate the stock function communication field by performing an interface communication area analysis on the stock application data preparation function.
[0015] According to an embodiment of the present disclosure, the existing function communication field includes an existing interface communication field and an existing communication area core field, and the interface communication area generation module includes: a first generation unit, used to obtain the intersection of the application data fields between every two functions in the existing application data preparation function to obtain the existing interface communication field; and a second generation unit, used to analyze the core field of each application data preparation interface in the existing application data preparation function to select the existing communication area core field.
[0016] According to an embodiment of the present disclosure, the function classification module includes: a function classification unit, used to perform function classification on the stock application data preparation interface to obtain the stock application data preparation function; and a relationship analysis unit, used to analyze the data dependency between the stock application data preparation functions to obtain the stock function dependency.
[0017] According to an embodiment of the present disclosure, the function classification unit includes: a first function classification subunit, which is used to take an application data preparation interface in the existing application data preparation interface as a data point; a second function classification subunit, which is used to select k data points of different types based on key business fields to obtain k initial cluster center points; k is an integer greater than 1; a third function classification subunit, which is used to calculate the Euclidean distance between the non-cluster center data point and the cluster center point based on the application interface data volume, and assign the function category of the non-cluster center data point according to the Euclidean distance; a fourth function classification subunit, which is used to calculate the average value of all data points in each function category to update the cluster center point of each function category; a fifth function classification subunit, which is used to continuously reallocate the function category to which each data point belongs according to the updated cluster center point, and update the cluster center point position until the clustering end condition is met to obtain the existing application data preparation function.
[0018] According to an embodiment of the present disclosure, the data preparation module includes: a first data preparation unit, which is used to obtain the target function communication field corresponding to the target data preparation function based on the stock function communication field; a second data preparation unit, which is used to call the application data preparation interface of the target data preparation function through the target function communication field based on the target application interface priority to prepare the test data corresponding to the target application module;
[0019] According to an embodiment of the present disclosure, the target function communication field includes a target interface communication field and a target communication area core field; the second data preparation unit includes: a serial interface sub-unit, used to use the target communication area core field to serially connect the application data preparation interface under the target data preparation function; a serial function sub-unit, used to use the target interface communication field to serially connect every two target data preparation functions; and a data calling sub-unit, used to call the application data preparation interface of the serially connected target data preparation function based on the target application interface priority, so as to prepare the test data corresponding to the target application module.
[0020] According to an embodiment of the present disclosure, the device also includes: an existing data update module, which is used to perform category relationship analysis on the application data preparation interface of the target data preparation function and the current existing application data preparation interface when the target data preparation function does not belong to the existing application data preparation function, so as to update the existing application data preparation function and the existing function dependency relationship; and to update the existing function communication field by performing interface communication area analysis on the updated existing application data preparation function.
[0021] According to an embodiment of the present disclosure, the device also includes: a production data recovery module, which is used to regularly count the data hit rate of the prepared test data; and when the data hit rate is lower than a preset threshold, according to preset rules, using the application data recovery strategy, calling the data recovery interface to restore the production data of the application module.
[0022] According to an embodiment of the present disclosure, the device further includes: a batch data preparation module, used to prepare test data for n target application modules selected by a user to obtain test data corresponding to the n target application modules; n is an integer greater than 1.
[0023] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0024] The fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the above computer program or instructions are executed by a processor.
[0025] The fifth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor.
[0026] In the embodiment of the present disclosure, since the preparation of existing business test data under the distributed platform architecture is time-consuming and inefficient, by implementing the embodiment of the present disclosure, the application data preparation interface of the target application module selected by the user is obtained to obtain the target data preparation function; when the target data preparation function belongs to the stock application data preparation function, the application data preparation interface of the target data preparation function is sorted based on the stock function dependency to obtain the target application interface priority; wherein the stock function dependency is obtained by performing a category relationship analysis on the stock application data preparation interface; and based on the target application interface priority and the stock function communication field, the application data preparation interface of the target data preparation function is called to prepare the test data corresponding to the target application module; wherein the stock function communication field is generated by performing an interface communication area analysis on the stock application data preparation function. Efficient data preparation across applications in an adaptive test environment can be achieved, one-stop data preparation without manual participation, no need to manually sort out the data dependency and interface communication area between applications, no need to manually arrange the function priority, and automatically adjust the data recovery strategy when the hit rate is low. By calling interface data through the existing function communication field, there is no need to repeatedly jump between platforms to find available data. This breaks down the department walls and platform walls of the tool, fully prepares test data, improves the efficiency of test data preparation, and reduces test data preparation time. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0028] Figure 1 A diagram schematically shows an application scenario of the test data preparation method according to an embodiment of the present disclosure;
[0029] Figure 2 A flowchart of a test data preparation method according to an embodiment of the present disclosure is schematically shown;
[0030] Figure 3 A category relationship analysis flow chart of a test data preparation method according to an embodiment of the present disclosure is schematically shown;
[0031] Figure 4 A functional classification flow chart of a test data preparation method according to an embodiment of the present disclosure is schematically shown;
[0032] Figure 5 The interface communication area analysis flow chart of the test data preparation method according to the embodiment of the present disclosure is schematically shown;
[0033] Figure 6 A data preparation flow chart of a test data preparation method according to an embodiment of the present disclosure is schematically shown;
[0034] Figure 7 A serial communication flow chart of a test data preparation method according to an embodiment of the present disclosure is schematically shown;
[0035] Figure 8 The structure block diagram of the test data preparation device according to the embodiment of the present disclosure is schematically shown;
[0036] Fig. 9 A connection diagram schematically showing a data preparation module of a test data preparation device according to an embodiment of the present disclosure; and
[0037] Fig.10 A block diagram of an electronic device suitable for implementing a test data preparation method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0038] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0039] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0040] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0041] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0042] The embodiment of the present disclosure provides a test data preparation method, which obtains the application data preparation interface of the target application module selected by the user to obtain the target data preparation function; when the target data preparation function belongs to the stock application data preparation function, the application data preparation interface of the target data preparation function is sorted based on the stock function dependency to obtain the target application interface priority; wherein the stock function dependency is obtained by performing a category relationship analysis on the stock application data preparation interface; and based on the target application interface priority and the stock function communication field, the application data preparation interface of the target data preparation function is called to prepare the test data corresponding to the target application module; wherein the stock function communication field is generated by performing an interface communication area analysis on the stock application data preparation function. It can realize efficient data preparation across applications in an adaptive test environment, one-stop data preparation without manual participation, no need to manually sort out the data dependency and interface communication area between applications, no need to manually arrange the function priority, and automatically adjust the data recovery strategy when the hit rate is low. By calling interface data through the existing function communication field, there is no need to repeatedly jump between platforms to find available data. This breaks down the department walls and platform walls of the tool, fully prepares test data, improves the efficiency of test data preparation, and reduces test data preparation time.
[0043] Figure 1 The application scenario diagram of the test data preparation method according to an embodiment of the present disclosure is schematically shown.
[0044] like Figure 1 As shown, the application scenario 100 according to this embodiment may include test data preparation for multi-application collaboration. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0045] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0046] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0047] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0048] It should be noted that the test data preparation method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the test data preparation device provided in the embodiment of the present disclosure can generally be set in the server 105. The test data preparation method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the test data preparation device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0049] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0050] The following will be based on Figure 1 The scene described by Figure 2~Figure 7 The test data preparation method of the disclosed embodiment is described in detail.
[0051] Figure 2 The flowchart of the test data preparation method according to the embodiment of the present disclosure is schematically shown.
[0052] like Figure 2 As shown, the test data preparation method of this embodiment includes operations S210 to S230, and the test data preparation method can be automatically executed.
[0053] In operation S210, an application data preparation interface of a target application module selected by a user is obtained to obtain a target data preparation function;
[0054] It supports users to select application modules by themselves to realize the test data functions they need. Each application module has an independent page for specifying the query conditions for the module. After the user selects the target application module, the program automatically executes the test data preparation method disclosed in this disclosure to obtain the corresponding test data. After completion, the test data results can be exported.
[0055] When the user selects an application module on the front-end page according to the test requirements, the application data preparation interface corresponding to the target application module selected by the user is extracted, and the selected application data preparation interface is used to determine whether it belongs to the existing application data preparation function (where each application data preparation function in the existing application data preparation function includes multiple application data preparation interfaces). If the selected application data preparation interface does not belong to any existing application data preparation function, it indicates that the target data preparation function does not belong to the existing application data preparation function, and the target data preparation function corresponding to the selected interface is a new function, which requires category relationship analysis to obtain the target data preparation function. If the selected application data preparation interface belongs to certain functions of the existing application data preparation function, these functions are used as the target data preparation function, indicating that the target data preparation function belongs to the existing application data preparation function.
[0056] It should be noted that the application module selected by the user may correspond to one or more application data preparation interfaces, and the application data preparation interfaces may belong to one function or different functions. Therefore, the target data preparation function may be one or more.
[0057] In operation S220, when the target data preparation function belongs to an existing application data preparation function, the application data preparation interfaces of the target data preparation function are sorted based on the existing function dependencies to obtain the target application interface priority; wherein the existing function dependencies are obtained by performing a category relationship analysis on the existing application data preparation interfaces.
[0058] Machine learning can be used to identify the stock functional dependencies of data interfaces between applications such as product accounts, card issuance, electronic banking, and customer information. Based on the fact that the stock functional dependencies include all the dependencies of the stock data preparation functions, the dependencies corresponding to the target data preparation functions are extracted to obtain the target functional dependencies. Based on the target functional dependencies, the application data preparation interfaces corresponding to the target data preparation functions are sorted. The sorted application data preparation interfaces are the target application interface priorities.
[0059] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0060] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.
[0061] According to an embodiment of the present disclosure, the method also includes: when the target data preparation function does not belong to the existing application data preparation function, performing a category relationship analysis on the application data preparation interface of the target data preparation function and the current existing application data preparation interface to update the existing application data preparation function and the existing function dependency relationship; and performing an interface communication area analysis on the updated existing application data preparation function to update the existing function communication field.
[0062] If the target data preparation function does not belong to the existing application data preparation function, the target data preparation function is a newly introduced function, and it is necessary to perform a category relationship analysis based on the new function, and then perform an interface communication area analysis, calculate the new function communication field, and update the existing function communication field accordingly based on whether the new function communication field needs to update the existing function communication field. Among them, the method of category relationship analysis is the same as the method of operation S310-S320, which will not be described in detail here, and the process of interface communication area analysis is the same as the method of operation S510-S520, which will not be described in detail here.
[0063] In the embodiments of the present disclosure, if the target data preparation function does not belong to the existing application data preparation function, it means that the target data preparation function is a new function. Based on the relevant interface in the new function, the relevant existing content is updated and the new data preparation interface is adapted. This can ensure the security and accurate processing of the test data, and can more smoothly integrate the data involved in the new application data preparation interface into the existing data system, thereby promoting data sharing between different business function modules.
[0064] In operation S230, based on the target application interface priority and the stock function communication field, the application data preparation interface of the target data preparation function is called to prepare test data corresponding to the target application module; wherein the stock function communication field is generated by analyzing the interface communication area of the stock application data preparation function.
[0065] In the embodiments of the present disclosure, efficient data preparation across applications in an adaptive test environment is achieved, and one-stop data preparation without human intervention is achieved. Interface data is called through existing function communication fields, and there is no need to repeatedly jump between platforms to find available data. This breaks down the departmental walls and platform walls of the tool, fully prepares test data, improves the efficiency of test data preparation, and reduces test data preparation time.
[0066] Figure 3 The flowchart of category relationship analysis of the test data preparation method according to the embodiment of the present disclosure is schematically shown.
[0067] like Figure 3 As shown, according to an embodiment of the present disclosure, in operation S220, the stock function dependency is obtained by performing category relationship analysis on the stock application data preparation interface, including operations S310-S320.
[0068] In operation S310, the stock application data preparation interface is functionally classified to obtain the stock application data preparation function.
[0069] The data set is classified by functions based on the interface for preparing existing application data. For example, the adaptability test of bank-related business systems may include functional interfaces for generating customer deposits, financial management purchases and other related data in the "personal finance" business, such as creating purchase record data of financial management products of different amounts and terms; functional interfaces for generating card opening information and consumption record data in the "credit card" business, such as simulating credit card consumption flow data under different limits and consumption scenarios; and functional interfaces for preparing basic customer information data such as customer name, ID number, contact information, address, etc. in the "customer information" business.
[0070] Functional classification methods include but are not limited to K-means clustering algorithm, density clustering algorithm, Gaussian mixture model clustering algorithm, and fuzzy C-means algorithm.
[0071] In operation S320 , data dependencies between existing application data preparation functions are analyzed to obtain existing function dependencies.
[0072] Since each of the existing application data preparation functions contains multiple application data preparation interfaces, the association between the application data preparation interfaces can be analyzed according to key business fields, so as to analyze the data dependency between the existing application data preparation functions and obtain the existing function dependency.
[0073] In the embodiments of the present disclosure, the existing application data preparation interfaces are functionally classified, the data dependencies between the existing application data preparation functions are analyzed, and after the dependencies between the application data preparation functions are clearly understood, the key dependency links can be identified in advance and the functional dependencies are clarified. The order of data flow between different interfaces is clear, which helps to optimize the data preparation process, facilitates priority sorting, ensures that data passes through each application data preparation interface in a reasonable order, avoids problems such as inverted data processing order, repeated processing or missed processing, and improves the accuracy and efficiency of data preparation.
[0074] Figure 4 The functional classification flow chart of the test data preparation method according to the embodiment of the present disclosure is schematically shown.
[0075] like Figure 4 As shown, according to an embodiment of the present disclosure, in operation S310, the stock application data preparation interface is functionally classified to obtain the stock application data preparation function, including operations S410-S450.
[0076] In operation S410, an application data preparation interface in the stock application data preparation interfaces is used as a data point.
[0077] In operation S420, based on the key business field, k data points of different types are selected to obtain k initial cluster center points; k is an integer greater than 1.
[0078] The k initial cluster centers indicate that the stock application data preparation interfaces are divided into k cluster categories, that is, there are k stock application data preparation functions. Preferably, the value of k is 3.
[0079] In operation S430, based on the amount of application interface data, the Euclidean distance between the non-cluster center data point and the cluster center point is calculated, and the function category of the non-cluster center data point is assigned according to the Euclidean distance.
[0080] The application interface data volume indicates the size of the data volume between applications. The size of the data volume between applications includes the data volume, concurrent processing capability, and data processing capability. The Euclidean distance can be calculated based on the size of the data volume between applications. The formula is as follows:
[0081]
[0082] Among them, X is the center point and Y is a non-cluster center data point.
[0083] Non-cluster center data points are assigned to the nearest cluster center point based on the Euclidean distance.
[0084] In operation S440 , an average value of all data points in each functional category is calculated to update a cluster center point of each functional category.
[0085] The average value of all data points in the cluster classification is calculated to update the center point of each cluster, that is, the cluster center point position of the functional category.
[0086] In operation S450, the function category to which each data point belongs is continuously reallocated according to the updated cluster center point, and the position of the cluster center point is updated until the clustering end condition is met to obtain the stock application data preparation function.
[0087] The process of continuously reallocating the functional category to which each data point belongs and updating the position of the cluster center point is to continuously perform operations S430-S440 based on the updated cluster center point until the clustering end condition is met, the classification of all existing application data preparation interfaces is realized, and the existing application data preparation function is obtained. The clustering end condition includes that the cluster center point no longer changes significantly (i.e. converges) or reaches a pre-set maximum number of iterations.
[0088] In the embodiment of the present disclosure, the k-means clustering algorithm is used to classify the functions of the stock application data preparation interface. The time complexity is relatively low, it can converge quickly, improve the calculation efficiency, and realize the reasonable classification of data. Different types of interface functions may interfere with each other, affecting the overall efficiency of data preparation. Through clustering classification, interfaces with similar functions are put together, which can reduce conflicts and interference between different functions.
[0089] Figure 5 The interface communication area analysis flow chart of the test data preparation method according to an embodiment of the present disclosure is schematically shown.
[0090] like Figure 5 As shown, according to an embodiment of the present disclosure, the stock function communication field includes a stock interface communication field and a stock communication area core field. In operation S230, the stock function communication field is generated by analyzing the stock application data preparation function in the interface communication area, including operations S510-S520.
[0091] In operation S510, the intersection of application data fields between every two functions in the stock application data preparation function is obtained to obtain the stock interface communication field.
[0092] In the classified stock application data preparation functions, take the intersection of the application data fields corresponding to every two functions and convert them into interface communication area fields, so that there is at least one interface communication field in every two functions, and associate the two functions to facilitate calling data of different functions.
[0093] In operation S520, the core fields of each application data preparation interface in the stock application data preparation function are analyzed to select the core fields of the stock communication area.
[0094] For example, after data cleaning, it is found that most of the interfaces in the mainstream test data preparation functions use the core field of customer number. In this case, the customer number can be used as the core field of the existing communication area, so that the communication area core field exists in most of the interfaces of each function, which facilitates the calling of interface data under the same function.
[0095] According to the embodiments of the present disclosure, the existing interface communication field is the intersection of the application data fields between every two functions, and the core field of the existing communication area is the core field selected for analyzing each application data preparation interface in the existing application data preparation function, ensuring that the application data preparation interface connected to each existing application data preparation function contains this field or an associated field of this field, which helps to establish a unified data communication standard between different application data preparation functions and promotes close collaboration between various functional modules at the data level.
[0096] Figure 6 The data preparation flow chart of the test data preparation method according to an embodiment of the present disclosure is schematically shown.
[0097] like Figure 6 As shown, according to an embodiment of the present disclosure, in operation S230, based on the target application interface priority and the stock function communication field, the application data preparation interface of the target data preparation function is called to prepare the test data corresponding to the target application module, including operations S610-S620.
[0098] In operation S610, based on the existing function communication fields, a target function communication field corresponding to the target data preparation function is acquired.
[0099] Based on the fact that the stock function communication field contains all the communication field contents of the stock data preparation function, the communication field contents corresponding to the target data preparation function are extracted to obtain the target function communication field.
[0100] In operation S620, based on the target application interface priority, the application data preparation interface of the target data preparation function is called through the target function communication field to prepare test data corresponding to the target application module.
[0101] In the embodiments of the present disclosure, based on the priority of the target application interface, test data corresponding to the core functions of the target application module are prepared in priority, and the priority and the corresponding functional communication field are clarified to accurately call the interface. This can avoid trying different interfaces one by one in a disorderly manner or wasting time on irrelevant interfaces, quickly obtain required data and complete data preparation, thereby speeding up the advancement of the entire testing process.
[0102] Figure 7 The serial communication flow chart of the test data preparation method according to the embodiment of the present disclosure is schematically shown.
[0103] like Figure 7 As shown, according to an embodiment of the present disclosure, the target function communication field includes a target interface communication field and a target communication area core field. In operation S620, based on the target application interface priority, the application data preparation interface of the target data preparation function is called through the target function communication field to prepare test data corresponding to the target application module, including operations S710-S730.
[0104] In operation S710, the application data preparation interface under the target data preparation function is serially connected using the target communication area core field.
[0105] When a certain field is selected as the core field of the target communication area, it is necessary to ensure that each access function contains a certain field or a field associated with a certain field. For example, if the core field of the target communication area is the customer number, the application data preparation interface of each application package is connected in series using the customer number to facilitate one-stop data preparation.
[0106] In operation S720, every two target data preparation functions are connected in series using the target interface communication field.
[0107] Exemplarily, if the target interface communication field is a transaction number, the transaction number is used to connect two application data preparation interfaces encapsulated under target data preparation functions in series, thereby facilitating the calling of application data preparation interfaces under different functions.
[0108] In operation S730, based on the target application interface priority, the application data preparation interface of the serially connected target data preparation function is called to prepare test data corresponding to the target application module.
[0109] In the embodiments of the present disclosure, based on the target interface communication field and the target communication area core field, the corresponding application data preparation interface is called to achieve rapid collaborative work between multiple applications, avoid business testers repeatedly jumping between various applications / platforms to find available data, enable smoother data interaction and collaboration, improve data preparation efficiency, focus on the core fields of the existing communication area for data processing, reduce unnecessary data transmission, and help to systematically collect comprehensive and complete test data.
[0110] According to an embodiment of the present disclosure, the method also includes: regularly counting the data hit rate of the prepared test data; and when the data hit rate is lower than a preset threshold, according to preset rules, using the application data recovery strategy, calling the data recovery interface to restore the production data of the application module.
[0111] In the background process, the data hit rate of application module data preparation is sampled regularly and statistically analyzed to evaluate the effectiveness of the interface and provide a basis for the recovery of production data. The data hit rate refers to the proportion of prepared test data that can meet the needs, be selected by users, and be effectively used in the actual application process.
[0112] When the data hit rate drops below the preset threshold, the data recovery interface is called according to the preset rules to trigger the recovery operation of production data. This is equivalent to setting up an automatic monitoring and emergency remediation mechanism to ensure that there is enough available production data to support the normal development of related work, synchronize data between different databases corresponding to different interfaces, provide a complete data monitoring, trigger recovery mechanism, and a system that flexibly customizes recovery strategies based on different test environments, aiming to ensure that the data preparation function module has appropriate data available in different scenarios to ensure the smooth progress of related business or testing work.
[0113] The preset rules include application module mechanism, data recovery method, production data source library and target library configuration.
[0114] Application module mechanism: The entire data recovery mechanism is implemented around the data related to the application module. It is the data source and operation object targeted by the entire process.
[0115] Data recovery method: defines the means used to recover data, such as incremental recovery, full recovery, or recovery based on specific conditions.
[0116] Production data source library and target library configuration: The relevant settings of where the data is obtained from (production data source library) and where it is stored after recovery (target library) clarify the source and destination of the data.
[0117] The application data recovery strategy specifies the overall ideas and methods for data recovery in different situations, such as how and from where. According to the characteristics of different test environments, the application data recovery strategy can be customized with targeted data recovery methods, such as a test environment with few applications and relatively single test functions: In this relatively simple and small-scale test environment, the data recovery strategy can extract and recover data based on the interface communication area fields, that is, selectively obtain the required data according to specific communication-related field conditions, which can not only meet the basic test needs, but also improve efficiency and avoid unnecessary data redundancy. For example, a full-function test environment: In the face of a full-function test environment with comprehensive functions and higher requirements, in order to ensure that all functional tests have complete data support, the data recovery strategy is set to full recovery, that is, all relevant production data is recovered to ensure that the test work will not be affected by data loss.
[0118] In the embodiments of the present disclosure, an automatic monitoring and emergency remediation mechanism is set up to automatically adjust data recovery when the hit rate is low, to ensure that the data application module has appropriate data available in different scenarios, to ensure the smooth progress of related business or testing work, to synchronously restore production data, to avoid inconsistencies in database production data between different application modules, and to improve the hit rate of prepared test data.
[0119] According to an embodiment of the present disclosure, the method further includes: preparing test data for n target application modules selected by a user to obtain test data corresponding to the n target application modules; n is an integer greater than 1.
[0120] Test data preparation is performed for the selected multiple target application modules, and the method of operation S210 to operation S230 is also used to implement batch data preparation work, which will not be described in detail here.
[0121] In the embodiments of the present disclosure, batch data preparation is supported to complete batch data preparation functions in scenarios with large data volume requirements such as performance testing and automated testing, thereby greatly improving data preparation efficiency.
[0122] Based on the above test data preparation method, the present disclosure also provides a test data preparation device. Figure 8 The device is described in detail.
[0123] Figure 8 The structure block diagram of the test data preparation device according to the embodiment of the present disclosure is schematically shown.
[0124] Fig. 9 The figure schematically shows a connection diagram of the data preparation module 840 of the test data preparation device according to an embodiment of the present disclosure.
[0125] like Figure 8 , 9 As shown, the test data preparation device 800 of this embodiment includes a target function acquisition module 810 , a function combination module 820 , a function classification module 830 , a data preparation module 840 and an interface communication area generation module 850 .
[0126] The target function acquisition module 810 is used to obtain the application data preparation interface of the target application module selected by the user to obtain the target data preparation function; in one embodiment, the target function acquisition module 810 can be used to perform the operation S210 described above, which will not be repeated here.
[0127] The function combination module 820 is used to sort the application data preparation interfaces of the target data preparation function based on the existing function dependency to obtain the target application interface priority when the target data preparation function belongs to the existing application data preparation function. In one embodiment, the function combination module 820 can be used to perform the operation S220 described above, which will not be repeated here.
[0128] The function classification module 830 is used to obtain the stock function dependency by performing category relationship analysis on the stock application data preparation interface. In one embodiment, the function classification module 830 can be used to perform the operations S310-S320 described above, which will not be described in detail here.
[0129] The data preparation module 840 is used to call the application data preparation interface of the target data preparation function based on the target application interface priority and the stock function communication field to prepare the test data corresponding to the target application module. In one embodiment, the data preparation module 840 can be used to perform the operation S230 described above, which will not be repeated here.
[0130] The interface communication area generation module 850 is used to generate the existing function communication field by performing interface communication area analysis on the existing application data preparation function. In one embodiment, the interface communication area generation module 850 can be used to perform the operations S510-S520 described above, which will not be repeated here.
[0131] According to an embodiment of the present disclosure, the existing function communication field includes an existing interface communication field and an existing communication area core field. The interface communication area generation module 850 includes: a first generation unit, used to obtain the intersection of the application data fields between every two functions in the existing application data preparation function to obtain the existing interface communication field; and a second generation unit, used to analyze the core field of each application data preparation interface in the existing application data preparation function to select the existing communication area core field.
[0132] According to an embodiment of the present disclosure, the function classification module 830 includes: a function classification unit, used to perform function classification on the stock application data preparation interface to obtain the stock application data preparation function; and a relationship analysis unit, used to analyze the data dependency between the stock application data preparation functions to obtain the stock function dependency.
[0133] According to an embodiment of the present disclosure, a function classification unit includes: a first function classification subunit, which is used to take an application data preparation interface in the existing application data preparation interface as a data point; a second function classification subunit, which is used to select k data points of different types based on key business fields to obtain k initial cluster center points; k is an integer greater than 1; a third function classification subunit, which is used to calculate the Euclidean distance between non-cluster center data points and cluster center points based on the application interface data volume, and assign functional categories to non-cluster center data points according to the Euclidean distance; a fourth function classification subunit, which is used to calculate the average value of all data points in each functional category to update the cluster center points of each functional category; a fifth function classification subunit, which is used to continuously reallocate the functional category to which each data point belongs according to the updated cluster center points, and update the cluster center point positions until the clustering end conditions are met to obtain the existing application data preparation function.
[0134] According to an embodiment of the present disclosure, the data preparation module 840 includes: a first data preparation unit, which is used to obtain a target function communication field corresponding to a target data preparation function based on the stock function communication field; a second data preparation unit, which is used to call an application data preparation interface of the target data preparation function through the target function communication field based on the target application interface priority to prepare test data corresponding to the target application module;
[0135] According to an embodiment of the present disclosure, the target function communication field includes a target interface communication field and a target communication area core field; the second data preparation unit includes: a serial interface sub-unit, which is used to use the target communication area core field to serially connect the application data preparation interface under the target data preparation function; a serial function sub-unit, which is used to use the target interface communication field to serially connect every two target data preparation functions; and a data calling sub-unit, which is used to call the application data preparation interface of the serially connected target data preparation function based on the target application interface priority to prepare the test data corresponding to the target application module.
[0136] According to an embodiment of the present disclosure, the device 800 also includes: an existing data update module 860, which is used to perform a category relationship analysis on the application data preparation interface of the target data preparation function and the current existing application data preparation interface when the target data preparation function does not belong to the existing application data preparation function, so as to update the existing application data preparation function and the existing function dependency relationship; and to perform an interface communication area analysis on the updated existing application data preparation function to update the existing function communication field.
[0137] According to an embodiment of the present disclosure, the device 800 also includes: a production data recovery module 870, which is used to regularly count the data hit rate of the prepared test data; and when the data hit rate is lower than a preset threshold, according to preset rules, using the application data recovery strategy, calling the data recovery interface to restore the production data of the application module.
[0138] According to an embodiment of the present disclosure, the apparatus 800 further includes: a batch data preparation module 880 for preparing test data for n target application modules selected by a user to obtain test data corresponding to the n target application modules; n is an integer greater than 1.
[0139] According to an embodiment of the present disclosure, any multiple modules among the target function acquisition module 810, the function combination module 820, the function classification module 830, the data preparation module 840, the interface communication area generation module 850, the inventory data update module 860, the production data recovery module 870 and the batch data preparation module 880 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the target function acquisition module 810, the function combination module 820, the function classification module 830, the data preparation module 840, the interface communication area generation module 850, the stock data update module 860, the production data recovery module 870 and the batch data preparation module 880 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware and firmware or by a proper combination of any of them. Alternatively, at least one of the target function acquisition module 810, the function combination module 820, the function classification module 830, the data preparation module 840, the interface communication area generation module 850, the stock data update module 860, the production data recovery module 870 and the batch data preparation module 880 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0140] Fig.10 A block diagram of an electronic device suitable for implementing a test data preparation method according to an embodiment of the present disclosure is schematically shown.
[0141] like Fig.10As shown, the electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 to a random access memory (RAM) 1003. The processor 1001 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 1001 may also include an onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0142] In RAM 1003, various programs and data required for the operation of electronic device 1000 are stored. Processor 1001, ROM 1002 and RAM 1003 are connected to each other via bus 1004. Processor 1001 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 1002 and / or RAM 1003. It should be noted that the program can also be stored in one or more memories other than ROM 1002 and RAM 1003. Processor 1001 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.
[0143] According to an embodiment of the present disclosure, the electronic device 1000 may further include an input / output (I / O) interface 1005, which is also connected to the bus 1004. The electronic device 1000 may further include one or more of the following components connected to the input / output (I / O) interface 1005: an input portion 1006 including a keyboard, a mouse, etc.; an output portion 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 1008 including a hard disk, etc.; and a communication portion 1009 including a network interface card such as a LAN card, a modem, etc. The communication portion 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the input / output (I / O) interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage portion 1008 as needed.
[0144] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0145] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 1002 and / or RAM 1003 described above and / or one or more memories other than ROM 1002 and RAM 1003.
[0146] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the test data preparation method provided by the embodiment of the present disclosure.
[0147] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 1001. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0148] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 1009, and / or installed from the removable medium 1011. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0149] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the processor 1001, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0150] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0151] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0152] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0153] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A test data preparation method, characterized in that: The method comprises: Obtain the application data preparation interface of the target application module selected by the user to obtain the target data preparation function; When the target data preparation function belongs to an existing application data preparation function, based on the existing function dependency, the application data preparation interfaces of the target data preparation function are sorted to obtain a target application interface priority; wherein the existing function dependency is obtained by performing a category relationship analysis on the existing application data preparation interfaces; and Based on the target application interface priority and the stock function communication field, the application data preparation interface of the target data preparation function is called to prepare the test data corresponding to the target application module; wherein the stock function communication field is generated by performing interface communication area analysis on the stock application data preparation function.
2. The method according to claim 1, characterized in that The stock function communication field includes a stock interface communication field and a stock communication area core field, and the stock function communication field is generated by performing interface communication area analysis on the stock application data preparation function, including: Obtaining the intersection of the application data fields between every two functions in the stock application data preparation function to obtain the stock interface communication field; and The core fields of each application data preparation interface in the stock application data preparation function are analyzed to select the core fields of the stock communication area.
3. The method according to claim 1, characterized in that The stock function dependency is obtained by performing a category relationship analysis on the stock application data preparation interface, including: Functionally classifying the stock application data preparation interface to obtain the stock application data preparation function; and The data dependencies between the stock application data preparation functions are analyzed to obtain the stock function dependencies.
4. The method according to claim 3, characterized in that The function classification of the stock application data preparation interface to obtain the stock application data preparation function includes: Taking one of the existing application data preparation interfaces as a data point; Based on the key business fields, k data points of different types are selected to obtain k initial cluster center points; k is an integer greater than 1; Based on the amount of application interface data, calculating the Euclidean distance between the non-cluster center data point and the cluster center point, and assigning the function category of the non-cluster center data point according to the Euclidean distance; Calculate the average value of all data points in each functional category to update the cluster center point of each functional category; According to the updated cluster center point, the function category to which each data point belongs is continuously reallocated, and the position of the cluster center point is updated until the clustering end condition is met to obtain the stock application data preparation function.
5. The method according to any one of claims 1 to 4, characterized in that: The calling of the application data preparation interface of the target data preparation function based on the target application interface priority and the stock function communication field to prepare the test data corresponding to the target application module includes: Based on the stock function communication field, acquiring the target function communication field corresponding to the target data preparation function; and Based on the target application interface priority, the application data preparation interface of the target data preparation function is called through the target function communication field to prepare the test data corresponding to the target application module.
6. The method according to any one of claim 5, characterized in that: in, The target function communication field includes a target interface communication field and a target communication area core field; the application data preparation interface of the target data preparation function is called through the target function communication field based on the target application interface priority to prepare the test data corresponding to the target application module, including: Using the target communication area core field, serially connect the application data preparation interface under the target data preparation function; Utilizing the target interface communication field, connecting each two target data preparation functions in series; and Based on the target application interface priority, the application data preparation interface of the serially connected target data preparation function is called to prepare the test data corresponding to the target application module.
7. The method according to claim 1, characterized in that in, The method further comprises: When the target data preparation function does not belong to the stock application data preparation function, performing a category relationship analysis on the application data preparation interface of the target data preparation function and the current stock application data preparation interface to update the stock application data preparation function and the stock function dependency; and The updated stock application data preparation function is subjected to interface communication area analysis to update the stock function communication field.
8. The method according to claim 1, characterized in that The method further comprises: Regularly collect statistics on the data hit rate of the prepared test data; and When the data hit rate is lower than a preset threshold, the data recovery interface is called according to preset rules and using the application data recovery strategy to recover the production data of the application module.
9. The method according to claim 1, characterized in that: The method further comprises: Test data preparation is performed on n target application modules selected by the user to obtain test data corresponding to the n target application modules; n is an integer greater than 1.
10. A test data preparation device, characterized in that: The device comprises: A target function acquisition module, used to acquire an application data preparation interface of a target application module selected by a user to obtain a target data preparation function; a function combination module, for sorting the application data preparation interfaces of the target data preparation function based on the dependency of the existing functions to obtain a target application interface priority when the target data preparation function belongs to an existing application data preparation function; A function classification module, configured to obtain the stock function dependency relationship by performing a category relationship analysis on the stock application data preparation interface; and A data preparation module, configured to call the application data preparation interface of the target data preparation function based on the target application interface priority and the stock function communication field, so as to prepare test data corresponding to the target application module; The interface communication area generating module is used to generate the stock function communication field by performing interface communication area analysis on the stock application data preparation function.
11. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
13. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.