CN102779071A - Method, device and system for calling software interface - Google Patents

Method, device and system for calling software interface Download PDF

Info

Publication number
CN102779071A
CN102779071A CN2012101967037A CN201210196703A CN102779071A CN 102779071 A CN102779071 A CN 102779071A CN 2012101967037 A CN2012101967037 A CN 2012101967037A CN 201210196703 A CN201210196703 A CN 201210196703A CN 102779071 A CN102779071 A CN 102779071A
Authority
CN
China
Prior art keywords
software interface
called
parameter information
information
calls
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
CN2012101967037A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN2012101967037A priority Critical patent/CN102779071A/en
Publication of CN102779071A publication Critical patent/CN102779071A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention discloses a method, a device and a system for calling software interface, which relate to the technical field of software, and still can call the software interface when parameter information of the software interface of a called end or a calling end changes. The method comprises the following steps of: receiving first software interface calling request information transmitted by the calling end, wherein the information carries the first parameter information of the called software interface; if the called software interface does not correspond to the first parameter information at the called end, obtaining the second parameter information of the called software interface at the called end according to the first parameter information; and transmitting second software interface calling request information carrying the second parameter information to the called end, thereby helping the called end to call the called software interface according to the second parameter information. The method, the device and the system are mainly used for calling the software interface.

Description

Software interface call method, device and system
Technical field
The present invention relates to software technology field, relate in particular to software interface call method, device and system.
Background technology
In computer realm, it is a kind of common schema of Inter-Process Communication that remote interface calls (RPC, Remote Procedure Call), is generally used for laying respectively between two processes on two computing machines in the consolidated network and carries out communication.
Can comprise client and service end in the remote interface calling system; The corresponding client pile function of each software interface of client; The client pile function is a coding function by the parameter generation of the corresponding software interface of this client pile function; The corresponding service end pile function of each software interface of service end, service end pile function are Gray code functions by the parameter generation of the corresponding software interface of this service end pile function.For same software interface, clients corresponding pile function and service end pile function are all generated by the parameter of this software interface, complement one another.When client need be called software interface of long-range Server (server) end; At first; Client is used with the corresponding client pile function of software interface that is called the parameter of the software interface that is called is encoded; Packet with the Parameters Transformation of the software interface that is called becomes can on network, transmit forms a software interface call request bag, and client passes to server through network communication with this interface interchange request package.Server uses with above-mentioned client pile function corresponding server pile function docking port call request bag and carries out Gray code; From the interface interchange request package, extract the parameter of the software interface that is called; And the corresponding interface of parameter call corresponding implementation module of the software interface that is called of use extraction, realize after module is carried out corresponding operating the result being returned to client.
State in realization in the process that remote interface calls; The inventor finds to have following problem in the prior art at least: along with updating of mechanics of communication, client or service end often need be upgraded, and after client or the service end upgrading; If the software interface parameter of the software interface parameter of client or service end also changes thereupon; In order to make above-mentioned remote interface call smooth completion, after just need changing, all clients that use the software interface of running parameter are upgraded in the software interface parameter of service end; The software interface parameter and the service end of this client are consistent; Equally, after the software interface parameter of client changes, need upgrade to the service end of the software interface that uses running parameter; The software interface parameter and the client of this service end are consistent, make maintenance cost bigger.
Summary of the invention
Embodiments of the invention provide a kind of software interface call method, device and system, can still can accomplish software interface and call at the end that is called, or the parameter information that calls the software interface of end when changing.
Embodiments of the invention adopt following technical scheme:
On the one hand, a kind of software interface call method comprises:
The first software interface call request message that end sends is called in reception, carries first parameter information of the software interface that is called in the said first software interface call request message;
If the said software interface that is called at not corresponding said first parameter information of end that is called, then obtains the said software interface that is called at second parameter information of end that is called according to said first parameter information;
Send the second software interface call request message to the said end that is called; Carry said second parameter information in the wherein said second software interface call request message, so that the said end that is called calls the said software interface that is called according to said second parameter information.
Further optional, carry the operation indication information in said first software interface call request message and the said second software interface call request message, said operation indication information is used to indicate the said content of operation that the end request is carried out that calls, and said method also comprises:
Receive said first of the end transmission that is called and call Indication message as a result; Said first calls as a result, and Indication message carries operation result information and said second parameter information; Said operation result information comprises that the said end that is called calls the said software interface that is called according to said second parameter information, and carries out the operating result of the corresponding content of operation of said operation indication information;
Obtain the said software interface that is called at said first parameter information that calls end according to said second parameter information;
Send second and call Indication message as a result to the said end that calls, and call as a result said second and to carry said first parameter information and said operation result information in the Indication message.
Further optional, the said first software interface call request message is also carried said first identifying information that calls the software interface that is called in the end;
The said software interface that is called at not corresponding said first parameter information of end that is called is: if said first identifying information is different with second identifying information of the said software interface that is called of end that is called, the then said software interface that is called is at not corresponding said first parameter information of end that is called.
Further optional, said method also comprises:
Receive the said parameter update Indication message that calls end or the said end transmission that is called; Carry the said perhaps said end that is called of end that calls in the said parameter update Indication message and go up the software interface information that parameter information changes, reach the parameter information after this software interface changes;
Generate the said perhaps said end that is called of end that calls according to said parameter update Indication message and go up the 3rd corresponding identifying information of this software interface parameter current information, and preserve the corresponding relation of this software interface and identifying information and the corresponding relation of each identifying information and each parameter information.
Further optional, said method also comprises:
If said first parameter information is identical at second parameter information of the end that is called with the said software interface that is called; Then send the 3rd software interface call request message, and in said the 3rd software interface call request message, carry said first parameter information to the said end that is called.
On the other hand, a kind of software interface calling device comprises:
First receiving element is used to receive and calls the first software interface call request message that end sends, and carries first parameter information of the software interface that is called in the said first software interface call request message;
First acquiring unit is used for if the said software interface that is called at not corresponding said first parameter information of end that is called, then obtains the said software interface that is called at second parameter information of end that is called according to said first parameter information;
First transmitting element; Be used for sending the second software interface call request message to the said end that is called; Carry said second parameter information in the wherein said second software interface call request message, so that the said end that is called calls the said software interface that is called according to said second parameter information.
Further optional, carry the operation indication information in said first software interface call request message and the said second software interface call request message, said operation indication information is used to indicate the said content of operation that the end request is carried out that calls, and said device also comprises:
Second receiving element; Be used to receive said first of the end transmission that is called and call Indication message as a result; Said first calls as a result, and Indication message carries operation result information and said second parameter information; Said operation result information comprises that the said end that is called calls the said software interface that is called according to said second parameter information, and carries out the operating result of the corresponding content of operation of said operation indication information;
Second acquisition unit is used for obtaining the said software interface that is called at said first parameter information that calls end according to said second parameter information;
Second transmitting element is used for sending second and calling Indication message as a result to the said end that calls, and calls as a result said second and to carry said first parameter information and said operation result information in the Indication message.
Further optional, the said first software interface call request message is also carried said first identifying information that calls the software interface that is called in the end;
The said software interface that is called at not corresponding said first parameter information of end that is called is: if said first identifying information is different with second identifying information of the said software interface that is called of end that is called, the then said software interface that is called is at not corresponding said first parameter information of end that is called.
Further optional, also comprise:
The 3rd receiving element; Be used to receive the said parameter update Indication message that calls end or the said end transmission that is called; Carry the said perhaps said end that is called of end that calls in the said parameter update Indication message and go up the software interface information that parameter information changes, reach the parameter information after this software interface changes;
Updating block; Be used for generating the said perhaps said end that is called of end that calls and go up the 3rd corresponding identifying information of this software interface parameter current information, and preserve the corresponding relation of this software interface and identifying information and the corresponding relation of each identifying information and each parameter information according to said parameter update Indication message.
Further optional, also comprise:
The 3rd transmitting element; Be used for if said first parameter information is identical at second parameter information of the end that is called with the said software interface that is called; Then send the 3rd software interface call request message, and in said the 3rd software interface call request message, carry said first parameter information to the said end that is called.
On the one hand, a kind of software interface calling system comprises again: call end, and be called end and software interface calling device, wherein:
The said end that calls is used for the first software interface call request message to said software interface calling device transmission, carries first parameter information of the software interface that is called in the said first software interface call request message;
The said end that is called is used to receive the second software interface call request message that said software interface calling device sends; Carry said second parameter information in the wherein said second software interface call request message, and call the said software interface that is called according to said second parameter information;
Said software interface calling device is above-mentioned each software interface calling device.
Software interface call method, device and system that the embodiment of the invention provides; Can be called software interface not simultaneously at said first parameter information and said, obtain the said software interface that is called at second parameter information of end that is called at second parameter information of the end that is called; Send the second software interface call request message to the said end that is called; And in the said second software interface call request message, carry said second parameter information, so that the said end that is called calls the said software interface that is called according to said second parameter information.Therefore, even owing to the end that is called, or call end and upgrade, the parameter information that make the end that is called, perhaps calls the software interface of end changes, and also can accomplish software interface and call.
Description of drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the invention; The accompanying drawing of required use is done to introduce simply in will describing embodiment below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
The process flow diagram of a kind of software interface call method that Fig. 1 provides for the embodiment of the invention;
The process flow diagram of the another kind of software interface call method that Fig. 2 provides for the embodiment of the invention;
Fig. 3 is the concrete applicating flow chart of the pairing embodiment of Fig. 2;
Fig. 4 is the embodiment of the invention is used method shown in Figure 2 in attendance management a process flow diagram;
The structural drawing of a kind of software interface calling device that Fig. 5 provides for the embodiment of the invention;
The structural drawing of the another kind of software interface calling device that Fig. 6 provides for the embodiment of the invention;
The structural drawing of a kind of software interface calling system that Fig. 7 provides for the embodiment of the invention.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
The embodiment of the invention provides a kind of software interface call method, and is as shown in Figure 1, comprising:
101, receive the first software interface call request message of calling the end transmission, carry first parameter information of the software interface that is called in the said first software interface call request message.
102, if the said software interface that is called, then obtains the said software interface that is called at not corresponding first parameter information of end that is called at second parameter information of end that is called.
103, send the second software interface call request message to the said end that is called; And in the said second software interface call request message, carry said second parameter information, so that the said end that is called calls the said software interface that is called according to said second parameter information.
The software interface call method that present embodiment provides can during at not corresponding said first parameter information of the end that is called, obtain the said software interface that is called at second parameter information of end that is called at the said software interface that is called; Send the second software interface call request message to the said end that is called; And in the said second software interface call request message, carry said second parameter information, so that the said end that is called calls the said software interface that is called according to said second parameter information.Therefore, even owing to the end that is called, or call end and upgrade, the parameter information that make the end that is called, perhaps calls the software interface of end changes, and also can accomplish software interface and call.
As a kind of improvement of present embodiment, the embodiment of the invention provides another kind of software interface call method, and at first, the calling end in the present embodiment is introduced with service end: the calling end in the present embodiment is a client (Client), and service end is a server end; Client comprises: client stubs (Client Stub), client network delivery module, the service end-apparatus comprises: server end stubs, server end network delivery module.As shown in Figure 2, comprising:
201, receive the first software interface call request message of calling the end transmission, carry first parameter information of the software interface that is called in the said first software interface call request message.
Client in the present embodiment also is preset with the identification information of each software interface except being preset with each software interface clients corresponding pile function.
Concrete; The software interface calling device receives and calls the first software interface call request message that end sends; Carry first parameter information of the software interface that is called, first identifying information that calls the software interface that is called in the end and operation indication information in the said first software interface call request message, said operation indication information is used to indicate the said content of operation that the end request is carried out that calls.
Client transmission software interface call request message process is following:
1. client triggers according to the user, loads the software interface clients corresponding stubs that is called, and calls the software interface clients corresponding pile function that is called from this client stubs.
2. the client stubs imports the parameter and the first identifying information α of the software interface that is called into, and converts this parameter and the first identifying information α to can on network, transmit packet through the client pile function that calls, and forms a call request bag.
3. the client stubs passes to the client network delivery module with the call request bag.
4. the client network delivery module adopts the mode of network communication that the call request bag is passed to server end network delivery module.
About client pile function and server end pile function: with ASN.1 (abstract syntax notation one; Abstract Syntax Notation One) be example; ASN.1 provides a kind of data description mode of standard; Provide several kinds of digital coding functions to be used for converting the data structure of standard to can on network, transmit packet simultaneously, be widely used between process in the telecommunication.
Common application model is at first to use data structure of standard syntax definition of ASN.1 definition; As shown in table 1; The data structure of a software interface parameter and the data structure of return results have been defined; Use the ASN.1 compiler to adopt certain concrete programming language (like the C language) then, use concrete programming language to describe this data structure, generation simultaneously becomes the coding function of network packet to reach the Gray code function that extracts this data structure of filling from network packet this data structure content packaging., above-mentioned coding function can think that client pile function and the above-mentioned Gray code function of server end pile function can think client pile function and server end pile function.
Figure BDA00001768162900071
Table 1
Remote interface call flow based on ASN.1 is as shown in Figure 2, and is similar with general remote interface call flow, and stubs is coding and the Gray code function that is generated by the ASN.1 compiler here:
202, judge that the said software interface that is called is at whether corresponding first parameter information of end that is called.
One, can be provided with following software interface configuration information in the software interface calling device in the present embodiment:
1. the parameter current corresponding identification information of each software interface of server end, and the software interface parameter information of corresponding each identifying information;
Each software interface of server end compatible institute have been friends in the past parameter corresponding identification information and the corresponding software interface parameter information of each old identifying information.
3. the transformational relation between the software interface parameter information in the current software interface parameter information of each software interface and each Geju City.
Concrete; The software interface calling device is checked the software interface configuration information; Finding that the correspondence software interface that is called is β at the server end identifying information, be not α, and there is transformational relation in identifying information α to identifying information β; The software interface calling device converts the corresponding software interface parameter information of identifying information β according to identifying information α extracts the software interface that is called from the call request bag parameters data into according to transformation rule.
Two, perhaps, dispose software interface configuration map listing between the software interface parameter information in a current software interface parameter information that has write down each software interface and each Geju City in the software interface calling device.
The software interface calling device judges whether first parameter information is identical at second parameter information of the end that is called with the said software interface that is called.Concrete, the software interface calling device judge said first identifying information be called hold said be called software interface second identifying information whether different.If said first identifying information and the end that is called be said be called software interface second identifying information different, the then said software interface that is called is held not corresponding first parameter information being called.
If the said software interface that is called is at not corresponding first parameter information of end that is called, then execution in step 203; Otherwise, execution in step 208.
203, obtain the said software interface that is called at second parameter information of end that is called.
Concrete, the software interface calling device generates the said software interface that is called at second parameter information of end that is called according to the software interface configuration information and first parameter information.Perhaps, the software interface calling device obtains the said software interface that is called at second parameter information of end that is called according to first parameter information from software interface configuration map listing.
204, send the second software interface call request message to the said end that is called; And in the said second software interface call request message, carry said second parameter information, so that the said end that is called calls the said software interface that is called according to said second parameter information.
Carry in the said second software interface call request message and the said first software interface call request message identical operations indication information.
Concrete, the end that is called calls the said software interface that is called according to said second parameter information and comprises:
1. after server end network delivery module receives the call request bag of client network delivery module transmission, the call request bag is passed to the server end stubs.
2. the server end stubs extracts second parameter information of the software interface that is called from the call request bag.
3. the server end stubs extracts second parameter information of the software interface that is called from the call request bag, and uses this second parameter call server to realize the software interface that module is corresponding.
4. server is realized after the corresponding operation of module executable operations indication information operating result being returned to the server stubs.
205, receive said first of the end transmission that is called and call Indication message as a result; Said first calls as a result, and Indication message carries operation result information and said second parameter information; Said operation result information comprises that the said end that is called calls the said software interface that is called according to said second parameter information, and carries out the operating result of the corresponding content of operation of said operation indication information.
206, obtain the said software interface that is called at said first parameter information that calls end according to said second parameter information.
Similar step 203 software interface calling device obtains the said software interface that is called at said first parameter information that calls end according to said second parameter information.
207, send second and call Indication message as a result to the said end that calls, and call as a result said second and to carry said first parameter information and said operation result information in the Indication message.
Concrete, the software interface calling device holds network delivery module transmission second to call Indication message as a result to said calling.
208, send the 3rd software interface call request message to the said end that is called, and in said the 3rd software interface call request message, carry said first parameter information.
The said software interface that is called is at corresponding first parameter information of end that is called; Explain that the software interface that is called is consistent in the parameter of client with parameter at server end; Therefore, the software interface calling device directly sends the 3rd software interface call request message of carrying first parameter information to the end that is called and just can accomplish software interface and call.
209, receive the said parameter update Indication message that calls end or the said end transmission that is called; Carry the said perhaps said end that is called of end that calls in the said parameter update Indication message and go up the software interface information that parameter information changes, reach the parameter information after this software interface changes.
Each software interface corresponding parameters information of client and server end often needs to change; For after the software interface parameter information that makes end wherein or two ends changes; Do not influence the call flow of software interface; When the software interface information of client and server end changes, can software interface change in information situation be sent to the software interface calling device in the present embodiment.
210, generate the said perhaps said end that is called of end that calls according to said parameter update Indication message and go up the 3rd corresponding identifying information of this software interface parameter current information, and preserve the corresponding relation of this software interface and identifying information and the corresponding relation of each identifying information and each parameter information.
The software interface calling device upgrades preset software interface configuration information or software interface configuration map listing according to the parameter update Indication message that receives.
Present embodiment is not done qualification to the execution time of step 209-210, can be in the optional position in the software interface call method flow process that present embodiment provides, and also individualism in the flow process of the software interface call method that present embodiment provides not.
The software interface call method that present embodiment provides can during at not corresponding said first parameter information of the end that is called, obtain the said software interface that is called at second parameter information of end that is called at the said software interface that is called; Send the second software interface call request message to the said end that is called; And in the said second software interface call request message, carry said second parameter information, so that the said end that is called calls the said software interface that is called according to said second parameter information.Therefore, even owing to the end that is called, or call end and upgrade, the parameter information that make the end that is called, perhaps calls the software interface of end changes, and also can accomplish software interface and call.
Through a concrete pairing software interface call method of example description Fig. 2 that calls, in the present embodiment, call end and be client below, the end that is called is server, and is as shown in Figure 3, may further comprise the steps:
301, server is to software interface calling device registration TestV1.20.
302, client is sent call request to the software interface calling device, request call TestV1.00.
303, the software interface calling device loads TestV1.00 and TestV1.20 interface definition, Parameters Transformation rule from configuration file.
304, software interface calling device conversion TestV1.00 calls to wrap to TestV1.20 and calls bag.
305, the software interface calling device sends the TestV1.20 request of calling to server.
306, server returns TestV1.20 to the software interface calling device.
307, software interface calling device conversion TestV1.20 result data bag is to TestV1.00 result data bag.
308, the software interface calling device returns TestV1.00 result to client.
309, the software interface calling device returns the server version change information to client.
For above-mentioned software interface call method further clearly is described; Call with the software interface in the Work attendance management system commonly used below and be example; Specify the implementation procedure of above-mentioned software interface call method, concrete scene is: a simple Work attendance management system comprises two processes; A business processing process A is responsible for the application of asking for leave of process user; Another one daily record process B is responsible for the recording operation daily record.After A has handled the application of asking for leave, with calling Operation Log of interface record that B provides.
As shown in Figure 4, comprising:
401, process B is to software interface calling device registration TestV1.20.
At first, the log record interface definition that provides of B process is:
Figure BDA00001768162900121
Afterwards, daily record process B upgraded, and enhancing has appearred in its log record interface definition, had increased an IPAddr field:
Figure BDA00001768162900122
402, process A sends call request to the software interface calling device, carries the preceding interface parameters of process B upgrading in the call request.
403, before the software interface calling device loads process B upgrading from configuration file, the definition of upgrading rear port, Parameters Transformation rule.
404, calling before the software interface calling device conversion process B upgrading wrapped the bag that calls to the process B upgrading.
405, the software interface calling device carries the interface parameters information after process B upgrades to process B transmission interface call request in this request.
406, the interface interchange result data bag of process B after the software interface calling device returns upgrading.
407, calling after the software interface calling device conversion process B upgrading called the result data bag before result data bag to the process B upgrading.
408, the software interface calling device calls the result data bag before process A returns process B upgrading.
409, the software interface calling device returns process B version change information to process A.
In the present embodiment; Variation has appearred in the AuditRecord organization definition; If process A does not upgrade synchronously; Do not comprise new IPAddr field from the AuditRecord structure the inside, far call request command bag the inside that process A mails to process B so, this can cause process B process that the order bag is made mistakes when decoding.This scene can use scheme provided by the invention to solve after process B upgrading, process A do not have under the situation of supporting upgrading still can normal call process B interface.
In order to realize above-mentioned software interface call method, the embodiment of the invention provides a kind of software interface calling device, and is as shown in Figure 5, comprising: first receiving element 51, first acquiring unit 52, first transmitting element 53.
Wherein, first receiving element 51 is used to receive and calls the first software interface call request message that end sends, and carries first parameter information of the software interface that is called in the said first software interface call request message;
First acquiring unit 52 is used for if the said software interface that is called at not corresponding said first parameter information of end that is called, then obtains the said software interface that is called at second parameter information of end that is called according to said first parameter information;
First transmitting element 53; Be used for sending the second software interface call request message to the said end that is called; And in the said second software interface call request message, carry said second parameter information, so that the said end that is called calls the said software interface that is called according to said second parameter information.
The software interface calling device that present embodiment provides, first acquiring unit can during at not corresponding said first parameter information of the end that is called, obtain the said software interface that is called at second parameter information of end that is called at the said software interface that is called; First transmitting element sends the second software interface call request message to the said end that is called; And in the said second software interface call request message, carry said second parameter information, so that the said end that is called calls the said software interface that is called according to said second parameter information.Therefore, even owing to the end that is called, or call end and upgrade, the parameter information that make the end that is called, perhaps calls the software interface of end changes, and also can accomplish software interface and call.
In other words; The embodiment of the invention increases a software interface calling device (also can be described as interface switching device Interface Adaptor) in far call, be used for changing automatically the interface interchange that calls end (for example client Client) and the end that is called (for example server end Server) centre of different editions
Through in software bus, increasing a software interface calling device; Through the configuration file mode Parameters Transformation rule between each interface different editions is set; Automatically carry out the interface parameters conversion by the software interface calling device; Thereby solve interface binary compatible problem to a certain extent; The end (for example server end Server) that is called is realized and can supported a plurality of versions to call end (for example client Client) through a cover code, and then end (for example client Client), the inconsistent abnormal conditions that cause of the end that is called (for example server end Server) version are called in solution to a certain extent.
A kind of improvement as present embodiment; The embodiment of the invention provides another kind of software interface calling device; As shown in Figure 5, comprising: first receiving element 61, first acquiring unit 62, first transmitting element 63, second receiving element 64, second acquisition unit 65, second transmitting element 66, the 3rd receiving element 67, updating block 68, the 3rd transmitting element 69.
Wherein, first receiving element 61 is used to receive and calls the first software interface call request message that end sends, and carries first parameter information of the software interface that is called in the said first software interface call request message; Carry the operation indication information in said first software interface call request message and the said second software interface call request message; Said operation indication information is used to indicate the said content of operation that the end request is carried out that calls, and the said first software interface call request message is also carried said first identifying information that calls the software interface that is called in the end.
First acquiring unit 62 is used for if the said software interface that is called at not corresponding said first parameter information of end that is called, then obtains the said software interface that is called at second parameter information of end that is called according to said first parameter information;
Concrete, if said first identifying information and the end that is called said be called software interface second identifying information different, the then said software interface that is called is held not corresponding said first parameter information being called.
First transmitting element 63; Be used for sending the second software interface call request message to the said end that is called; And in the said second software interface call request message, carry said second parameter information, so that the said end that is called calls the said software interface that is called according to said second parameter information.
Second receiving element 64; Be used to receive said first of the end transmission that is called and call Indication message as a result; Said first calls as a result, and Indication message carries operation result information and said second parameter information; Said operation result information comprises that the said end that is called calls the said software interface that is called according to said second parameter information, and carries out the operating result of the corresponding content of operation of said operation indication information;
Second acquisition unit 65 is used for obtaining the said software interface that is called at said first parameter information that calls end according to said second parameter information;
Second transmitting element 66 is used for sending second and calling Indication message as a result to the said end that calls, and calls as a result said second and to carry said first parameter information and said operation result information in the Indication message.
The 3rd receiving element 67; Be used to receive the said parameter update Indication message that calls end or the said end transmission that is called; Carry the said perhaps said end that is called of end that calls in the said parameter update Indication message and go up the software interface information that parameter information changes, reach the parameter information after this software interface changes;
Updating block 68; Be used for generating the said perhaps said end that is called of end that calls and go up the 3rd corresponding identifying information of this software interface parameter current information, and preserve the corresponding relation of this software interface and identifying information and the corresponding relation of each identifying information and each parameter information according to said parameter update Indication message.
The 3rd transmitting element 69; Be used for if said first parameter information is identical at second parameter information of the end that is called with the said software interface that is called; Then send the 3rd software interface call request message, and in said the 3rd software interface call request message, carry said first parameter information to the said end that is called.
The software interface calling device that present embodiment provides, first acquiring unit can during at not corresponding said first parameter information of the end that is called, obtain the said software interface that is called at second parameter information of end that is called at the said software interface that is called; First transmitting element sends the second software interface call request message to the said end that is called; And in the said second software interface call request message, carry said second parameter information, so that the said end that is called calls the said software interface that is called according to said second parameter information.Therefore, even owing to the end that is called, or call end and upgrade, the parameter information that make the end that is called, perhaps calls the software interface of end changes, and also can accomplish software interface and call.
In other words; The embodiment of the invention increases a software interface calling device (also can be described as interface switching device Interface Adaptor) in far call, be used for changing automatically the interface interchange that calls end (for example client Client) and the end that is called (for example server end Server) centre of different editions
Through in software bus, increasing a software interface calling device; Through the configuration file mode Parameters Transformation rule between each interface different editions is set; Automatically carry out the interface parameters conversion by the software interface calling device; Thereby solve interface binary compatible problem to a certain extent; The end (for example server end Server) that is called is realized and can supported a plurality of versions to call end (for example client Client) through a cover code, and then end (for example client Client), the inconsistent abnormal conditions that cause of the end that is called (for example server end Server) version are called in solution to a certain extent.
The software interface calling device that the embodiment of the invention provides can be an independent device, also can be used as the part of server.The software interface that the software interface call method that the embodiment of the invention provides not only can be used between the client and server end calls; Also can be used between client and the client; And Inter-Process Communication; Provide one to call Proxy (agent software or acting server also can be a kind of access to netwoks modes) to intermodule API (API, Application Programming Interface); Realize similar Parameters Transformation by calling Proxy, thereby avoid intermodule interlock upgrading.
The embodiment of the invention provides a kind of software interface calling system, and is as shown in Figure 7, comprising: call end 71, end 72 and software interface calling device 73 are called.
Wherein: the said end 71 that calls is used for the first software interface call request message to said software interface calling device 73 transmissions, carries first parameter information of the software interface that is called in the said first software interface call request message.
The said end 72 that is called is used to receive the second software interface call request message that said software interface calling device 73 sends; Carry said second parameter information in the wherein said second software interface call request message, and call the said software interface that is called according to said second parameter information.
The software interface calling device of said software interface calling device 73 for relating in the foregoing description.
The software interface calling system that present embodiment provides can during at not corresponding said first parameter information of the end that is called, obtain the said software interface that is called at second parameter information of end that is called at the said software interface that is called; Send the second software interface call request message to the said end that is called; And in the said second software interface call request message, carry said second parameter information, so that the said end that is called calls the said software interface that is called according to said second parameter information.Therefore, even owing to the end that is called, or call end and upgrade, the parameter information that make the end that is called, perhaps calls the software interface of end changes, and also can accomplish software interface and call.
In other words; In the software interface calling system that present embodiment provides; In far call, increase a software interface calling device (also can be described as interface switching device Interface Adaptor), be used for changing automatically the interface interchange that calls end (for example client Client) and the end that is called (for example server end Server) centre of different editions
Through in software bus, increasing a software interface calling device; Through the configuration file mode Parameters Transformation rule between each interface different editions is set; Automatically carry out the interface parameters conversion by the software interface calling device; Thereby solve interface binary compatible problem to a certain extent; The end (for example server end Server) that is called is realized and can supported a plurality of versions to call end (for example client Client) through a cover code, and then end (for example client Client), the inconsistent abnormal conditions that cause of the end that is called (for example server end Server) version are called in solution to a certain extent.
Through the description of above embodiment, the those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential common hardware, can certainly pass through hardware, but the former is better embodiment under a lot of situation.Based on such understanding; The part that technical scheme of the present invention contributes to prior art in essence in other words can be come out with the embodied of software product, and this computer software product is stored in the storage medium that can read, like the floppy disk of computing machine; Hard disk or CD etc.; Comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
The above; Be merely embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technician who is familiar with the present technique field is in the technical scope that the present invention discloses; Can expect easily changing or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion by said protection domain with claim.

Claims (11)

1. a software interface call method is characterized in that, comprising:
The first software interface call request message that end sends is called in reception, carries first parameter information of the software interface that is called in the said first software interface call request message;
If the said software interface that is called at not corresponding said first parameter information of end that is called, then obtains the said software interface that is called at second parameter information of end that is called according to said first parameter information;
Send the second software interface call request message to the said end that is called; Carry said second parameter information in the wherein said second software interface call request message, so that the said end that is called calls the said software interface that is called according to said second parameter information.
2. software interface call method according to claim 1; It is characterized in that; Carry the operation indication information in said first software interface call request message and the said second software interface call request message; Said operation indication information is used to indicate the said content of operation that the end request is carried out that calls, and said method also comprises:
Receive said first of the end transmission that is called and call Indication message as a result; Said first calls as a result, and Indication message carries operation result information and said second parameter information; Said operation result information comprises that the said end that is called calls the said software interface that is called according to said second parameter information, and carries out the operating result of the corresponding content of operation of said operation indication information;
Obtain the said software interface that is called at said first parameter information that calls end according to said second parameter information;
Send second and call Indication message as a result to the said end that calls, and call as a result said second and to carry said first parameter information and said operation result information in the Indication message.
3. software interface call method according to claim 1 and 2 is characterized in that, the said first software interface call request message is also carried said first identifying information that calls the software interface that is called in the end;
The said software interface that is called at not corresponding said first parameter information of end that is called is: if said first identifying information is different with second identifying information of the said software interface that is called of end that is called, the then said software interface that is called is at not corresponding said first parameter information of end that is called.
4. according to each described software interface call method of claim 1-3, it is characterized in that said method also comprises:
Receive the said parameter update Indication message that calls end or the said end transmission that is called; Carry the said perhaps said end that is called of end that calls in the said parameter update Indication message and go up the software interface information that parameter information changes, reach the parameter information after this software interface changes;
Generate the said perhaps said end that is called of end that calls according to said parameter update Indication message and go up the 3rd corresponding identifying information of this software interface parameter current information, and preserve the corresponding relation of this software interface and identifying information and the corresponding relation of each identifying information and each parameter information.
5. according to each described software interface call method of claim 1 to 4, it is characterized in that said method also comprises:
If said first parameter information is identical at second parameter information of the end that is called with the said software interface that is called; Then send the 3rd software interface call request message, and in said the 3rd software interface call request message, carry said first parameter information to the said end that is called.
6. a software interface calling device is characterized in that, comprising:
First receiving element is used to receive and calls the first software interface call request message that end sends, and carries first parameter information of the software interface that is called in the said first software interface call request message;
First acquiring unit is used for if the said software interface that is called at not corresponding said first parameter information of end that is called, then obtains the said software interface that is called at second parameter information of end that is called according to said first parameter information;
First transmitting element; Be used for sending the second software interface call request message to the said end that is called; Carry said second parameter information in the wherein said second software interface call request message, so that the said end that is called calls the said software interface that is called according to said second parameter information.
7. software interface calling device according to claim 6; It is characterized in that; Carry the operation indication information in said first software interface call request message and the said second software interface call request message; Said operation indication information is used to indicate the said content of operation that the end request is carried out that calls, and said device also comprises:
Second receiving element; Be used to receive said first of the end transmission that is called and call Indication message as a result; Said first calls as a result, and Indication message carries operation result information and said second parameter information; Said operation result information comprises that the said end that is called calls the said software interface that is called according to said second parameter information, and carries out the operating result of the corresponding content of operation of said operation indication information;
Second acquisition unit is used for obtaining the said software interface that is called at said first parameter information that calls end according to said second parameter information;
Second transmitting element is used for sending second and calling Indication message as a result to the said end that calls, and calls as a result said second and to carry said first parameter information and said operation result information in the Indication message.
8. according to claim 6 or 7 described software interface calling devices, it is characterized in that the said first software interface call request message is also carried said first identifying information that calls the software interface that is called in the end;
The said software interface that is called at not corresponding said first parameter information of end that is called is: if said first identifying information is different with second identifying information of the said software interface that is called of end that is called, the then said software interface that is called is at not corresponding said first parameter information of end that is called.
9. according to each described software interface calling device of claim 6-8, it is characterized in that, also comprise:
The 3rd receiving element; Be used to receive the said parameter update Indication message that calls end or the said end transmission that is called; Carry the said perhaps said end that is called of end that calls in the said parameter update Indication message and go up the software interface information that parameter information changes, reach the parameter information after this software interface changes;
Updating block; Be used for generating the said perhaps said end that is called of end that calls and go up the 3rd corresponding identifying information of this software interface parameter current information, and preserve the corresponding relation of this software interface and identifying information and the corresponding relation of each identifying information and each parameter information according to said parameter update Indication message.
10. according to each described software interface calling device of claim 6 to 9, it is characterized in that, also comprise:
The 3rd transmitting element; Be used for if said first parameter information is identical at second parameter information of the end that is called with the said software interface that is called; Then send the 3rd software interface call request message, and in said the 3rd software interface call request message, carry said first parameter information to the said end that is called.
11. a software interface calling system is characterized in that, comprising: call end, be called end and software interface calling device, wherein:
The said end that calls is used for the first software interface call request message to said software interface calling device transmission, carries first parameter information of the software interface that is called in the said first software interface call request message;
The said end that is called is used to receive the second software interface call request message that said software interface calling device sends; Carry said second parameter information in the wherein said second software interface call request message, and call the said software interface that is called according to said second parameter information;
Said software interface calling device is each described software interface calling device of claim 6-10.
CN2012101967037A 2012-06-14 2012-06-14 Method, device and system for calling software interface Pending CN102779071A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012101967037A CN102779071A (en) 2012-06-14 2012-06-14 Method, device and system for calling software interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012101967037A CN102779071A (en) 2012-06-14 2012-06-14 Method, device and system for calling software interface

Publications (1)

Publication Number Publication Date
CN102779071A true CN102779071A (en) 2012-11-14

Family

ID=47123990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012101967037A Pending CN102779071A (en) 2012-06-14 2012-06-14 Method, device and system for calling software interface

Country Status (1)

Country Link
CN (1) CN102779071A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978176A (en) * 2014-04-10 2015-10-14 腾讯科技(北京)有限公司 Application program interface calling method and device
CN105808365A (en) * 2016-03-22 2016-07-27 深圳市宁远科技股份有限公司 HIS (Hospital Information System) interface calling method and HIS interface configuration method
CN109213519A (en) * 2018-09-14 2019-01-15 北京数聚鑫云信息技术有限公司 A kind of isomery API adaptation processing method and system
CN109525677A (en) * 2018-12-20 2019-03-26 杭州数梦工场科技有限公司 Handle the method and device of data
CN109683873A (en) * 2018-11-16 2019-04-26 中国西安卫星测控中心 Utilize the coding method of aerospace information interface and system architecture of ASN1 rule
CN110413349A (en) * 2019-07-31 2019-11-05 中国工商银行股份有限公司 Service calling method, device, electronic equipment and storage medium
CN113407367A (en) * 2021-08-18 2021-09-17 万商云集(成都)科技股份有限公司 Interface configuration method and system
CN113934407A (en) * 2021-12-08 2022-01-14 阿里云计算有限公司 Method, device, medium and computing equipment for calling interfaces among different language codes

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277301A (en) * 2008-04-24 2008-10-01 华为技术有限公司 Method and device for invocation of distributed system interface
CN101499904A (en) * 2008-02-01 2009-08-05 华为技术有限公司 Method, apparatus and system for safe interface call

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101499904A (en) * 2008-02-01 2009-08-05 华为技术有限公司 Method, apparatus and system for safe interface call
CN101277301A (en) * 2008-04-24 2008-10-01 华为技术有限公司 Method and device for invocation of distributed system interface

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978176A (en) * 2014-04-10 2015-10-14 腾讯科技(北京)有限公司 Application program interface calling method and device
US10853437B2 (en) 2014-04-10 2020-12-01 Tencent Technology (Shenzhen) Company Limited Method and apparatus for invoking application programming interface
CN105808365A (en) * 2016-03-22 2016-07-27 深圳市宁远科技股份有限公司 HIS (Hospital Information System) interface calling method and HIS interface configuration method
CN109213519A (en) * 2018-09-14 2019-01-15 北京数聚鑫云信息技术有限公司 A kind of isomery API adaptation processing method and system
WO2020052548A1 (en) * 2018-09-14 2020-03-19 北京数聚鑫云信息技术有限公司 Heterogeneous api adaptation processing method, apparatus, device, and medium
CN109683873A (en) * 2018-11-16 2019-04-26 中国西安卫星测控中心 Utilize the coding method of aerospace information interface and system architecture of ASN1 rule
CN109683873B (en) * 2018-11-16 2021-10-08 中国西安卫星测控中心 Space information interface coding method and system architecture using ASN1 rule
CN109525677A (en) * 2018-12-20 2019-03-26 杭州数梦工场科技有限公司 Handle the method and device of data
CN110413349A (en) * 2019-07-31 2019-11-05 中国工商银行股份有限公司 Service calling method, device, electronic equipment and storage medium
CN113407367A (en) * 2021-08-18 2021-09-17 万商云集(成都)科技股份有限公司 Interface configuration method and system
CN113934407A (en) * 2021-12-08 2022-01-14 阿里云计算有限公司 Method, device, medium and computing equipment for calling interfaces among different language codes

Similar Documents

Publication Publication Date Title
CN102779071A (en) Method, device and system for calling software interface
CN109246251B (en) Micro-service calling method, device, system, equipment and readable storage medium
CN102970362B (en) The method of a kind of high in the clouds data sharing and device
CN101854371A (en) Method and device for calling and processing JavaScript object
CN105022832B (en) Method, mobile terminal and the download server that APP application securities are downloaded
CN104268025A (en) Interprocess communication method and system, and server
CN111552568B (en) Cloud service calling method and device
CN103200022B (en) A kind of data download abnormality eliminating method, equipment and system
CN104852971A (en) Plug-in protocol device and data communication method based on plug-in protocol
CN105763419A (en) Instant messaging service calling method and enterprise service bus server
CN105099769A (en) Method, device and system for processing abnormal operations of service platform
CN112565439A (en) Internet of things communication method and system
CN102811230B (en) Resource call method based on application integration and system thereof
CN109213533A (en) A kind of advertisement SDK dynamic loading method, device and terminal
CN109787789B (en) Compatibility management method, device and equipment for software upgrading and storage medium
CN114244654A (en) URL forwarding method, device, equipment and computer storage medium
CN110825797B (en) Data exchange method and device
CN111756844A (en) Multi-language message agent method and device
CN103442256A (en) Electronic program menu implementation method and system based on HTML5
CN114265638B (en) Communication method, device, equipment and storage medium based on plug-in compatibility
CN114006939A (en) Message pushing method and device
CN115080274A (en) Service processing method, device and system and interface mapping system
KR20140110983A (en) Method and device for implementing plugin upgrade based on instant messaging software
CN106874004A (en) The method and client and server of lowest version software compatibility highest version file
CN113542217A (en) Service subscription system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20121114