CN107809332A - Compound interface configures and compound interface call method, device - Google Patents

Compound interface configures and compound interface call method, device Download PDF

Info

Publication number
CN107809332A
CN107809332A CN201711102261.4A CN201711102261A CN107809332A CN 107809332 A CN107809332 A CN 107809332A CN 201711102261 A CN201711102261 A CN 201711102261A CN 107809332 A CN107809332 A CN 107809332A
Authority
CN
China
Prior art keywords
interface
sub
call
compound
compound interface
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
CN201711102261.4A
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.)
China Minsheng Banking Corp Ltd
Original Assignee
China Minsheng Banking Corp 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 China Minsheng Banking Corp Ltd filed Critical China Minsheng Banking Corp Ltd
Priority to CN201711102261.4A priority Critical patent/CN107809332A/en
Publication of CN107809332A publication Critical patent/CN107809332A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides compound interface collocation method and device, by obtaining compound interface configuration information, the configuration information includes the call by passing order between each sub-interface in the mark and at least one call by passing chain of the sub-interface in sub-interface configuration information, compound interface is established so that terminal device calls, solves the problems, such as that terminal device can not be improved and safeguard to former server device function;Based on the good compound interface of above-mentioned configuration, present invention also offers compound interface call method and device, the call request sent by obtaining client device, at least one sub-interface by the input information assignment in call request to called compound interface, server is called and performs each sub-interface successively according to the configuration information of each call by passing chain of compound interface, and the output item of at least one sub-interface got is sent into client device as the output information of compound interface.Client device can realize the functions such as fast search, inquiry by above-mentioned invoked procedure.

Description

Compound interface configures and compound interface call method, device
Technical field
The present invention relates to computer communication field, more particularly to a kind of configuration of compound interface and compound interface call method, Device.
Background technology
Network service (Web Service) technology is a kind of far call skill across programming language and spanning operation system platform Art.Specifically, Web Service establish the new platform of the distributed application program of interoperable, and it is defined using journey How sequence realizes interoperability on Web, wherein, call Web Service application program to be called client, there is provided Web Service application program is called service end.Client can be by calling Web service interfaces to inquire about service end And access.
In the prior art, for the calling of the calling of Web Service interfaces, simply single face, former clothes can only be used The function that business end externally provides, and the function that can not be provided former service end is improved and safeguarded.
The content of the invention
The present invention provides a kind of compound interface configuration and compound interface call method, device, can not to solve prior art The problem of function of providing former service end is improved and safeguarded.
In a first aspect, the present invention provides a kind of compound interface collocation method, including:
Compound interface configuration information is obtained, the compound interface configuration information includes sub-interface configuration information;Wherein, it is described Sub-interface configuration information includes the mark of sub-interface and the configuration information of at least one call by passing chain, the call by passing chain Including at least one sub-interface, the configuration information of each call by passing chain include each sub-interface on the call by passing chain it Between call by passing order;
Compound interface is established according to the configuration information of the mark of the sub-interface and at least one call by passing chain, for Terminal device calls the compound interface, and the compound interface includes at least one call by passing chain.
Optionally, methods described also includes:
Obtain the calling order of each call by passing chain;
Wherein, the calling order includes parallel execution sequence and/or serial execution sequence.
Optionally, the compound interface configuration information also includes:The message template of compound interface;The message template includes Request message template and response message template;Methods described also includes:
Obtain pair between the data item of the request message template and the input item of each sub-interface of the compound interface It should be related to, and it is corresponding between the data item of the response message template and the output item of each sub-interface of the compound interface Relation;
Wherein, the data item of the request message template is used for each sub-interface for being assigned to corresponding relation, the response The data item of message template is used to be sent to terminal device as the output information of the compound interface.
Second aspect, the present invention provide a kind of compound interface call method, including:
The call request of compound interface is received, and obtains the input information in the call request, the compound interface bag At least one call by passing chain is included, the call by passing chain includes at least one sub-interface;
By the input information assignment to the compound interface;
Each sub-interface is called according to the configuration information of each call by passing chain of the compound interface, each described transmit is adjusted Include the call by passing order between each sub-interface on the call by passing chain with the configuration information of chain;
Obtain the output item of each sub-interface of the compound interface;
The output information of the compound interface is sent, the output information of the compound interface includes the compound interface extremely The output item of a few sub-interface.
Optionally, it is described by it is described input information assignment to the compound interface, including:
By it is described input information input to request message template, according to the data item of the request message template with it is described multiple Corresponding relation between the input item of each sub-interface of splice grafting mouth, the data item of the request message template is assigned to correspondingly The sub-interface of relation;
Before the output information for sending the compound interface, including:
According to the corresponding pass between the data item of response message template and the output item of each sub-interface of the compound interface System, the output item for each sub-interface for having corresponding relation is assigned to the data item of the response message template, got response packet;
Terminal device is sent to using the response message as the output information of the compound interface.
The third aspect, the present invention provide a kind of compound interface generating means, including:
Acquisition module, for obtaining compound interface configuration information, the compound interface configuration information configures including sub-interface Information;Wherein, the sub-interface configuration information includes the mark of sub-interface and the configuration information of at least one call by passing chain, The call by passing chain includes at least one sub-interface, and the configuration information of each call by passing chain includes the call by passing chain On each sub-interface between call by passing order;
Module is established, is established for the configuration information of the mark according to the sub-interface and at least one call by passing chain Compound interface, so that terminal device calls the compound interface, the compound interface includes at least one call by passing chain.
Optionally, the acquisition module, it is additionally operable to obtain the calling order of each call by passing chain;
Wherein, the calling order includes parallel execution sequence and/or serial execution sequence.
Optionally, the compound interface configuration information also includes:The message template of compound interface;The message template includes Request message template and response message template;
Acquisition module, it is additionally operable to obtain the data item and each sub-interface of the compound interface of the request message template Corresponding relation between input item, and the data item of the response message template and each sub-interface of the compound interface are defeated The corresponding relation gone out between item;
Wherein, the data item of the request message template is used for each sub-interface for being assigned to corresponding relation, the response The data item of message template is used to be sent to terminal device as the output information of the compound interface.
Fourth aspect, the present invention provide a kind of compound interface calling device, including:
Acquisition module is received, for receiving the call request of compound interface, and obtains the letter of the input in the call request Breath, the compound interface include at least one call by passing chain, and the call by passing chain includes at least one sub-interface;
Assignment module, for by the input information assignment to the compound interface;
Calling module, the configuration information for each call by passing chain according to the compound interface call each son to connect Mouthful, the call by passing that the configuration information of each call by passing chain is included between each sub-interface on the call by passing chain is suitable Sequence;
Acquisition module, the output item of each sub-interface for obtaining the compound interface;
Sending module, for sending the output information of the compound interface, the output information of the compound interface includes institute State the output item of at least one sub-interface of compound interface.
Optionally, the assignment module, it is additionally operable to input the input information to request message template, is asked according to described The corresponding relation between the data item of message template and the input item of each sub-interface of the compound interface is sought, the request is reported The data item of literary template is assigned to the sub-interface of corresponding relation;According to the data item of response message template and the compound interface Each sub-interface output item between corresponding relation, the output item for each sub-interface for having corresponding relation is assigned to the response The data item of message template, gets response packet;
The sending module, it is additionally operable to be sent to terminal using the response message as the output information of the compound interface Equipment.
The invention provides compound interface collocation method and device, by obtaining compound interface configuration information, should match somebody with somebody confidence Breath is included between each sub-interface in the mark and at least one call by passing chain of the sub-interface in sub-interface configuration information Call by passing order, compound interface is established so that terminal device calls, solving terminal device can not be to former server device function The problem of being improved and safeguarding;Based on the good compound interface of above-mentioned configuration, present invention also offers compound interface call method And device, the call request sent by obtaining client device are multiple to being called by the input information assignment in call request At least one sub-interface of splice grafting mouth, server call execution successively according to the configuration information of each call by passing chain of compound interface Each sub-interface, and the output item of at least one sub-interface got is sent to client as the output information of compound interface Equipment.Client device can realize the functions such as fast search, inquiry by above-mentioned invoked procedure.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are this hairs Some bright embodiments, for those of ordinary skill in the art, without having to pay creative labor, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of possible system architecture diagram provided by the invention;
Fig. 2 is the flow chart for the compound interface collocation method that one embodiment of the invention provides;
Fig. 3 is the flow chart for the compound interface collocation method that another embodiment of the present invention provides;
Fig. 4 is the flow chart for the compound interface call method that one embodiment of the invention provides;
Fig. 5 is the flow chart for the compound interface call method that another embodiment of the present invention provides;
Fig. 6 is the structural representation for the compound interface generating means that one embodiment of the invention provides;
Fig. 7 is the structural representation for the compound interface calling device that one embodiment of the invention provides.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Before the inventive method embodiment is introduced, the application scenarios progress first to embodiment of the method is as described below.This Inventive method embodiment is to be based on Web Service technologies, and Web Service technologies are a kind of across programming language and across operation system The far call technology of system platform.
It is so-called across programming language, that is serve end program is write using java, and client-side program can then use other Programming language is write, and vice versa;
So-called spanning operation system platform then refers to that serve end program and client-side program can be in different operating systems Operation;
So-called far call, a program exactly on a computer A can be called on an other computer B The method of one object, for example, Unionpay is supplied to the POS system in market, the POS in market is transferred accounts the transfer account method of calling Code be to operate on bank server in fact.For another example, weather forecast system, Taobao, Baidu etc. system service with The form of Web Service services is exposed, and allows third party website and program to call these service functions.
Fig. 1 is a kind of possible system architecture diagram provided by the invention, the Web provided referring to Fig. 1, the present embodiment Service system architectures include server 11, terminal device 12;Wherein, server 11 is used to obtain and store Web Service Compound interface configuration information, and for calling and sending the output information of Web Service compound interfaces.The basis of terminal device 12 Practical operation, it is divided into client device and server device, wherein, client device calls Web Service compound interfaces Terminal device, server device is to provide the terminal device of Web Service interfaces or compound interface.Terminal device 12 can be with It is the equipment such as computer, flat board, mobile phone.
The assembled that New function is completed when server device is developed, and the configuration information of compound interface can be sent into service On device 11, called for other client devices.Web Service systems use HTTP (HTTP, Hyper Text Transfer Protocol) transmission data, using extensible markup language (XML, Extensible Markup Language) Form encapsulation of data.XML format is in addition to being easy to establish and analyzing, main advantage is that it is both unrelated with system platform, again Unrelated with manufacturer, showing, storing, handling related data information, scalability is good.The related data form of the present embodiment is XML, therefore there is certain fault-tolerance for the version of each interface.
How to be solved to the technical scheme of technical scheme and the application with specifically embodiment below above-mentioned Technical problem is described in detail.These specific embodiments can be combined with each other below, for same or analogous concept Or process may repeat no more in certain embodiments.Below in conjunction with accompanying drawing, embodiments of the invention are described.
The flow chart for the compound interface collocation method that Fig. 2 provides for one embodiment of the invention, the executive agent of the present embodiment For the server 11 in above-mentioned Fig. 1, as shown in Fig. 2 the compound interface collocation method of the present embodiment includes:
S101, compound interface configuration information is obtained, compound interface configuration information includes sub-interface configuration information.
Wherein, sub-interface configuration information includes the mark of sub-interface and the configuration information of at least one call by passing chain, Call by passing chain includes at least one sub-interface, and the configuration information of each call by passing chain includes each sub-interface on call by passing chain Between call by passing order;
Specifically, in the compound interface of the present embodiment sub-interface quantity at least two, it is single in the prior art to distinguish The calling of one interface.The mark of sub-interface is used for the position for uniquely determining each sub-interface, is easy to tune of the server to each sub-interface With.Exemplary, compound interface a sub-interface includes interface 1, interface 2, interface 3, interface 4.
Also include the configuration information of at least one call by passing chain, in other words, call by passing chain in sub-interface configuration information It can be one, two or a plurality of, the present embodiment is not especially limited to this.Wherein, each call by passing chain is included extremely A few sub-interface, and also include for the call by passing chain comprising two or more sub-interface, the configuration information of call by passing chain Call by passing order between each sub-interface on the call by passing chain.Call by passing order is the input and output between sub-interface Transitive relation, the sub-interface defined on call by passing chain use the output item of its front interface as the input item of the sub-interface.
Exemplary, compound interface a includes sub-interface 1,2,3,4, if compound interface a only includes a call by passing chain, The configuration information of call by passing chain is 3 → interface of interface 1 → interface, 2 → interface 4.Exemplary, compound interface a includes two biographies Pass call chain, call by passing order respectively 1 → interface of interface 3 of each call by passing chain, 2 → interface of interface 4.
Call by passing chain includes at least one sub-interface in the present embodiment, optionally, can only include on call by passing chain One sub-interface, it should be pointed out that in the case, the quantity of the call by passing chain of compound interface is at least two, with area Not in the prior art to the calling of single face.Exemplary, compound interface a includes two call by passing chains, each call by passing The call by passing order respectively interface 1 of chain, 2 → interface of interface 3.
S102, compound interface established according to the mark of sub-interface and the configuration information of at least one call by passing chain, with Compound interface is called for terminal device.
Wherein, compound interface includes at least one call by passing chain.
Specifically, server is identified according to the sub-interface of acquisition and the configuration information of at least one call by passing chain generates The application package of the compound interface is called, and the mark of compound interface is set, the mark is used to determine compound interface application journey The position of sequence bag, it is easy to other client devices to call compound interface by the mark.
Compound interface collocation method provided in an embodiment of the present invention, by obtaining compound interface configuration information, confidence should be matched somebody with somebody Breath is included between each sub-interface in the mark and at least one call by passing chain of the sub-interface in sub-interface configuration information Call by passing order, compound interface is established so that terminal device calls.By above-mentioned configuration, solving terminal device can not take to original Business end equipment function the problem of being improved and safeguarding, to form the compound of New function by being developed to the assembled of each sub-interface and connect Mouthful, substantially increase development efficiency.
On the basis of above-described embodiment, firstly, for the compound interface for including more than two call by passing chains, it is also necessary to Further configuration is made to the relation of more than two call by passing chains.
Secondly, in the compound interface configured in calling above-described embodiment, server need to obtain compound client device The input information of interface, and by the sub-interface in the input information assignment to compound interface of compound interface, configured according to sub-interface Information performs each sub-interface of compound interface successively or parallel, and the output information of compound interface is returned into visitor after being finished Family end equipment.Therefore, on the basis of above-described embodiment, compound interface configuration information also includes:
The message template of compound interface;Message template includes request message template and response message template.
Wherein, the data item of request message template is used to be assigned to have corresponding relation with the data item of request message template Each sub-interface, the data item of response message template are used to be sent to terminal device as the output information of compound interface.
Specifically, the input information of compound interface includes the input item of simple types or complicated type.Simple types it is defeated It is a content to enter item;The input item of complicated type includes structure and array, and its input item is not single one, but Multiple input items that multi-form is combined.
Server is inserted the input information of compound interface in the request message template of above-mentioned compound interface, request message mould The data item of plate is used to the input information of compound interface being assigned to corresponding each sub-interface.
Data transfer in the present embodiment between each sub-interface supports the transmission of above-mentioned complex data type, supports complexity Data type is configured to input and output transmission.Structured data transmission is exactly the leaf node value that transferring structure body is following successively; It is exactly to transmit all array members successively that array data, which is transmitted, and structure is similar to the data transfer of each array member.
Based on above-mentioned data transfer, the output information of compound interface equally includes the output of simple types or complicated type , server is inserted the output item for the sub-interface for needing to export in compound interface in the response message template of compound interface, rings The data item of message template is answered to be used to be sent to terminal device as the output information of compound interface.Wherein, needed in compound interface The quantity for the sub-interface to be exported can be one or more, be connect according to the son that the functional configuration of compound interface needs to export Mouthful.
Configuration of the summary to compound interface call by passing chain and the configuration to compound interface message module, now to this The compound interface collocation method that another embodiment provides is invented to elaborate.Fig. 3 is answering for another embodiment of the present invention offer The flow chart of interface allocation method is closed, as shown in figure 3, the compound interface collocation method of the present embodiment includes:
S201, compound interface configuration information is obtained, compound interface configuration information includes sub-interface configuration information.
Wherein, sub-interface configuration information includes the mark of sub-interface and the configuration information of at least one call by passing chain, Call by passing chain includes at least one sub-interface, and the configuration information of each call by passing chain includes each sub-interface on call by passing chain Between call by passing order.
S202, the calling order for obtaining each call by passing chain;Wherein, calling order includes parallel execution sequence and/or string Row execution sequence.
In the present embodiment, it is necessary to compound interface when group interface configuration information includes more than two call by passing chains The relation of each call by passing chain makees further configuration.Specifically, need to configure the calling order of each call by passing chain, calling order Including parallel execution sequence and/or serial execution sequence.Wherein, parallel execution sequence refers to the priority phase of each call by passing chain Together, can synchronization perform parallel;Serial execution sequence refers to the priority orders according to each call by passing chain, performs successively, After last sub-interface of the high call by passing chain of priority is finished, biography of the item as next priority is output it The input item of first sub-interface of call chain is passed, order performs, until last sub-interface of compound interface is finished.
Exemplary, compound interface a includes two call by passing chains, call by passing chain a1:1 → interface of interface 3, transmit and adjust With chain a2:2 → interface of interface 4, after compound interface configuration information is obtained, the calling order of each call by passing chain is configured, it can The calling order of energy:A1, a2 are performed parallel;A1, a2 are serially performed (a1 → a2 or a2 → a1).Wherein, the a1 performed parallel With a2 first sub-interface, interface 1 and interface 2, after obtaining corresponding input information respectively, its biography is each performed successively Pass other sub-interfaces in call chain.
S203, obtain request message template data item and the input item of each sub-interface of compound interface between it is corresponding close System, and the corresponding relation between the output item of each sub-interface of the data item of response message template and compound interface;
In this step, server is according to the defeated of the data item and each sub-interface of compound interface for obtaining request message template Enter the corresponding relation between item, the data item of request message template is assigned to each sub-interface corresponding with the data item, and root According to the call by passing order between each sub-interface on each call by passing chain, each sub-interface is performed successively.
After the output item that server gets each sub-interface, according to the data item and compound interface of response message template Each sub-interface output item between corresponding relation, the output item for the sub-interface for having corresponding relation is assigned to response message mould In plate, as the output information of compound interface, client terminal is ultimately sent to.Wherein, the output information of compound interface can be with The output information of output information or multiple sub-interfaces including sub-interface.
S204, compound interface is established, so that terminal device calls compound interface.
Wherein, compound interface includes at least one call by passing chain.
Server device is by after the compound interface information sharing configured in above-described embodiment to server, different clients End equipment the operation such as can scan for, inquire about by the server calls compound interface.Below to the tune of compound interface of the present invention It is explained as follows with method.
Fig. 4 is the flow chart for the compound interface call method that one embodiment of the invention provides, as shown in figure 4, this method Executive agent is server, specifically includes following steps:
S301, the call request for receiving compound interface, and obtain the input information in the call request.
Wherein, compound interface includes at least one call by passing chain, and call by passing chain includes at least one sub-interface;
Server receives the call request for the compound interface that client device is sent, and the request bag is containing the defeated of client device Enter information, input information includes the input information of simple types or complicated type.The input information of simple types only have one it is defeated Enter item;The input information of complicated type includes multiple input items.
S302, information assignment will be inputted to compound interface.
The input information got is assigned at least one sub-interface of compound interface by server in this step.For letter The input information of single type, in a kind of possible implementation, server is assigned to a sub-interface of compound interface, then The sub-interface is the first sub-interface on the call by passing chain of limit priority;In alternatively possible implementation, server It is assigned to multiple sub-interfaces of compound interface simultaneously, the multiple sub-interfaces being assigned both can be in same call by passing chain On, on different call by passing chains, according to the sub-interface configuration information of compound interface, each sub-interface can also be performed successively, its The sub-interface of middle lower priority waits the output item of its front interface, and performs the sub-interface with reference to initial input information.It is right In the input information of complicated type, its assignment principle is same as above, and here is omitted.
S303, each sub-interface called according to the configuration information of each call by passing chain of compound interface, each call by passing chain Configuration information includes the call by passing order between each sub-interface on call by passing chain.
Specifically, server will input information assignment to after the sub-interface of compound interface, according to the tune of call by passing chain With the call by passing order between each sub-interface on order and each call by passing chain, call perform each sub-interface successively:And The call by passing chain that row performs performs the first sub-interface on each call by passing chain simultaneously, and the output item of the first sub-interface is assigned It is worth the input item to rearmounted sub-interface, calls successively;Or, each sub-interface on each call by passing chain is performed successively.
S304, obtain compound interface each sub-interface output item.
Server preserves the output item of each sub-interface for the compound interface being finished, for transferring sub-interface to be output Output information.
S305, the output information for sending compound interface.
Wherein, the output information of compound interface includes the output item of at least one sub-interface of compound interface.
According to compound interface configuration information, output information of the output item as compound interface of sub-interface to be output is transferred It is sent to terminal device.Wherein, the quantity of sub-interface to be output is at least one.
Compound interface call method provided by the invention, the call request sent by obtaining client device, will be called Input information assignment in request is at least one sub-interface of called compound interface, and server is according to each biography of compound interface The configuration information for passing call chain calls perform each sub-interface successively, and using the output item of at least one sub-interface got as The output information of compound interface is sent to client device.Client device can be realized by above-mentioned invoked procedure fast search, The functions such as inquiry.
Above-mentioned compound interface call method is elaborated with specific embodiment below.Fig. 5 is another reality of the present invention The flow chart of the compound interface call method of example offer is provided, as shown in figure 5, the executive agent of this method is server, specific bag Include following steps:
S401, the call request for receiving compound interface, and obtain the input information in the call request.
S402, will input information input to request message template, according to the data item and compound interface of request message template Each sub-interface input item between corresponding relation, the son that the data item of request message template is assigned to corresponding relation connects Mouthful.
Specifically, server inputs the input information got to the request message template configured, further according to request Corresponding relation between the data item of message template and the input item of each sub-interface of compound interface, by the number of request message template It is assigned to each sub-interface of corresponding relation respectively according to item.Exemplary, server obtains the input information in call request, right In the input information of simple types, the input information is inputted into request message template, the data item x of request message template Represent, it is known that compound interface configuration information is call by passing chain a1:1 → interface of interface 3, call by passing chain a2:2 → interface of interface 4, corresponding relation between the data item of request message template and the input item of each sub-interface of compound interface is x and interface 1,2, 4 have corresponding relation, then the data item x of request message template are assigned into interface 1,2,4 simultaneously.Input letter for complicated type Breath, the input information is inputted into request message template, and the data item of request message template is represented with [x, y, z], it is known that multiple Conjunction interface configuration information is call by passing chain a1:Interface 1, call by passing chain a2:2 → interface of interface, 3 → interface 4, request message The corresponding relation of the data item of template and each sub-interface of compound interface for x with interface 1, interface 2, interface 3 corresponding, y and interface 1st, the correspondence of interface 4, z are corresponding with interface 2, interface 3.The function of being realized according to each sub-interface is different, and different corresponding passes can be set System, the present embodiment are not especially limited to this.
After the data item of request message template is assigned into each sub-interface of corresponding relation, server is adjusted according to transmission Called successively with the call by passing order between each sub-interface on the calling order of chain and each call by passing chain and perform each son Interface.
S403, each sub-interface called according to the configuration information of each call by passing chain of compound interface, each call by passing chain Configuration information includes the call by passing order between each sub-interface on call by passing chain.
S404, obtain compound interface each sub-interface output item.
S405, according to the corresponding pass between the data item and the output item of each sub-interface of compound interface of response message template System, the output item for each sub-interface for having corresponding relation is assigned to the data item of response message template, got response packet.
Specifically, output item of the server according to each sub-interface of the compound interface of acquisition, and the response report configured Corresponding relation between the data item of literary template and the output item of each sub-interface of compound interface, each son for having corresponding relation is connect The output item assignment of mouth obtains the response message as compound interface output information into response message template.Exemplary, quilt The configuration information of the compound interface of calling is a call by passing chain:1 → interface of interface, 2 → interface 3, the number of response message template Only there is corresponding relation with interface 3 according to item x, then the output item of interface 3 is assigned to data item x.Exemplary, called is compound Interface configuration information is call by passing chain a1:1 → interface of interface 3, call by passing chain a2:2 → interface of interface 4, each call by passing Chain performs parallel.The data item x of response message template has corresponding relation with interface 3, and data item y has corresponding relation with interface 4, then The output item of interface 3 is assigned to data item x, the output item of interface 4 is assigned to data item y.To sum up, the number of response message template It is at least one according to the quantity of item, i.e., the output item of a compound interface sub-interface is comprised at least in response message.
S406, using response message as the output information of compound interface it is sent to terminal device.
Each embodiment based on the configuration of above-mentioned compound interface and call method, in order to make it easy to understand, below by a tool Body example is described in detail.
The function to be realized of compound interface:Inquired about according to name is saved:Following three days weather of provincial capital, other prefecture-level cities work as Day weather.Define compound interface:queryWeather.
The Web Service interfaces of existing other systems have:
queryProvinceCode:Provincial capital's code is inquired about according to name is saved;
queryCities:Prefecture-level city's city codes list is had under its command according to name inquiry is saved;
queryCityWeather3Days:The following three days weather in city is inquired about according to city codes;
queryCitiesWeatherToday:According to the same day weather in each city of city codes list query.
Compound interface queryWeather configuration informations include:
Call by passing chain a1:queryProvinceCode→queryCityWeather3Days;
Call by passing chain a2:queryCities→queryCitiesWeatherToday.
The calling order of call by passing chain is a1, and a2 is performed parallel.
Compound interface queryWeather request message template is:
<queryWeatherRequest>
<provinceName></provinceName>
<date>#today#</date>
Explanation:#today# represents the date of parameter today, and system can be automatically real by parameter when runnable interface Example turns to the actual date
</queryWeatherRequest>
Compound interface queryWeather response message template is:
When calling compound interface queryWeather, the calling that server receives compound interface queryWeather please Ask, obtain the input information of call request, the input information is inputted into above-mentioned request message template:
It is pointed out that the sub-interface either in compound interface or compound interface, the input information of interface includes The input item of simple types or complicated type.Wherein, the input item of complicated type includes structure and array.
Exemplary, the input item of structure type, illustrate in xml format:
Array type can regard multiple structures repeated as, illustrate (this array type number in xml format It is 3 according to length, there are 3 number group memberships in other words):
Will input information input to compound interface queryWeather request message template, server further according to please The corresponding relation between the data item of message template and the input item of compound interface queryWeather each sub-interface is sought, please The data item of message template is asked to be assigned to the sub-interface of corresponding relation.According to compound interface queryWeather call by passing Call by passing order between each sub-interface on chain a1, a2, calls perform each sub-interface successively.
It will be understood by those skilled in the art that each sub-interface equally includes request message template and response message template, please The input item that each sub-interface is inserted in message template is sought, the output of each sub-interface after being finished is inserted in response message template .Each sub-interface is configured to the shared interface of existing server device,
The request message template and response message template of each sub-interface is set forth below:
The defeated of compound interface queryWeather each sub-interface is obtained by the response message template of above-mentioned each sub-interface Go out item, further according to compound interface queryWeather response message templates data item and compound interface queryWeather it is each Corresponding relation between the output item of sub-interface, the output item for each sub-interface for having corresponding relation is assigned to compound interface In queryWeather response message template, get response packet.The data of response message are as follows:
Terminal device is sent to using above-mentioned response message as compound interface queryWeather output information.
Fig. 6 is the structural representation for the compound interface generating means that one embodiment of the invention provides, as shown in fig. 6, this reality The compound interface generating means of example are applied, including:
Acquisition module 21, for obtaining compound interface configuration information, compound interface configuration information matches somebody with somebody confidence including sub-interface Breath;Wherein, sub-interface configuration information includes the mark of sub-interface and the configuration information of at least one call by passing chain, transmits and adjusts Include at least one sub-interface with chain, the configuration information of each call by passing chain is including between each sub-interface on call by passing chain Call by passing order;
Module 22 is established, is established for the configuration information of the mark according to sub-interface and at least one call by passing chain multiple Splice grafting mouth, so that terminal device calls compound interface, compound interface includes at least one call by passing chain.
The device of the present embodiment, it can be used for the technical scheme for performing above method embodiment, its realization principle and technology Effect is similar, and here is omitted.
Optionally, acquisition module 21, it is additionally operable to obtain the calling order of each call by passing chain;
Wherein, calling order includes parallel execution sequence and/or serial execution sequence.
Optionally, compound interface configuration information also includes:The message template of compound interface;Message template includes request message Template and response message template.
Acquisition module 21, it is additionally operable to obtain the data item of request message template and the input item of each sub-interface of compound interface Between corresponding relation, it is and corresponding between the data item of response message template and the output item of each sub-interface of compound interface Relation;
Wherein, the data item of request message template is used for each sub-interface for being assigned to corresponding relation, response message template Data item be used to be sent to terminal device as the output information of compound interface.
Fig. 7 is the structural representation for the compound interface calling device that one embodiment of the invention provides, as shown in fig. 7, this reality The compound interface calling device of example is applied, including:
Acquisition module 31 is received, for receiving the call request of compound interface, and obtains the input information in call request, Compound interface includes at least one call by passing chain, and call by passing chain includes at least one sub-interface;
Assignment module 32, for information assignment will to be inputted to compound interface;
Calling module 33, the configuration information for each call by passing chain according to compound interface calls each sub-interface, each to pass Passing the configuration information of call chain includes the call by passing order between each sub-interface on call by passing chain;
Acquisition module 34, the output item of each sub-interface for obtaining compound interface;
Sending module 35, for sending the output information of compound interface, the output information of compound interface includes compound interface At least one sub-interface output item.
The device of the present embodiment, it can be used for the technical scheme for performing above method embodiment, its realization principle and technology Effect is similar, and here is omitted.
Optionally, assignment module 32, it is additionally operable to input input information to request message template, according to request message template Data item and compound interface each sub-interface input item between corresponding relation, by the data item assignment of request message template To the sub-interface for having corresponding relation;According between the data item of response message template and the output item of each sub-interface of compound interface Corresponding relation, the output item for each sub-interface for having corresponding relation is assigned to the data item of response message template, met with a response Message;
Sending module 35, it is additionally operable to be sent to terminal device using response message as the output information of compound interface.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead to The related hardware of programmed instruction is crossed to complete.Foregoing program can be stored in a computer read/write memory medium.The journey Sequence upon execution, execution the step of including above-mentioned each method embodiment;And foregoing storage medium includes:ROM、RAM、SRAM、 DRAM, FLASH, magnetic disc or CD etc. are various can be with the medium of store program codes.
Finally it should be noted that:Various embodiments above is merely illustrative of the technical solution of the present invention, rather than its limitations;To the greatest extent The present invention is described in detail with reference to foregoing embodiments for pipe, it will be understood by those within the art that:Its according to The technical scheme described in foregoing embodiments can so be modified, either which part or all technical characteristic are entered Row equivalent substitution;And these modifications or replacement, the essence of appropriate technical solution is departed from various embodiments of the present invention technology The scope of scheme.

Claims (10)

  1. A kind of 1. compound interface collocation method, it is characterised in that including:
    Compound interface configuration information is obtained, the compound interface configuration information includes sub-interface configuration information;Wherein, the son connects Mouth configuration information, which includes the mark of sub-interface and the configuration information of at least one call by passing chain, the call by passing chain, to be included At least one sub-interface, the configuration information of each call by passing chain is including between each sub-interface on the call by passing chain Call by passing order;
    Compound interface is established according to the configuration information of the mark of the sub-interface and at least one call by passing chain, for terminal Compound interface described in equipment calls, the compound interface include at least one call by passing chain.
  2. 2. according to the method for claim 1, it is characterised in that methods described also includes:
    Obtain the calling order of each call by passing chain;
    Wherein, the calling order includes parallel execution sequence and/or serial execution sequence.
  3. 3. method according to claim 1 or 2, it is characterised in that the compound interface configuration information also includes:It is compound to connect The message template of mouth;The message template includes request message template and response message template;Methods described also includes:
    Obtain the corresponding pass between the data item of the request message template and the input item of each sub-interface of the compound interface System, and the corresponding pass between the data item of the response message template and the output item of each sub-interface of the compound interface System;
    Wherein, the data item of the request message template is used for each sub-interface for being assigned to corresponding relation, the response message The data item of template is used to be sent to terminal device as the output information of the compound interface.
  4. A kind of 4. compound interface call method, it is characterised in that including:
    The call request of compound interface is received, and obtains the input information in the call request, the compound interface is included extremely A few call by passing chain, the call by passing chain include at least one sub-interface;
    By the input information assignment to the compound interface;
    Each sub-interface, each call by passing chain are called according to the configuration information of each call by passing chain of the compound interface Configuration information include the call by passing chain on each sub-interface between call by passing order;
    Obtain the output item of each sub-interface of the compound interface;
    The output information of the compound interface is sent, the output information of the compound interface includes at least the one of the compound interface The output item of individual sub-interface.
  5. 5. according to the method for claim 4, it is characterised in that described compound to connect the input information assignment to described Mouthful, including:
    The input information is inputted to request message template, compound connect with described according to the data item of the request message template Corresponding relation between the input item of each sub-interface of mouth, corresponding relation has been assigned to by the data item of the request message template Sub-interface;
    Before the output information for sending the compound interface, including:
    , will according to the corresponding relation between the data item of response message template and the output item of each sub-interface of the compound interface The output item for having each sub-interface of corresponding relation is assigned to the data item of the response message template, gets response packet;
    Terminal device is sent to using the response message as the output information of the compound interface.
  6. A kind of 6. compound interface generating means, it is characterised in that including:
    Acquisition module, for obtaining compound interface configuration information, the compound interface configuration information includes sub-interface configuration information; Wherein, the sub-interface configuration information includes the mark of sub-interface and the configuration information of at least one call by passing chain, described Call by passing chain includes at least one sub-interface, and the configuration information of each call by passing chain is included on the call by passing chain Call by passing order between each sub-interface;
    Module is established, the configuration information for the mark according to the sub-interface and at least one call by passing chain is established compound Interface, so that terminal device calls the compound interface, the compound interface includes at least one call by passing chain.
  7. 7. device according to claim 6, it is characterised in that
    The acquisition module, it is additionally operable to obtain the calling order of each call by passing chain;
    Wherein, the calling order includes parallel execution sequence and/or serial execution sequence.
  8. 8. the device according to claim 6 or 7, it is characterised in that the compound interface configuration information also includes:It is compound to connect The message template of mouth;The message template includes request message template and response message template;
    Acquisition module, it is additionally operable to obtain data item and the input of each sub-interface of the compound interface of the request message template Corresponding relation between, and the data item of the response message template and the output item of each sub-interface of the compound interface Between corresponding relation;
    Wherein, the data item of the request message template is used for each sub-interface for being assigned to corresponding relation, the response message The data item of template is used to be sent to terminal device as the output information of the compound interface.
  9. A kind of 9. compound interface calling device, it is characterised in that including:
    Acquisition module is received, for receiving the call request of compound interface, and obtains the input information in the call request, institute Stating compound interface includes at least one call by passing chain, and the call by passing chain includes at least one sub-interface;
    Assignment module, for by the input information assignment to the compound interface;
    Calling module, the configuration information for each call by passing chain according to the compound interface call each sub-interface, respectively The configuration information of the call by passing chain includes the call by passing order between each sub-interface on the call by passing chain;
    Acquisition module, the output item of each sub-interface for obtaining the compound interface;
    Sending module, for sending the output information of the compound interface, the output information of the compound interface is including described multiple The output item of at least one sub-interface of splice grafting mouth.
  10. 10. device according to claim 9, it is characterised in that
    The assignment module, it is additionally operable to input the input information to request message template, according to the request message template Data item and the compound interface each sub-interface input item between corresponding relation, by the number of the request message template The sub-interface of corresponding relation is assigned to according to item;According to the data item of response message template and each sub-interface of the compound interface Output item between corresponding relation, the output item for each sub-interface for having corresponding relation is assigned to the response message template Data item, get response packet;
    The sending module, is additionally operable to the response message being sent to terminal as the output information of the compound interface and sets It is standby.
CN201711102261.4A 2017-11-10 2017-11-10 Compound interface configures and compound interface call method, device Pending CN107809332A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711102261.4A CN107809332A (en) 2017-11-10 2017-11-10 Compound interface configures and compound interface call method, device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711102261.4A CN107809332A (en) 2017-11-10 2017-11-10 Compound interface configures and compound interface call method, device

Publications (1)

Publication Number Publication Date
CN107809332A true CN107809332A (en) 2018-03-16

Family

ID=61591346

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711102261.4A Pending CN107809332A (en) 2017-11-10 2017-11-10 Compound interface configures and compound interface call method, device

Country Status (1)

Country Link
CN (1) CN107809332A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109787954A (en) * 2018-12-12 2019-05-21 四川商通实业有限公司 A kind of PHP interface security filter method and system
CN109842610A (en) * 2018-12-13 2019-06-04 平安科技(深圳)有限公司 Interface requests processing method, device, computer equipment and storage medium
CN110554968A (en) * 2019-09-10 2019-12-10 联想(北京)有限公司 interface calling method and device
CN110569031A (en) * 2019-09-10 2019-12-13 联想(北京)有限公司 programming implementation method and device
CN111638984A (en) * 2020-05-29 2020-09-08 拉扎斯网络科技(上海)有限公司 Interface configuration method, interface calling method and related device
CN112437126A (en) * 2020-11-10 2021-03-02 中国联合网络通信集团有限公司 Task flow processing method and device based on atomic interface
CN115442560A (en) * 2022-07-20 2022-12-06 合肥移瑞通信技术有限公司 Method, client, server, device and medium for acquiring multi-path data streams

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345420A (en) * 2013-06-03 2013-10-09 百度在线网络技术(北京)有限公司 Method for massively calling API interfaces, system for massively calling API interfaces and device for massively calling API interfaces
CN104866383A (en) * 2015-05-29 2015-08-26 北京金山安全软件有限公司 Interface calling method and device and terminal
CN106528418A (en) * 2016-10-28 2017-03-22 广东浪潮大数据研究有限公司 Test method and device
CN106649488A (en) * 2016-09-30 2017-05-10 广东网金数据服务有限公司 Method and device for invoking multi-data-source interaction interface
CN107329762A (en) * 2017-06-30 2017-11-07 上海棠棣信息科技股份有限公司 A kind of method and system for describing to service with integrated software

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345420A (en) * 2013-06-03 2013-10-09 百度在线网络技术(北京)有限公司 Method for massively calling API interfaces, system for massively calling API interfaces and device for massively calling API interfaces
CN104866383A (en) * 2015-05-29 2015-08-26 北京金山安全软件有限公司 Interface calling method and device and terminal
CN106649488A (en) * 2016-09-30 2017-05-10 广东网金数据服务有限公司 Method and device for invoking multi-data-source interaction interface
CN106528418A (en) * 2016-10-28 2017-03-22 广东浪潮大数据研究有限公司 Test method and device
CN107329762A (en) * 2017-06-30 2017-11-07 上海棠棣信息科技股份有限公司 A kind of method and system for describing to service with integrated software

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109787954A (en) * 2018-12-12 2019-05-21 四川商通实业有限公司 A kind of PHP interface security filter method and system
CN109787954B (en) * 2018-12-12 2021-08-10 四川商通实业有限公司 PHP interface security filtering method and system
CN109842610A (en) * 2018-12-13 2019-06-04 平安科技(深圳)有限公司 Interface requests processing method, device, computer equipment and storage medium
CN109842610B (en) * 2018-12-13 2022-07-26 平安科技(深圳)有限公司 Interface request processing method and device, computer equipment and storage medium
CN110554968A (en) * 2019-09-10 2019-12-10 联想(北京)有限公司 interface calling method and device
CN110569031A (en) * 2019-09-10 2019-12-13 联想(北京)有限公司 programming implementation method and device
CN111638984A (en) * 2020-05-29 2020-09-08 拉扎斯网络科技(上海)有限公司 Interface configuration method, interface calling method and related device
CN112437126A (en) * 2020-11-10 2021-03-02 中国联合网络通信集团有限公司 Task flow processing method and device based on atomic interface
CN115442560A (en) * 2022-07-20 2022-12-06 合肥移瑞通信技术有限公司 Method, client, server, device and medium for acquiring multi-path data streams

Similar Documents

Publication Publication Date Title
CN107809332A (en) Compound interface configures and compound interface call method, device
CN108416577B (en) Block chain service system
CN113037831B (en) Service gateway message processing method and device
CN108510389A (en) Intelligent contract call method, equipment and readable storage medium storing program for executing based on block chain
CN101483651B (en) Data transmission method based map queue
CN100545851C (en) The remote system administration of utility command row environment
CN112463211A (en) System architecture transformation method compatible with multiple development architectures and system architecture
CN106375458A (en) Service call system, method and device
CN101753592B (en) Method and system for data processing
CN113010332A (en) Remote service calling method, device, equipment and storage medium
CN106027534A (en) System for implementing financial message processing based on Netty
CN113467972A (en) Communication interface construction method, communication interface construction device, computer equipment and storage medium
CN108733457A (en) The implementation method and device of distributed transaction
CN104239508A (en) Data query method and data query device
CN107562489A (en) A kind of method and system based on web page management module management plug-in unit
CN112217845B (en) Data transmission method based on Netconf protocol and related equipment
CN107040613A (en) A kind of message transmitting method and system
US20070094278A1 (en) Data transfer services
WO2019043462A1 (en) Systems and methods for creating automated interface transmission between heterogeneous systems in an enterprise ecosystem
CN112835700B (en) Data processing method, device, equipment and storage medium based on intelligent contract
US20140019515A1 (en) Adaptive business logic configurator
CN103001962A (en) Business support method and system
CN104714760B (en) A kind of method and device for reading and writing storage device
WO2015192796A1 (en) Automatic application release method and system based on trusted service manager
CN110377292A (en) Service configuration method, apparatus, computer 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180316