CN110727580A - Response data generation method, full-flow interface data processing method and related equipment - Google Patents

Response data generation method, full-flow interface data processing method and related equipment Download PDF

Info

Publication number
CN110727580A
CN110727580A CN201910828865.XA CN201910828865A CN110727580A CN 110727580 A CN110727580 A CN 110727580A CN 201910828865 A CN201910828865 A CN 201910828865A CN 110727580 A CN110727580 A CN 110727580A
Authority
CN
China
Prior art keywords
interface
response
data
request
parameters
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
CN201910828865.XA
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910828865.XA priority Critical patent/CN110727580A/en
Publication of CN110727580A publication Critical patent/CN110727580A/en
Pending legal-status Critical Current

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/362Software debugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application

Abstract

The invention provides a response data generation method, which comprises the following steps: receiving a data access request output by a client, wherein the data access request carries a request parameter of an interface; reading interface access parameters of different interfaces and all returned interface response parameters corresponding to the different interfaces; confirming whether the data access request passes the verification or not according to the interface access parameter; if the result is yes, traversing a preset rule base according to the received request parameters, and matching interface response parameters corresponding to the request parameters; generating interface response data according to the matched interface response parameters; and feeding back response data corresponding to the interface to the client. The invention also provides a full-flow interface data processing method and related equipment. By utilizing the embodiment of the invention, all interface response data can be generated during development, and information such as interface documents and the like does not need to be manually maintained; and each process interface is set to be opened or closed in response state, so that each process is convenient to debug, and the development and test efficiency is improved.

Description

Response data generation method, full-flow interface data processing method and related equipment
Technical Field
The invention relates to the technical field of data processing, in particular to a response data generation method, a full-flow interface data processing method and related equipment.
Background
The existing software system development process usually involves the interface with the external website data interface, the data interaction between the client and the server, and the like, and the definition of some interfaces and the return of data, and various tasks need to be developed and defined. Because the return of the client page data needs to depend on the service interface of the server, when the service interface of the server is not developed, the client page display needs to display the page effect and can only be completed in other ways, such as: (1) displaying through the data of the page which is written dead and the data of the page which is dead; (2) and simulating response data of the request server end by self, and debugging the simulation data in the local server. In the mode (1), when a program is developed, a client page needs to depend on server-side service, and when the server-side service is not completed, the client page only can wait for the completion of a service interface, so that the waiting time is wasted in the middle. Mode (2) in most cases, only normal or generic response data can be simulated from the interface document. The response to the sub-business process or the response returned by the error can only modify the normal response data, so the response data of each request of each process can not be flexibly configured, the simulation is complicated, and the efficiency is low.
Therefore, it is desirable to provide a method for configuring response data of the whole process and processing the configured data.
Disclosure of Invention
In view of the above, it is necessary to provide a response data generating method, a full-flow interface data processing method and related devices, which can generate all interface response data of each interface during development without manually maintaining information such as interface documents; and the opening and closing of the response state is set for the interface of each flow and sub-flow, so that each flow is convenient to debug, and the development and test efficiency is improved.
A first aspect of an embodiment of the present invention provides a response data generation method, where the response data generation method includes:
receiving a data access request output by a client, wherein the data access request carries a request parameter of an interface;
reading interface access parameters of different interfaces and all returned interface response parameters corresponding to the different interfaces;
confirming whether the data access request passes interface verification according to the interface access participation;
if the data access request passes the interface verification, traversing a preset rule base according to the received request parameters, and matching interface response parameters corresponding to the request parameters;
generating interface response data according to the matched interface response parameters;
and feeding back the interface response data to the client.
Further, in the above response data generating method provided in the embodiment of the present invention, the reading the interface entry parameters of the different interfaces and all returned interface response parameters corresponding to the different interfaces includes:
calling a preset number of code resolvers;
and carrying out parallel analysis on the interface documents corresponding to different interfaces through the preset number of code analyzers to obtain interface access parameters corresponding to the interfaces and all returned interface response parameters.
A second aspect of the embodiments of the present invention further provides a full-process interface data processing method, where the full-process interface data processing method includes:
acquiring all interfaces in a preset service flow;
constructing a graph structure of the preset business process according to all the interfaces;
receiving an interface request output by a client;
determining a response state of an interface in the graph structure according to the interface request;
generating response data according to the response state of the interface and the response parameters corresponding to the interface;
and feeding back the response data to the client.
Further, in the above full-flow interface data processing method provided by the embodiment of the present invention, the interfaces in the graph structure are connected by logical lines, where the logical lines include a solid logical line and a dashed logical line, and a direction of passing the service data between the interfaces is a unidirectional pass.
Further, in the above-mentioned full-flow interface data processing method provided in an embodiment of the present invention, the constructing a graph structure of the preset business flow according to all the interfaces includes:
identifying hierarchy information and association information for each interface;
classifying all interfaces according to the hierarchy information;
and performing relevant connection on the classified interfaces according to the relevant information to construct a pattern structure of the preset business process.
Further, in the above full-flow interface data processing method provided by the embodiment of the present invention, the determining a response status of an interface in the graph structure according to the interface request includes:
matching a target interface corresponding to the interface request in the graph structure;
acquiring a target response state of the target interface;
judging whether the target response state is consistent with the request response state in the interface request or not;
and if the judgment result is inconsistent, converting the target response state into the request response state, wherein the interface corresponding response state comprises interface response opening and interface response closing.
Further, in the above full-flow interface data processing method provided in the embodiment of the present invention, when the response status corresponding to the interface is a multi-path status, the method further includes:
acquiring interface request parameters in the interface request;
acquiring a numerical value corresponding to the type attribute according to the interface request parameter;
and returning corresponding response data according to the numerical value corresponding to the type attribute.
Further, in the above full-flow interface data processing method provided in the embodiment of the present invention, the method further includes:
receiving an updating instruction aiming at the preset business process;
increasing and/or decreasing the number of interfaces in the graph structure according to the updating instruction; or
And converting the response state of the interface according to the updating instruction.
A third aspect of an embodiment of the present invention further provides a terminal, where the terminal includes a processor, and the processor is configured to implement any one of the response data generation methods described above or implement any one of the full-flow interface data processing methods described above when executing a computer program stored in a memory.
The fourth aspect of the embodiments of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the response data generating method according to any one of the above-mentioned items or implements the full-flow interface data processing method according to any one of the above-mentioned items.
The embodiment of the invention provides a response data generation method and device, a full-flow interface data processing method and device and a terminal, which are used for receiving a data access request output by a client, wherein the data access request carries a request parameter of an interface; reading interface access parameters of different interfaces and all returned interface response parameters corresponding to the different interfaces; confirming whether the data access request passes interface verification according to the interface access participation; if the data access request passes the interface verification, traversing a preset rule base according to the received request parameters, and matching interface response parameters corresponding to the request parameters; generating interface response data according to the matched interface response parameters; and feeding back the interface response data to the client. By utilizing the embodiment of the invention, all interface response data of each interface can be generated during development, and information such as interface documents and the like does not need to be manually maintained; and the opening and closing of the response state is set for the interface of each flow and sub-flow, so that each flow is convenient to debug, and the development and test efficiency is improved.
Drawings
Fig. 1 is a flowchart of a response data generation method according to an embodiment of the present invention.
Fig. 2 is a flowchart of a full-flow interface data processing method according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Fig. 4 is a functional block diagram of an exemplary terminal shown in fig. 3.
Fig. 5 is another exemplary functional block diagram of the terminal shown in fig. 3.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a detailed description of the present invention will be given below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
Fig. 1 is a flowchart of a response data generation method according to an embodiment of the present invention. As shown in fig. 1, the response data generation method may include the steps of:
s101: receiving a data access request output by a client, wherein the data access request carries a request parameter of an interface.
In at least one embodiment of the present invention, the selected communication protocol may be an http protocol, where the http protocol is based on a TCP protocol, and when a client (e.g., a web browser, a mobile phone client, etc.) needs to obtain web page data from a server, an http request is sent (where the http request includes a request line, a request header, a blank line, and a request text (where the request text carries a delivery request parameter)). A connection channel from a client to a server is established through an http protocol, and the server sends an http response to the client according to the received http request (the http response includes a status line, a message header and a response body (the response body carries a delivery response parameter)). And the client and the server perform data interaction, a finally required page template is generated by testing the client, and the page template can be in seamless joint with the server, namely the development of the client and the server can be performed in parallel. It is understood that the server side further provides an http interface, and the http interface is used for remote communication based on the http protocol.
In at least one embodiment of the present invention, a data access request output by a client is received, where the data access request carries a request parameter of an interface.
S102: and reading the interface access parameters of different interfaces and all returned interface response parameters corresponding to the different interfaces.
In at least one embodiment of the invention, the interface entry includes a login authentication parameter. It can be understood that, when the client and the server perform data transmission, the integrity and the security of the data transmission need to be ensured, and therefore, before the client accesses the server, login verification needs to be performed. The login authentication is mainly used for judging whether the client has the authority of accessing the server.
All the possible returned interface response parameters corresponding to different interfaces may be set by the user according to experience, and the user here may be a system developer. The interface entry parameters and the interface response parameters are declared in the code in advance in an enumeration manner. The interface input parameters and all corresponding interface response parameters that may be returned may be written according to a preset format, where the preset format may be preset by a user, for example, for each interface, the corresponding interface input parameters and all the interface response parameters that may be returned are sequentially input in sequence. It can be understood that, when the server develops the code, besides writing the entry parameters of the interface and all the interface response parameters that may be returned, a certain function description, interface parameter description and other explanation descriptions may be added to the interface, so that it is not necessary to write interface documents in doc format and/or excel format separately, the code developed by the server is directly used as the interface document, and it is not necessary to maintain information such as the interface document in a manual manner, and the development and test efficiency is improved.
The reading of the interface access parameters of the different interfaces and all returned interface response parameters corresponding to the different interfaces includes: calling a preset number of code resolvers; and carrying out parallel analysis on the interface documents corresponding to different interfaces through the preset number of code analyzers to obtain interface access parameters corresponding to the interfaces and all returned interface response parameters. The preset number is the number preset by a terminal user, the code analyzer is used for analyzing the interface document, and the code analysis efficiency can be improved in a parallel analysis mode.
S103: and confirming whether the data access request passes interface verification according to the interface access participation, and if the confirmation result is that the data access request passes the interface verification, entering the step S104.
In at least one embodiment of the present invention, the interface entry includes a login authentication parameter for confirming whether the data access request is authenticated by the interface, so as to ensure the integrity and security of data transmission. If the confirmation result is that the data access request passes the interface verification, the step S104 is executed; otherwise, the server side refuses the data access request. For example, in a batch operation scenario, if the data access request output by the client is 10 ten thousand data of a batch operation at a time, if the server determines that the data access request exceeds the setting of the interface access parameter, the server denies the data access request output by the client.
S104: and traversing a preset rule base according to the received request parameters, and matching interface response parameters corresponding to the request parameters.
In at least one embodiment of the present invention, the data access request carries a request parameter corresponding to an interface, the request parameter corresponding to the interface is obtained according to the data access request, and an interface response parameter corresponding to the request parameter is matched according to the received request parameter by traversing a preset rule base. The preset rule base is preset by a terminal user and is used for determining the corresponding relation between the request parameters and the response parameters. The method for traversing the preset rule base according to the received request parameter is not limited, for example, the request parameter and the response parameter may be identified by a sequence number, and the method for traversing the preset rule base according to the received request parameter includes: acquiring the serial number of the request parameter; traversing the preset rule base according to the serial numbers of the request parameters, and matching the serial numbers of the response parameters corresponding to the serial numbers of the request parameters; and determining the response parameters according to the sequence numbers of the response parameters.
S105: and generating interface response data according to the matched interface response parameters.
In at least one embodiment of the present invention, interface response data is generated according to the matched interface response parameters, the interface response data may be recovered from a series of response parameters, and each interface supports returning different response data according to the difference of the entered interface response parameters. For each interface, there is a corresponding interface response parameter that is likely to be returned, and thus the interface includes all the response data that is likely to be returned.
S106: and feeding back the response data corresponding to the interface to the client.
In at least one embodiment of the present invention, the obtained response data is fed back to the client, and the client performs a client development test according to the obtained response data.
The response data generation method provided by the embodiment of the invention receives a data access request output by a client, wherein the data access request carries a request parameter of an interface; reading interface access parameters of different interfaces and all returned interface response parameters corresponding to the different interfaces; confirming whether the data access request passes interface verification according to the interface access participation; if the data access request passes the interface verification, traversing a preset rule base according to the received request parameters, and matching interface response parameters corresponding to the request parameters; generating interface response data according to the matched interface response parameters; and feeding back the response data corresponding to the interface to the client. By utilizing the embodiment of the invention, all the service interface return data of each interface are generated during development, information such as interface documents and the like does not need to be manually maintained, and the development testing efficiency is improved.
Referring to fig. 2, fig. 2 is a flowchart of a full-flow interface data processing method according to an embodiment of the present invention. The full-flow interface data processing method can be applied to a terminal with a mock platform. Test data processing is carried out through the mock platform, so that the test environment can be simplified, and the test efficiency is improved. As shown in fig. 2, the full-flow interface data processing method may include the following steps:
s201: and acquiring all interfaces in the preset business process.
In at least one embodiment of the invention, a business process refers to a set of interrelated tasks linked by activities having different functions. The business process can be applied in many fields, for example, the business process can include: the system comprises a signing and reporting flow of an enterprise office system, a reimbursement flow in a financial system, a commodity purchasing flow in electronic commerce, a core business flow of a bank and the like.
The business process is a collection of different interfaces. The preset service flow is preset by a terminal user. The set of different interfaces includes interfaces of different hierarchies and different interfaces of the same hierarchy. For example, for a business process of commodity purchase in electronic commerce, a commodity list query interface exists; for different commodity categories, corresponding category interfaces exist; for commodities of the same category, corresponding commodity detail interfaces exist; when an item is selected for purchase, a corresponding purchase interface may exist. It is understood that corresponding to the purchase interface, there are other interfaces such as a payment interface, a change bank card interface, and a refund interface.
S202: and constructing a graph structure of the preset business process according to all the interfaces.
In at least one embodiment of the present invention, the constructing the graph structure of the preset business process according to all the interfaces comprises: identifying hierarchy information and association information for each interface; classifying all interfaces according to the hierarchy information; and performing relevant connection on the classified interfaces according to the relevant information to construct a pattern structure of the preset business process. It is understood that the hierarchical information of each interface is also related to the category of each interface, and the related information of each interface is also related to the logic of each interface.
The graph structure can be a tree graph, a flow chart or other forms of graphs. The interfaces in the graph structure are connected through logic lines, and the logic lines comprise logic solid lines and logic dashed lines. The logical solid line part is a flow that response data returned by the interface will go, and the logical dotted line is a flow that response data returned by the interface will not go. Traffic data can be communicated between each interface in the graph structure, and the direction of the traffic data communicated between the interfaces is unidirectional.
It is understood that the method further comprises: receiving an updating instruction aiming at the preset business process; increasing and/or decreasing the number of interfaces in the graph structure according to the updating instruction; or converting the response state of the interface according to the updating instruction. The update instruction for the preset business process may be a computer program instruction for requesting an update of the preset business process. In other embodiments, the graph structure may be updated by dragging the interface graph in the preset business process.
S203: and receiving an interface request output by the client.
In at least one embodiment of the present invention, each interface in the graph structure corresponds to two response states, which are interface response on and interface response off, respectively. For example, for a purchase interface in a commodity purchase process, there are two request responses, one is an unregistered response and the other is a registered response. When the response corresponding to the unregistered interface is closed, the response corresponding to the registered interface is opened. Receiving an interface request output by a client, wherein the interface request comprises request parameters, parameter types, request parameter descriptions, interface information, response state information corresponding to an interface and the like.
S204: determining a response status of an interface in the graph structure according to the interface request.
In at least one embodiment of the present invention, the determining a response status of an interface in the graph structure according to the interface request comprises: matching a target interface corresponding to the interface request in the graph structure; acquiring a target response state of the target interface; judging whether the target response state is consistent with the request response state in the interface request or not; and if the judgment result is inconsistent, converting the target response state into the request response state. Response data of various interfaces expected by the client can be simulated and returned by receiving the interface request output by the client and determining the response state of the interfaces in the graph structure according to the interface request.
S205: and generating response data according to the response state of the interface and the response parameters corresponding to the interface.
In at least one embodiment of the present invention, each interface includes all possible returned interface response parameters corresponding to the interface. All the possible returned interface response parameters corresponding to the interface can be arranged in an excel document or a doc document. And generating response data according to the response state of the interface and the response parameters corresponding to the interface. For example, for a commodity purchase process, the process that the client wants the mock platform to simulate is as follows: if the user does not log in and the bank card has no money flow, the flow and the corresponding response switch of the interface can be set, the response data corresponding to the interface is obtained, the response data is fed back to the client, and the client can simulate the flow.
It can be understood that, when the interface corresponding response state is a multi-path state, the method further includes: acquiring interface request parameters in the interface request; acquiring a numerical value corresponding to the type attribute according to the interface request parameter; and returning corresponding response data according to the numerical value corresponding to the type attribute. The multi-path state is a situation where some interfaces may respond to at least one response being returned. Taking a payment interface in a commodity purchase process as an example, assuming that the payment interface is correspondingly provided with two response returns (the first return is a return of payment failure due to insufficient money in a bank card, and the second return is a return of payment success after the bank card is replaced), at this moment, a type parameter value is required to be transmitted into a client when the client requests the payment interface, and the mock platform can return different response data according to different type values. For example, when type is 0, failed response data is returned; when type is 1, successful response data is returned.
S206: and feeding back the response data to the client.
In at least one embodiment of the present invention, the obtained response data is fed back to the client, and the client performs a client development test according to the obtained response data.
The embodiment of the invention provides a full-process interface data processing method, which comprises the steps of acquiring all interfaces in a preset service process; constructing a graph structure of the preset business process according to all the interfaces; receiving an interface request output by a client; determining a response state of an interface in the graph structure according to the interface request; generating response data according to the response state of the interface and the response parameters corresponding to the interface; and feeding back the response data to the client. By utilizing the embodiment of the invention, the client can configure the full-flow graph structure through the mock platform, one-time configuration is realized, the whole effect is achieved, and frequent simulation data construction is not needed. And the interface of each flow and sub-flow can set the opening and closing of the response state, thereby facilitating the debugging of each flow. And the server side service provider can check whether the relevant interfaces accord with logic or not and whether a missing business process exists or not according to the graph structure, so that modification and improvement are facilitated, and the development and test efficiency is improved.
The above is a detailed description of the method provided by the embodiments of the present invention. The order of execution of the blocks in the flowcharts shown may be changed, and some blocks may be omitted, according to various needs. The following describes a terminal provided in an embodiment of the present invention.
The embodiment of the present invention further provides a terminal 1, which includes a memory 10, a processor 30, and a computer program stored in the memory 10 and capable of running on the processor 30, where the processor 30 implements the steps of the response data generating method/the full-flow interface data processing method described in any of the above embodiments when executing the program.
Fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention, and as shown in fig. 3, a terminal 1 includes a memory 10, where the memory 10 stores a program code, where the program code may receive a data access request output by a client, and the data access request carries a request parameter of an interface; reading interface access parameters of different interfaces and all returned interface response parameters corresponding to the different interfaces; confirming whether the data access request passes interface verification according to the interface access participation; if the data access request passes the interface verification, traversing a preset rule base according to the received request parameters, and matching interface response parameters corresponding to the request parameters; generating interface response data according to the matched interface response parameters; and feeding back the interface response data to the client. By utilizing the program code, all service interface return data of each interface can be generated during development, information such as interface documents and the like does not need to be manually maintained, and the development testing efficiency is improved.
The program code can acquire all interfaces in a preset business process; constructing a graph structure of the preset business process according to all the interfaces; receiving an interface request output by a client; determining a response state of an interface in the graph structure according to the interface request; generating response data according to the response state of the interface and the response parameters corresponding to the interface; and feeding back the response data to the client. By utilizing the embodiment of the invention, the client can configure the full-flow graph structure through the mock platform, one-time configuration is realized, the whole effect is achieved, and frequent simulation data construction is not needed. And the interface of each flow and sub-flow can set the opening and closing of the response state, thereby facilitating the debugging of each flow. And the server side service provider can check whether the relevant interfaces accord with logic or not and whether a missing business process exists or not according to the graph structure, so that modification and improvement are facilitated, and the development and test efficiency is improved.
In this embodiment, the terminal 1 may further include a display 20 and a processor 30. The memory 10 and the display screen 20 can be electrically connected with the processor 30 respectively.
The memory 10 may be of different types of memory devices for storing various types of data. For example, the memory or internal memory of the terminal 1 may be used, or a memory Card that can be externally connected to the terminal 1, such as a flash memory, an SM Card (Smart Media Card), an SD Card (Secure Digital Card), and the like. Further, the memory 10 may include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other non-volatile solid state storage device. The memory 10 is used for storing various types of data, for example, various types of application programs (Applications) installed in the terminal 1, data set and acquired by applying the above-described response data generation method/full-flow interface data processing method, and the like.
A display 20 is mounted to the terminal 1 for displaying information.
The processor 30 is used for executing the response data generating method/full-flow interface data processing method and various types of software installed in the terminal 1, such as an operating system and application display software. The processor 30 includes, but is not limited to, a Central Processing Unit (CPU), a Micro Controller Unit (MCU), and other devices for interpreting a computer and Processing data in computer software.
When the program code is used to implement the response data generation method, the program code may include one or more modules stored in the memory 10 of the terminal 1 and configured to be executed by one or more processors (in this embodiment, one processor 30) to complete the embodiment of the present invention. For example, referring to fig. 4, the program code may include a request receiving module 101, a parameter reading module 102, an interface verification module 103, a parameter matching module 104, a data generating module 105, and a data feedback module 106. The modules referred to in the embodiments of the present invention may be program segments that perform a specific function, and are more suitable than programs for describing the execution process of software in a processor.
It is understood that, corresponding to the embodiments of the response data generation method, the terminal 1 may include some or all of the functional modules shown in fig. 4, and the functions of the modules will be described in detail below. Note that the same terms, related terms, and specific explanations thereof in the above embodiments of the response data generation method can also be applied to the following functional descriptions of the respective modules. For brevity and to avoid repetition, further description is omitted.
The request receiving module 101 may be configured to receive a data access request output by a client, where the data access request carries a request parameter of an interface.
The parameter reading module 102 may be configured to read interface entries of different interfaces and all returned interface response parameters corresponding to the different interfaces.
The interface verification module 103 may be configured to confirm whether the data access request is verified by the interface according to the interface participation.
The parameter matching module 104 may be configured to traverse a preset rule base according to the received request parameter, and match an interface response parameter corresponding to the request parameter.
The data obtaining module 105 may be configured to generate interface response data according to the matched interface response parameters.
The data feedback module 106 may be configured to feed back response data corresponding to the interface to the client.
Referring to fig. 5, fig. 5 is a functional block diagram of another exemplary terminal shown in fig. 3. When the program code is used for implementing the full-flow interface data processing method, the program code may include an interface acquisition module 201, a pattern construction module 202, a request acquisition module 203, a state determination module 204, a data acquisition module 205, and a data output module 206.
The interface acquiring module 201 may be configured to acquire all interfaces in a preset service flow.
The interface obtaining module 202 may be configured to construct a graph structure corresponding to the preset business process according to all the interfaces.
The request obtaining module 203 may be configured to receive an interface request output by a client.
The state determination module 204 may be configured to determine a response state of an interface in the graph structure according to the interface request.
The data generating module 205 may be configured to generate response data according to the response state of the interface and the response parameter corresponding to the interface.
The data output module 206 may be used to feed back the response data to the client.
The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by the processor 30, implements the steps of the response data generating method and/or the full-flow interface data processing method in any of the above embodiments.
The program code/terminal/computer device integrated module/unit may be stored in a computer readable storage medium if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, all or part of the flow in the method according to the above embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium and used by the processor 30 to implement the steps of the above method embodiments. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), or the like.
The Processor 30 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like, said processor 30 being the control center of the terminal 1, the whole program code/various parts of the terminal 1 being connected by various interfaces and lines.
The memory 10 is used for storing the computer programs and/or modules, and the processor 30 implements various functions of the program code/terminal 1 by running or executing the computer programs and/or modules stored in the memory 10 and calling data stored in the memory. The memory 10 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data) created according to the use of the terminal 1, and the like.
In the several embodiments provided in the present invention, it should be understood that the disclosed terminal and method can be implemented in other manners. For example, the system embodiments described above are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
It will be evident to those skilled in the art that the embodiments of the present invention are not limited to the details of the foregoing illustrative embodiments, and that the embodiments of the present invention are capable of being embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the embodiments being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Several units, modules or means recited in the system, apparatus or terminal claims may also be implemented by one and the same unit, module or means in software or hardware.
Although the embodiments of the present invention have been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the spirit and scope of the embodiments of the present invention.

Claims (10)

1. A response data generation method, characterized by comprising:
receiving a data access request output by a client, wherein the data access request carries a request parameter of an interface;
reading interface access parameters of different interfaces and all returned interface response parameters corresponding to the different interfaces;
confirming whether the data access request passes interface verification according to the interface access participation;
if the data access request passes the interface verification, traversing a preset rule base according to the received request parameters, and matching interface response parameters corresponding to the request parameters;
generating interface response data according to the matched interface response parameters;
and feeding back the response data corresponding to the interface to the client.
2. The method for generating response data according to claim 1, wherein the reading of the interface entries of the different interfaces and all returned interface response parameters corresponding to the different interfaces comprises:
calling a preset number of code resolvers;
and carrying out parallel analysis on the interface documents corresponding to different interfaces through the preset number of code analyzers to obtain interface access parameters corresponding to the interfaces and all returned interface response parameters.
3. A full-flow interface data processing method using the response data generation method according to any one of claims 1 to 2, wherein the full-flow interface data processing method includes:
acquiring all interfaces in a preset service flow;
constructing a graph structure of the preset business process according to all the interfaces;
receiving an interface request output by a client;
determining a response state of an interface in the graph structure according to the interface request;
generating response data according to the response state of the interface and the response parameters corresponding to the interface;
and feeding back the response data to the client.
4. The full-flow interface data processing method according to claim 3, wherein the interfaces in the graph structure are connected with each other through a logical line, the logical line includes a logical solid line and a logical dotted line, and a direction of traffic data passing between the interfaces is a unidirectional pass.
5. The method as claimed in claim 3, wherein said constructing the graph structure of the predetermined business process according to all the interfaces comprises:
identifying hierarchy information and association information for each interface;
classifying all interfaces according to the hierarchy information;
and performing relevant connection on the classified interfaces according to the relevant information to construct a pattern structure of the preset business process.
6. The full flow interface data processing method of claim 3, wherein said determining a response status of an interface in the graph structure according to the interface request comprises:
matching a target interface corresponding to the interface request in the graph structure;
acquiring a target response state of the target interface;
judging whether the target response state is consistent with the request response state in the interface request or not;
and if the judgment result is inconsistent, converting the target response state into the request response state, wherein the interface corresponding response state comprises interface response opening and interface response closing.
7. The full-flow interface data processing method according to claim 3, wherein when the interface response state is a multi-path state, the method further comprises:
acquiring interface request parameters in the interface request;
acquiring a numerical value corresponding to the type attribute according to the interface request parameter;
and returning corresponding response data according to the numerical value corresponding to the type attribute.
8. The full flow interface data processing method of claim 3, further comprising:
receiving an updating instruction aiming at the preset business process;
increasing and/or decreasing the number of interfaces in the graph structure according to the updating instruction; or
And converting the response state of the interface according to the updating instruction.
9. A terminal, characterized in that the terminal comprises a processor for implementing the response data generating method according to any one of claims 1 to 2 or the full flow interface data processing method according to any one of claims 3 to 8 when executing a computer program stored in a memory.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the response data generation method according to any one of claims 1 to 2 or implements the full-flow interface data processing method according to any one of claims 3 to 8.
CN201910828865.XA 2019-09-03 2019-09-03 Response data generation method, full-flow interface data processing method and related equipment Pending CN110727580A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910828865.XA CN110727580A (en) 2019-09-03 2019-09-03 Response data generation method, full-flow interface data processing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910828865.XA CN110727580A (en) 2019-09-03 2019-09-03 Response data generation method, full-flow interface data processing method and related equipment

Publications (1)

Publication Number Publication Date
CN110727580A true CN110727580A (en) 2020-01-24

Family

ID=69218929

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910828865.XA Pending CN110727580A (en) 2019-09-03 2019-09-03 Response data generation method, full-flow interface data processing method and related equipment

Country Status (1)

Country Link
CN (1) CN110727580A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111562982A (en) * 2020-04-28 2020-08-21 北京金堤科技有限公司 Request data processing method and device, computer readable storage medium and electronic equipment
CN111694561A (en) * 2020-06-10 2020-09-22 中国建设银行股份有限公司 Interface management method, device, equipment and storage medium
CN111782330A (en) * 2020-07-07 2020-10-16 赞同科技股份有限公司 Web application-based page data acquisition method, device and equipment
CN112199281A (en) * 2020-09-30 2021-01-08 中国平安财产保险股份有限公司 Data processing method and device, terminal equipment and readable storage medium
CN112506473A (en) * 2020-12-01 2021-03-16 深圳市和讯华谷信息技术有限公司 API development method and device, computer equipment and storage medium
CN113938473A (en) * 2021-10-12 2022-01-14 平安银行股份有限公司 Automatic Mock method, device, equipment and storage medium based on flow
CN114238065A (en) * 2020-09-09 2022-03-25 马上消费金融股份有限公司 Test processing method, device, equipment and readable storage medium

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111562982A (en) * 2020-04-28 2020-08-21 北京金堤科技有限公司 Request data processing method and device, computer readable storage medium and electronic equipment
CN111562982B (en) * 2020-04-28 2023-09-19 北京金堤科技有限公司 Method and device for processing request data, computer readable storage medium and electronic equipment
CN111694561A (en) * 2020-06-10 2020-09-22 中国建设银行股份有限公司 Interface management method, device, equipment and storage medium
CN111782330A (en) * 2020-07-07 2020-10-16 赞同科技股份有限公司 Web application-based page data acquisition method, device and equipment
CN111782330B (en) * 2020-07-07 2024-01-26 赞同科技股份有限公司 Page data acquisition method, device and equipment based on Web application
CN114238065A (en) * 2020-09-09 2022-03-25 马上消费金融股份有限公司 Test processing method, device, equipment and readable storage medium
CN112199281A (en) * 2020-09-30 2021-01-08 中国平安财产保险股份有限公司 Data processing method and device, terminal equipment and readable storage medium
CN112506473A (en) * 2020-12-01 2021-03-16 深圳市和讯华谷信息技术有限公司 API development method and device, computer equipment and storage medium
CN113938473A (en) * 2021-10-12 2022-01-14 平安银行股份有限公司 Automatic Mock method, device, equipment and storage medium based on flow

Similar Documents

Publication Publication Date Title
CN110727580A (en) Response data generation method, full-flow interface data processing method and related equipment
CN110020381A (en) Method of calibration, device, equipment and computer storage medium based on configuration file
CN107862425B (en) Wind control data acquisition method, device and system and readable storage medium
CN111639480A (en) Text labeling method based on artificial intelligence, electronic device and storage medium
CN109710810A (en) Change management method, apparatus, equipment and storage medium
WO2014151789A9 (en) System and method for developing business rules for decision engines
KR102226463B1 (en) UI/UX solution providing server linked with process automation program, process automation method using the same, and computer program executing the same
CN110574005B (en) Method and system for verifying software programs
CN114116801A (en) Data list checking method and device
CN113238739A (en) Plug-in development and data acquisition method, device, electronic equipment and medium
CN111639903A (en) Review processing method for architecture change and related equipment
CN111435348A (en) Method for creating runtime executable program for data analysis function
US20230004477A1 (en) Providing a pseudo language for manipulating complex variables of an orchestration flow
CN111882419B (en) Method and device for quality inspection of files and server
CN113506099A (en) Configuration system, method, computer device and storage medium for reporting service
Liu et al. A formal approach to testing programs in practice
CN111552648A (en) Automatic verification method and system for application
CA3090986C (en) Method and system for overseeing execution of graph-based contracts using hash chains
CN115422514B (en) Information interaction method, system, equipment and storage medium
CN115994094A (en) Automatic test method, device, equipment and medium based on machine learning
CN114281831A (en) Data construction method and related equipment
CN112650524A (en) Characteristic branch pipeline configuration method and characteristic branch code submitting method
CN117149549A (en) Equipment simulation method, device, equipment and storage medium
CN117472746A (en) Automated testing method, apparatus and storage medium
CN114385722A (en) Interface attribute consistency checking method and device, electronic equipment and storage 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