CN115996251A - Data acquisition method, device, computer equipment and storage medium for service simulation - Google Patents

Data acquisition method, device, computer equipment and storage medium for service simulation Download PDF

Info

Publication number
CN115996251A
CN115996251A CN202211412132.6A CN202211412132A CN115996251A CN 115996251 A CN115996251 A CN 115996251A CN 202211412132 A CN202211412132 A CN 202211412132A CN 115996251 A CN115996251 A CN 115996251A
Authority
CN
China
Prior art keywords
input message
service
target
message
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211412132.6A
Other languages
Chinese (zh)
Inventor
邓权威
暨光耀
连煜伟
韩靖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202211412132.6A priority Critical patent/CN115996251A/en
Publication of CN115996251A publication Critical patent/CN115996251A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The application relates to a data acquisition method, a data acquisition device, computer equipment and a storage medium for service simulation, which can be used in the financial field or other fields. The existing input message Wen Moban corresponding to the method information to be simulated in the service simulation request is determined from the existing message template, if no existing input message Wen Moban matched with the input message in the service simulation request exists, the IP port information of the target service provider is acquired from the target registry, the target message which is returned by the target service provider and is determined based on the input message is acquired, and a simulation result is returned to the service consumer according to the target message. Compared with the traditional manual message writing mode, the message matching efficiency is improved by adopting the generalized calling mode to acquire the target message returned by the target service provider corresponding to the registration center based on the input message when the input message is not matched.

Description

Data acquisition method, device, computer equipment and storage medium for service simulation
Technical Field
The present invention relates to the field of data processing technology, and in particular, to a data acquisition method, apparatus, computer device, storage medium and computer program product for service simulation.
Background
When cloud computing development is performed, remote call testing is required to be performed on each service developed, however, because development of each service is not completed synchronously, when one service needs to be remotely called, and another service is not completed and cannot be called, simulation is required to be performed on the called service, so that the service initiating the call can complete message matching in the simulation service, and information returned after matching is obtained. Because the cloud computing service has different scenes, the messages in the different scenes are different, and the messages in different simulation services are different, when the simulation services are called to match the messages, the situation that the matched messages cannot be obtained can occur. At present, a method for solving the problem that messages cannot be matched is a method for manually writing messages in different scenes for simulation services. However, by manually writing the message, the efficiency of matching is reduced.
Therefore, the existing data acquisition method for service simulation has the defect of low matching efficiency.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a data acquisition method, apparatus, computer device, computer readable storage medium, and computer program product that are capable of matching efficient service simulations.
In a first aspect, the present application provides a data acquisition method for service simulation, applied to a first server, where the method includes:
receiving a service simulation request of a service consumer; the service simulation request comprises service information to be simulated, method information to be simulated corresponding to the service information to be simulated and an input message corresponding to the method information to be simulated;
obtaining a simulation service class corresponding to the service information to be simulated in the first server, determining at least one existing input message template corresponding to the method information to be simulated from existing input message templates corresponding to the simulation service class, and matching the input message with the at least one existing input message template;
if no existing input message Wen Moban matched with the input message exists, acquiring IP port information of a target service provider from a target registry; the target registration center is pre-registered with IP port information of at least one service provider of the service corresponding to the method information to be simulated, and the service corresponding to the method information to be simulated comprises an input message Wen Moban matched with the input message;
calling the target service provider based on the IP port information of the target service provider, and acquiring a target message returned by the target service provider; the target service provider is used for determining a corresponding target message based on the input message;
And generating and storing an input message template corresponding to the simulation service class according to the target message, and returning a simulation result of the service simulation request to the service consumer.
In one embodiment, if there are a plurality of existing input message templates corresponding to the method information to be simulated; said matching said input message with said at least one existing input message template comprises:
sequencing a plurality of existing input message templates according to the order of the priority of each existing input message template from high to low to obtain an input message template sequence to be matched;
and respectively carrying out sequential matching on the input message and each existing input message template in the input message template sequence to be matched.
In one embodiment, the input message includes an input message field and input message contents corresponding to the input message field, and the sequentially matching the input message with each existing input message template in the input message templates to be matched includes:
for each existing input message template, detecting whether the existing input message template contains a message field corresponding to the input message text segment and whether the message content of the message field is the input message content;
If the message field of the existing input message template does not have the input message field, or the message content of the message field is not the input message content corresponding to the input message field, determining that the existing input message template is not matched with the input message.
In one embodiment, the generating and storing the input message template corresponding to the analog service class according to the target message includes:
and if the input message field is a preset field, generating a new input message template according to the input message field and the target message, and storing the new input message template as an existing input message template corresponding to the simulation service class.
In one embodiment, after the matching the input message with the at least one existing input message template, the method further includes:
if the input message template sequence to be matched has an existing input message Wen Moban matched with the input message, acquiring an existing input message Wen Moban matched with the input message in the first input message template sequence to be matched as a target existing input message Wen Moban;
and taking a message corresponding to the input message in the target existing input message template as a target message for responding to the service simulation request.
In one embodiment, the acquiring the IP port information of the target service provider from the target registry includes:
inquiring a target registry containing the service information to be simulated and the IP port information of the service provider of the method information to be simulated, and acquiring an address of the target registry;
processing the parameter type into a character string array according to the separator in the parameter type of the input message, and converting the input message into an object array;
initializing a generalized service information configuration based on a dubbo distributed service framework, packaging calling party information corresponding to the input message, the address of the target registry and the service information to be simulated into the generalized service information configuration, and caching generalized service abstract classes in the generalized service information configuration;
subscribing the to-be-simulated method information, the character string array of the parameter type and the object array of the input message to a list containing IP port information of at least one service provider in the target registry in a generalization calling mode through the generalization service abstract class;
and determining IP port information of the target service provider from the list.
In one embodiment, obtaining the target message returned by the target service provider includes:
acquiring IP port information of at least one service provider containing the service information to be simulated from the IP port information of the service provider registered to the target registration center, and at least one candidate method information corresponding to the service information to be simulated in each service provider;
determining target IP port information of a target service provider from the IP port information of the at least one service provider, calling the target service provider according to the target IP port information, acquiring at least one target method information corresponding to the method information to be simulated in the at least one candidate method information by the target service provider, and determining and returning a target message according to the input message and the at least one target method information.
In a second aspect, the present application provides a data acquisition device for service simulation, applied to a first server, the device comprising:
the first receiving module is used for receiving a service simulation request of a service consumer; the service simulation request comprises service information to be simulated, method information to be simulated corresponding to the service information to be simulated and an input message corresponding to the method information to be simulated;
The determining module is used for obtaining the simulation service class corresponding to the service information to be simulated in the first server, determining at least one existing input message template corresponding to the method information to be simulated from the existing input message templates corresponding to the simulation service class, and matching the input message with the at least one existing input message template;
a forwarding module, configured to obtain IP port information of a target service provider from a target registry if there is no existing input message Wen Moban matching the input message; the target registration center is pre-registered with IP port information of at least one service provider of the service corresponding to the method information to be simulated, and the service corresponding to the method information to be simulated comprises an input message Wen Moban matched with the input message;
the first matching module is used for calling the target service provider based on the IP port information of the target service provider and acquiring a target message returned by the target service provider; the target service provider is used for determining a corresponding target message based on the input message;
and the return module is used for generating and storing an input message template corresponding to the simulation service class according to the target message, and returning a simulation result of the service simulation request to the service consumer.
In a third aspect, the present application provides a computer device comprising a memory storing a computer program and a processor implementing the steps of the method described above when the processor executes the computer program.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method described above.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method described above.
The data acquisition method, apparatus, computer device, storage medium and computer program product for service simulation described above, by determining at least one existing input message Wen Moban corresponding to the method information to be simulated in the service simulation request sent by the service consumer from the existing message template, if there is no existing input message Wen Moban matching the input message in the service simulation request, acquire the IP port information of the target service provider from the target registry, acquire the target message determined based on the input message and returned by the target service provider, and return the simulation result to the service consumer according to the target message. Compared with the traditional manual message writing mode, the message matching efficiency is improved by adopting the generalized calling mode to acquire the target message returned by the target service provider corresponding to the registration center based on the input message when the input message is not matched.
Drawings
FIG. 1 is an application environment diagram of a data acquisition method for service simulation in one embodiment;
FIG. 2 is a flow chart of a data collection method for service simulation in one embodiment;
FIG. 3 is a flow chart of a forwarding step according to one embodiment;
FIG. 4 is a flowchart illustrating an initialization generalized service information configuration step in one embodiment;
FIG. 5 is a flow chart of the matching step in one embodiment;
FIG. 6 is a flow chart of a data collection method for service simulation in another embodiment;
FIG. 7 is a schematic diagram of a message matching system according to an embodiment;
FIG. 8 is a block diagram of a data acquisition device for service simulation in one embodiment;
FIG. 9 is a block diagram of a data acquisition device for service simulation in another embodiment;
fig. 10 is an internal structural view of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The data acquisition method for service simulation provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the first server 102 communicates with the registry 104 via a network. The data storage system may store data that needs to be processed by the first server 102 and the registry 104. The data storage system may be integrated on the first server 102, may be integrated on the registry 104, or may be located on a cloud or other network server. The first server 102 may receive a service simulation request sent by a service consumer, match an input message of method information to be simulated in the service simulation request based on an existing input message template, determine IP port information of a target service provider from at least one service provider corresponding to the target registry 104 by generalized call if the matching is unsuccessful, determine a target message matched with the input message by the target service provider corresponding to the IP port information, and determine a simulation result based on the obtained target message. The first server 102 and the registry 104 may be implemented as separate servers or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a data collection method for service simulation is provided, and the method is applied to the first server in fig. 1 for illustration, and includes the following steps:
step S202, receiving a service simulation request of a service consumer; the service simulation request comprises service information to be simulated, method information to be simulated corresponding to the service information to be simulated and an input message corresponding to the method information to be simulated.
Wherein the service consumer may be a party that needs to invoke a service, such as an application in a computer, etc. The first server may receive a service simulation request of a service consumer, where the service simulation request includes service information to be simulated, method information to be simulated corresponding to the service information to be simulated, and an input message corresponding to the method information to be simulated. The service information to be simulated can be related information of a service to be called, the service information to be simulated comprises at least one method information to be simulated, the method information to be simulated can be information of a method in the service corresponding to the service information to be simulated, the method information to be simulated comprises corresponding input messages, the service simulation can be a process of acquiring target messages based on the input messages, and the first server can be used for matching the target messages to the corresponding target messages based on the input messages and takes the target messages as simulation results of service simulation requests.
The service to be called can be a Mock simulation service, mock means simulation, namely simulation interface returned information, and existing information is used for replacing the information to be returned, so that the test of the upper module is realized. The Mock described above is for the interface test level. For example, for some object interfaces which are not easy to construct and are not finished, the first server can be used for a virtual object interface to come out, and the preset mock data is returned by calling the mock virtual object interface, so that the test can be finished. The service consumer and the first server may include an application 1 and an application 2, where the application 1 includes the service 1 and the service 2, and the application 2 includes the service 3 and the service 4, where the application 1 and the application 2 may be different applications, exist in different application deployment environments, and have a call relationship with each other. The above procedure of service simulation may be that the environment 1 deploys the applications 1 and 2, i.e. the environment 1 contains the services 1, 2, 3, 4; the environment 2 is provided with only the application 2 because the server performance is insufficient, that is, the environment 2 only has the services 3 and 4; but service 3 needs to call service 1 to complete the operation, and environment 2 has no service 1 inside; at this time, the first server needs to Mock off service 1 in environment 2, and returns some predefined Mock messages when service 3 of environment 2 calls service 1. Therefore, the first server can match the input message in the service simulation request according to the service simulation request.
Step S204, obtaining a simulation service class corresponding to the service information to be simulated in the first server, determining at least one existing input message template corresponding to the method information to be simulated from the existing input message templates corresponding to the simulation service class, and matching the input message with the at least one existing input message template.
The first server may include a plurality of analog service classes obtained through mock, where the analog service classes may correspond to at least one existing input message template. The existing input message template may be an input message template existing in the database of the first server, where the existing input message template may be used to match an input message, and the input message template includes an input message field, an input message content corresponding to the input message field, and a message content corresponding to the input message. For example, an input message template includes an input message field, input message content "{" a ":1," c ": {" d ":4 }" corresponding to the input message field, and message content corresponding to the input message: "{" msg ":" match template 1 "}. Then the input message can be considered to match the input message template when the input message fields and the input message content in the input message are fields in "{" a ":1," c ": {" d ":4 }" and the corresponding input message content. The first server may determine at least one existing input message template corresponding to the method information to be simulated from existing input message templates corresponding to the simulated service class after receiving the service simulation request, and match the input message in the method information to be simulated with the at least one existing input message template.
The first server can detect the input message and the template after acquiring the input message in the service simulation request and the existing input message template. The first server may determine, when receiving the input message and the existing input message template, whether the integrity and the data structure of the input message and the existing input message template are consistent, if so, indicate that further matching may be performed, and if not, return information of abnormal matching to the service consumer.
Step S206, if there is no existing input message Wen Moban matched with the input message, the IP port information of the target service provider is obtained from the target registry; the IP port information of at least one service provider of the service corresponding to the method information to be simulated is registered in the target registration center in advance, and the service corresponding to the method information to be simulated comprises an input message template matched with the input message.
The first server may match the input message with each existing input message template. However, there may not be a template matching the input message in the existing input message template, at this time, the first server may determine IP port information of the target service provider from the registry by using a generalized call manner, and obtain the target message matching the input message from the target service provider corresponding to the IP port information. The service consumer end in the generalized call can complete the call of the service without any interface definition realization of the service, and the coupling between the consumer and the provider is greatly reduced. When the first server detects that the existing input message template matched with the input message does not exist in the existing input message template, the first server can acquire the IP port information of the target service provider from the target registry, wherein the IP port information of the target service provider can be the IP port information of one service provider selected by the first server from the IP port information of at least one service provider in the target registry, and the first server can determine the target registry containing the IP port information of the service provider corresponding to the method information to be simulated according to the service information to be simulated and the method information to be simulated, and the determination can be determined by a generalized calling mode.
Wherein the target registry may contain IP port information of at least one service provider, which may be the party being invoked, i.e. the party providing the interface, each service provider may be a server. The target registry registers the IP port information of at least one service provider of the service corresponding to the method information to be simulated in advance, and the service corresponding to the method information to be simulated includes an input message template matched with the input message, and the method information corresponding to the service in each service provider may be different or the same. I.e. the at least one service provider has a corresponding identity and port, each service may exist in the at least one service provider, the method in the same service in each service provider may be different or the same, the first server invokes the IP port information of the service provider in the registry, and the invoking may be performed by the identity and port of the service provider, e.g. by the IP port information.
Wherein the first server and the registry are only for the physically expressed needs, and in fact, the first server and the registry may be different services in the same server.
Step S208, calling a target service provider based on the IP port information of the target service provider, and acquiring a target message returned by the target service provider; the target service provider is used for determining a corresponding target message based on the input message; .
The first server determines a target registry and then inquires the method information corresponding to the method information to be simulated. The first server may determine IP port information of a target service provider from at least one service provider based on the corresponding method information, where the target service provider may be selected randomly, or may be a service provider that includes method information corresponding to the method information to be simulated. The server can call the target service provider based on the IP port information of one target service provider registered in the target center, the target service provider processes based on the input message, further generates a target message matched with the input message, and returns the target message to the simulation service in the first server, so that the first server can acquire the target message returned by the target service provider.
Step S210, according to the target message, an input message template corresponding to the simulated service class is generated and stored, and a simulation result of the service simulation request is returned to the service consumer.
The target message may be an address of a certain target service provider, for example, IP port information, obtained by the first server from the target registry when there is no existing input message template matching the input message in the first server, and the input message is transferred to the target service provider through generalized call, and the target service provider returns the target message to the first server after processing, so that the first server may return a simulation result of the service simulation request to the service consumer according to the target message. Specifically, the first server may send the target packet to an application corresponding to the service consumer, so that the application may obtain a simulation result corresponding to the service simulation request sent by the first server based on the target packet. And the first server can also generate and store an input message template corresponding to the simulation service class based on the target message.
In the above data collection method of service simulation, at least one existing input message Wen Moban corresponding to the method information to be simulated in the service simulation request sent by the service consumer is determined from the existing message template, if there is no existing input message Wen Moban matching with the input message in the service simulation request, the IP port information of the target service provider is obtained from the target registry, the target message determined based on the input message and returned by the target service provider is obtained, and the simulation result is returned to the service consumer according to the target message. Compared with the traditional manual message writing mode, the message matching efficiency is improved by adopting the generalized calling mode to acquire the target message returned by the target service provider corresponding to the registration center based on the input message when the input message is not matched.
In one embodiment, if there are a plurality of existing input message templates corresponding to the method information to be simulated; matching the input message with at least one existing input message template, comprising: sequencing a plurality of existing input message templates according to the order of the priority of each existing input message template from high to low to obtain an input message template sequence to be matched; and sequentially matching the input message with each existing input message template in the input message template sequence to be matched.
In this embodiment, in the first server, there may be a plurality of existing input message templates corresponding to the method information to be simulated, and when there are a plurality of existing input message templates, each existing input message template has a corresponding priority. When the first server matches the input message with the existing input message templates, the first server may sort the plurality of existing input message templates according to the order of the priority of each existing input message template from high to low, so as to obtain an input message template sequence to be matched. The input message template sequence to be matched comprises a plurality of existing input message templates which are arranged according to the order of the priority. The first server may sequentially match the input message with each existing input message template in the input message template sequence to be matched, so as to match the input message with the existing input message templates.
The priority of each existing input message template may be set according to actual situations, and when the input message is matched with an existing input message template, the first server may start matching from the existing input message template with the highest priority in the input message template sequence to be matched. For example, in one embodiment, after matching the input message with at least one existing input message template, further comprises: if an existing input message Wen Moban matched with the input message exists in the input message template sequence to be matched, acquiring an existing input message Wen Moban matched with the input message in the first input message template sequence to be matched as a target existing input message Wen Moban; and taking the message corresponding to the input message in the target existing input message template as a target message for responding to the service simulation request. In this embodiment, when the first server matches an input message with each existing input message template in the input message template sequence to be matched, the first server may start to match from the existing input message template with the highest priority in the input message template sequence to be matched, and match with other existing input message templates respectively according to descending order of priority, and if the first server determines that the existing input message template matched with the input message exists in the input message template sequence to be matched, the first server may obtain the first existing input message Wen Moban matched with the input message in the input message sequence to be matched as the target input message template. And the first server may further use the message content corresponding to the input message in the target existing input message template as a target message for responding to the service simulation request.
Specifically, the existing input message template includes an input message field, input message content corresponding to the input message field, and a message corresponding to the input message, where the input message may be a field type message, and the first server may be based on matching of the input message field when matching. And the information of the method to be simulated can be a mock method, after the first server sends the input message to the method to be simulated, the integrity of the input message can be detected through the method to be simulated, and if the information is missed, a fault prompt is returned. After the detection is passed, the first server can query all existing input message matching templates belonging to the method to be simulated in the database, and the first server can transmit the input message and the existing input message templates to the input message matching module according to a certain sequence for data matching, for example, matching according to the sequence from high priority to low priority of the existing input message templates; if the matching based on the priority is successful, the first server can interrupt the rest matching, and return the Mock message corresponding to the matching result of the current success, namely, the target message to the service consumer.
Specifically, the input message template is also called a matching template, for example, the first server may include an existing matching template 1 and an existing matching template 2, where a message field in the matching template 1 is "{" a ":1," c ": {" d ":4 }", and a message corresponding to the message field is: "{" msg ":" match template 1"}"; the message field in the matching template 2 is "{" a ":1," c ": {" d ":3 }", and the message corresponding to the message field is: "{" msg ":" match template 2 "}. The input message is ' a ' 1, ' b ' 2, ' c ' is'd ' 3 ', the first server matches the input message with the matching template 1 and the matching template 2 respectively, and the first server compares the input message with the matching template 1 to find that the values of c and d are not equal, so that the matching is unsuccessful; the first server matches the input message with the matching template 2, and all key-values of the template 2 are matched with the input message, so that the first server determines that the matching template 2 is the target input message template, and the Mock message "{" msg ":" matching template 2"}" in the matching template 2 can be used as the target message.
Through the embodiment, the first server can match the input message with each existing input message template according to the order of the priority of the existing input message templates, and takes the input message content in the existing input message template successfully matched for the first time as the target message, so that the message matching efficiency is improved.
In one embodiment, sequentially matching the input message with each existing input message template in the input message templates to be matched respectively includes: for each existing input message template, detecting whether the existing input message template contains a message field corresponding to the input message text segment and whether the message content of the message field is the input message content; if the message field of the existing input message template does not have the input message field, or the message content of the message field is not the input message content corresponding to the input message field, determining that the existing input message template is not matched with the input message.
In this embodiment, the input message includes an input message field and input message content corresponding to the input message field, where the input message field may be information for participating in matching, and the input message content may be message information returned after the matching passes. There may be a plurality of existing input message templates, and each existing input message template may include a message field and a message content, and may further include a corresponding message. For each existing input message Wen Moban, the first server may detect whether the existing message template includes a message field corresponding to the input message field, and if so, detect whether the message content of the message field is the input message content. If the first server detects that the message field corresponding to the input message field does not exist in the existing input message template, or detects that the corresponding message field exists, but the message content of the message field is not the input message content corresponding to the input message field, the first server can determine that the existing input message template is not matched with the input message. If the first server detects that the input message field is the input message field and the message content of the message field is the input message content corresponding to the input message field, determining that the input message template is matched with the input message to be simulated.
Specifically, the message content may be a field value, the first server may parse the received input message, compare the input message field and the input message content in the input message with the corresponding message field and field value in the existing input message template, if the field value of a certain field is inconsistent, the comparison is interrupted, the matching failure information is returned, and if all the input message text fields are consistent with the corresponding field comparison in the existing input message template, the matching success information is returned. For example, the input message may be "{" a ":1," b ":2," c ": {" d ":3 }", where a, b, and c are input message fields respectively, and 1, 2, { and 3 are input message contents corresponding to respective input message fields respectively, that is, the field values. If the message field in the matching template 1 is "{" a ":1," c ": {" d ":4 }", the message corresponding to the message field is: "{" msg ":" match template 1"}"; the message field in the matching template 2 is "{" a ":1," c ": {" d ":3 }", and the message corresponding to the message field is: "{" msg ":" match template 2 "}. The first server respectively matches the input message with the matching template 1 and the matching template 2, and the first server compares the input message with the matching template 1 to find that the values of c and d are not equal, so that the matching is unsuccessful; the first server matches the input message with the matching template 2, and if the field and the field value are found to be uniform, the first server indicates that the input message is matched with the matching template 2, and then the first server can take the message of the matching template 2 as the target message.
By the embodiment, the first server can match the input message with the input message template based on the message field and the corresponding message content, so that the message matching efficiency is improved.
In one embodiment, generating and storing an input message template corresponding to the simulated service class according to the target message, including: if the input message field is a preset field, generating a new input message template according to the input message field and the target message, and storing the new input message template as an existing input message template corresponding to the simulation service class.
In this embodiment, the first server may preset a preset field, where the preset field may be a field having an important meaning. The first server may obtain the address of at least one service provider from the target registry in a generalized calling manner when none of the existing input message templates can match with the input message Wen Pi, determine the IP port information of the target service provider from the IP port information of the at least one service provider, transmit the input message to the target service provider, and generate the target message by the target service provider based on the input message. When the first server obtains the target message returned by the target registration center, it can detect whether the input message field is the preset field. If yes, the first server may generate a new input message template according to the input message field and the target message, and store the new input message template as an existing input message template corresponding to the analog service class.
Specifically, the first server may configure a service keyword of the input message for each service method that needs to perform mock, for example, the input message may be "{" a ":0," b ":2," { "d":6} ", and then the first server may make a and d be service keywords. When the input message is not matched with the existing template, the target message is obtained through a service forwarding mode, the fields a and d of the current input message and the corresponding values of the fields a and d are stored as new templates, and the message in the templates is the target message. For example, for the input message "{" a ":0," b ":2," { "d":6} ", it is known that the input message is not matched with the matching template 1 and the matching template 2, and a and d are service keywords, the terminal may integrate the input message, and the input message field corresponding to the service keywords and the input message field matched with the matching template are integrated into the input message field in the new input message template, that is, integrated into" { "a":0, "c" { "d":6 }). The first server may obtain the target message corresponding to the input message through the generalization call, for example, the returned target message may be "{" msg ": forward return" }. The first server may generate a new input message template based on the input message "{" a ":0," c ": {" d ":6 }" and the target message "{" msg ": forward return" } ", and store the new input message template as an existing input message template, for example, the existing input message template includes a matching template 1 and a matching template 2, and after adding the new input message template, the new input message template may be used as a matching template 3.
According to the embodiment, the first server can combine the input message and the target message returned by the real target service provider into a new input message Wen Moban, so that the efficiency of input message matching can be improved.
In one embodiment, obtaining IP port information for a target service provider from a target registry includes: inquiring a target registry containing the service information to be simulated and the IP port information of the service provider of the method information to be simulated, and acquiring the address of the target registry; processing the parameter type into a character string array according to the separator in the parameter type of the input message, and converting the input message into an object array; initializing the configuration of the generalized service information based on the dubbo distributed service framework, packaging calling party information corresponding to the input message, the address of the target registration center and the service information to be simulated into the configuration of the generalized service information, and caching generalized service abstract classes in the configuration of the generalized service information; and subscribing the object array of the to-be-simulated method information, the character string array of the parameter type and the input message into a list containing IP port information of at least one service provider in the target registration center in a generalization calling mode through generalization service abstract classes.
In this embodiment, the first server may include a service forwarding module, and when forwarding the input packet to the target service provider, the first server may process the input packet through the service forwarding module. The method information corresponding to the service information may correspond to an address of a target registry, and the first server may query a database to obtain the address of the target registry including the IP port information of the service provider corresponding to the method information to be simulated, which may specifically be the address of the target registry. The input message may have a plurality of parameter types, each of the parameter types may be distinguished by a separator, and the first server may process the parameter type of the input message into a character string array according to the separator in the parameter type of the input message, and convert the input message into an object array. The first server may initialize a generalization service information configuration based on the dubbo distributed service framework, and encapsulate the caller information corresponding to the input message, the address of the target registry, and the service information to be simulated into the generalization service information configuration. The caller information may be information of the service consumer. The first server may also cache the generalization service abstract class in the generalization service information configuration, and subscribe the list including the IP port information of at least one service provider in the target registry of the to-be-simulated method information, the character string array of the parameter type and the object of the input message to the list including the IP port information of at least one service provider in a generalization calling manner through the generalization service abstract class, and determine the IP port information of the target service provider from the IP port information of at least one service provider corresponding to the target registry, so that the first server may implement forwarding of the input message based on the IP port information of the target service provider.
Specifically, the first server may determine that the input message needs to be forwarded to the target service provider for generalized call when the input message does not match all existing input message templates. The first server may transmit the forwarded target registry address, the input message, and the service method information to the service forwarding module, and store the target message returned by the target service provider after forwarding is completed. As shown in fig. 3, fig. 3 is a schematic flow chart of the forwarding step in one embodiment. The first server can judge whether the service name, the service version, the method name, the parameter entering type and the registry address of the to-be-simulated method information of the to-be-simulated service information are normal or not through the service forwarding module after receiving the address, the input message, the to-be-simulated service information and the to-be-simulated method information of the forwarded target registry, and if not, return prompt information of abnormal to-be-checked. The entry type may be a type of an input parameter in the method name, and the registry may be a module in the target registry. The parameter type may be a multi-parameter type, and the first server may process the parameters into a string array according to a preset separator, such as an english comma or other special characters, and remove the spaces before and after each parameter type. For example, the above-mentioned entry type may be "java. Land. String, java. Util. Map", and the converted string array is "[" java. Land. String "," java. Util. Map "]. In addition, the first server may also use a json framework, such as fastjson, to convert the string-type input message into an Object array type. The first server can also judge whether the input parameter type array is consistent with the length of the input message Object array, and can normally call the dubbo service when the input parameter type array is detected to be completely consistent with the length of the input message Object array, or else, the error information is directly returned. Wherein, each value in the array corresponding to the parameter entry type can be corresponding to each Object in the Object array corresponding to the input message; dubbo is a distributed service framework that is directed to providing a high performance and transparent RPC (Remote Procedure Call ) remote service invocation scheme with cores containing telecommunications, cluster fault tolerance, auto discovery.
The first server may also initialize the generalized service information configuration ReferenceConfig < GenericService >. As shown in fig. 4, fig. 4 is a flowchart illustrating a step of initializing the generalized service information configuration in one embodiment. The generic service is a generalized service abstract class provided by the dubbo framework, and is used to replace an actual service class, because the service forwarding module cannot contain interface files of all services, and therefore, the generic service class of the generic service is used to replace the actual service class. The first server may encapsulate the current caller application information into an application config and set the application config into an attribute of the ReferenceConfig, where the caller application information may declare attributes such as an application name, an organization, a version, and the like of the caller. The first server may also encapsulate the registry address configuration described above, with the address prefix being preceded by a registry protocol type, such as zookeeer://. If there are multiple registries, the first server may process the encapsulation steps separately and finally inject into the registries attribute of the ReferenceConfig. The first server may also set a service name and a service version of the refereenconfig, and declare, through setGeneric (true), that the refereenconfig uses a generalized call manner, so that the first server may use a protocol path of the generalized call when making an RPC service call by a $invoke method. In addition, the first server can also customize the rule of generating keys by using the above-mentioned referenceConfigCache (generalized service information configuration buffer), so as to avoid the problem that the referenceConfig acquired by the service name and the service version is the same in different registries. Wherein the format of the key may be: address/interface name: interface version.
After initializing the configuration of the generalization service information, the first server may obtain a GenericService object corresponding to the ReferenceConfig, that is, the generalization service abstract class, through the referenceconfigcche cache. The GenericService object may be an initialized object, and may be cached by a referenceconfigchache, so that the first server may maintain a long connection between the first server and a registry or a service provider through the GenericService object. Finally, the first server may send the method name, the parameter type array, and the input message Object array to the service forwarding module according to the target registry address and the target registry address, for example, according to the identifier and the port of the target registry, so that the first server may call the IP port information of the corresponding at least one service provider from the target registry, obtain the target message returned by the target service provider based on the IP port information of the target service provider determined from the IP port information of the at least one service provider. The first server can judge the validity of the target message obtained based on the generalized call, if the target message is normally obtained, the first server carries out message type conversion according to the parameter type in the method information, and packages and returns the message type conversion to the Mock receiving module; if the target message throws out accidents such as abnormality, the first server can package the abnormality information and return the abnormality information to the Mock receiving module.
According to the embodiment, the first server can process the data such as the service information to be simulated, the method information to be simulated and the input message based on the service forwarding module, and then send the processed data to the target service provider corresponding to the target registry to perform generalized call to obtain the target message matched with the input message. The efficiency of message matching is improved.
In one embodiment, as shown in fig. 5, fig. 5 is a flow chart of the matching step in one embodiment. Obtaining the target message returned by the target service provider, including:
step S302, obtaining IP port information of at least one service provider including service information to be simulated from IP port information of service providers registered in the target registry, and at least one candidate method information corresponding to the service information to be simulated in each service provider.
The service information to be simulated can be related information of the service to be called, the service information to be simulated comprises at least one method information to be simulated, the method information to be simulated can be information of a method in the service corresponding to the service information to be simulated, and the method information to be simulated comprises a corresponding input message.
The target registry contains IP port information of at least one service provider, which may be the party to whom the service is invoked and may be embodied in the form of a server. The target registry may acquire, from the service providers registered in the registry and in a state of being registered, IP port information of at least one service provider including the service information to be simulated, and at least one candidate method information corresponding to the service information in the IP port information of each service provider. Wherein each service provider may include a corresponding service, and each service may correspond to at least one method information.
Step S304, determining target IP port information of a target service provider from IP port information of at least one service provider, calling the target service provider according to the target IP port information, acquiring at least one target method information corresponding to the method information to be simulated in at least one candidate method information by the target service provider, and determining and returning a target message according to the input message and the at least one target method information.
The first server may acquire at least one target method information corresponding to the method information to be simulated from the at least one candidate method information acquired from the target service provider based on the IP port information of the target service provider corresponding to the target registry. The target method information may be a method consistent with the method information to be simulated, for example, a method name consistent with both methods, and the like. The first server can process the input message according to the target method information based on the target IP port information of the target service provider corresponding to the target registration center.
The first server may forward the input message to the IP port information of the target service provider corresponding to the target registry, where the target service provider processes the input message to obtain a corresponding target message and returns the corresponding target message to the first server. The first server may return a simulation result of the service simulation request to the service consumer according to the target message. For example, after the registration center is matched, the target message is "{" msg ":" forward return "}", and then the first server can obtain a simulation result based on the target message.
According to the data acquisition method for the service simulation, when the input messages are not matched, the generalized calling mode is adopted to obtain the target message from the target service provider corresponding to the registration center based on the input message, so that the efficiency of message matching is improved.
In one embodiment, as shown in fig. 6, fig. 6 is a flow chart of a data collection method for service simulation in another embodiment. In this embodiment, the method may be applied to a system as shown in fig. 7, and fig. 7 is a schematic structural diagram of a message matching system in one embodiment. The system comprises a first server, wherein the first server comprises a Mock receiving module, a service forwarding module, an input message matching module, a Mock configuration module and the like. The method comprises the steps that a Mock receiving module can be used for receiving a call request of a service consumer, the call request comprises a Mock method and the like, a Mock message is returned to the service consumer, and a service forwarding module can be used for transmitting a target registry address, an input message and service information to IP port information of a target service provider in a registry when templates are not matched, and the target service provider returns a simulation result containing the target message; the input message matching module can be used for matching the input message with the existing input message template; the Mock configuration module can be used for inquiring the Mock configuration, storing new templates, mock messages and the like, and storing the new templates, the Mock messages and the like in a database.
Specifically, the first server may receive a Mock request, receive an input message corresponding to the method to be simulated, and check the integrity of the message, where an information error is directly returned to the error. After the detection is passed, the first server can search all existing input message modules belonging to the method in the database, and transmit the input message and the input message template to the input message matching module for data matching according to the order of priority; if a certain matching is successful, the rest matching is interrupted, and the Mock message corresponding to the current successful matching result is returned.
If all the existing input message templates are not matched, the first server can query the target registry address of the method to be simulated in the database and transmit the target registry address, the input message and the service method information to the service forwarding module, so that the target registry can be determined by the input message and the service method information, and the target message returned by the target service provider corresponding to the target registry can be acquired based on generalized call. If the first server receives the target message returned by the target service provider, the first server indicates that the generalized call is successful, at this time, the first server can query whether the input message has a service keyword, acquire a value corresponding to the service keyword in the input message, combine the target message to form a new input message template, store the new input message template in a database, and the first server can return the target message to the service consumer who initiates the call request. If the target message is not received, the failure of the generalization call is indicated, and the first server can receive the information of the failure of the generalization call.
Through the embodiment, the target message returned by the target service provider corresponding to the registration center based on the input message is acquired by adopting the generalized calling mode when the input message is not matched, so that the message matching efficiency is improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a data acquisition device for realizing the service simulation of the data acquisition method of the service simulation. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the data acquisition device for service simulation provided below may be referred to the limitation of the data acquisition method for service simulation hereinabove, and will not be repeated here.
In one embodiment, as shown in fig. 8, there is provided a data acquisition device for service simulation, including: a first receiving module 500, a determining module 502, a forwarding module 504, a first matching module 506, and a returning module 508, wherein:
a first receiving module 500, configured to receive a service simulation request of a service consumer; the service simulation request comprises service information to be simulated, method information to be simulated corresponding to the service information to be simulated and an input message corresponding to the method information to be simulated.
The determining module 502 is configured to obtain a simulation service class corresponding to the service information to be simulated in the first server, determine at least one existing input message template corresponding to the method information to be simulated from existing input message templates corresponding to the simulation service class, and match the input message with the at least one existing input message template.
A forwarding module 504, configured to obtain, from the target registry, IP port information of the target service provider if there is no existing input message Wen Moban matching the input message; the IP port information of at least one service provider of the service corresponding to the method information to be simulated is registered in the target registration center in advance, and the service corresponding to the method information to be simulated comprises an input message template matched with the input message.
A first matching module 506, configured to invoke the target service provider based on the IP port information of the target service provider, and obtain a target message returned by the target service provider; the target service provider is used for determining a corresponding target message based on the input message.
And the return module 508 is used for generating and storing an input message template corresponding to the simulated service class according to the target message, and returning a simulation result of the service simulation request to the service consumer.
In one embodiment, the determining module 502 is specifically configured to sort the plurality of existing input message templates according to the order of the priority of each existing input message template from high to low, so as to obtain an input message template sequence to be matched; and sequentially matching the input message with each existing input message template in the input message template sequence to be matched.
In one embodiment, the determining module 502 is specifically configured to detect, for each existing input message template, whether the existing input message template includes a message field corresponding to an input message field and whether a message content of the message field is an input message content; if the message field of the existing input message template does not have the input message field, or the message content of the message field is not the input message content corresponding to the input message field, determining that the existing input message template is not matched with the input message.
In one embodiment, the return module 508 is specifically configured to generate a new input message template according to the input message field and the target message if the input message field is a preset field, and store the new input message template as an existing input message template corresponding to the analog service class.
In one embodiment, the determining module 502 is specifically configured to obtain, as the target existing input message Wen Moban, the first existing input message Wen Moban in the input message template sequence to be matched that matches the input message if there is an existing input message Wen Moban in the input message template sequence to be matched that matches the input message; and taking the message corresponding to the input message in the target existing input message template as a target message for responding to the service simulation request.
In one embodiment, the forwarding module 504 is specifically configured to query a target registry of IP port information of a service provider including service information to be simulated and method information to be simulated, and obtain an address of the target registry; processing the parameter type into a character string array according to the separator in the parameter type of the input message, and converting the input message into an object array; initializing the configuration of the generalized service information based on the dubbo distributed service framework, packaging calling party information corresponding to the input message, the address of the target registration center and the service information to be simulated into the configuration of the generalized service information, and caching generalized service abstract classes in the configuration of the generalized service information; subscribing the object array of the to-be-simulated method information, the character string array of the parameter type and the input message into a list containing IP port information of at least one service provider in a target registration center in a generalization calling mode through a generalization service abstract class; IP port information of the target service provider is determined from the list.
In one embodiment, the first matching module 506 includes: a first acquisition module 602 and a second matching module 604, wherein:
the first obtaining module 602 is configured to obtain, from the IP port information of the service provider registered to the target registry, the IP port information of at least one service provider including the service information to be simulated, and at least one candidate method information corresponding to the service information to be simulated in each service provider.
And the second matching module 604 is configured to determine target IP port information of the target service provider from the IP port information of the at least one service provider, call the target service provider according to the target IP port information, obtain at least one target method information corresponding to the method information to be simulated in the at least one candidate method information by the target service provider, and determine and return a target message according to the input message and the at least one target method information.
The modules in the data acquisition device for service simulation can be all or partially realized by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
It should be noted that, the method and the device determined in the present disclosure may be used for data acquisition of service simulation in a distributed service in a financial field, and may also be used for data acquisition of service simulation in any field other than the financial field, where the application field of the method and the device for data acquisition of service simulation in the present disclosure is not limited.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 10. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer equipment is used for storing data such as input message templates. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a data acquisition method for service simulation.
It will be appreciated by those skilled in the art that the structure shown in fig. 10 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided that includes a memory having a computer program stored therein and a processor that implements the data collection method of service simulation described above when the computer program is executed.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, implements the data acquisition method of service simulation described above.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, implements the data acquisition method of service simulation described above.
It should be noted that, user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (11)

1. A data collection method for service simulation, applied to a first server, the method comprising:
receiving a service simulation request of a service consumer; the service simulation request comprises service information to be simulated, method information to be simulated corresponding to the service information to be simulated and an input message corresponding to the method information to be simulated;
obtaining a simulation service class corresponding to the service information to be simulated in the first server, determining at least one existing input message template corresponding to the method information to be simulated from existing input message templates corresponding to the simulation service class, and matching the input message with the at least one existing input message template;
If no existing input message Wen Moban matched with the input message exists, acquiring IP port information of a target service provider from a target registry; the target registration center is pre-registered with IP port information of at least one service provider of the service corresponding to the method information to be simulated, and the service corresponding to the method information to be simulated comprises an input message Wen Moban matched with the input message;
calling the target service provider based on the IP port information of the target service provider, and acquiring a target message returned by the target service provider; the target service provider is used for determining a corresponding target message based on the input message;
and generating and storing an input message template corresponding to the simulation service class according to the target message, and returning a simulation result of the service simulation request to the service consumer.
2. The method of claim 1, wherein there are a plurality of existing input message templates corresponding to the method information to be simulated; said matching said input message with said at least one existing input message template comprises:
sequencing a plurality of existing input message templates according to the order of the priority of each existing input message template from high to low to obtain an input message template sequence to be matched;
And respectively carrying out sequential matching on the input message and each existing input message template in the input message template sequence to be matched.
3. The method according to claim 2, wherein the input message includes an input message field and input message content corresponding to the input message field, and the sequentially matching the input message with each existing input message template in the input message templates to be matched includes:
for each existing input message template, detecting whether the existing input message template contains a message field corresponding to the input message text segment and whether the message content of the message field is the input message content;
if the message field of the existing input message template does not have the input message field, or the message content of the message field is not the input message content corresponding to the input message field, determining that the existing input message template is not matched with the input message.
4. The method of claim 3, wherein generating and storing the input message template corresponding to the simulated service class according to the target message comprises:
And if the input message field is a preset field, generating a new input message template according to the input message field and the target message, and storing the new input message template as an existing input message template corresponding to the simulation service class.
5. The method of claim 2, further comprising, after said matching said input message with said at least one existing input message template:
if the input message template sequence to be matched has an existing input message Wen Moban matched with the input message, acquiring an existing input message Wen Moban matched with the input message in the first input message template sequence to be matched as a target existing input message Wen Moban;
and taking a message corresponding to the input message in the target existing input message template as a target message for responding to the service simulation request.
6. The method of claim 1, wherein the obtaining IP port information of the target service provider from the target registry comprises:
inquiring a target registry containing the service information to be simulated and the IP port information of the service provider of the method information to be simulated, and acquiring an address of the target registry;
Processing the parameter type into a character string array according to the separator in the parameter type of the input message, and converting the input message into an object array;
initializing a generalized service information configuration based on a dubbo distributed service framework, packaging calling party information corresponding to the input message, the address of the target registry and the service information to be simulated into the generalized service information configuration, and caching generalized service abstract classes in the generalized service information configuration;
subscribing a list containing IP port information of at least one service provider in the target registry according to the information of the method to be simulated, the character string array of the parameter type and the object array of the input message in a generalization calling mode through the generalization service abstract class;
and determining IP port information of the target service provider from the list.
7. The method of claim 1, wherein the obtaining the target message returned by the target service provider comprises:
acquiring IP port information of at least one service provider containing the service information to be simulated from the IP port information of the service provider registered to the target registration center, and at least one candidate method information corresponding to the service information to be simulated in each service provider;
Determining target IP port information of a target service provider from the IP port information of the at least one service provider, calling the target service provider according to the target IP port information, acquiring at least one target method information corresponding to the method information to be simulated in the at least one candidate method information by the target service provider, and determining and returning a target message according to the input message and the at least one target method information.
8. A data acquisition device for service simulation, applied to a first server, the device comprising:
the first receiving module is used for receiving a service simulation request of a service consumer; the service simulation request comprises service information to be simulated, method information to be simulated corresponding to the service information to be simulated and an input message corresponding to the method information to be simulated;
the determining module is used for obtaining the simulation service class corresponding to the service information to be simulated in the first server, determining at least one existing input message template corresponding to the method information to be simulated from the existing input message templates corresponding to the simulation service class, and matching the input message with the at least one existing input message template;
A forwarding module, configured to obtain IP port information of a target service provider from a target registry if there is no existing input message Wen Moban matching the input message; the target registration center is pre-registered with IP port information of at least one service provider of the service corresponding to the method information to be simulated, and the service corresponding to the method information to be simulated comprises an input message Wen Moban matched with the input message;
the first matching module is used for calling the target service provider based on the IP port information of the target service provider and acquiring a target message returned by the target service provider; the target service provider is used for determining a corresponding target message based on the input message;
and the return module is used for generating and storing an input message template corresponding to the simulation service class according to the target message, and returning a simulation result of the service simulation request to the service consumer.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202211412132.6A 2022-11-11 2022-11-11 Data acquisition method, device, computer equipment and storage medium for service simulation Pending CN115996251A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211412132.6A CN115996251A (en) 2022-11-11 2022-11-11 Data acquisition method, device, computer equipment and storage medium for service simulation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211412132.6A CN115996251A (en) 2022-11-11 2022-11-11 Data acquisition method, device, computer equipment and storage medium for service simulation

Publications (1)

Publication Number Publication Date
CN115996251A true CN115996251A (en) 2023-04-21

Family

ID=85989496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211412132.6A Pending CN115996251A (en) 2022-11-11 2022-11-11 Data acquisition method, device, computer equipment and storage medium for service simulation

Country Status (1)

Country Link
CN (1) CN115996251A (en)

Similar Documents

Publication Publication Date Title
CN109635019B (en) Request processing method, device, equipment and storage medium
CN110058864B (en) Micro-service deployment method and device
WO2018184535A1 (en) Insurance service processing method and device, server, and storage medium
CN111708619B (en) Distributed transaction processing method and system based on message queue and database
EP3974960B1 (en) Method and system for automated testing of web service apis
CN111858083A (en) Remote service calling method and device, electronic equipment and storage medium
US7289989B2 (en) Pattern based web services
CN111953662A (en) Data processing method, device and system and storage medium
CN115996251A (en) Data acquisition method, device, computer equipment and storage medium for service simulation
CN111224981A (en) Data processing method and device, electronic equipment and storage medium
CN111985186A (en) Dictionary entry conversion method, API gateway system, equipment and storage medium
CN115730016B (en) Data synchronization method, system, device, computer equipment and storage medium
CN118400433A (en) Message processing method, device, computer equipment, readable storage medium and product
CN116016668A (en) Data access request processing method and device
CN116647468A (en) Registration center configuration method, registration center configuration device, computer equipment and storage medium
CN116679976A (en) Request processing method, system, computer device, storage medium, and program product
CN117014441A (en) Service providing method, system, computer device and storage medium for core network
CN116366724A (en) Business process processing method, device, computer equipment and storage medium
CN117234951A (en) Function test method and device of application system, computer equipment and storage medium
CN117155661A (en) Risk log data pushing method, apparatus, computer device and storage medium
CN116049504A (en) Information query method, system, device, computer equipment and storage medium
CN117742842A (en) Request processing method, apparatus, computer device and storage medium
CN116436989A (en) Message conversion method, device, equipment and storage medium
CN118214613A (en) Cross-network application calling method, device, equipment and storage medium
CN116708559A (en) Distributed service calling method, device, system, computer equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination