CN109032952B - Rule-based intelligent outbound service simulation method and system - Google Patents

Rule-based intelligent outbound service simulation method and system Download PDF

Info

Publication number
CN109032952B
CN109032952B CN201810902388.2A CN201810902388A CN109032952B CN 109032952 B CN109032952 B CN 109032952B CN 201810902388 A CN201810902388 A CN 201810902388A CN 109032952 B CN109032952 B CN 109032952B
Authority
CN
China
Prior art keywords
service
rule
message
request message
value
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.)
Active
Application number
CN201810902388.2A
Other languages
Chinese (zh)
Other versions
CN109032952A (en
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN201810902388.2A priority Critical patent/CN109032952B/en
Publication of CN109032952A publication Critical patent/CN109032952A/en
Application granted granted Critical
Publication of CN109032952B publication Critical patent/CN109032952B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3612Software analysis for verifying properties of programs by runtime analysis

Abstract

The application discloses an intelligent outbound service simulation method and system based on rules, wherein the method comprises the following steps: analyzing the received request message sent by the application subsystem to generate an analysis result, wherein the analysis result comprises a request message service number, generating a rule value based on the request message service number, and returning a response message based on the request message service number and the rule value. The method and the system can receive and analyze the request message sent by the subsystem and return the response message by simulating the service of the external system, so that the service and the data can be available and controllable at any time, and the problem that the external system can not provide the service in time in the prior art is solved.

Description

Rule-based intelligent outbound service simulation method and system
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and a system for simulating an intelligent outbound service based on rules.
Background
In a large software system, there are often multiple subsystems and multiple development teams, each responsible for one subsystem. Because each subsystem needs to interact and coordinate to complete the work of the whole large system together, some subsystems need to provide services for other subsystems, and other subsystems obtain the services in an outbound mode. The outbound mode is generally to send a request message, receive a response message and analyze. In the unit testing stage or the automated regression testing stage of a certain subsystem development group, due to unstable functions and data of external subsystems, the situation that services or data cannot be obtained when testing is desired often occurs, and great inconvenience is brought to development and testing work.
Disclosure of Invention
In view of the above, the present application provides a rule-based intelligent outbound service simulation method, which can receive and analyze a request message sent by a subsystem by simulating a service of an external system, and return a response message, so that the service and data are available and controllable at any time, and the problem that the external system in the prior art cannot provide the service in time is solved.
The application provides an intelligent outbound service simulation method based on rules, which comprises the following steps:
analyzing a received request message sent by an application subsystem to generate an analysis result, wherein the analysis result comprises a request message service number;
generating a rule value based on the request message service number;
and returning a response message based on the request message service number and the rule value.
Preferably, the generating a rule value based on the request packet service number includes:
inquiring a corresponding rule formula in a pre-generated rule base based on the request message service number;
sequentially retrieving corresponding application fields in the request message based on the rule formula;
and extracting the value in the application field, and adding the value into the parameter corresponding to the rule formula to generate a rule value.
Preferably, the returning a response packet based on the request packet service number and the rule value includes:
generating a unique index of a service library based on the request message service number and the rule value;
retrieving a unique service record in a pre-generated service library based on the index;
extracting a service response message of the service record;
and adding message header information in the service response message and returning a response message.
Preferably, the method further comprises:
obtaining the access address of the service in the addressing service through the request message service code;
forwarding the current service to the corresponding subsystem through the access address;
judging whether the subsystem returns a response message of a correct mode, if not, automatically generating a service message;
extracting analysis information of the service message, obtaining a service number of the service message, searching in a rule base according to the service number of the service message, judging whether the number of search records is 0, if so, generating a default rule formula, and adding the service number of the service message and the default rule formula to the rule base, and if not, then:
analyzing a rule value through a rule formula;
and adding the service number, the rule value and the corresponding response message of the service message into a service library.
Preferably, after the subsystem returns a response message in a correct mode, the analysis information of the request message is extracted to obtain the service number of the request message, the service number of the request message is searched in a rule base, whether the number of search records is 0 is judged, if yes, a default rule formula is generated, the service number of the request message and the default rule formula are added to the rule base, and if not, the method comprises the following steps:
analyzing a rule value through a rule formula;
and adding the service number, the rule value and the corresponding response message of the request message into a service library.
A rule-based intelligent outbound service simulation system comprising:
the request message analysis module is used for analyzing the received request message sent by the application subsystem to generate an analysis result, and the analysis result comprises a request message service number;
the rule analysis module is used for generating a rule value based on the request message service number;
and the service assembly module is used for returning a response message based on the request message service number and the rule value.
Preferably, the rule parsing module includes:
the query unit is used for querying a corresponding rule formula in a pre-generated rule base based on the request message service number;
the first retrieval unit is used for sequentially retrieving the corresponding application fields in the request message based on the rule formula;
and the first generating unit is used for extracting the value in the application field, adding the value into the parameter corresponding to the rule formula and generating a rule value.
Preferably, the service assembly module is configured to:
a second generating unit, configured to generate a unique index of a service library based on the request packet service number and the rule value;
the second retrieval unit is used for retrieving only one service record in a service library generated in advance based on the index;
the extracting unit is used for extracting the service response message of the service record;
and the return unit is used for adding message header information in the service response message and returning the response message.
Preferably, the system further comprises:
the real service addressing module is used for acquiring the access address of the service in the addressing service through the request message service code;
the message forwarding and analyzing module is used for forwarding the current service to the corresponding subsystem through the access address and judging whether the subsystem returns a response message in a correct mode;
the intelligent message generating module is used for automatically generating a service message when the subsystem does not return a response message in a correct mode;
a service preservation module to:
extracting analysis information of the service message, obtaining a service number of the service message, searching in a rule base according to the service number of the service message, judging whether the number of search records is 0, if so, generating a default rule formula, and adding the service number of the service message and the default rule formula to the rule base, and if not, then:
analyzing a rule value through a rule formula;
and adding the service number, the rule value and the corresponding response message of the service message into a service library.
Preferably, the service saving module is further configured to:
when the subsystem returns a response message in a correct mode, extracting analysis information of the request message, obtaining a service number of the request message, searching in a rule base through the service number of the request message, judging whether the number of search records is 0, if so, generating a default rule formula, and adding the service number of the request message and the default rule formula to the rule base, and if not,:
analyzing a rule value through a rule formula;
and adding the service number, the rule value and the corresponding response message of the request message into a service library.
In summary, the present application discloses a rule-based intelligent outbound service simulation method, which includes analyzing a received request message sent by an application subsystem to generate an analysis result, where the analysis result includes a request message service number; and then generating a rule value based on the request message service number, and then returning a response message based on the request message service number and the rule value. The method and the system can receive and analyze the request message sent by the subsystem and return the response message by simulating the service of the external system, so that the service and the data can be available and controllable at any time, and the problem that the external system can not provide the service in time in the prior art is solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an embodiment 1 of a rule-based intelligent outbound service simulation method disclosed in the present application;
fig. 2 is a flowchart of an embodiment 2 of a rule-based intelligent outbound service simulation method disclosed in the present application;
fig. 3 is a flowchart of an embodiment 3 of a rule-based intelligent outbound service simulation method disclosed in the present application;
fig. 4 is a schematic structural diagram of an embodiment 1 of a rule-based intelligent outbound service simulation system disclosed in the present application;
fig. 5 is a schematic structural diagram of an embodiment 2 of a rule-based intelligent outbound service simulation system disclosed in the present application;
fig. 6 is a schematic structural diagram of an embodiment 3 of the rule-based intelligent outbound service simulation system disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As shown in fig. 1, which is a flowchart of an embodiment 1 of the rule-based intelligent outbound service simulation method disclosed in the present application, the method may include the following steps:
s101, analyzing a received request message sent by an application subsystem to generate an analysis result, wherein the analysis result comprises a request message service number;
when intelligent outbound service simulation needs to be realized based on rules, an XML (Extensible Markup Language) request message sent by an application subsystem is received first, and then the received request message is analyzed, wherein the analyzed key information comprises a request message service number, a message length, names of all application fields of the message, and values of all application fields of the message. The following is illustrated by way of example:
Figure BDA0001759749340000061
for the above XML request message fragment, the Service number Service1 is analyzed, the message length is 100, the application field names are Filed1, Filed2 and Filed3, and the corresponding values are Data1, Data2 and Data3, respectively.
S102, generating a rule value based on the request message service number;
defining in a parameterized manner how to convert a rule formula into a rule value, the rule formula being as follows:
#{Field1}-#{Field2}-#{Field3}…-#{Fieldn}
wherein Field is the name of the application Field in the request message, and the program will analyze the corresponding rule value according to the formula.
The rule base mainly stores a rule analysis formula of each service, and key information of the rule base is a service number and the rule analysis formula, wherein each service number is unique in the rule base.
S103, returning a response message based on the request message service number and the rule value.
The service library mainly stores the information of each service, wherein the information comprises a service number, service description information, a service rule value and a service response message. And finally, returning a response message according to the service number and the rule value of the request message.
In summary, in the above embodiment, a received request message sent by an application subsystem is first analyzed to generate an analysis result, where the analysis result includes a request message service number; and then generating a rule value based on the request message service number, and then returning a response message based on the request message service number and the rule value. The method and the system can receive and analyze the request message sent by the subsystem and return the response message by simulating the service of the external system, so that the service and the data can be available and controllable at any time, and the problem that the external system can not provide the service in time in the prior art is solved.
As shown in fig. 2, which is a flowchart of embodiment 2 of the rule-based intelligent outbound service simulation method disclosed in the present application, the method may include the following steps:
s201, analyzing the received request message sent by the application subsystem to generate an analysis result, wherein the analysis result comprises a service number of the request message;
s202, inquiring a corresponding rule formula in a pre-generated rule base based on the request message service number;
after the request message is analyzed, the request message service number transmitted by the request message analyzing module is received, and then the corresponding rule formula is inquired in the rule base according to the request message service number. The rule base mainly stores a rule analysis formula of each service, and key information of the rule base is a service number and the rule analysis formula, wherein each service number is unique in the rule base.
S203, sequentially retrieving corresponding application fields in the request message based on a rule formula;
and after the rule formula is inquired, sequentially searching the corresponding application fields in the request message according to the rule formula.
S204, extracting the value in the application field, adding the value into the parameter corresponding to the rule formula, and generating a rule value;
s205, generating a unique index of the service library based on the service number of the request message and the rule value;
the service library mainly stores the information of each service, wherein the information comprises a service number, service description information, a service rule value and a service response message. Then, receiving the rule value and the request message service number analyzed by the rule analysis module, and generating a unique index of the service library according to the request message service number and the rule value.
S206, retrieving a unique service record in a pre-generated service library based on the index;
s207, extracting a service response message of the service record;
and S208, adding message header information in the service response message, and returning the response message.
In summary, in the above embodiment, a received request message sent by an application subsystem is first analyzed to generate an analysis result, where the analysis result includes a request message service number; then inquiring a corresponding rule formula in a pre-generated rule base based on the service number of the request message, sequentially searching corresponding application fields in the request message based on the rule formula, extracting values in the application fields, adding the values to parameters corresponding to the rule formula, generating rule values, generating a unique index of the service base based on the service number of the request message and the rule values, searching a unique service record in the pre-generated service base based on the index, extracting a service response message of the service record, adding message header information in the service response message, and returning the response message. The method and the system can receive and analyze the request message sent by the subsystem and return the response message by simulating the service of the external system, so that the service and the data can be available and controllable at any time, and the problem that the external system can not provide the service in time in the prior art is solved.
On the basis of the above embodiment 1 and embodiment 2, a large amount of work of manually maintaining the rule base and the service base may be further reduced by a self-learning mode of the service, and a specific implementation manner is as shown in fig. 3, and may include the following steps:
s301, obtaining an access address of the service in an addressing service through a request message service code;
when the work of manually maintaining the rule base and the service base needs to be reduced through a self-learning mode, a request message sent by an application subsystem is firstly analyzed, and a service code, a rule analysis formula and a rule value are obtained. Searching according to the service code in the rule base, if the number of the searched records is 1, searching according to the service code and the rule value in the service base, if the number of the searched records is 1, repeating the process described in the above embodiment 1 or embodiment 2, if the number of the searched records is 0, and obtaining the access address of the service in the addressing service by requesting the message service code.
S302, forwarding the current service to a corresponding subsystem through the access address;
s303, judging whether the subsystem returns a response message of a correct mode, if not, entering S304-S308, otherwise, entering S309-S312:
s304, automatically generating a service message;
and when the subsystem does not return a response message in a correct mode, automatically generating a service message through the message intelligent generation module.
S305, extracting the analysis information of the service message, obtaining the service number of the service message, searching in a rule base through the service number of the service message, judging whether the number of the search records is 0, if not, entering S306, and if so, entering S307:
s306, when the number of the search records is 1, generating a default rule formula, and adding the service number of the service message and the default rule formula to a rule base;
s307, analyzing a rule value through a rule formula;
when the number of the search records is 0, the rule value is analyzed through a rule formula.
S308, adding the service number, the rule value and the corresponding response message of the service message into a service library;
s309, extracting the analysis information of the request message, obtaining the service number of the request message, searching in a rule base through the service number of the request message, judging whether the number of the search records is 0, if so, entering S310, and if not, entering S311:
when the subsystem returns a response message with a correct mode, the analysis information of the request message is extracted, the service number of the request message is obtained, the service number of the request message is searched in a rule base, and whether the number of the search records is 0 or not is judged.
S310, generating a default rule formula, and adding the service number of the request message and the default rule formula to a rule base;
s311, analyzing a rule value through a rule formula;
when the number of the search records is 1, the rule value is analyzed through a rule formula.
S312, adding the service number, the rule value and the corresponding response message of the request message into a service library.
In summary, in the self-learning process, the main function is to analyze the messages obtained in the interaction and automatically add the service records to the service library through the interaction with the real environment. And under the condition that the message cannot be obtained in a real environment, the message intelligent generation module automatically generates a service response message through message interface description information provided by the message interface query service. Real service addressing finds the address corresponding to the service by addressing services, each of which needs to register its access address with the addressing service. And the message forwarding and analyzing module forwards the service request to an external subsystem, receives a message returned by the real environment and analyzes the message. A service is provided by one of the external subsystems, and a subsystem address corresponding to the service is obtained by the addressing service.
The intelligent message generation module mainly uses the service number as a parameter to send a query request to the message interface query service, the message interface query service returns message interface description information in a JSON data format, the message interface description information comprises a message structure, a message header format, a message field and a message field definition description, and the message forwarding and analyzing module analyzes JSON data to automatically generate a response message after receiving the return information.
The service storage module receives the service message provided by the message forwarding and analyzing module or the message intelligent generating module, extracts the analysis information of the request message, including the service number, the rule analyzing formula and the rule value corresponding to the rule analyzing formula, and inserts the information and the corresponding response message information into the rule base and the service base, thereby reducing a large amount of work of receiving and maintaining the rule base and the service base.
As shown in fig. 4, a schematic structural diagram of an embodiment 1 of the rule-based intelligent outbound service simulation system disclosed in the present application is shown, where the system may include:
a request message parsing module 401, configured to parse a received request message sent by an application subsystem, and generate a parsing result, where the parsing result includes a request message service number;
when intelligent outbound service simulation needs to be realized based on rules, an XML (Extensible Markup Language) request message sent by an application subsystem is received first, and then the received request message is analyzed, wherein the analyzed key information comprises a request message service number, a message length, names of all application fields of the message, and values of all application fields of the message. The following is illustrated by way of example:
Figure BDA0001759749340000101
Figure BDA0001759749340000111
for the above XML request message fragment, the Service number Service1 is analyzed, the message length is 100, the application field names are Filed1, Filed2 and Filed3, and the corresponding values are Data1, Data2 and Data3, respectively.
A rule parsing module 402, configured to generate a rule value based on the request packet service number;
defining in a parameterized manner how to convert a rule formula into a rule value, the rule formula being as follows:
#{Field1}-#{Field2}-#{Field3}…-#{Fieldn}
wherein Field is the name of the application Field in the request message, and the program will analyze the corresponding rule value according to the formula.
The rule base mainly stores a rule analysis formula of each service, and key information of the rule base is a service number and the rule analysis formula, wherein each service number is unique in the rule base.
A service assembling module 403, configured to return a response message based on the request message service number and the rule value.
The service library mainly stores the information of each service, wherein the information comprises a service number, service description information, a service rule value and a service response message. And finally, returning a response message according to the service number and the rule value of the request message.
In summary, in the above embodiment, a received request message sent by an application subsystem is first analyzed to generate an analysis result, where the analysis result includes a request message service number; and then generating a rule value based on the request message service number, and then returning a response message based on the request message service number and the rule value. The method and the system can receive and analyze the request message sent by the subsystem and return the response message by simulating the service of the external system, so that the service and the data can be available and controllable at any time, and the problem that the external system can not provide the service in time in the prior art is solved.
As shown in fig. 5, which is a schematic structural diagram of an embodiment 2 of the rule-based intelligent outbound service simulation system disclosed in the present application, the system may include:
a request message parsing module 501, configured to parse a received request message sent by an application subsystem, and generate a parsing result, where the parsing result includes a request message service number;
a query unit 502, configured to query a corresponding rule formula in a pre-generated rule base based on the request message service number;
after the request message is analyzed, the request message service number transmitted by the request message analyzing module is received, and then the corresponding rule formula is inquired in the rule base according to the request message service number. The rule base mainly stores a rule analysis formula of each service, and key information of the rule base is a service number and the rule analysis formula, wherein each service number is unique in the rule base.
A first retrieving unit 503, configured to sequentially retrieve corresponding application fields in the request packet based on a rule formula;
and after the rule formula is inquired, sequentially searching the corresponding application fields in the request message according to the rule formula.
A first generating unit 504, configured to extract a value in the application field, add the value to a parameter corresponding to the rule formula, and generate a rule value;
a second generating unit 505, configured to generate a unique index of the service library based on the request message service number and the rule value;
the service library mainly stores the information of each service, wherein the information comprises a service number, service description information, a service rule value and a service response message. Then, receiving the rule value and the request message service number analyzed by the rule analysis module, and generating a unique index of the service library according to the request message service number and the rule value.
A second retrieving unit 506, configured to retrieve a unique service record in a pre-generated service library based on the index;
an extracting unit 507, configured to extract a service response packet of the service record;
a returning unit 508, configured to add header information to the service response packet, and return the response packet.
In summary, in the above embodiment, a received request message sent by an application subsystem is first analyzed to generate an analysis result, where the analysis result includes a request message service number; then inquiring a corresponding rule formula in a pre-generated rule base based on the service number of the request message, sequentially searching corresponding application fields in the request message based on the rule formula, extracting values in the application fields, adding the values to parameters corresponding to the rule formula, generating rule values, generating a unique index of the service base based on the service number of the request message and the rule values, searching a unique service record in the pre-generated service base based on the index, extracting a service response message of the service record, adding message header information in the service response message, and returning the response message. The method and the system can receive and analyze the request message sent by the subsystem and return the response message by simulating the service of the external system, so that the service and the data can be available and controllable at any time, and the problem that the external system can not provide the service in time in the prior art is solved.
On the basis of the system embodiment 1 and the system embodiment 2, a large amount of work of manually maintaining the rule base and the service base may be further reduced through a self-learning mode of the service, and a specific implementation manner is as shown in fig. 6, and may include:
the real service addressing module 601 is configured to obtain an access address of the service in the addressing service through the request packet service code;
when the work of manually maintaining the rule base and the service base needs to be reduced through a self-learning mode, a request message sent by an application subsystem is firstly analyzed, and a service code, a rule analysis formula and a rule value are obtained. Searching according to the service code in the rule base, if the number of the searched records is 1, searching according to the service code and the rule value in the service base, if the number of the searched records is 1, repeating the process described in the above embodiment 1 or embodiment 2, if the number of the searched records is 0, and obtaining the access address of the service in the addressing service by requesting the message service code.
A message forwarding and parsing module 602, configured to forward the current service to a corresponding subsystem through an access address, and determine whether the subsystem returns a response message in a correct mode;
a message intelligent generation module 603, configured to automatically generate a service message when the subsystem does not return a response message in a correct mode;
and when the subsystem does not return a response message in a correct mode, automatically generating a service message through the message intelligent generation module.
A service saving module 604 for: extracting analysis information of a service message, obtaining a service number of the service message, searching in a rule base according to the service number of the service message, judging whether the number of search records is 0, if so, generating a default rule formula, and adding the service number of the service message and the default rule formula to the rule base, and if not, then: analyzing a rule value through a rule formula, and adding a service number, the rule value and a corresponding response message of the service message into a service library;
the service saving module 604 is further configured to: when the subsystem returns a response message in a correct mode, extracting analysis information of a request message, obtaining a service number of the request message, searching in a rule base through the service number of the request message, judging whether the number of search records is 0, if so, generating a default rule formula, and adding the service number of the request message and the default rule formula to the rule base, and if not, then: and analyzing a rule value through a rule formula, and adding the service number, the rule value and the corresponding response message of the request message into a service library.
In summary, in the self-learning process, the main function is to analyze the messages obtained in the interaction and automatically add the service records to the service library through the interaction with the real environment. And under the condition that the message cannot be obtained in a real environment, the message intelligent generation module automatically generates a service response message through message interface description information provided by the message interface query service. Real service addressing finds the address corresponding to the service by addressing services, each of which needs to register its access address with the addressing service. And the message forwarding and analyzing module forwards the service request to an external subsystem, receives a message returned by the real environment and analyzes the message. A service is provided by one of the external subsystems, and a subsystem address corresponding to the service is obtained by the addressing service.
The intelligent message generation module mainly uses the service number as a parameter to send a query request to the message interface query service, the message interface query service returns message interface description information in a JSON data format, the message interface description information comprises a message structure, a message header format, a message field and a message field definition description, and the message forwarding and analyzing module analyzes JSON data to automatically generate a response message after receiving the return information.
The service storage module receives the service message provided by the message forwarding and analyzing module or the message intelligent generating module, extracts the analysis information of the request message, including the service number, the rule analyzing formula and the rule value corresponding to the rule analyzing formula, and inserts the information and the corresponding response message information into the rule base and the service base, thereby reducing a large amount of work of receiving and maintaining the rule base and the service base.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method for intelligent outbound service simulation based on rules, the method comprising:
analyzing a received request message sent by an application subsystem to generate an analysis result, wherein the analysis result comprises a request message service number;
generating a rule value based on the request message service number;
returning a response message based on the request message service number and the rule value;
obtaining the access address of the service in the addressing service through the request message service code;
forwarding the current service to the corresponding subsystem through the access address;
judging whether the subsystem returns a response message of a correct mode, if not, automatically generating a service message;
extracting analysis information of the service message, obtaining a service number of the service message, searching in a rule base according to the service number of the service message, judging whether the number of search records is 0, if so, generating a default rule formula, and adding the service number of the service message and the default rule formula to the rule base, and if not, then:
analyzing a rule value through a rule formula;
and adding the service number, the rule value and the corresponding response message of the service message into a service library.
2. The method of claim 1, wherein generating a rule value based on the request message service number comprises:
inquiring a corresponding rule formula in a pre-generated rule base based on the request message service number;
sequentially retrieving corresponding application fields in the request message based on the rule formula;
and extracting the value in the application field, and adding the value into the parameter corresponding to the rule formula to generate a rule value.
3. The method of claim 2, wherein returning a response packet based on the request packet service number and the rule value comprises:
generating a unique index of a service library based on the request message service number and the rule value;
retrieving a unique service record in a pre-generated service library based on the index;
extracting a service response message of the service record;
and adding message header information in the service response message and returning a response message.
4. The method according to claim 1, wherein after the subsystem returns a response packet in a correct mode, parsing information of the request packet is extracted to obtain a service number of the request packet, the request packet is searched in a rule base by the service number of the request packet, whether the number of search records is 0 or not is judged, if yes, a default rule formula is generated, the service number of the request packet and the default rule formula are added to the rule base, and if not, the method comprises the following steps:
analyzing a rule value through a rule formula;
and adding the service number, the rule value and the corresponding response message of the request message into a service library.
5. A rule-based intelligent outbound service simulation system, comprising:
the request message analysis module is used for analyzing the received request message sent by the application subsystem to generate an analysis result, and the analysis result comprises a request message service number;
the rule analysis module is used for generating a rule value based on the request message service number;
the service assembly module is used for returning a response message based on the request message service number and the rule value;
the real service addressing module is used for acquiring the access address of the service in the addressing service through the request message service code;
the message forwarding and analyzing module is used for forwarding the current service to the corresponding subsystem through the access address and judging whether the subsystem returns a response message in a correct mode;
the intelligent message generating module is used for automatically generating a service message when the subsystem does not return a response message in a correct mode;
a service preservation module to:
extracting analysis information of the service message, obtaining a service number of the service message, searching in a rule base according to the service number of the service message, judging whether the number of search records is 0, if so, generating a default rule formula, and adding the service number of the service message and the default rule formula to the rule base, and if not, then:
analyzing a rule value through a rule formula;
and adding the service number, the rule value and the corresponding response message of the service message into a service library.
6. The system of claim 5, wherein the rule parsing module comprises:
the query unit is used for querying a corresponding rule formula in a pre-generated rule base based on the request message service number;
the first retrieval unit is used for sequentially retrieving the corresponding application fields in the request message based on the rule formula;
and the first generating unit is used for extracting the value in the application field, adding the value into the parameter corresponding to the rule formula and generating a rule value.
7. The system of claim 6, wherein the service assembly module is configured to:
a second generating unit, configured to generate a unique index of a service library based on the request packet service number and the rule value;
the second retrieval unit is used for retrieving only one service record in a service library generated in advance based on the index;
the extracting unit is used for extracting the service response message of the service record;
and the return unit is used for adding message header information in the service response message and returning the response message.
8. The system of claim 5, wherein the service preservation module is further configured to:
when the subsystem returns a response message in a correct mode, extracting analysis information of the request message, obtaining a service number of the request message, searching in a rule base through the service number of the request message, judging whether the number of search records is 0, if so, generating a default rule formula, and adding the service number of the request message and the default rule formula to the rule base, and if not,:
analyzing a rule value through a rule formula;
and adding the service number, the rule value and the corresponding response message of the request message into a service library.
CN201810902388.2A 2018-08-09 2018-08-09 Rule-based intelligent outbound service simulation method and system Active CN109032952B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810902388.2A CN109032952B (en) 2018-08-09 2018-08-09 Rule-based intelligent outbound service simulation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810902388.2A CN109032952B (en) 2018-08-09 2018-08-09 Rule-based intelligent outbound service simulation method and system

Publications (2)

Publication Number Publication Date
CN109032952A CN109032952A (en) 2018-12-18
CN109032952B true CN109032952B (en) 2021-11-23

Family

ID=64632450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810902388.2A Active CN109032952B (en) 2018-08-09 2018-08-09 Rule-based intelligent outbound service simulation method and system

Country Status (1)

Country Link
CN (1) CN109032952B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580937A (en) * 2012-07-24 2014-02-12 阿里巴巴集团控股有限公司 Web service simulating method and system and service agent system thereof
CN105373469A (en) * 2014-08-25 2016-03-02 广东金赋信息科技有限公司 Interface based software automation test method
CN106021090A (en) * 2016-05-04 2016-10-12 上海瀚银信息技术有限公司 Software interface test system and method
CN106339318A (en) * 2016-08-29 2017-01-18 上海斐讯数据通信技术有限公司 Automatic testing device and establishment method thereof
CN107612914A (en) * 2017-09-20 2018-01-19 重庆邮电大学 A kind of safe trust method of Ad Hoc networks based on reference mode strategy

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9065860B2 (en) * 2011-08-02 2015-06-23 Cavium, Inc. Method and apparatus for multiple access of plural memory banks
US9785533B2 (en) * 2011-10-18 2017-10-10 Soasta, Inc. Session template packages for automated load testing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580937A (en) * 2012-07-24 2014-02-12 阿里巴巴集团控股有限公司 Web service simulating method and system and service agent system thereof
CN105373469A (en) * 2014-08-25 2016-03-02 广东金赋信息科技有限公司 Interface based software automation test method
CN106021090A (en) * 2016-05-04 2016-10-12 上海瀚银信息技术有限公司 Software interface test system and method
CN106339318A (en) * 2016-08-29 2017-01-18 上海斐讯数据通信技术有限公司 Automatic testing device and establishment method thereof
CN107612914A (en) * 2017-09-20 2018-01-19 重庆邮电大学 A kind of safe trust method of Ad Hoc networks based on reference mode strategy

Also Published As

Publication number Publication date
CN109032952A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN109814856B (en) Data entry method, device, terminal and computer readable storage medium
CN109542412A (en) Interface message generation method, device, computer equipment and storage medium
CN108256870B (en) Method and device for generating description information, updating and processing data based on topological structure
CN107784068A (en) Acquisition methods, device, storage medium, processor and the service end of data variation
CN110533456A (en) A kind of coupon information method for pushing, system and server
CN114491518A (en) Unauthorized access detection method, device, system and medium
CN111464515A (en) Data conversion method, device, equipment and storage medium
CN113485702B (en) Method, device and equipment for generating front-end page in configuration mode and storage medium
CN110209780B (en) Question template generation method and device, server and storage medium
CN110069378A (en) Data monitoring method, device, terminal and computer readable storage medium
CN109032952B (en) Rule-based intelligent outbound service simulation method and system
CN113032836B (en) Data desensitization method and apparatus
CN113704486A (en) Map data construction method and device and map data query method and device
CN106294433B (en) Equipment information processing method and device
CN111695031A (en) Label-based searching method, device, server and storage medium
CN114328572A (en) Data query method, device, system and medium based on SQL parser
CN111552785A (en) Method and device for updating database of human-computer interaction system, computer equipment and medium
CN117251384B (en) Interface automation test case generation method and system
CN113535843B (en) Data query method and device, electronic equipment and readable storage medium
CN114553512B (en) Ethernet packet filtering method and device for power edge computing chip
CN113886132B (en) Intelligent web-side error repairing method and device and computer-readable storage medium
CN114003714B (en) Intelligent knowledge pushing method for document context sensing
CN113704484A (en) Atlas data processing method and device
CN113704485A (en) Atlas data System
CN117240931A (en) Cross-protocol data simulation method, device, 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
GR01 Patent grant
GR01 Patent grant