Financial test data construction method, electronic equipment and storage medium
The method of class parsing and subroutine implantation in bytecode files, combined with a data construction server using microservice clusters, addresses inefficiencies and security issues in financial test data construction, enabling secure and accurate data generation for system testing.
Patent Information
- Application Number
- CN202411207178.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-06
AI Technical Summary
Existing financial test data construction methods are inefficient, insecure, and can intrude on the original system, failing to accurately reflect the complexity of financial and insurance businesses.
A method involving class parsing and subroutine implantation in bytecode files to generate target parameters, which are used to create a number-making model for constructing financial test data, utilizing a data construction server with microservice clusters for distributed processing.
Enables secure and efficient construction of massive financial test data that accurately reflects business complexity, supporting system testing and ensuring compliance with performance and security requirements.
Smart Images

Figure CN119090648A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial insurance technology, and in particular to a financial test data construction method, electronic equipment, and storage medium. Background Art
[0002] In the financial and insurance fields, the need to construct massive data can appear in multiple scenarios. For example, in order to ensure that a newly developed financial system or an updated insurance platform can run stably and meet performance requirements before going online, a series of performance tests are required. These tests require the system to run under high load to simulate the situation in the real world where a large number of users use the service at the same time. In these tests, constructing massive data is necessary because they can help evaluate the performance of the system when processing a large number of transactions or policies.
[0003] In related technologies, the difficulty in constructing massive data lies in how to generate these data efficiently and securely while ensuring that they can truly reflect the complexity of financial and insurance businesses. Traditional financial test data construction methods, such as using scripts or SQL statements, may intrude on the original system and affect data security. Therefore, how to construct massive data in a more secure way has become a problem that needs to be solved urgently in the industry. Summary of the invention
[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a financial test data construction method, electronic device, and storage medium, which can realize the construction of massive data in a safer way.
[0005] According to the financial test data construction method of the first aspect of the present application, applied to a request processing server, the method includes:
[0006] Get processing request information and number generation subroutines;
[0007] Performing class parsing based on the processing request information to obtain an original class bytecode file;
[0008] Implanting the number-generating subroutine into the original class bytecode file to obtain a target class bytecode file;
[0009] Performing class loading on the target class bytecode file to execute a request processing operation matching the processing request information;
[0010] In the process of executing the request processing operation, in response to the number generation subroutine being triggered, obtaining a target parameter;
[0011] The target parameters are sent to a data construction server, so that the data construction server generates a number-making model according to the target parameters, and performs a data construction operation through the number-making model to obtain financial test data.
[0012] According to some embodiments of the present application, the step of implanting the number creation subroutine into the original class bytecode file to obtain a target class bytecode file includes:
[0013] Determine the main function of the service for the original class bytecode file;
[0014] The number-generating subroutine is implanted into the pre-execution function corresponding to the main business function to obtain the target class bytecode file.
[0015] According to the financial test data construction method of the second aspect of the present application, applied to a data construction server, the method includes:
[0016] Obtaining a target parameter transmitted by a request processing server; wherein the target parameter is obtained in the request processing server in the following manner:
[0017] Get processing request information and number generation subroutine;
[0018] Performing class parsing based on the processing request information to obtain an original class bytecode file;
[0019] Implanting the number-generating subroutine into the original class bytecode file to obtain a target class bytecode file;
[0020] Loading the target class bytecode file to execute a request processing operation matching the processing request information;
[0021] In the process of executing the request processing operation, in response to the number generation subroutine being triggered, obtaining a target parameter;
[0022] A number-making model is generated according to the target parameters, and a data construction operation is performed through the number-making model to obtain financial test data.
[0023] According to some embodiments of the present application, before generating a number-making model according to the target parameters and performing a data construction operation through the number-making model to obtain financial test data, the method further includes:
[0024] Generate template configuration information according to the type of the number-generating subroutine;
[0025] The number creation model matching the number creation subroutine is generated according to the template configuration information.
[0026] According to some embodiments of the present application, generating a number-making model according to the target parameter, and performing a data construction operation through the number-making model to obtain financial test data includes:
[0027] Performing data analysis on the target parameters to obtain business rule information and parameter characteristic information;
[0028] Based on the business rule information and the parameter characteristic information, generating the number creation model;
[0029] The financial test data is obtained by performing a data construction operation through the number-making model.
[0030] According to some embodiments of the present application, the data construction server includes a plurality of number-making microservice clusters, and the data construction operation is performed through the number-making model to obtain the financial test data, including:
[0031] Generate multiple number-generating subtasks through the number-generating model, and assign each of the number-generating subtasks to the corresponding number-generating microservice cluster, so that the number-generating microservice cluster executes the corresponding assigned number-generating subtask;
[0032] In response to each of the number-generating subtasks being executed, the financial test data is obtained.
[0033] According to some embodiments of the present application, after generating the number-making model based on the business rule information and the parameter feature information, the method further includes:
[0034] Obtaining at least one of a data structure modification request, a generation rule adjustment request, and a business logic addition request;
[0035] Based on at least one of the data structure modification request, the generation rule adjustment request and the business logic addition request, adjusting the number creation model to update the number creation model;
[0036] The step of performing a data construction operation through the number-making model to obtain the financial test data includes:
[0037] The financial test data is obtained by performing data construction operations through the updated number-making model.
[0038] According to some embodiments of the present application, after generating a number-making model according to the target parameters and performing a data construction operation through the number-making model to obtain financial test data, the method further includes:
[0039] generating annotation information matching the number creation reference information according to the number creation model;
[0040] Generate a number-making script description based on the number-making reference information and the annotation information;
[0041] The number creation script description is displayed through a user interaction interface.
[0042] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the financial test data construction method as described in any one of the embodiments of the first aspect of the present application.
[0043] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement a financial test data construction method as described in any one of the embodiments of the first aspect of the present application.
[0044] The financial test data construction method, electronic device, and storage medium according to the embodiments of the present application have at least the following beneficial effects:
[0045] According to the financial test data construction method of the embodiment of the present application, in the request processing server, it is necessary to first obtain the processing request information and the number-generating subroutine; perform class parsing based on the processing request information to obtain the original class bytecode file; implant the number-generating subroutine into the original class bytecode file to obtain the target class bytecode file; class load the target class bytecode file to execute the request processing operation that matches the processing request information; in the process of executing the request processing operation, in response to the number-generating subroutine being triggered, obtain the target parameters; send the target parameters to the data construction server. In the data construction server, it is necessary to obtain the target parameters transmitted from the request processing server; generate a number-generating model based on the target parameters, and perform the data construction operation through the number-generating model to obtain financial test data. In this way, the construction of massive data can be achieved in a safer way.
[0046] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0048] Figure 1 A flowchart of a method for constructing financial test data provided in an embodiment of the present application;
[0049] Figure 2 for Figure 1 The flowchart of step 103 in the embodiment shown is as follows;
[0050] Figure 3 Another schematic diagram of a flow chart of a method for constructing financial test data provided in an embodiment of the present application;
[0051] Figure 4 for Figure 1 A schematic flow chart of step 108 in the illustrated embodiment;
[0052] Figure 5 for Figure 4 The flowchart of step 403 in the embodiment shown is as follows;
[0053] Figure 6 Another schematic diagram of a flow chart of a method for constructing financial test data provided in an embodiment of the present application;
[0054] Figure 7 Another schematic diagram of a flow chart of a method for constructing financial test data provided in an embodiment of the present application;
[0055] Figure 8 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0056] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0057] In the description of this application, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0058] In the description of the present application, it should be understood that descriptions involving orientation, such as up, down, left, right, front, back, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0059] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0060] In the description of this application, it should be noted that, unless otherwise clearly defined, the terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application in combination with the specific content of the technical solution. In addition, the identification of specific steps below does not represent a limitation on the order of steps and execution logic. The execution order and execution logic between each step should be understood and inferred with reference to the contents described in the embodiment.
[0061] In the field of finance and insurance, the need to construct massive data can appear in multiple scenarios.
[0062] First, in order to ensure that the newly developed financial system or updated insurance platform can run stably and meet performance requirements before going online, a series of performance tests are required. These tests can include stress tests, load tests, and durability tests, which require the system to run under high load to simulate the situation in the real world where a large number of users use the service at the same time. In these tests, it is necessary to construct massive data because they can help evaluate the performance of the system when processing a large number of transactions or policies.
[0063] Secondly, in risk management and compliance testing, a large amount of data also needs to be constructed. Financial institutions and insurance companies must ensure that their systems can accurately assess and manage risks while complying with data security requirements. By constructing massive data, various market situations and risk events can be simulated to test the system's responsiveness and accuracy.
[0064] In addition, in order to improve user experience and service quality, financial insurance companies may use automated testing to simulate user behavior and interaction. This requires the system to be able to handle a large number of requests and responses, and constructing massive data can ensure the comprehensiveness and authenticity of the test.
[0065] In the above situation, the difficulty in constructing massive data lies in how to generate these data efficiently and securely, while ensuring that they can truly reflect the complexity of financial insurance business. Traditional financial test data construction methods, such as using scripts or SQL statements, are inefficient, low-security, difficult to reuse, and may intrude into the original system, affecting data security.
[0066] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a financial test data construction method, electronic device, and storage medium, which can realize the construction of massive data in a safer way.
[0067] Further explanation is given below based on the accompanying drawings.
[0068] Reference Figure 1 According to a financial test data construction method provided in an embodiment of the present application, in a request processing server, the following steps may be included, but not limited to:
[0069] Step 101, obtaining processing request information and number generation subroutine;
[0070] Step 102, performing class parsing based on the processing request information to obtain the original class bytecode file;
[0071] Step 103, implanting the number-generating subroutine into the original class bytecode file to obtain a target class bytecode file;
[0072] Step 104, class loading the target class bytecode file to execute the request processing operation matching the processing request information;
[0073] Step 105, in the process of executing the request processing operation, in response to the number generation subroutine being triggered, obtaining the target parameter;
[0074] Step 106, sending the target parameters to the data construction server;
[0075] The financial test data construction method of the embodiment of the present application may include, but is not limited to, executing the following steps in the data construction server:
[0076] Step 107, obtaining target parameters transmitted from the request processing server;
[0077] Step 108, generating a mathematical model according to the target parameters, and performing a data construction operation through the mathematical model to obtain financial test data.
[0078] According to the financial test data construction method of the embodiment of the present application, in the request processing server, it is necessary to first obtain the processing request information and the number-generating subroutine; perform class parsing based on the processing request information to obtain the original class bytecode file; implant the number-generating subroutine into the original class bytecode file to obtain the target class bytecode file; class load the target class bytecode file to execute the request processing operation that matches the processing request information; in the process of executing the request processing operation, in response to the number-generating subroutine being triggered, obtain the target parameters; send the target parameters to the data construction server. In the data construction server, it is necessary to obtain the target parameters transmitted from the request processing server; generate a number-generating model based on the target parameters, and perform the data construction operation through the number-generating model to obtain financial test data. In this way, the construction of massive data can be achieved in a safer way.
[0079] In step 101 of some embodiments, processing request information and number-generating subroutines are obtained. It should be noted that processing request information refers to business request information that needs to be processed. Processing request information may include user operations, transaction processing, data queries, etc. The reason for obtaining these processing request information is that the processing request information defines the requirements and goals corresponding to the completion of a certain business, ensuring that the generated data can meet specific business scenarios and test purposes. In addition, number-generating subroutines refer to code snippets used to implement data construction logic. These number-generating subroutines can be embedded in class bytecode files, so that when the class bytecode files are executed, the number-generating subroutines will be triggered in some cases, thereby generating corresponding target parameters.
[0080] In some embodiments, the number-generating subroutine may include data generation rules, data association logic, and data verification mechanisms to ensure that the generated target parameters comply with business rules and truly reflect the complexity of financial and insurance businesses.
[0081] In some more specific embodiments, the acquired processing request information can be first identified and parsed to determine which specific number-generating subroutines are needed. In this process, it may involve the analysis of the request type, request parameters and context corresponding to the processing request information, and select a suitable subroutine as the number-generating subroutine based on this. Once the appropriate number-generating subroutine is determined, the embodiment of the present application can associate the processing request information with the corresponding number-generating subroutine, and prepare for the class parsing and subroutine implantation of the subsequent process. In this way, a solid foundation can be laid for the financial test data construction method of the embodiment of the present application, thereby improving the quality and efficiency of data construction.
[0082] In step 102 of some embodiments, class parsing is performed based on the processing request information to obtain the original class bytecode file. It should be noted that the purpose of performing class parsing based on the processing request information is to obtain the original class bytecode file.
[0083] It should be noted that the processing request information includes the specific content of the user request, such as the transaction type, user input parameters, etc. The embodiment of the present application needs to identify what information such as the business logic and data model corresponding to the processing request information can include through class parsing. Further, the embodiment of the present application can locate the corresponding class definition based on the business logic and data model corresponding to the processing request information. In some embodiments, these class definitions can exist in the form of source code, but in order to perform subsequent bytecode operations, the class definition can be converted into bytecode form, that is, the original class bytecode file.
[0084] It should be noted that bytecode is an intermediate representation that can be understood and executed by the Java Virtual Machine (JVM). Converting source code into bytecode requires a compilation process, which can be done automatically.
[0085] In some more specific embodiments, after obtaining the original class bytecode file, the original class bytecode file can be further processed, such as checking the structure of the original class bytecode file, confirming whether the structure and method definition of the class in the original class bytecode file meet expectations, and confirming whether the original class bytecode file has necessary hook functions or entry points, wherein these hook functions or entry points can be used to implant number-generating subroutines in subsequent steps.
[0086] In step 103 of some embodiments, a number-generating subroutine is implanted into the original class bytecode file to obtain a target class bytecode file. It should be noted that step 103 is a key link in realizing the non-invasiveness of the data construction method, which allows the embodiments of the present application to expand its functions to support data construction without modifying the existing business code. It should be emphasized that the number-generating subroutine is a specially written code for generating financial test data at runtime. These number-generating subroutines are configured to be triggered at specific business logic points and perform data construction tasks. The number-generating subroutine may include a data generation algorithm, data association logic, and a verification mechanism to ensure that the data complies with business rules.
[0087] In an embodiment of the present application, the original class bytecode file can first be analyzed to determine a suitable implantation point. This can be achieved by identifying the execution flow of the original class bytecode file and finding a position where the number-generating subroutine can be inserted. For example, the position where the number-generating subroutine is inserted may be at the beginning or end of the execution flow corresponding to the original class bytecode file, or at a specific conditional judgment point. Once the implantation point is determined, the embodiment of the present application can modify the original bytecode file through bytecode editing. For example, in the ASM library of Java, bytecode editing can include inserting new instruction sequences into the original class bytecode file, and these instruction sequences define the execution logic of the number-generating subroutine. The implanted number-generating subroutine can work in conjunction with the original business logic, so that it can be ensured that when the number-generating subroutine is triggered, it will not affect the normal execution of the original business logic in the target class bytecode file.
[0088] It should be made clear that the class bytecode file after the number-generating subroutine is implanted will become the target class bytecode file, which contains the original business logic and the newly added number-generating function. Among them, the original business logic is derived from the original class bytecode file, and the newly added number-generating function is derived from the number-generating subroutine. The target class bytecode file can be loaded into the JVM for execution in the subsequent process, so that the number-generating subroutine can be triggered in the subsequent class loading process of the target class bytecode file. In this way, it is possible to dynamically expand its functions without intruding into the original system to support automated financial test data construction. This method not only improves the efficiency and security of data construction, but also provides a flexible solution for system testing in the financial and insurance fields.
[0089] Reference Figure 2 According to some embodiments provided by the present application, step 103 of implanting the number-generating subroutine into the original class bytecode file to obtain the target class bytecode file may include, but is not limited to, executing the following steps:
[0090] Step 201, determining the main function of the business for the original class bytecode file;
[0091] Step 202: implant a number generation subroutine into the pre-execution function corresponding to the main function of the business to obtain a target class bytecode file.
[0092] Step 201 of some embodiments first involves determining the main business function in the original class bytecode file. The main business function refers to a function used in business logic to solve specific business needs, wherein the business logic contained in the main business function may be an entry point for processing user requests, executing transactions or other core business operations. It should be understood that the main business function contains a potential location for implanting a number generation subroutine.
[0093] In step 202 of some embodiments, after the main business function is determined, a number generation subroutine may be further implanted in a pre-execution function corresponding to the main business function.
[0094] It should be noted that pre-execution functions are functions that are executed before the main business function is executed. They can be used to initialize the environment, set parameters, or perform other preparatory work. By embedding number-generating subroutines in these pre-execution functions, data construction-related operations can be performed before the business logic is executed.
[0095] Specifically, a pre-execution function (premain) is a special method used to initialize an agent in a Java program. In Java, an agent is a special program that can extend or enhance the functionality of an application by inserting additional logic without modifying the original business logic code. The pre-execution function premain is part of the Java agent mechanism. It runs before the main method of the application is executed, providing an opportunity for the agent to be initialized.
[0096] When the Java Virtual Machine (JVM) is started, if the -javaagent parameter is used to specify an agent JAR file, the JVM will load the agent's premain method before loading the application's main method. This makes the premain method an ideal place to execute agent initialization logic, setting up the required environment and conditions before the main part of the application starts.
[0097] The introduction of the premain method provides a flexible mechanism for Java applications to extend their functionality without modifying their core code. This mechanism is particularly useful when it is necessary to perform AOP (aspect-oriented programming) on the application or to implement monitoring and interception for certain specific purposes. In this way, after the number-generating subroutine is implanted, a target class bytecode file can be generated based on the pre-execution function and the business main function containing the number-generating subroutine. This target class bytecode file will contain the original business logic and the newly added data construction function, which can dynamically expand the system's data construction capabilities without restarting the business system.
[0098] The embodiment of the present application shown in steps 201 to 202 can enhance the original bytecode file by accurately determining the main business function and implanting the number-generating subroutine, thereby providing a flexible, efficient and secure data construction solution without invading the original business system. This embodiment not only improves the automation of data construction, but also provides strong support for system testing and verification work in the financial and insurance fields.
[0099] In step 104 of some embodiments, the target class bytecode file is class loaded to execute the request processing operation matching the processing request information. It should be noted that the target class bytecode file is class loaded to execute the request processing operation matching the processing request information.
[0100] In step 104, first, it is necessary to ensure that the target class bytecode file has been correctly modified and saved, including the implanted number-generating subroutines. These number-generating subroutines are specially configured to generate target parameters, and they will be triggered at specific points in the business logic. The class loader can load the target class bytecode files and convert them into an internal form that the JVM can understand and execute to perform the request processing operation that matches the processing request information.
[0101] It should be made clear that class loading is a key link in the Java program runtime. It is responsible for converting the bytecode file into an internal representation that can be executed by the JVM and initializing the state of the class. The class loading process can include three main stages: loading, linking, and initialization. In the loading stage, the bytecode file is read into the memory and a Class object representing the class is created. In the linking stage, the legitimacy of the bytecode is further verified, and operations such as verification and preparation are performed to ensure that the structure of the class is correct. In the initialization stage, the class constructor method is executed to assign initial values to static variables.
[0102] In some embodiments, if static initialization blocks or static variable assignment operations are defined in the target class bytecode file, these operations will be executed during the initialization phase of class loading, thereby providing an initialization environment for the implanted number-generating subroutine to ensure that all necessary states and dependencies are ready.
[0103] In step 105 of some embodiments, in the process of executing the request processing operation, in response to the number-generating subroutine being triggered, the target parameters are obtained. It should be noted that in the process of executing the request processing operation, the embodiment of the present application will process the user request according to the normal business logic. When the business logic reaches a specific point, such as during the execution of a method or when a specific condition is met, the implanted number-generating subroutine will be triggered. This triggering mechanism may be based on a specific annotation, method call or conditional judgment. Once the number-generating subroutine is triggered, it will immediately respond and start executing its defined tasks to generate target parameters. These tasks may include capturing current context information, such as method parameters, return values or related business states, which may be components of the target parameters, which are the basis for generating financial test data.
[0104] In steps 106 to 107 of some embodiments, the request processing server sends the target parameters to the data construction server, and the data construction server obtains the target parameters transmitted by the request processing server. It should be noted that in the process of executing the request processing operation, once the number creation subroutine is triggered and obtains the target parameters, these target parameters can be quickly and securely sent to the data construction server. This transmission process is usually carried out through a network and may involve remote procedure calls (RPCs), message queues or other middleware technologies to ensure reliable data transmission.
[0105] In step 108 of some embodiments, a number-making model is generated according to the target parameters, and a data construction operation is performed through the number-making model to obtain financial test data. It should be noted that a number-making model is generated according to the target parameters in the data construction server, and a data construction operation is performed through the number-making model to finally obtain financial test data. This step reflects the intelligence and automation of the data construction process, ensuring that the generated data not only complies with business rules but also meets test requirements.
[0106] First, the target parameters are captured in the previous steps. They are the actual data generated in business operations, including but not limited to user input, transaction details, system status, etc. These target parameters are the basis for building financial test data.
[0107] Furthermore, the embodiments of the present application will use these target parameters as inputs to generate a mathematical model through a series of algorithms and rules. The mathematical model is an abstract representation that defines the logic of how to generate financial test data from the target parameters. The target parameters may include data generation rules, data relevance, data distribution characteristics, etc. The process of generating a mathematical model may involve machine learning, statistical analysis, or empirical rule definition.
[0108] It should be understood that once the number-making model is successfully constructed, the embodiment of the present application will use this number-making model to perform data construction operations. During the execution of the data construction operation, it may include generating new data records according to the model rules, modifying existing parameters to explore different business scenarios, or expanding the data set to cover more test cases. The purpose of the data construction operation may be to create enough, diverse, and business-logical financial test data.
[0109] In some embodiments, the generated financial test data can be used in various test scenarios, such as performance testing, stress testing, regression testing, etc. These financial test data can help evaluate the stability, reliability and performance of some financial systems or updated insurance platforms, and ensure that these financial systems or updated insurance platforms can meet the expected business requirements and performance standards before going online.
[0110] It should be understood that step 108 provides high-quality data that meets business requirements and test objectives for the test of the embodiment of the present application in the field of finance and insurance by intelligently generating a mathematical model and performing data construction operations. This approach can not only improve the efficiency and accuracy of data construction, but also ensure the comprehensiveness of the financial and insurance fields.
[0111] Reference Figure 3 According to some embodiments provided by the present application, before generating a number-making model according to the target parameters in step 108 and performing a data construction operation through the number-making model to obtain financial test data, the following steps may also be included:
[0112] Step 301, generating template configuration information according to the type of number generation subroutine;
[0113] Step 302: Generate a number creation model matching the number creation subroutine according to the template configuration information.
[0114] In step 301 of some embodiments, template configuration information is generated according to the type of number-generating subprogram. The type of number-generating subprogram corresponds to its corresponding function and purpose. For example, some number-generating subprograms can be specifically used to generate financial test data for resource circulation, while others can be used to generate test information for customer service. Each type of number-generating subprogram can have its specific data structure and generation rules. Therefore, the purpose of step 301 is to create corresponding template configuration information according to the specific requirements of the number-generating subprogram. This template configuration information will define the parameters, structure and rules required for number generation. Among them, the template configuration information can specifically include the name, data type, generation algorithm, association rules, etc. of the data field, providing a detailed basis for the generation of the subsequent number-generating model.
[0115] In step 302 of some embodiments, a number generation model matching the number generation subroutine is generated according to the template configuration information generated in step 301. It should be noted that this step is used to convert the template configuration information into a specific data construction logic, and generate a corresponding number generation model according to the specific data construction logic. The number generation model will be based on the template configuration information and define how to generate data that meets a specific business scenario.
[0116] In some embodiments, generating a number generation model may include setting an algorithm for data generation, determining data distribution characteristics, defining the association between data, etc. The number generation model may be highly automated, and it uses template configuration information to ensure that the generated data not only conforms to business logic, but also meets the diversity and complexity of test requirements.
[0117] The embodiment of the present application shown in step 301 to step 302 makes the data construction method of the present application more flexible and scalable, because different number-making subroutines can adapt to different business needs and test scenarios by adjusting the template configuration information. In addition, this embodiment also improves the accuracy and efficiency of data construction, because the introduction of template configuration information allows the data generation process to be more accurately controlled, reducing the need for manual intervention. It should be understood that the number-making model generated by step 302 will be used for the operation in step 108 to perform data construction and obtain financial test data. These financial test data can be used in various test scenarios to help evaluate the stability, reliability and performance of the financial system, and ensure that the system can meet the expected business requirements and performance standards before going online. Through this embodiment, the financial test data construction becomes more efficient, accurate and controllable.
[0118] Reference Figure 4 According to some embodiments provided by the present application, step 108 generates a number-making model according to the target parameters, and performs a data construction operation through the number-making model to obtain financial test data, which may include, but is not limited to, performing the following steps:
[0119] Step 401, performing data analysis on the target parameter to obtain business rule information and parameter characteristic information;
[0120] Step 402, generating a number-making model based on the business rule information and the parameter characteristic information;
[0121] Step 403, performing data construction operations through the mathematical model to obtain financial test data.
[0122] In step 401 of some embodiments, the target parameter is subjected to data parsing to extract business rule information and parameter characteristic information. It should be noted that business rule information refers to rules and constraints used to guide business logic and operations, such as transaction validity conditions, data dependencies, etc. Parameter characteristic information refers to attributes such as data type, value range, and distribution characteristics corresponding to the target parameter.
[0123] In step 402 of some embodiments, a mathematical model is generated based on the business rule information and the parameter characteristic information. It should be emphasized that the mathematical model is an abstract representation, which defines how to generate financial test data that conforms to the business logic based on the business rule information and the parameter characteristic information.
[0124] In some embodiments, the number-making model is generated based on the business rule information and the parameter feature information, which may specifically include operations such as determining the algorithm for data generation, setting the boundary conditions of the data, and defining the association rules between the data. It should be understood that the number-making model of the embodiment of the present application is highly customized, and it needs to reflect the complexity and diversity of the financial business, so that the generated financial test data can be both real and representative.
[0125] In step 403 of some embodiments, data construction operations are performed through the number-making model to obtain financial test data. In this step, the number-making model is used as a blueprint for generating financial test data. The data construction operations may include operations such as random data generation, template-based data filling, data mutation and expansion. The purpose of these operations is to create a large amount of financial test data that conforms to business rules and parameter characteristics to support various test scenarios, such as performance testing, stress testing, regression testing, etc.
[0126] Through step 401 to step 403 of the embodiment of the present application, a complete data construction process is jointly constituted, which starts from parsing the target parameters, and finally realizes the generation of financial test data through the generation of the number-making model. In this process, not only the degree of automation of data construction is improved, but also the quality and relevance of financial test data are ensured by accurately controlling the generation process of financial test data. This is very important for system testing in the field of finance and insurance, because high-quality financial test data can help evaluate the stability, reliability and performance of the system, and ensure that the financial system or insurance platform can meet the expected business requirements and performance standards before going online. Through this embodiment, the construction of financial test data becomes more efficient, accurate and controllable.
[0127] Reference Figure 5 According to some embodiments provided by the present application, the data construction server includes multiple number-making microservice clusters. Step 403 performs data construction operations through the number-making model to obtain financial test data, which may include, but is not limited to, performing the following steps:
[0128] Step 501, generating multiple number-generating subtasks through a number-generating model, and assigning each number-generating subtask to a corresponding number-generating microservice cluster, so that the number-generating microservice cluster executes the corresponding assigned number-generating subtask;
[0129] Step 502: In response to each number-generating subtask being executed, financial test data is obtained.
[0130] In step 501 of some embodiments, a plurality of number-making subtasks are generated through a number-making model, and these number-making subtasks are assigned to corresponding number-making microservice clusters. The purpose of this step is to decompose the data construction task into smaller, manageable units, namely, number-making microservice clusters, each of which can be executed independently. The advantage of doing so is that the distributed processing capabilities of the microservice architecture can be fully utilized to improve the efficiency and scalability of data construction. Each number-making subtask is based on an instance of the number-making model and contains all the information and rules required to generate specific test data. In step 501, the data construction server can assign the number-making subtasks to different number-making microservice clusters according to the load and resource allocation of each number-making microservice cluster. This allocation can be determined based on factors such as the characteristics of the number-making subtasks, the current workload of the number-making microservice clusters, and the processing capacity to ensure that each number-making subtask can be efficiently executed.
[0131] It should be clear that the data-generating microservice cluster of the embodiment of the present application is a distributed system designed based on a microservice architecture and specifically used to perform data construction tasks. In this architecture, the work of data construction is split into multiple smaller, independent task units, each of which is handled by one or more microservices. These microservices are organized into clusters for easy management and expansion. Among them, the microservice architecture is a method of developing an application as a set of small services, each of which runs in its own independent process and is usually built around business functions. In the data-generating microservice cluster, each microservice has the ability to handle specific data construction tasks, such as generating specific types of test data, performing specific data conversions, or applying specific business rules. In the scenario of financial test data construction, the data-generating microservice cluster can effectively handle large-scale data generation requirements and generate high-quality data that meets business rules and test requirements. This clustered approach makes the data construction process more efficient and reliable, and can adapt to changing business and technical needs.
[0132] In step 502 of some embodiments, in response to each number-generating subtask being executed, financial test data is obtained. Once all number-generating subtasks are assigned to corresponding number-generating microservice clusters and begin to execute, each number-generating microservice cluster will generate financial test data in parallel. Since each number-generating microservice cluster works independently, the embodiments of the present application can significantly reduce the overall data processing time and increase the speed of data construction. After all number-generating subtasks are completed, the data generated by each number-generating microservice cluster will be aggregated to form complete financial test data.
[0133] The embodiment of the present application shown by steps 501 to 502, this microservice-based data construction method has multiple advantages. First, it improves scalability, because larger data construction tasks can be processed by adding more number-making microservice clusters. Second, it enhances fault tolerance, because even if a number-making microservice cluster fails, other clusters can still continue to perform tasks. Finally, it improves the flexibility of data processing, because each number-making microservice cluster can be independently updated and maintained without affecting the operation of the entire system.
[0134] In summary, through step 501 and step 502, the embodiment provided by the present application uses the microservice architecture to optimize the data construction process, and realizes an efficient, scalable and fault-tolerant financial test data generation solution. This embodiment not only improves the automation of data construction, but also ensures that the generated test data can meet the complex business requirements and strict testing standards in the financial insurance field.
[0135] Reference Figure 6 According to some embodiments provided by the present application, after generating a numerical model based on business rule information and parameter feature information in step 402, the following steps may also be included:
[0136] Step 601, obtaining at least one of a data structure modification request, a generation rule adjustment request, and a business logic addition request;
[0137] Step 602, adjusting the number generation model based on at least one of the data structure modification request, the generation rule adjustment request and the business logic addition request to update the number generation model;
[0138] In step 403, performing data construction operations through the mathematical model to obtain financial test data may include, but is not limited to, performing the following steps:
[0139] Step 603, performing data construction operations through the updated number-building model to obtain financial test data.
[0140] In step 601 of some embodiments, at least one of a data structure modification request, a generation rule adjustment request, or a business logic addition request is obtained. It should be noted that the data structure modification request, the generation rule adjustment request, and the business logic addition request may be derived from changes in business requirements, changes in resource flow conditions, or updates to regulatory constraints. The mathematical model needs to flexibly adapt to these changes in order to generate high-quality financial test data. Among them, the data structure modification request may be an adjustment to a data field or format; the generation rule adjustment request may be a change in the algorithm or logic of data generation; and the business logic addition request may be the addition of a new business scenario or rule.
[0141] In step 602 of some embodiments, the number-making model is adjusted accordingly based on at least one request obtained in step 601. This step ensures that the number-making model can be updated in a timely manner to reflect the latest business rules and requirements. Adjusting the number-making model may include modifying the definition of data fields, updating the algorithm for data generation, adding new data association rules or logic, etc., to ensure that the updated model can still accurately generate test data that meets business requirements and maintain data consistency and accuracy.
[0142] In step 603 of some embodiments, the updated number-making model is used to perform data construction operations. This means that after the number-making model is adjusted, the embodiments of the present application will use the new number-making model to generate test data to ensure that the data construction results can meet the latest business requirements and rules.
[0143] Through step 601 to step 603 of the embodiment of the present application, the embodiment of the present application provides a flexible and scalable data construction method, which allows dynamic adjustment and optimization during the data construction process. This embodiment not only improves the adaptability and accuracy of data construction, but also provides strong support for system testing in the financial insurance field. By continuously updating and optimizing the number-making model, it can be ensured that the generated test data always meets the latest business rules and test requirements, thereby improving the effectiveness and reliability of the test.
[0144] Reference Figure 7 According to some embodiments provided by the present application, after generating a mathematical model according to the target parameters in step 108 and performing a data construction operation through the mathematical model to obtain financial test data, the following steps may also be included:
[0145] Step 701, generating annotation information matching the number creation reference information according to the number creation model;
[0146] Step 702, generating a number-making script description based on the number-making reference information and the annotation information;
[0147] Step 703: Display the number creation script description through the user interaction interface.
[0148] In step 701 of some embodiments, annotation information matching the number-making reference information is generated according to the number-making model. It should be noted that the number-making reference information may include standard rules for data generation, expected data distribution, or specific business logic requirements. In addition, the annotation information is a supplement to the number-making model, and it provides additional details about how the number-making model generates data, such as the context of data generation, the data source used, or specific algorithm parameters. These annotation information helps users understand the working principle of the number-making model and the characteristics of the generated data.
[0149] In step 702 of some embodiments, a number-making script description is further generated based on the number-making benchmark information and the annotation information. It should be noted that the number-making script description can be a document that describes in detail the function, usage method, and generated data type of the number-making script. Specifically, the number-making script description can include the input parameters of the number-making script, the structure of the output data, the relevant business rules, and how to adjust the script according to different test requirements. By providing such a number-making script description, the user can use and maintain the number-making script more conveniently, and can also customize the script according to actual needs.
[0150] Step 703 of some embodiments is to display the number-making script description through the user interaction interface. This step ensures that the user can intuitively access and browse the relevant information of the number-making script. The user interface can be graphical, providing a clear layout, navigation and search functions, so that the user can quickly find the required information. The displayed number-making script description can be in text form, and can also contain charts, examples or links to more detailed documents to help users better understand the working principle and application scenarios of the number-making script.
[0151] The embodiment of the present application shown by steps 701 to 703 not only realizes the automatic construction of financial test data, but also provides a method to enhance the user's understanding of the number-making process. This method improves the maintainability and scalability of the number-making model, and also provides necessary documentation support for non-technical users, so that they can participate in the data construction and testing process more effectively. This emphasis on user-friendliness is the key to achieving an efficient, transparent and collaborative data construction process.
[0152] Reference Figure 8 , Figure 8 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0153] The processor 801 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0154] The memory 802 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 802 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 802, and the processor 801 calls and executes the financial test data construction method of the embodiment of this application;
[0155] Input / output interface 803, used to implement information input and output;
[0156] The communication interface 804 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WI FI, Bluetooth, etc.);
[0157] A bus 805 that transmits information between the various components of the device (e.g., the processor 801, the memory 802, the input / output interface 803, and the communication interface 804);
[0158] The processor 801 , the memory 802 , the input / output interface 803 and the communication interface 804 are connected to each other in communication within the device via a bus 805 .
[0159] The embodiment of the present application further provides a computer program product, which includes a computer program. A processor of a computer device reads and executes the computer program, so that the computer device executes and implements the above-mentioned financial test data construction method.
[0160] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "comprises" and "comprising" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0161] It should be understood that in the present disclosure, "at least one (item)" refers to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can represent: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, and may include, but is not limited to, any combination of single or plural items of performing the following steps. For example, at least one of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0162] It should be understood that in the description of the embodiments of the present application, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood to not include the number, and above, below, within, etc. are understood to include the number.
[0163] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0164] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0165] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0166] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and may include, but is not limited to, executing the following steps and several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.
[0167] It should also be understood that the various implementations provided in the embodiments of the present application can be combined arbitrarily to achieve different technical effects.
[0168] The above is a specific description of the implementation methods of the present disclosure, but the present disclosure is not limited to the above implementation methods. Technical personnel familiar with the art can also make various equivalent modifications or substitutions without violating the spirit of the present disclosure. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present disclosure.
Claims
1. A method for constructing financial test data. It is characterized in that Applicable to request processing servers, including: Get processing request information and number generation subroutines; Performing class parsing based on the processing request information to obtain an original class bytecode file; Implanting the number-generating subroutine into the original class bytecode file to obtain a target class bytecode file; Performing class loading on the target class bytecode file to execute a request processing operation matching the processing request information; In the process of executing the request processing operation, in response to the number generation subroutine being triggered, obtaining a target parameter; The target parameters are sent to a data construction server, so that the data construction server generates a number-making model according to the target parameters, and performs a data construction operation through the number-making model to obtain financial test data.
2. The method according to claim 1, It is characterized in that The step of implanting the number-generating subroutine into the original class bytecode file to obtain a target class bytecode file includes: Determine the main function of the service for the original class bytecode file; The number-generating subroutine is implanted into the pre-execution function corresponding to the main business function to obtain the target class bytecode file.
3. A method for constructing financial test data, It is characterized in that Applicable to data construction servers, including: Obtaining a target parameter transmitted by a request processing server; wherein the target parameter is obtained in the request processing server in the following manner: Get processing request information and number generation subroutines; Performing class parsing based on the processing request information to obtain an original class bytecode file; Implanting the number-generating subroutine into the original class bytecode file to obtain a target class bytecode file; Loading the target class bytecode file to execute a request processing operation matching the processing request information; In the process of executing the request processing operation, in response to the number generation subroutine being triggered, obtaining a target parameter; A number-making model is generated according to the target parameters, and a data construction operation is performed through the number-making model to obtain financial test data.
4. The method according to claim 3, It is characterized in that Before generating a number-making model according to the target parameters and performing a data construction operation through the number-making model to obtain financial test data, the method further includes: Generate template configuration information according to the type of the number-generating subroutine; The number creation model matching the number creation subroutine is generated according to the template configuration information.
5. The method according to claim 3, It is characterized in that The step of generating a number-making model according to the target parameters and performing a data construction operation through the number-making model to obtain financial test data includes: Performing data analysis on the target parameters to obtain business rule information and parameter characteristic information; Based on the business rule information and the parameter characteristic information, generating the number creation model; The financial test data is obtained by performing a data construction operation through the number-making model.
6. The method according to claim 5, It is characterized in that The data construction server includes a plurality of number-making microservice clusters, and the data construction operation is performed through the number-making model to obtain the financial test data, including: Generate multiple number-generating subtasks through the number-generating model, and assign each of the number-generating subtasks to the corresponding number-generating microservice cluster, so that the number-generating microservice cluster executes the corresponding assigned number-generating subtask; In response to each of the number-generating subtasks being executed, the financial test data is obtained.
7. The method according to claim 5, It is characterized in that After generating the number-making model based on the business rule information and the parameter feature information, the method further includes: Obtaining at least one of a data structure modification request, a generation rule adjustment request, and a business logic addition request; Based on at least one of the data structure modification request, the generation rule adjustment request and the business logic addition request, adjusting the number creation model to update the number creation model; The step of performing a data construction operation through the number-making model to obtain the financial test data includes: The financial test data is obtained by performing data construction operations through the updated number-making model.
8. The method according to claim 3, It is characterized in that After generating a number-making model according to the target parameters and performing a data construction operation through the number-making model to obtain financial test data, the method further includes: generating annotation information matching the number creation reference information according to the number creation model; Generate a number-making script description based on the number-making reference information and the annotation information; The number creation script description is displayed through a user interaction interface.
9. An electronic device, It is characterized in that include: A memory and a processor, wherein the memory stores a computer program, and the processor implements the financial test data construction method according to any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium, It is characterized in that The storage medium stores a program, and the program is executed by a processor to implement the financial test data construction method according to any one of claims 1 to 8.
