Data processing method and device, storage medium and electronic equipment
By extracting the target operation identification and request information in user requests on the simulation server and performing pre- and post-action configurations, the problem that the simulation server in the prior art cannot truly simulate complex business processes and dependencies between systems is solved, and more realistic service simulation and more comprehensive testing are achieved.
Patent Information
- Application Number
- CN202411853612.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-16
AI Technical Summary
The service simulator in the prior art cannot realistically simulate the response of complex business processes and dependencies between systems, resulting in the inability to realistically simulate the test scenario.
By implementing the data processing method on the simulation server, obtaining user requests sent by the simulation client, extracting target operation identifiers and request information, performing pre-action configurations based on the target operation identifier, performing data conversion on user requests, responding to converted target requests, and performing post-action configurations based on the data interaction results.
It realizes that the simulation server can truly simulate and respond to user requests, enhancing the realism of service simulation and comprehensiveness of testing.
Smart Images

Figure CN119781856A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing, and specifically, to a data processing method and device, a storage medium, and an electronic device. Background Art
[0002] In the service industry, the core functions and stability of information technology (IT) systems are crucial to ensuring the normal operation of the business. As the business becomes more diverse and complex, IT systems need to adapt to rapid innovation and change, and system upgrades and transformations will be required.
[0003] During system upgrades and new function development, they need to be tested to verify the correctness of new functions and the stability of the system. However, service simulators in related technologies can usually only simulate the response of a single service interface, and have limitations in simulating complex business processes and dependencies between systems, and cannot truly simulate test scenarios. Summary of the invention
[0004] The embodiments of the present application provide a data processing method and device, a storage medium, and an electronic device to at least solve the problem in the related art that the simulated server cannot truly simulate the response to the user request.
[0005] According to an embodiment of the present application, a data processing method is provided, which is applied to a simulation server, wherein the simulation server is connected to a simulation client, and the method includes: obtaining a user request sent by a target user through the simulation client, wherein the user request is a request for requesting data interaction with a data system; obtaining a target operation identifier and request information from the user request, wherein the target operation identifier is used to indicate the type of data interaction requested by the user, and the request information includes account information registered by the target user in the data system; in the case where 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, so as to perform data conversion on the user request by executing the pre-action configuration to obtain a target request, wherein the pre-action configuration is used to configure the simulation server to have the ability to convert 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; executing the post-action configuration to perform data processing on 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.
[0006] In an exemplary embodiment, obtaining the target operation identifier and request information from the user request includes: determining, from the header data of the user request, the communication protocol used by the target user to send the user request; parsing the user request based on the communication protocol, and obtaining request body data from the user request, wherein the request body data includes key data in the user request; 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, 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, so as to perform data conversion on the user request by executing the pre-action configuration, and before obtaining the target request, the method further includes: determining the data interaction type based on the target operation identifier; querying a pre-action configuration template matching the target operation identifier from a first configuration database based on the data interaction type; and determining that the pre-action configuration needs to be executed when the first configuration database includes the pre-action configuration template matching the target operation identifier.
[0008] In an exemplary embodiment, when it is determined that a pre-action configuration needs to be executed based on the above-mentioned target operation identifier, the above-mentioned pre-action configuration is executed using the above-mentioned request information, so as to perform data conversion on the above-mentioned user request by executing the above-mentioned pre-action configuration to obtain the target request, including: obtaining a pre-action configuration template matching the above-mentioned target operation identifier from a first configuration database; filling the above-mentioned pre-action configuration template with the above-mentioned request information to obtain the above-mentioned pre-action configuration; executing the above-mentioned pre-action configuration to obtain an execution result; performing data conversion on the above-mentioned user request based on the above-mentioned execution result to obtain the above-mentioned target request.
[0009] In an exemplary embodiment, the request information is used to fill the pre-action configuration template to obtain the pre-action configuration, including: calculating 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; comparing the N first matching degrees with a first threshold value, and determining the first preset operation identifier greater than the first threshold value in the N first comparison results as the first operation identifier; querying the pre-action configuration template matching the first operation identifier from the first configuration database, wherein, when the first operation identifier is the first preset identifier, querying the first pre-action configuration template matching the first preset identifier from the first configuration database, wherein the first pre-configuration template includes a first configuration name, a first configuration description, a first request method, a first request address and the first message content. When the first operation identifier is the second preset identifier, query the second pre-action configuration template matching the second preset identifier from the first configuration database, the second pre-configuration template includes the second configuration name, the second configuration description, the character type, the second request address and the second message content. When the first operation identifier is the third preset identifier, query the third pre-action configuration template matching the third preset identifier from the first configuration database, the third pre-configuration template includes the third configuration name, the third configuration description, the configuration path and the configuration source file. When it is determined that the request information is compatible with the pre-action configuration template, fill the request information 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.
[0010] In an exemplary embodiment, responding to the target request to perform the data interaction in the data system to obtain a data interaction result includes: parsing the target request to obtain the account information and business requirements of the target user registered in the data system; acquiring first target data that matches both the business requirements and the account information from the data system; performing 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.
[0011] In an exemplary embodiment, before executing the post-action configuration to perform data processing on the data interaction result by executing the post-action configuration, the method further includes: calculating the matching degree of M second preset operation identifiers in the preset operation identifier list with the target operation identifier to obtain M second matching degrees, wherein the M is a natural number greater than 1; comparing the M second matching degrees with a second threshold value respectively, and determining the second preset operation identifier greater than the second threshold value in the M second comparison results as the second operation identifier; querying a post-action configuration template matching the second operation identifier from a second configuration database; and filling in the post-action configuration template based on the request information to obtain the post-action configuration.
[0012] According to another embodiment of the present application, a data processing device is provided, which is applied to a simulation server, and the simulation server is connected to a simulation client, including: a first acquisition module, which is used to acquire a user request sent by a target user through the simulation client, wherein the user request is a request for requesting data interaction with a data system; a second acquisition module, which 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 type of data interaction requested by the user, and the request information includes the account information registered by the target user in the data system; a first execution module, which is used to determine the need to execute a pre-action configuration based on the target operation identifier. In this case, the above-mentioned pre-action configuration is executed by utilizing the above-mentioned request information, so as to perform data conversion on the above-mentioned user request by executing the above-mentioned pre-action configuration to obtain a target request, wherein the above-mentioned pre-action configuration is used to configure the above-mentioned simulation server to have the ability to convert the above-mentioned user request into a request reflecting the actual business scenario; a response module is used to respond to the above-mentioned target request, so as to perform the above-mentioned data interaction in the above-mentioned data system to obtain a data interaction result; a second execution module is used to execute the post-action configuration, so as to perform data processing on the above-mentioned data interaction result by executing the above-mentioned post-action configuration, wherein the above-mentioned post-action configuration is used to configure the above-mentioned simulation server to have the ability to process the above-mentioned data interaction result.
[0013] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0014] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.
[0015] According to another embodiment of the present application, an electronic device is 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 execute the steps in any one of the above method embodiments.
[0016] Through this application, after obtaining the user request sent by the simulated client, the simulation server extracts the target operation identifier and request information from it, and judges and executes the corresponding pre-action configuration based on the target operation identifier, converts the user request and responds to the converted target request, interacts with the data system, and executes the post-action configuration based on the interaction result to perform further data processing. This solves the problem in the related art that the simulation server cannot truly simulate and respond to user requests, and achieves the technical effect of enhancing the realism of service simulation and improving the comprehensiveness of testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a schematic diagram of a hardware environment of a data processing method according to an embodiment of the present application;
[0018] Figure 2 is a flow chart of a data processing method according to an embodiment of the present application;
[0019] Figure 3 is a schematic diagram of an interface for post-action configuration according to an embodiment of the present application;
[0020] Figure 4 This is a specific interface diagram of a pre-action configuration according to an embodiment of the present application. Figure 1 ;
[0021] Figure 5 This is a specific interface diagram of a pre-action configuration according to an embodiment of the present application. Figure 2 ;
[0022] Figure 6 This is a specific interface diagram of a pre-action configuration according to an embodiment of the present application. Figure 3 ;
[0023] Figure 7 This is a specific interface diagram of a pre-action configuration according to an embodiment of the present application. Figure 4 ;
[0024] Figure 8 is a schematic diagram of a pre-action configuration according to an embodiment of the present application;
[0025] Fig. 9 is a schematic diagram of a post-action configuration according to an embodiment of the present application;
[0026] Fig.10is a flow chart of a data processing method according to an embodiment of the present application;
[0027] Fig.11 It is a structural block diagram of a data processing device according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0030] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 Schematic diagram of the hardware environment of a data processing method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0031] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a data processing method in an embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to a server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0032] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0033] In this embodiment, a data processing method is provided. Figure 2 is a flow chart of a data processing method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0034] Step S202, obtaining a user request sent by a target user through the simulated client, wherein the user request is a request for requesting data interaction with a data system;
[0035] Optionally, the simulation client in this embodiment can simulate the behavior and operation of a real user on the Internet, and can be a software program or tool, such as JMeter, LoadRunner, Gatling, etc.
[0036] Step S204, obtaining a target operation identifier and request information from the user request, wherein the target operation identifier is used to indicate the data interaction type requested by the user, 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 is used to represent the data interaction type requested by the user, and the specific representation includes but is not limited to a transaction code and a Uniform Resource Identifier (URI). For example, the transaction code may be G00009, G00010, etc. Each code represents a specific data interaction type or transaction service, such as account query, transfer transaction, loan application.
[0038] Optionally, the request information in this embodiment is 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 information includes transaction amount, transaction time, transaction type, user name, ID number, card number, contact information, 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, contact information, etc.
[0040] Step S206, when it is determined based on the target operation identifier that a pre-action configuration needs to be executed, the pre-action configuration is executed using the request information, so as to perform data conversion on the user request by executing the pre-action configuration to obtain a target request, wherein the pre-action configuration is used to configure the simulation server to have the ability to convert the user request into a request reflecting an actual business scenario;
[0041] Step S208, responding to the target request to perform the data interaction in the data system to obtain a data interaction result;
[0042] Optionally, the data conversion in this embodiment is used to convert the user request into a target request. The 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, executing the post-action configuration to perform data processing on the above-mentioned data interaction results by executing the above-mentioned post-action configuration, wherein the above-mentioned post-action configuration is used to configure the above-mentioned simulation server to have the ability to process the above-mentioned data interaction results.
[0044] Optionally, the data interaction in this embodiment includes but is not limited to transfer transactions, account inquiries, loan application progress inquiries, etc.
[0045] Optionally, the pre-action configuration or post-action configuration in this embodiment may also be configured under the triggering of an operator. Figure 3 : is a schematic diagram of an interface for post-action configuration according to an embodiment of the present application. The operator triggers the post-action configuration by clicking the "Add" button and triggers the saving of the post-action configuration by clicking the "Save" button. The interface schematic diagram of the pre-action configuration is similar to Figure 3 Similar, no further elaboration is required here.
[0046] Through the above steps, after obtaining the user request sent by the simulated client, the simulation server extracts the target operation identifier and request information from it, and judges and executes the corresponding pre-action configuration based on the target operation identifier, converts the user request and responds to the converted target request, interacts with the data system, and executes the post-action configuration based on the interaction result to perform further data processing. This solves the problem in the related art that the simulation server cannot truly simulate and respond to user requests, and achieves the technical effect of enhancing the realism of service simulation and improving the comprehensiveness of testing.
[0047] In an exemplary embodiment, obtaining the target operation identifier and request information from the user request includes: determining, from the header data of the user request, the communication protocol used by the target user to send the user request; parsing the user request based on the communication protocol, and obtaining request body data from the user request, wherein the request body data includes key data in the user request; 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 for indicating the communication protocol used by the request, including but not limited to the 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 for short).
[0050] Optionally, when parsing user requests based on the communication protocol, this embodiment may adopt a dynamic and configurable parsing strategy, allowing flexible configuration of parsing rules according to different business scenarios and requirements. For example, in certain specific scenarios, additional preprocessing or decryption operations may be required on user requests.
[0051] Optionally, when parsing the request body data portion, this embodiment can process request information in multiple formats, including but not limited to Extensible Markup Language (XML), JavaScript Object Notation (JSON), fixed-length data format, etc., and identify and extract the target operation identifier and request information in the body information through predefined parsing rules. For example, by analyzing the received URL, possible parameters 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, provide a solid foundation for subsequent data conversion and simulation testing, and ensure the accuracy and comprehensiveness of the test.
[0053] In an 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, so as to perform data conversion on the user request by executing the pre-action configuration, and before obtaining the target request, the method further includes: determining the data interaction type based on the target operation identifier; querying a pre-action configuration template matching the target operation identifier from a first configuration database based on the data interaction type; and determining that the pre-action configuration needs to be executed when the first configuration database includes the pre-action configuration template matching the target operation identifier.
[0054] Optionally, the data interaction types in this embodiment include but are not limited to query types and modification types, and may specifically be transfers, account inquiries, loan applications, and the like.
[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 according to the target operation identifier, this embodiment searches the first configuration database for a pre-action configuration template that matches the data interaction type to determine whether the user request needs to execute the above pre-action configuration, thereby ensuring that the simulation server can automatically select and execute the most appropriate pre-action configuration based on the specific business scenario, thereby enhancing the personalization and scenario adaptability of the simulation.
[0057] In an exemplary embodiment, when it is determined that a pre-action configuration needs to be executed based on the above-mentioned target operation identifier, the above-mentioned pre-action configuration is executed using the above-mentioned request information, so as to perform data conversion on the above-mentioned user request by executing the above-mentioned pre-action configuration to obtain the target request, including: obtaining a pre-action configuration template matching the above-mentioned target operation identifier from a first configuration database; filling the above-mentioned pre-action configuration template with the above-mentioned request information to obtain the above-mentioned pre-action configuration; executing the above-mentioned pre-action configuration to obtain an execution result; performing data conversion on the above-mentioned user request based on the above-mentioned execution result to obtain the above-mentioned target request.
[0058] Optionally, the data conversion in this embodiment is used to convert the user request into a target request. The specific conversion method has been described above and will not be repeated here.
[0059] Optionally, in this embodiment, Figure 4 This is a specific interface diagram of a pre-action configuration according to an embodiment of the present application. Figure 1 ,like Figure 4 As shown, when it is determined that the pre-action configuration needs to be executed, the action type in the pre-action configuration template is determined based on the target operation identifier, and the action name is determined according to the request information. The operator can add or delete the pre-action configuration, or manually configure the pre-action, where the action name and action type are required items, and the action description is an optional item.
[0060] Through the above steps, the matching pre-action configuration template is obtained from the configuration database, the configuration template is filled with request information, a specific pre-action configuration is generated and executed, and an execution result is generated. Based on the execution result of the pre-action configuration, the original user request is converted into a target request that meets the business scenario. User requests can be personalized efficiently and accurately to ensure that the request content conforms to the actual business logic and improve the comprehensiveness and authenticity of the test.
[0061] In an exemplary embodiment, the request information is used to fill the pre-action configuration template to obtain the pre-action configuration, including: calculating 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; comparing the N first matching degrees with a first threshold value, and determining the first preset operation identifier greater than the first threshold value in the N first comparison results as the first operation identifier; querying the pre-action configuration template matching the first operation identifier from the first configuration database, wherein, when the first operation identifier is the first preset identifier, querying the first pre-action configuration template matching the first preset identifier from the first configuration database, wherein the first pre-configuration template includes a first configuration name, a first configuration description, a first request method, a first request address and the first message content. When the first operation identifier is the second preset identifier, query the second pre-action configuration template matching the second preset identifier from the first configuration database, the second pre-configuration template includes the second configuration name, the second configuration description, the character type, the second request address and the second message content. When the first operation identifier is the third preset identifier, query the third pre-action configuration template matching the third preset identifier from the first configuration database, the third pre-configuration template includes the third configuration name, the third configuration description, the configuration path and the configuration source file. When it is determined that the request information is compatible with the pre-action configuration template, fill the request information 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.
[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 other request identifiers that do 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 perform the pre-action configuration operation on the user request.
[0064] Optionally, Figure 5 This is a specific interface diagram of a pre-action configuration according to an embodiment of the present application. Figure 2 ,like Figure 5As shown, in the case where the first operation identifier is an HTTP request identifier, a first pre-action configuration template matching the HTTP request identifier is queried from the first configuration database, and the first pre-configuration template includes an action name, an action description, a request method, a request address, a message body (corresponding to the above-mentioned first configuration name, first configuration description, first request method, first request address, and first message content, respectively) and an action type (in this case, "execute HTTP request"). Specifically, the request method field may include methods corresponding to HTTP requests such as GET, POST, PUT, and DELETE.
[0065] Optionally, Figure 6 This is a specific interface diagram of a pre-action configuration according to an embodiment of the present application. Figure 3 ,like Figure 6 As shown, when the first operation identifier is a TCP request identifier, a second pre-action configuration template matching the TCP request identifier is queried from the first configuration database, and the second pre-configuration template includes an action name, an action description, a character set, a request address, a message body (corresponding to the above-mentioned second configuration name, second configuration description, character type, second request address and second message content, respectively) and an action type (in this case, "execute TCP request"), wherein the character set defines the character encoding method in the message body, including but not limited to Unicode Transformation Format-8bits (UTF-8 for short), American Standard Code for Information Interchange (ASCII for short), etc.
[0066] Optionally, Figure 7 This is a specific interface diagram of a pre-action configuration according to an embodiment of the present application. Figure 4 ,like Figure 7 As shown, when the first operation identifier is other request identifiers, a third pre-action configuration template that matches the other request identifiers is queried from the first configuration database, and the third pre-configuration template includes an action name, an action description (corresponding to the above-mentioned third configuration name and third configuration description, respectively), an execution content (corresponding to the above-mentioned configuration path and configuration source file) and an action type (in this case, "execution 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 8is a schematic diagram of a pre-action configuration according to an embodiment of the present application, such as Figure 8 As shown, in the case where the user request is a request for frozen account balance inquiry, it is necessary to perform pre-configuration operations to enable the simulation server to have the ability to notify user 1 of the arrears inquiry result, determine that the match 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", define the character encoding method in the message body as UTF-8, and the action name is "User 1 arrears inquiry result notification", and then fill in the request address and message body according to the request information in the user request.
[0069] Through the above steps, the target operation identifier of the user request is compared with the identifiers in the preset operation identifier list, the matching degree is calculated, the calculated matching degree is compared with the preset threshold, the most matching first operation identifier is determined, and then the pre-action configuration template corresponding to the first operation identifier is searched from the first configuration database. When it is determined that the request information is compatible with the configuration template, the request information is filled into the configuration template to generate the pre-action configuration. Through accurate matching and compatibility checking, the pre-action configuration that best suits the current business scenario can be selected and generated, enhancing the flexibility and accuracy of data processing.
[0070] In an exemplary embodiment, responding to the target request to perform the data interaction in the data system to obtain a data interaction result includes: parsing the target request to obtain the account information and business requirements of the target user registered in the data system; acquiring first target data that matches both the business requirements and the account information from the data system; performing 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.
[0071] Optionally, in this embodiment, the business needs include but are not limited to account balance inquiry needs, transfer needs, loan applications, etc.
[0072] Optionally, in this embodiment, if it is a transfer demand or a balance inquiry demand, the corresponding first target data is the user's fund information; if it is a loan progress inquiry demand, the corresponding first target data is records related to loan review.
[0073] Optionally, in this embodiment, corresponding data processing is performed according to the content in the request information, for example: after receiving a transfer request, performing a fund transfer operation between accounts, or after receiving an account query request, returning information such as account balance and transaction records.
[0074] Through the above steps, based on the parsed account information and business requirements, data interaction is performed in the data system and the data interaction results are obtained. By refining the data interaction process, it is ensured that each data interaction is based on the 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 perform data processing on the data interaction result by executing the post-action configuration, the method further includes: calculating the matching degree of M second preset operation identifiers in the preset operation identifier list with the target operation identifier to obtain M second matching degrees, wherein the M is a natural number greater than 1; comparing the M second matching degrees with a second threshold value respectively, and determining the second preset operation identifier greater than the second threshold value in the M second comparison results as the second operation identifier; querying a post-action configuration template matching the second operation identifier from a second configuration database; and filling in 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, Fig. 9 is a schematic diagram of a post-action configuration according to an embodiment of the present application, such as Fig. 9 As shown, in the case where the user request is a transfer request, the post-configuration operation needs to be performed so that the simulation server has the ability to trigger the account notification after the transfer transaction is completed, that is, after the transfer transaction is completed, the requester needs to receive the account transaction flow notification to confirm the final result of the transaction and obtain the transaction flow details, etc. Determine that the action type to be executed for this user request is "Execute jar package" and the action name is "Insert event-driven architecture (EDA)", and then fill in the execution content according to the 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, the best matching second operation identifier is determined, and the post-action configuration template matching the second operation identifier is obtained from the configuration database. Then, the template is filled with the request information, and the post-action configuration is generated and executed to ensure that the data interaction result can be processed correctly. Through the execution of the post-action configuration, the complete service process is simulated, including the related operations after the service response, to further improve the comprehensiveness of the test and the integrity of the simulation.
[0079] The above method is explained below with a specific example:
[0080] Fig.10 This is a flow chart of a data processing method according to an embodiment of the present application. A data system needs to upgrade its core transaction module. In order to test the performance and stability of the upgraded system and 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 is connected to the simulation client to receive and process user requests sent by the simulation client, and to perform necessary pre- and post-action configurations to ensure that data interaction is consistent with actual business scenarios. Fig.10 As shown, the process includes the following steps:
[0081] Step S1002, obtaining a user request from a simulated client, wherein the simulated client simulates a user to initiate a transfer transaction request, and the request includes a target operation identifier "TRANSFER" and request information, including a transfer amount, a transfer account number, 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", it is determined that the pre-action configuration related to the transfer needs to be executed, and the user request is converted into data to obtain the target request, and the relevant pre-action configuration is performed for the simulation server through the HTTP request, so that it has the "account balance verification" service;
[0084] Step S1008, responding to the target request, executing the transfer operation in the data system (i.e., the simulated bank core system) to obtain the transfer result;
[0085] Step S1010, execute the post-action configuration, send the "account movement flow" event through EDA, and record the transaction flow.
[0086] Through the above steps, the simulation server can not only accurately simulate the data interaction response of the external system to the bank's core system, but also ensure the authenticity and integrity of the transaction data by executing the pre- and post-action configuration. This improves the efficiency and accuracy of the test, allowing the data system to be more comprehensively tested and verified for performance and stability when upgrading or developing new functions, ensuring the normal operation of the business and the security of customer data.
[0087] This example demonstrates how to perform a series of complex operations in a simulated environment through 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 description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0089] In the present embodiment, a data processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0090] Fig.11 is a structural block diagram of a data processing device according to an embodiment of the present application, such as Fig.11 As shown, the device is applied to a simulation server, and the simulation server is connected to a simulation client, including:
[0091] A first acquisition module 1102 is used to acquire a user request sent by a target user through the simulated client, wherein the user request is a request for requesting data interaction with a data system;
[0092] A 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 requested by the user, 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 preceding action configuration using the request information when it is determined that the preceding action configuration needs to be executed based on the target operation identifier, so as to perform data conversion on the user request by executing the preceding action configuration to obtain a target request, wherein the preceding action configuration is used to configure the simulation server to have the ability to convert the user request into a request reflecting an actual business scenario;
[0094] A response module 1108 is used to respond to the target request to perform the data interaction in the data system and obtain a data interaction result;
[0095] The second execution module 1110 is used to execute the post-action configuration to perform data processing on the above-mentioned data interaction results by executing the above-mentioned post-action configuration, wherein the above-mentioned post-action configuration is used to configure the above-mentioned simulation server to have the ability to process the above-mentioned data interaction results.
[0096] In an exemplary embodiment, the second acquisition module 1104 includes: a first determination unit, used 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, used 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; a second parsing unit, used 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 above-mentioned first execution module 1106 includes: a second determination unit, used to determine the above-mentioned data interaction type based on the above-mentioned target operation identifier; a first query unit, used to query the first configuration database for a pre-action configuration template that matches the above-mentioned target operation identifier based on the above-mentioned data interaction type; and a third determination unit, used to determine that the above-mentioned pre-action configuration needs to be executed when the above-mentioned first configuration database includes the above-mentioned pre-action configuration template that matches the above-mentioned target operation identifier.
[0098] In an exemplary embodiment, the first execution module 1106 includes: a first acquisition unit, used to acquire a pre-action configuration template matching the target operation identifier from a first configuration database; a first filling unit, used to fill the pre-action configuration template with the request information to obtain the pre-action configuration; a first execution unit, used to execute the pre-action configuration to obtain an execution result; and a first conversion unit, used 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, used to calculate the matching degree between N first preset operation identifiers in the preset operation identifier list and the target operation identifier, and obtain N first matching degrees, where N is a natural number greater than 1; a first comparison unit, used to compare the N first matching degrees with a first threshold value, and determine the first preset operation identifier greater than the first threshold value in the N first comparison results as the first operation identifier; a second query unit, used 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 the 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-configuration template includes a first configuration name, a first configuration description, a first request method, and a first request method. The method comprises the following steps: a first operation unit for requesting an address and a first message content, and when the first operation identifier is a second preset identifier, querying a second pre-action configuration template matching the second preset identifier from the first configuration database, wherein the second pre-action configuration template includes a second configuration name, a second configuration description, a character type, a second requested address and a second message content; and when the first operation identifier is a third preset identifier, querying a third pre-action configuration template matching the third preset identifier from the first configuration database, wherein the third pre-action configuration template includes a third configuration name, a third configuration description, a configuration path and a configuration source file; and a second filling unit for filling the request information into a field corresponding to the pre-action configuration template when determining that the request information is compatible with the pre-action configuration template, so as to obtain 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, used to parse the target request to obtain the account information and business requirements of the target user registered in the data system; a second acquisition unit, used to obtain the first target data that matches both the business requirements and the account information from the data system; a second execution unit, used to perform the data interaction on the first target data to obtain the data interaction result, wherein the data interaction includes the 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, used to calculate the matching degree of M second preset operation identifiers in the preset operation identifier list and the target operation identifier, and obtain M second matching degrees, wherein the M is a natural number greater than 1; a second comparison unit, used to compare the M second matching degrees with the second threshold value respectively, and determine the second preset operation identifier greater than the second threshold value in the M second comparison results as the second operation identifier; a third query unit, used to query the post-action configuration template that matches the second operation identifier from the second configuration database; and a third filling unit, used 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, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0103] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0104] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0105] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0106] In an 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] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0108] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0109] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.
[0110] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0111] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0112] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A data processing method, characterized in that: Applied to a simulation server, the simulation server is connected to a simulation client, the method comprises: Acquire a user request sent by a target user through the simulated client, wherein the user request is a request for requesting data interaction with a data system; 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 requested by the user, and the request information includes account information of the target user registered in the data system; In the case where it is determined based on the target operation identifier that a pre-action configuration needs to be executed, the pre-action configuration is executed using the request information, so as to perform data conversion on the user request by executing the pre-action configuration to obtain a target request, wherein the pre-action configuration is used to configure the simulation server to have the ability to convert 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 and obtain a data interaction result; Execute the post-action configuration to perform data processing on 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 Acquiring a target operation identifier and request information from the user request, including: Determining, from the header data of the user request, the communication protocol used by the target user to send the user request; Parsing the user request based on the communication protocol, and obtaining request body data 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 In the case where it is determined based on the target operation identifier that a pre-action configuration needs to be executed, the pre-action configuration is executed using the request information, so as to perform data conversion on the user request by executing the pre-action configuration to obtain the target request, the method further includes: Determining the data interaction type based on the target operation identifier; Based on the data interaction type, querying a first configuration database for a pre-action configuration template that matches the target operation identifier; In a case where 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: In the case where it is determined based on the target operation identifier that a pre-action configuration needs to be executed, the pre-action configuration is executed using the request information, so as to perform data conversion on the user request by executing the pre-action configuration to obtain a target request, including: Acquire 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; Execute the preceding action configuration to obtain an execution result; The user request is data converted based on the execution result to obtain the target request.
5. The method according to claim 4, characterized in that Filling the pre-action configuration template with the request information to obtain the pre-action configuration includes: Calculating the matching degrees 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; Compare the N first matching degrees with a first threshold respectively, and determine a first preset operation identifier greater than the first threshold among the N first comparison results as a first operation identifier; Querying the pre-action configuration template that matches the first operation identifier from the first configuration database, wherein, when the first operation identifier is a first preset identifier, querying the first pre-action configuration template that matches the first preset identifier from the first configuration database, the first pre-configuration template includes a first configuration name, a first configuration description, a first request mode, a first request address, and a first message content; when the first operation identifier is a second preset identifier, querying the second pre-action configuration template that matches the second preset identifier from the first configuration database, the second pre-configuration template includes a second configuration name, a second configuration description, a character type, a second request address, and a second message content; when the first operation identifier is a third preset identifier, querying the third pre-action configuration template that matches the third preset identifier from the first configuration database, the third pre-configuration template includes a third configuration name, a third configuration description, a configuration path, and a configuration source file; In the case where it is determined that the request information is compatible with the pre-action configuration template, the request information is filled into a 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 Responding to the target request to perform the data interaction in the data system and obtain a data interaction result includes: Parsing the target request to obtain the target user's account information and business requirements registered in the data system; Acquire first target data that matches both the business requirement and the account information from the data system; 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 the post-action configuration to perform data processing on the data interaction result by executing the post-action configuration, the method further includes: Calculating the matching degrees between 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; Compare the M second matching degrees with a second threshold respectively, and determine a second preset operation identifier greater than the second threshold among the M second comparison results as a second operation identifier; Querying a post-action configuration template matching the second operation identifier from a second configuration database; The post-action configuration template is filled based on the request information to obtain the post-action configuration.
8. A data processing device, characterized in that: Applied to a simulation server, the simulation server is connected to a simulation client, comprising: A first acquisition module, used to acquire a user request sent by a target user through the simulated client, wherein the user request is a request for requesting data interaction with a data system; A 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 requested by the user, and the request information includes the account information of the target user registered in the data system; A first execution module is used for executing the pre-action configuration using the request information when it is determined that the pre-action configuration needs to be executed based on the target operation identifier, so as to perform data conversion on the user request by executing the pre-action configuration to obtain a target request, wherein the pre-action configuration is used to configure the simulation server to have the ability to convert the user request into a request reflecting an actual business scenario; A response module, used for responding to the target request to perform the data interaction in the data system and obtain a data interaction result; The second execution module is used to execute the post-action configuration to perform data processing on 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 implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.
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, the steps of the method described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Simulation test method, client, server, system and readable storage medium
CN111708702A
Distributed data processing method and device, server and readable storage medium
CN112486592A
Network request processing method and device, storage medium and electronic device
CN114124891A
Buried point test method and device, electronic equipment and storage medium
CN116541263A
Operation search method and operation search apparatus
US20150254309A1