Data processing methods and apparatus, storage media, electronic equipment
By obtaining the target operation identifier and request information of the user request in the simulation server, and executing the pre- and post-action configurations, the problem of the simulation server being unable to respond to user requests realistically is solved, achieving a more realistic and comprehensive testing effect.
Patent Information
- Application Number
- CN202411853612.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-12-16
AI Technical Summary
Existing simulation servers cannot realistically simulate user requests, and are particularly limited in simulating complex business processes and inter-system dependencies, making comprehensive testing impossible.
By obtaining the target operation identifier and request information from the user request, the pre-action configuration is executed to transform the user request into a request that reflects the actual business scenario, and data interaction is performed in the data system. Subsequently, the post-action configuration is executed to process the interaction result.
This enhances the realism of service simulation and the comprehensiveness of testing, ensuring that the data interaction process conforms to actual business logic and improving the accuracy and comprehensiveness of testing.
Smart Images

Figure CN119781856B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and more specifically, to a data processing method and apparatus, a storage medium, and an electronic device. Background Technology
[0002] In the service industry, the core functionality and stability of information technology (IT) systems are crucial to ensuring the smooth operation of business. As business becomes more diversified and complex, IT systems need to adapt to rapid innovation and change, requiring system upgrades and transformations.
[0003] During system upgrades and new feature development, testing is necessary to verify the correctness of the new features and the stability of the system. However, service simulators in related technologies can typically only simulate the response of a single service interface, and have limitations in simulating complex business processes and inter-system dependencies, thus failing to realistically simulate test scenarios. Summary of the Invention
[0004] This application provides a data processing method and apparatus, storage medium, and electronic device to at least solve the problem in the related art that simulated servers cannot realistically simulate responses to user requests.
[0005] According to one embodiment of this application, a data processing method is provided, applied to a simulation server connected to a simulation client. The method includes: acquiring a user request sent by a target user through the simulation client, wherein the user request is a request for data interaction with a data system; acquiring a target operation identifier and request information from the user request, wherein the target operation identifier indicates the data interaction type of the user request, and the request information includes account information registered by the target user in the data system; if it is determined based on the target operation identifier that a pre-action configuration needs to be executed, executing the pre-action configuration using the request information to perform data transformation on the user request to obtain a target request, wherein the pre-action configuration configures the simulation server to have the ability to transform the user request into a request reflecting an actual business scenario; responding to the target request to perform the data interaction in the data system to obtain a data interaction result; and executing a post-action configuration to process the data interaction result, wherein the post-action configuration configures the simulation server to have the ability to process the data interaction result.
[0006] In one exemplary embodiment, obtaining the target operation identifier and request information from the user request includes: determining the communication protocol used by the target user to send the user request from the header data of the user request; parsing the user request based on the communication protocol to obtain request body data from the user request, wherein the request body data includes key data in the user request; and parsing the request body data to obtain the target operation identifier and the request information from the request body data.
[0007] In an exemplary embodiment, before executing the aforementioned pre-action configuration using the aforementioned request information to perform data transformation on the aforementioned user request and obtain the target request, when it is determined that a pre-action configuration needs to be executed based on the aforementioned target operation identifier, the method further includes: determining the aforementioned data interaction type based on the aforementioned target operation identifier; querying a pre-action configuration template matching the aforementioned target operation identifier from a first configuration database based on the aforementioned data interaction type; and determining that the aforementioned pre-action configuration needs to be executed if the aforementioned first configuration database includes the aforementioned pre-action configuration template matching the aforementioned target operation identifier.
[0008] In one exemplary embodiment, when it is determined that a pre-action configuration needs to be executed based on the target operation identifier, the pre-action configuration is executed using the request information to perform data transformation on the user request and obtain a target request. This includes: obtaining a pre-action configuration template matching the target operation identifier from a first configuration database; filling the pre-action configuration template with the request information to obtain the pre-action configuration; executing the pre-action configuration to obtain an execution result; and performing data transformation on the user request based on the execution result to obtain the target request.
[0009] In an exemplary embodiment, filling the aforementioned pre-action configuration template with the aforementioned request information to obtain the aforementioned pre-action configuration includes: calculating the matching degree between N first preset operation identifiers in the preset operation identifier list and the aforementioned target operation identifier to obtain N first matching degrees, where N is a natural number greater than 1; comparing each of the N aforementioned first matching degrees with a first threshold, and determining the first preset operation identifier among the N first comparison results that is greater than the aforementioned first threshold as the first operation identifier; querying the aforementioned pre-action configuration template that matches the aforementioned first operation identifier from the aforementioned first configuration database, wherein, when the aforementioned first operation identifier is a first preset identifier, querying the aforementioned first configuration database for a first pre-action configuration template that matches the aforementioned first preset identifier, the aforementioned first pre-action configuration template includes a first configuration name, a first configuration description, a first request method, and a first... The request address and the first message content are used as follows: If the first operation identifier is a second preset identifier, a second pre-action configuration template matching the second preset identifier is queried from the first configuration database. The second pre-action configuration template includes a second configuration name, a second configuration description, a character type, a second request address, and a second message content. If the first operation identifier is a third preset identifier, a third pre-action configuration template matching the third preset identifier is queried from the first configuration database. The third pre-action configuration template includes a third configuration name, a third configuration description, a configuration path, and a configuration source file. If it is determined that the request information is compatible with the pre-action configuration template, the request information is filled into the fields corresponding to the pre-action configuration template to obtain the pre-action configuration, wherein the pre-action configuration matches the user request.
[0010] In one exemplary embodiment, responding to the aforementioned target request to perform the aforementioned data interaction in the aforementioned data system and obtain the data interaction result includes: parsing the aforementioned target request to obtain the account information and business requirements registered by the target user in the aforementioned data system; obtaining first target data from the aforementioned data system that matches both the aforementioned business requirements and the aforementioned account information; performing the aforementioned data interaction on the aforementioned first target data to obtain the aforementioned data interaction result, wherein the aforementioned data interaction includes business transactions between the aforementioned target user and the aforementioned data system.
[0011] In an exemplary embodiment, before executing the post-action configuration to process the data interaction result by executing the post-action configuration, the method further includes: calculating the matching degree between M second preset operation identifiers in the preset operation identifier list and the target operation identifier to obtain M second matching degrees, wherein M is a natural number greater than 1; comparing the M second matching degrees with a second threshold respectively, and determining the second preset operation identifiers that are greater than the second threshold among the M second comparison results as second operation identifiers; querying the post-action configuration template that matches the second operation identifier from the second configuration database; and filling the post-action configuration template based on the request information to obtain the post-action configuration.
[0012] According to another embodiment of this application, a data processing apparatus is provided, applied to a simulation server connected to a simulation client, comprising: a first acquisition module, configured to acquire a user request sent by a target user through the simulation client, wherein the user request is a request for data interaction with a data system; a second acquisition module, configured to acquire a target operation identifier and request information from the user request, wherein the target operation identifier indicates the data interaction type of the user request, and the request information includes account information registered by the target user in the data system; and a first execution module, configured to, based on the target operation identifier, determine that a pre-action configuration needs to be executed. In this case, the aforementioned request information is used to execute the aforementioned pre-action configuration, so as to perform data transformation on the aforementioned user request by executing the aforementioned pre-action configuration to obtain the target request. The aforementioned pre-action configuration is used to configure the aforementioned simulation server to have the ability to transform the aforementioned user request into a request reflecting the actual business scenario. The response module is used to respond to the aforementioned target request, so as to perform the aforementioned data interaction in the aforementioned data system to obtain the data interaction result. The second execution module is used to execute the post-action configuration, so as to perform data processing on the aforementioned data interaction result by executing the aforementioned post-action configuration. The aforementioned post-action configuration is used to configure the aforementioned simulation server to have the ability to process the aforementioned data interaction result.
[0013] According to yet another embodiment of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0014] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0015] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0016] This application demonstrates that after receiving a user request from a simulated client, the simulation server extracts the target operation identifier and request information. Based on the target operation identifier, it determines and executes the corresponding pre-action configuration, transforms the user request, responds to the transformed target request, interacts with the data system, and executes post-action configuration for further data processing based on the interaction results. This solves the problem in related technologies where simulation servers cannot realistically simulate responses to user requests, achieving the technical effect of enhancing the realism of service simulation and improving the comprehensiveness of testing. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the hardware environment for a data processing method according to an embodiment of this application;
[0018] Figure 2 This is a flowchart of a data processing method according to an embodiment of this application;
[0019] Figure 3 This is a schematic diagram of an interface for configuring a post-action according to an embodiment of this application;
[0020] Figure 4 This is a schematic diagram of a specific interface for configuring a pre-action according to an embodiment of this application. Figure 1 ;
[0021] Figure 5 This is a schematic diagram of a specific interface for configuring a pre-action according to an embodiment of this application. Figure 2 ;
[0022] Figure 6 This is a schematic diagram of a specific interface for configuring a pre-action according to an embodiment of this application. Figure 3 ;
[0023] Figure 7 This is a schematic diagram of a specific interface for configuring a pre-action according to an embodiment of this application. Figure 4 ;
[0024] Figure 8 This is a schematic diagram of a pre-action configuration according to an embodiment of this application;
[0025] Figure 9 This is a schematic diagram of a post-action configuration according to an embodiment of this application;
[0026] Figure 10This is a flowchart illustrating a data processing method according to an embodiment of this application;
[0027] Figure 11 This is a structural block diagram of a data processing apparatus according to an embodiment of this application. Detailed Implementation
[0028] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0030] The methods and embodiments provided in this application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a schematic diagram of the hardware environment for a data processing method according to an embodiment of this application. For example... Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The server device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server equipment described above. For example, the server equipment may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0031] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to a data processing method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the aforementioned method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to server devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0032] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the server device. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0033] This embodiment provides a data processing method. Figure 2 This is a flowchart of a data processing method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0034] Step S202: Obtain the user request sent by the target user through the above-mentioned simulated client, wherein the above-mentioned user request is a request to interact with the data system.
[0035] Optionally, the simulated client in this embodiment can simulate the behavior and operations of a real user on the Internet, and can be a software program or tool, such as JMeter, LoadRunner, Gatling, etc.
[0036] Step S204: Obtain the target operation identifier and request information from the user request, wherein the target operation identifier is used to indicate the data interaction type of the user request, and the request information includes the account information of the target user registered in the data system.
[0037] Optionally, in this embodiment, the target operation representation is used to represent the data interaction type requested by the user. The specific representation forms include, but are not limited to, transaction codes and Uniform Resource Identifiers (URIs). For example, transaction codes can be G00009, G00010, etc., and each code represents a specific data interaction type or transaction service, such as account inquiry, transfer transaction, or loan application.
[0038] Optionally, the request information in this embodiment is the information carried by the user request, including but not limited to account information and request parameters. For example, when the user request is a transfer request, the request information includes the transaction amount, transaction time, transaction type, user name, ID number, card number, contact information, and the name and card number of the transfer recipient.
[0039] Optionally, the account information in this embodiment includes, but is not limited to, account number, account balance, account status, credit limit, account type, and the account holder's name, ID number, and contact information.
[0040] Step S206: If it is determined that a pre-action configuration needs to be executed based on the target operation identifier, the pre-action configuration is executed using the request information to perform data conversion on the user request and obtain the target request. The pre-action configuration is used to configure the simulation server to have the ability to convert the user request into a request that reflects the actual business scenario.
[0041] Step S208: Respond to the above target request to perform the above data interaction in the above data system and obtain the data interaction result;
[0042] Optionally, the data conversion in this embodiment is used to convert user requests into target requests. Specific conversion methods include, but are not limited to: message format conversion, converting the original format of the user request into a format acceptable to the data system; character set conversion, processing request messages with different encodings to ensure the correctness and consistency of data during transmission.
[0043] Step S210: Execute the post-action configuration to process the data interaction result by executing the post-action configuration, wherein the post-action configuration is used to configure the simulation server to have the ability to process the data interaction result.
[0044] Optionally, the data interaction in this embodiment includes, but is not limited to, fund transfer transactions, account inquiries, and loan application progress inquiries.
[0045] Optionally, the pre-action configuration or post-action configuration in this embodiment can also be configured under the triggering of the operator. Figure 3 This is a schematic diagram of a post-action configuration interface according to an embodiment of this application. The operator triggers the post-action configuration by clicking the "Add" button and saves the post-action configuration by clicking the "Save" button. The schematic diagram of the pre-action configuration interface is similar to... Figure 3 Similarly, I will not go into details here.
[0046] Through the above steps, after receiving a user request sent by a simulated client, the simulation server extracts the target operation identifier and request information. Based on the target operation identifier, it determines and executes the corresponding pre-action configuration, transforms the user request, responds to the transformed target request, interacts with the data system, and executes post-action configuration for further data processing based on the interaction results. This solves the problem in related technologies where simulation servers cannot realistically simulate responses to user requests, achieving the technical effect of enhancing the realism of service simulation and improving the comprehensiveness of testing.
[0047] In one exemplary embodiment, obtaining the target operation identifier and request information from the user request includes: determining the communication protocol used by the target user to send the user request from the header data of the user request; parsing the user request based on the communication protocol to obtain request body data from the user request, wherein the request body data includes key data in the user request; and parsing the request body data to obtain the target operation identifier and the request information from the request body data.
[0048] Optionally, the header of the user request in this embodiment carries data indicating the communication protocol used by the request, including but not limited to URL and port number. For example, different communication protocols usually use different default port numbers. The default port number used by the Hypertext Transfer Protocol (HTTP) is 80.
[0049] Optionally, the communication protocols in this embodiment include, but are not limited to, HTTP protocol and Transmission Control Protocol (TCP).
[0050] Optionally, this embodiment can adopt a dynamic and configurable parsing strategy when parsing user requests based on communication protocols, allowing for flexible configuration of parsing rules according to different business scenarios and needs. For example, in certain specific scenarios, it may be necessary to perform additional preprocessing or decryption operations on user requests.
[0051] Optionally, when parsing the request body data, this embodiment can process request information in various formats, including but not limited to Extensible Markup Language (XML), JavaScript Object Notation (JSON), fixed-length data formats, etc. Through predefined parsing rules, the target operation identifier and request information in the body information can be identified and extracted. For example, by analyzing the received URL, parameters that may be related to the target operation identifier can be obtained.
[0052] Through the above steps, this embodiment can accurately extract the target operation identifier and request information from the user request, providing a solid foundation for subsequent data conversion and simulation testing, and ensuring the accuracy and comprehensiveness of the test.
[0053] In an exemplary embodiment, before executing the aforementioned pre-action configuration using the aforementioned request information to perform data transformation on the aforementioned user request and obtain the target request, when it is determined that a pre-action configuration needs to be executed based on the aforementioned target operation identifier, the method further includes: determining the aforementioned data interaction type based on the aforementioned target operation identifier; querying a pre-action configuration template matching the aforementioned target operation identifier from a first configuration database based on the aforementioned data interaction type; and determining that the aforementioned pre-action configuration needs to be executed if the aforementioned first configuration database includes the aforementioned pre-action configuration template matching the aforementioned target operation identifier.
[0054] Optionally, the data interaction types in this embodiment include, but are not limited to, query types and modification types, specifically such as transfers, account inquiries, and loan applications.
[0055] Optionally, in this embodiment, a pre-action configuration template matching the target operation identifier is queried from the first configuration database based on the data interaction type. If no pre-action configuration template is found from the first configuration database, it indicates that no pre-action configuration needs to be performed.
[0056] Through the above steps, after determining the specific data interaction type based on the target operation identifier, this embodiment searches for a pre-action configuration template that matches the data interaction type in the first configuration database to determine whether the user request needs to execute the above pre-action configuration. This ensures that the simulation server can automatically select and execute the most suitable pre-action configuration based on the specific business scenario, thereby enhancing the personalization and scenario adaptability of the simulation.
[0057] In one exemplary embodiment, when it is determined that a pre-action configuration needs to be executed based on the target operation identifier, the pre-action configuration is executed using the request information to perform data transformation on the user request and obtain a target request. This includes: obtaining a pre-action configuration template matching the target operation identifier from a first configuration database; filling the pre-action configuration template with the request information to obtain the pre-action configuration; executing the pre-action configuration to obtain an execution result; and performing data transformation on the user request based on the execution result to obtain the target request.
[0058] Optionally, the data transformation in this embodiment is used to transform the user request into the target request. The specific transformation method has been described above and will not be repeated here.
[0059] Optionally, in this embodiment, Figure 4 This is a schematic diagram of a specific interface for configuring a pre-action according to an embodiment of this application. Figure 1 ,like Figure 4 As shown, when it is determined that a prerequisite action configuration needs to be executed, the action type in the prerequisite action configuration template will be determined based on the target operation identifier, and the action name will be determined based on the request information. Operators can add or delete prerequisite action configurations, or manually configure prerequisite actions. Among them, the action name and action type are required fields, and the action description is an optional field.
[0060] Through the above steps, a matching pre-action configuration template is retrieved from the configuration database. The request information is then used to populate the configuration template, generating and executing the specific pre-action configuration. The execution result is then generated, and based on the execution result of the pre-action configuration, the original user request is transformed into a target request that conforms to the business scenario. This allows for efficient and accurate personalized processing of user requests, ensuring that the request content matches the actual business logic and improving the comprehensiveness and realism of the test.
[0061] In an exemplary embodiment, filling the aforementioned pre-action configuration template with the aforementioned request information to obtain the aforementioned pre-action configuration includes: calculating the matching degree between N first preset operation identifiers in the preset operation identifier list and the aforementioned target operation identifier to obtain N first matching degrees, where N is a natural number greater than 1; comparing each of the N aforementioned first matching degrees with a first threshold, and determining the first preset operation identifier among the N first comparison results that is greater than the aforementioned first threshold as the first operation identifier; querying the aforementioned pre-action configuration template that matches the aforementioned first operation identifier from the aforementioned first configuration database, wherein, when the aforementioned first operation identifier is a first preset identifier, querying the aforementioned first configuration database for a first pre-action configuration template that matches the aforementioned first preset identifier, the aforementioned first pre-action configuration template includes a first configuration name, a first configuration description, a first request method, and a first... The request address and the first message content are used as follows: If the first operation identifier is a second preset identifier, a second pre-action configuration template matching the second preset identifier is queried from the first configuration database. The second pre-action configuration template includes a second configuration name, a second configuration description, a character type, a second request address, and a second message content. If the first operation identifier is a third preset identifier, a third pre-action configuration template matching the third preset identifier is queried from the first configuration database. The third pre-action configuration template includes a third configuration name, a third configuration description, a configuration path, and a configuration source file. If it is determined that the request information is compatible with the pre-action configuration template, the request information is filled into the fields corresponding to the pre-action configuration template to obtain the pre-action configuration, wherein the pre-action configuration matches the user request.
[0062] Optionally, in this embodiment, the first preset identifier may be an HTTP request identifier, the second preset identifier may be a TCP request identifier, and the third preset identifier may be another request identifier that does not belong to HTTP and TCP.
[0063] Optionally, in this embodiment, if the request information is incompatible with the pre-action configuration template, a prompt message will be sent to the operator to update the template in the first configuration data and successfully execute the pre-action configuration operation for the user request.
[0064] Optionally, Figure 5 This is a schematic diagram of a specific interface for configuring a pre-action according to an embodiment of this application. Figure 2 ,like Figure 5As shown, when the first operation identifier is an HTTP request identifier, the first pre-action configuration template matching the HTTP request identifier is queried from the first configuration database. The first pre-action configuration template includes the action name, action description, request method, request address, message body (corresponding to the first configuration name, first configuration description, first request method, first request address, and first message content mentioned above, respectively), and action type (in this case, "execute HTTP request"). Specifically, the request method field can include HTTP request methods such as GET, POST, PUT, and DELETE.
[0065] Optionally, Figure 6 This is a schematic diagram of a specific interface for configuring a pre-action according to an embodiment of this application. Figure 3 ,like Figure 6 As shown, when the first operation identifier is a TCP request identifier, the second pre-action configuration template matching the TCP request identifier is queried from the first configuration database. The second pre-action configuration template includes an action name, action description, character set, request address, message body (corresponding to the second configuration name, second configuration description, character type, second request address, and second message content mentioned above, respectively), and action type (in this case, "execute TCP request"). The character set defines the character encoding method in the message body, including but not limited to Unicode Transformation Format-8bits (UTF-8) and American Standard Code for Information Interchange (ASCII).
[0066] Optionally, Figure 7 This is a schematic diagram of a specific interface for configuring a pre-action according to an embodiment of this application. Figure 4 ,like Figure 7 As shown, when the first operation identifier is another request identifier, the third pre-action configuration template that matches the other request identifier is queried from the first configuration database. The third pre-action configuration template includes the action name, action description (corresponding to the third configuration name and third configuration description mentioned above), execution content (corresponding to the configuration path and configuration source file mentioned above), and action type (in this case, "execute jar package").
[0067] Optionally, in this embodiment, if there is no first preset operation identifier greater than the first threshold, it is determined that the user request does not need to perform the pre-action configuration, or a prompt message is sent to the operator to further confirm whether the pre-action configuration needs to be performed.
[0068] Optionally, Figure 8This is a schematic diagram of a pre-action configuration according to an embodiment of this application, such as... Figure 8 As shown, when the user request is a request to freeze the account balance query, a pre-configuration operation needs to be performed to enable the simulated server to notify user 1 of the overdue payment query result. It is determined that the matching degree between the second preset identifier in the preset operation identifier list and the target operation identifier is greater than the first threshold, that is, the user request is a "TCP request". The character encoding method in the message body is defined as UTF-8, and the action name is "User 1 Overdue Payment Query Result Notification". Then, the request address and message body are filled in according to the request information in the user request.
[0069] Through the above steps, the target operation identifier requested by the user is compared with the identifiers in the preset operation identifier list to calculate the matching degree. The calculated matching degree is then compared with a preset threshold to determine the most matching first operation identifier. Next, the pre-action configuration template corresponding to the first operation identifier is retrieved from the first configuration database. If the request information is confirmed to be compatible with the configuration template, the request information is filled into the configuration template to generate the pre-action configuration. Through precise matching and compatibility checks, the most suitable pre-action configuration for the current business scenario can be selected and generated, enhancing the flexibility and accuracy of data processing.
[0070] In one exemplary embodiment, responding to the aforementioned target request to perform the aforementioned data interaction in the aforementioned data system and obtain the data interaction result includes: parsing the aforementioned target request to obtain the account information and business requirements registered by the target user in the aforementioned data system; obtaining first target data from the aforementioned data system that matches both the aforementioned business requirements and the aforementioned account information; performing the aforementioned data interaction on the aforementioned first target data to obtain the aforementioned data interaction result, wherein the aforementioned data interaction includes business transactions between the aforementioned target user and the aforementioned data system.
[0071] Optionally, the business requirements in this embodiment include, but are not limited to, account balance inquiry requirements, transfer requirements, loan applications, etc.
[0072] Optionally, in this embodiment, if the request is for a transfer or balance inquiry, the corresponding first target data is the user's financial information; if the request is for a loan progress inquiry, the corresponding first target data is the loan approval-related records.
[0073] Optionally, in this embodiment, corresponding data processing is performed according to the content of the request information. For example, after receiving a transfer request, an inter-account fund transfer operation is performed, or after receiving an account query request, information such as account balance and transaction records is returned.
[0074] Through the above steps, based on the parsed account information and business requirements, data interaction is performed in the data system, and the results are obtained. By refining the data interaction process, it is ensured that each data interaction is based on accurate information requested by the user, thereby improving the accuracy of data interaction and the reliability of testing.
[0075] In an exemplary embodiment, before executing the post-action configuration to process the data interaction result by executing the post-action configuration, the method further includes: calculating the matching degree between M second preset operation identifiers in the preset operation identifier list and the target operation identifier to obtain M second matching degrees, wherein M is a natural number greater than 1; comparing the M second matching degrees with a second threshold respectively, and determining the second preset operation identifiers that are greater than the second threshold among the M second comparison results as second operation identifiers; querying the post-action configuration template that matches the second operation identifier from the second configuration database; and filling the post-action configuration template based on the request information to obtain the post-action configuration.
[0076] Optionally, in this embodiment, if there is no second preset operation identifier greater than the second threshold, it is determined that the user request does not need to perform the post-action configuration, or a prompt message is sent to the operator to further confirm whether the post-action configuration needs to be performed.
[0077] Optionally, Figure 9 This is a schematic diagram of a post-action configuration according to an embodiment of this application, such as... Figure 9 As shown, when the user request is a transfer request, a post-configuration operation needs to be performed to enable the simulated server to trigger a transaction notification after the transfer transaction is completed. That is, after the transfer transaction is completed, the requester needs to receive an account transaction record notification to confirm the final result of the transaction and obtain transaction details. The action type required for this user request is determined to be "Execute JAR package," and the action name is "Insert Event-Driven Architecture (EDA)." The execution content is then filled in according to the specific request information in the user request.
[0078] Through the above steps, the matching degree between the data interaction result and the identifier in the preset operation identifier list is calculated. The matching degree is compared with the second threshold to determine the second operation identifier that matches best. The post-action configuration template that matches the second operation identifier is obtained from the configuration database. Then, the template is populated with request information to generate the post-action configuration and execute it, ensuring that the data interaction result can be processed correctly. By executing the post-action configuration, the complete service process is simulated, including the relevant operations after the service response, further improving the comprehensiveness of the test and the integrity of the simulation.
[0079] The following is a specific example to illustrate the above method:
[0080] Figure 10 This is a flowchart illustrating a data processing method according to an embodiment of this application. A data system needs to upgrade its core transaction module. To test the performance and stability of the upgraded system, and to ensure compatibility with external systems (such as clearing centers, payment gateways, etc.), the bank uses a simulation server to simulate the responses and services of these external systems to test the performance of its core transaction module after the upgrade. The simulation server connects to a simulation client to receive and process user requests sent by the simulation client, and to execute necessary pre- and post-processing configurations to ensure that data interaction is consistent with actual business scenarios. Figure 10 As shown, the process includes the following steps:
[0081] Step S1002: Obtain a user request from the simulated client, wherein the simulated client simulates a user initiating a transfer transaction request. The request includes the target operation identifier "TRANSFER" and request information, including the transfer amount, transfer account, etc.
[0082] Step S1004: Parse the target operation identifier "TRANSFER" and request information from the user request, including the transfer amount, transfer account number, and account name;
[0083] Step S1006: Based on the target operation identifier "TRANSFER", determine the configuration of the pre-action related to the transfer that needs to be performed, and perform data conversion on the user request to obtain the target request. Configure the relevant pre-action for the simulation server through the HTTP request so that it has the "account balance verification" service.
[0084] Step S1008: In response to the target request, execute the transfer operation in the data system (i.e., the simulated bank core system) and obtain the transfer result;
[0085] Step S1010: Execute the post-action configuration, send the "Account Transaction Record" event through EDA, and record the transaction record.
[0086] Through the above steps, the simulation server can not only accurately simulate the data interaction response of external systems to the bank's core system, but also ensure the authenticity and integrity of transaction data by executing pre- and post-processing configurations. This improves the efficiency and accuracy of testing, enabling the data system to more comprehensively test and verify its performance and stability when upgrading or developing new functions, ensuring normal business operations and the security of customer data.
[0087] This example demonstrates how to perform a series of complex operations in a simulated environment using a simulated server to ensure that data interactions during testing and development accurately reflect actual business scenarios, while verifying the correctness of system functions and the stability of the system.
[0088] It should be noted that, through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0089] This embodiment also provides a data processing apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0090] Figure 11 This is a structural block diagram of a data processing apparatus according to an embodiment of this application, such as... Figure 11 As shown, the device is used in a simulation server, which is connected to a simulation client, and includes:
[0091] The first acquisition module 1102 is used to acquire user requests sent by the target user through the above-mentioned simulated client, wherein the above-mentioned user requests are requests to interact with the data system.
[0092] The second acquisition module 1104 is used to acquire a target operation identifier and request information from the user request, wherein the target operation identifier is used to indicate the data interaction type of the user request, and the request information includes the account information of the target user registered in the data system.
[0093] The first execution module 1106 is used to execute the aforementioned pre-action configuration using the aforementioned request information when it is determined that a pre-action configuration needs to be executed based on the aforementioned target operation identifier, so as to perform data conversion on the aforementioned user request by executing the aforementioned pre-action configuration to obtain the target request, wherein the aforementioned pre-action configuration is used to configure the aforementioned simulation server to have the ability to convert the aforementioned user request into a request that reflects the actual business scenario.
[0094] The response module 1108 is used to respond to the above target request, so as to perform the above data interaction in the above data system and obtain the data interaction result;
[0095] The second execution module 1110 is used to execute the post-action configuration to process the data interaction result by executing the post-action configuration, wherein the post-action configuration is used to configure the simulation server to have the ability to process the data interaction result.
[0096] In an exemplary embodiment, the second acquisition module 1104 includes: a first determining unit, configured to determine the communication protocol used by the target user to send the user request from the header data of the user request; a first parsing unit, configured to parse the user request based on the communication protocol and obtain request body data from the user request, wherein the request body data includes key data in the user request; and a second parsing unit, configured to parse the request body data to obtain the target operation identifier and the request information from the request body data.
[0097] In an exemplary embodiment, the first execution module 1106 includes: a second determining unit, configured to determine the data interaction type based on the target operation identifier; a first querying unit, configured to query a pre-action configuration template matching the target operation identifier from a first configuration database based on the data interaction type; and a third determining unit, configured to determine that the pre-action configuration needs to be executed if the first configuration database includes the pre-action configuration template matching the target operation identifier.
[0098] In an exemplary embodiment, the first execution module 1106 includes: a first acquisition unit, configured to acquire a pre-action configuration template matching the target operation identifier from a first configuration database; a first filling unit, configured to fill the pre-action configuration template with the request information to obtain the pre-action configuration; a first execution unit, configured to execute the pre-action configuration to obtain an execution result; and a first conversion unit, configured to perform data conversion on the user request based on the execution result to obtain the target request.
[0099] In an exemplary embodiment, the first execution module 1106 includes: a first calculation unit, configured to calculate the matching degree between N first preset operation identifiers in the preset operation identifier list and the target operation identifier, to obtain N first matching degrees, where N is a natural number greater than 1; a first comparison unit, configured to compare the N first matching degrees with a first threshold, and determine the first preset operation identifier among the N first comparison results that is greater than the first threshold as the first operation identifier; and a second query unit, configured to query the first configuration database for the pre-action configuration template that matches the first operation identifier, wherein, when the first operation identifier is a first preset identifier, the first pre-action configuration template that matches the first preset identifier is queried from the first configuration database, and the first pre-action configuration template includes a first configuration name, a first configuration description, a first request method, and a first request... The system requests an address and a first message content. If the first operation identifier is a second preset identifier, it queries the first configuration database for a second pre-action configuration template that matches the second preset identifier. The second pre-action configuration template includes a second configuration name, a second configuration description, a character type, a second request address, and a second message content. If the first operation identifier is a third preset identifier, it queries the first configuration database for a third pre-action configuration template that matches the third preset identifier. The third pre-action configuration template includes a third configuration name, a third configuration description, a configuration path, and a configuration source file. A second filling unit is used to fill the request information into the corresponding fields of the pre-action configuration template when it is determined that the request information is compatible with the pre-action configuration template, thereby obtaining the pre-action configuration, wherein the pre-action configuration matches the user request.
[0100] In an exemplary embodiment, the response module 1108 includes: a third parsing unit, configured to parse the target request to obtain the account information and business requirements registered by the target user in the data system; a second acquisition unit, configured to acquire first target data from the data system that matches both the business requirements and the account information; and a second execution unit, configured to perform the data interaction on the first target data to obtain the data interaction result, wherein the data interaction includes business transactions between the target user and the data system.
[0101] In an exemplary embodiment, the second execution module 1110 includes: a second calculation unit, configured to calculate the matching degree between M second preset operation identifiers in the preset operation identifier list and the target operation identifier, to obtain M second matching degrees, wherein M is a natural number greater than 1; a second comparison unit, configured to compare the M second matching degrees with a second threshold respectively, and determine the second preset operation identifiers among the M second comparison results that are greater than the second threshold as second operation identifiers; a third query unit, configured to query a post-action configuration template that matches the second operation identifier from a second configuration database; and a third filling unit, configured to fill the post-action configuration template based on the request information to obtain the post-action configuration.
[0102] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0103] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.
[0104] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0105] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0106] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0107] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0108] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0109] The embodiments described herein also provide a computer program that includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in any of the above method embodiments.
[0110] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0111] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0112] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A data processing method, characterized in that, Applied to a simulation server, the simulation server connecting to a simulation client, the method includes: Obtain user requests sent by the target user through the simulated client, wherein the user requests are requests to interact with the data system. Obtain a target operation identifier and request information from the user request, wherein the target operation identifier is used to indicate the data interaction type of the user request, and the request information includes the account information registered by the target user in the data system; When it is determined that a pre-action configuration needs to be executed based on the target operation identifier, the pre-action configuration is executed using the request information to perform data transformation on the user request by executing the pre-action configuration to obtain the target request. The pre-action configuration is used to configure the simulation server to have the ability to transform the user request into a request that reflects the actual business scenario. In response to the target request, the data interaction is performed in the data system to obtain the data interaction result; A post-action configuration is executed to process the data interaction result by executing the post-action configuration, wherein the post-action configuration is used to configure the simulation server to have the ability to process the data interaction result.
2. The method according to claim 1, characterized in that, Obtain the target operation identifier and request information from the user request, including: Determine the communication protocol used by the target user to send the user request from the header data of the user request; The user request is parsed based on the communication protocol, and request body data is obtained from the user request, wherein the request body data includes key data in the user request; The request body data is parsed to obtain the target operation identifier and the request information from the request body data.
3. The method according to claim 1, characterized in that, If, based on the target operation identifier, it is determined that a pre-action configuration needs to be executed, the method further includes, before executing the pre-action configuration using the request information to perform data transformation on the user request and obtain the target request by executing the pre-action configuration, the method further includes: The data interaction type is determined based on the target operation identifier; Based on the data interaction type, query the first configuration database for a pre-action configuration template that matches the target operation identifier; If the first configuration database includes the pre-action configuration template that matches the target operation identifier, it is determined that the pre-action configuration needs to be executed.
4. The method according to claim 1, characterized in that, If, based on the target operation identifier, it is determined that a pre-action configuration needs to be executed, the pre-action configuration is executed using the request information to perform data transformation on the user request and obtain the target request, including: Retrieve a pre-action configuration template that matches the target operation identifier from the first configuration database; The request information is used to populate the pre-action configuration template to obtain the pre-action configuration; Execute the aforementioned pre-action configuration to obtain the execution result; Based on the execution result, the user request is transformed to obtain the target request.
5. The method according to claim 4, characterized in that, The request information is used to populate the pre-action configuration template to obtain the pre-action configuration, which includes: Calculate the matching degree between N first preset operation identifiers in the preset operation identifier list and the target operation identifier to obtain N first matching degrees, where N is a natural number greater than 1; Each of the N first matching degrees is compared with a first threshold, and the first preset operation identifier that is greater than the first threshold among the N first comparison results is determined as the first operation identifier; The system queries the first configuration database for the pre-action configuration template that matches the first operation identifier. Specifically, if the first operation identifier is a first preset identifier, the system queries the first configuration database for a first pre-action configuration template that matches the first preset identifier. The first pre-action configuration template includes a first configuration name, a first configuration description, a first request method, a first request address, and a first message content. If the first operation identifier is a second preset identifier, the system queries the first configuration database for a second pre-action configuration template that matches the second preset identifier. The second pre-action configuration template includes a second configuration name, a second configuration description, a character type, a second request address, and a second message content. If the first operation identifier is a third preset identifier, the system queries the first configuration database for a third pre-action configuration template that matches the third preset identifier. The third pre-action configuration template includes a third configuration name, a third configuration description, a configuration path, and a configuration source file. If it is determined that the request information is compatible with the pre-action configuration template, the request information is filled into the field corresponding to the pre-action configuration template to obtain the pre-action configuration, wherein the pre-action configuration matches the user request.
6. The method according to claim 1, characterized in that, In response to the target request, to perform the data interaction in the data system and obtain the data interaction result, including: Parse the target request to obtain the target user's registered account information and business requirements in the data system; Obtain first target data from the data system that matches both the business requirements and the account information; The data interaction is performed on the first target data to obtain the data interaction result, wherein the data interaction includes business transactions between the target user and the data system.
7. The method according to claim 1, characterized in that, Before executing a post-action configuration to process the data interaction result by executing the post-action configuration, the method further includes: Calculate the matching degree between the M second preset operation identifiers in the preset operation identifier list and the target operation identifier to obtain M second matching degrees, where M is a natural number greater than 1; Each of the M second matching degrees is compared with the second threshold, and the second preset operation identifier that is greater than the second threshold among the M second comparison results is determined as the second operation identifier; Query the second configuration database for a post-action configuration template that matches the second operation identifier; The post-action configuration template is populated based on the request information to obtain the post-action configuration.
8. A data processing apparatus, characterized in that, Applied to a simulation server, the simulation server is connected to a simulation client, including: The first acquisition module is used to acquire user requests sent by the target user through the simulated client, wherein the user request is a request to interact with the data system. The second acquisition module is used to acquire a target operation identifier and request information from the user request, wherein the target operation identifier is used to indicate the data interaction type of the user request, and the request information includes the account information registered by the target user in the data system; The first execution module is used to execute the pre-action configuration using the request information when it is determined that a pre-action configuration needs to be executed based on the target operation identifier, so as to perform data transformation on the user request by executing the pre-action configuration to obtain the target request. The pre-action configuration is used to configure the simulation server to have the ability to convert the user request into a request that reflects the actual business scenario. A response module is used to respond to the target request in order to perform the data interaction in the data system and obtain the data interaction result; The second execution module is used to execute the post-action configuration to process the data interaction result by executing the post-action configuration, wherein the post-action configuration is used to configure the simulation server to have the ability to process the data interaction result.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Simulation test method, client, server, system and readable storage medium
CN111708702A
Buried point test method and device, electronic equipment and storage medium
CN116541263A