CN108595280A - Method for interface adaptation, device, computer equipment and storage medium - Google Patents

Method for interface adaptation, device, computer equipment and storage medium Download PDF

Info

Publication number
CN108595280A
CN108595280A CN201810381590.5A CN201810381590A CN108595280A CN 108595280 A CN108595280 A CN 108595280A CN 201810381590 A CN201810381590 A CN 201810381590A CN 108595280 A CN108595280 A CN 108595280A
Authority
CN
China
Prior art keywords
application programming
programming interfaces
private clound
version information
public cloud
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.)
Granted
Application number
CN201810381590.5A
Other languages
Chinese (zh)
Other versions
CN108595280B (en
Inventor
陈丰
林志贤
部伟
潘伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201810381590.5A priority Critical patent/CN108595280B/en
Publication of CN108595280A publication Critical patent/CN108595280A/en
Application granted granted Critical
Publication of CN108595280B publication Critical patent/CN108595280B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/541Interprogram communication via adapters, e.g. between incompatible applications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

This application involves a kind of method for interface adaptation, device, computer equipment and storage mediums.The method includes:Obtain the logging request for carrying private clound mark, the version information that corresponding application programming interfaces are identified with private clound is obtained according to logging request, obtain operation requests, the version information that corresponding application programming interfaces are identified according to operation requests and with private clound searches corresponding public cloud application programming interfaces, obtain response results corresponding with operation requests, wherein, response results are called corresponding private clound application programming interfaces to execute service logic and are obtained by public cloud application programming interfaces.By the version information for obtaining private clound application programming interfaces, private clound application programming interfaces are recalled after finding corresponding public cloud application programming interfaces, it does not need all private clounds and adjusts the application programming interfaces of oneself and can be achieved with communication between public cloud and private clound, to improve the efficiency of interface adaptation.

Description

Method for interface adaptation, device, computer equipment and storage medium
Technical field
This application involves Internet technical field, more particularly to a kind of method for interface adaptation, device, computer equipment and Storage medium.
Background technology
With the development of Internet technology, there are various cloud services.In mixing cloud mode, cloud platform is by public affairs There are cloud platform and private clound platform combination to form.It mixes under cloud mode, public cloud is by calling the interface of private clound to realize data It accesses, public cloud can define a set of interface specification, and private clound is wanted to realize the data access between public cloud, be needed to oneself Interface be adjusted, to adapt to the interface specification of public cloud.When the interface specification of public cloud changes or is adjusted When, private clound is also required to synchronize adjustment to the interface of oneself, the communication abnormality being just avoided that between public cloud and private clound.
When private clound quantity is more and more huger, as long as the interface specification of public cloud changes, all private clounds are all It needs to adjust interface to adapt to the interface specification of public cloud.The method of current this interface adaptation, there are inefficiency and waves The problem of taking resource.
Invention content
Based on this, it is necessary to which in view of the above technical problems, interface Adaption efficiency can be improved and save money by providing one kind Method for interface adaptation, device, computer equipment and the storage medium in source.
A kind of method for interface adaptation, the method includes:
Obtain the logging request for carrying private clound mark;
The version information that corresponding application programming interfaces are identified with the private clound is obtained according to the logging request;
Operation requests are obtained, corresponding application programming interfaces are identified according to the operation requests and with the private clound Version information searches corresponding public cloud application programming interfaces;
Obtain response results corresponding with the operation requests, wherein the response results pass through the public cloud application The corresponding private clound application programming interfaces of program interface call execute service logic and obtain.
It is described in one of the embodiments, to apply journey according to the logging request acquisition private clound mark is corresponding The version information of sequence interface, including:
Corresponding private clound is identified to the private clound send information acquisition request according to the logging request;
Obtain the version information that the private clound obtains the corresponding application programming interfaces that request returns according to described information.
The method further includes in one of the embodiments,:
Detection carries the user conversation of private clound mark;
When the user conversation fails, the logging request for carrying private clound mark is reacquired.
Operation requests are being obtained in one of the embodiments, are being connect according to the operation requests and the application program Before the version information of mouth searches corresponding application programming interfaces step, the method further includes:
Establish the version information pass corresponding with the private clound application programming interfaces of the private clound application programming interfaces System;
The version information of the private clound application programming interfaces is stored to active user's session according to the correspondence.
The version information that the private clound identifies corresponding application programming interfaces in one of the embodiments, is current private There is the maximum version information in the version information library of cloud application routine interface.
The method further includes in one of the embodiments,:
Obtain the first instruction for changing the public cloud application programming interfaces;
The public cloud application programming interfaces are updated according to first instruction.
The method further includes in one of the embodiments,:
Obtain the second instruction of the version information of update private clound application programming interfaces;
The version information library of private clound application programming interfaces is updated according to second instruction, is obtained updated The version information library of private clound application programming interfaces;
Wherein, the version information library of the updated private clound application programming interfaces includes that original application program connects The version information of mouth and the version information of updated application programming interfaces.
A kind of interface adaptive device, described device include:
Acquisition request module, for obtaining the logging request for carrying private clound mark;
Data obtaining module connects for obtaining application program corresponding with private clound mark according to the logging request The version information of mouth;
Interface lookup module, for obtaining operation requests, according to the operation requests and with the private clound mark pair The version information for the application programming interfaces answered searches corresponding public cloud application programming interfaces;
As a result acquisition module, for obtaining response results corresponding with the operation requests, wherein the response results are logical Crossing the public cloud application programming interfaces calls corresponding private clound application programming interfaces execution service logic to obtain.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing Device realizes following steps when executing the computer program:
Obtain the logging request for carrying private clound mark;
The version information that corresponding application programming interfaces are identified with the private clound is obtained according to the logging request;
Operation requests are obtained, corresponding application programming interfaces are identified according to the operation requests and with the private clound Version information searches corresponding public cloud application programming interfaces;
Obtain response results corresponding with the operation requests, wherein the response results pass through the public cloud application The corresponding private clound application programming interfaces of program interface call execute service logic and obtain.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor Following steps are realized when row:
Obtain the logging request for carrying private clound mark;
The version information that corresponding application programming interfaces are identified with the private clound is obtained according to the logging request;
Operation requests are obtained, corresponding application programming interfaces are identified according to the operation requests and with the private clound Version information searches corresponding public cloud application programming interfaces;
Obtain response results corresponding with the operation requests, wherein the response results pass through the public cloud application The corresponding private clound application programming interfaces of program interface call execute service logic and obtain.
Above-mentioned method for interface adaptation, device, computer equipment and storage medium carry private clound mark by obtaining Logging request obtains the version information that corresponding application programming interfaces are identified with private clound according to logging request, obtains operation and asks It asks, the corresponding public cloud of version information lookup that corresponding application programming interfaces are identified according to operation requests and with private clound is answered With routine interface, response results corresponding with operation requests are obtained, wherein response results pass through public cloud application programming interfaces tune Service logic is executed with corresponding private clound application programming interfaces to obtain.By the version letter for obtaining private clound application programming interfaces Breath, recalls private clound application programming interfaces, since each public cloud is answered after finding corresponding public cloud application programming interfaces Corresponding private clound application programming interfaces are had with routine interface to realize, are not needed all private clounds and are adjusted the application journey of oneself Sequence interface can be achieved with the communication between public cloud and private clound, to improve the efficiency of interface adaptation.By not needing Some private clound application programming interfaces are adjusted, and to reduce cost, and then are economized on resources.
Description of the drawings
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with Obtain other attached drawings according to these attached drawings.
Fig. 1 is the applied environment figure of method for interface adaptation in one embodiment;
Fig. 2 is the internal structure chart of one embodiment Computer equipment;
Fig. 3 is the schematic diagram that cloud mode is mixed in one embodiment;
Fig. 4 is the flow diagram of method for interface adaptation in one embodiment;
Fig. 5 is the method flow schematic diagram that private clound application programming interfaces version information is obtained in one embodiment;
Fig. 6 is the method flow schematic diagram that logging request is reacquired in one embodiment;
Fig. 7 is the method flow schematic diagram that private clound application programming interfaces version information is stored in one embodiment;
Fig. 8 is the method flow schematic diagram that public cloud application programming interfaces are updated in one embodiment;
Fig. 9 is the method flow schematic diagram that private clound application programming interfaces version information is updated in one embodiment;
Figure 10 is the schematic diagram in the version information library of private clound application programming interfaces in one embodiment;
Figure 11 is the interaction flow schematic diagram of method for interface adaptation in another embodiment;
Figure 12 is the schematic diagram of a scenario of method for interface adaptation in one embodiment;
Figure 13 is the structure diagram of interface adaptive device in one embodiment.
Specific implementation mode
It is with reference to the accompanying drawings and embodiments, right in order to make the object, technical solution and advantage of the application be more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
Method for interface adaptation provided by the present application can be applied in application environment as shown in Figure 1.Wherein, terminal 110 It is connect with public cloud 120 by network, public cloud 120 is communicated by network with private clound 130.Terminal 102 passes through network It is communicated by network with server 104.Wherein, terminal 110 can be, but not limited to be various personal computers, notebook electricity Brain, smart mobile phone and tablet computer etc., public cloud 120 can provide public service by network, and private clound 130 can pass through Network provides specific resource.
In one embodiment, a kind of computer equipment is provided, which can be terminal, internal structure Figure can be as shown in Figure 2.The computer equipment includes the processor, memory, network interface sum number connected by system bus According to library.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory of the computer equipment includes Non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The database of machine equipment is for storing private clound mark and action type.The network interface of the computer equipment be used for it is publicly-owned Cloud is communicated by network connection.To realize a kind of method for interface adaptation when the computer program is executed by processor.
It will be understood by those skilled in the art that structure shown in Figure 2, is only tied with the relevant part of application scheme The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment May include either combining certain components than more or fewer components as shown in the figure or being arranged with different components.
In one embodiment, as shown in figure 3, mixing cloud mode can include public cloud 310 and multiple private clounds. In the case where mixing cloud mode, public cloud 310 can be connected with private clound 320, private clound 330 and private clound 340 by network respectively It connects.Private clound 320, private clound 330 and private clound 340 can be stored with the specific resource of different tenants, for example, private clound 320 can be stored with the data and resource of financing corporation, and private clound 330 can be stored with the data and resource of scientific & technical corporation, and Private clound 340 can be stored with the data and resource of training company.For the user behaviour of a private clound in multiple private clounds Make, public cloud 310 can be docked according to the user's operation of the private clound with private clound.
In one embodiment, as shown in figure 4, providing a kind of method for interface adaptation, include the following steps:
Step 402, the logging request for carrying private clound mark is obtained.
Private clound is a type of cloud service, can be directed to various functions and provide memory capacity and processing capacity, privately owned The safety of the data, data that are stored in cloud and service quality are all more secure.Public cloud is also one kind of cloud service Class, this kind of cloud service of public cloud and non-user are possessed, and public cloud can be passed through towards the public service for providing computing resource Internet obtains the resource in public cloud.For example, publicly-owned cloud service provider have Amazon, Google, Microsoft and Ali's cloud, Tencent's cloud etc..
There are one private clounds to identify for each private clound correspondence, for being distinguished with other private clounds, private clound mark It can be string number, can also be a string of codes.Terminal can be by way of account and password login public cloud to publicly-owned Cloud sends logging request, and private clound mark can be carried in the logging request of transmission, and public cloud can get terminal transmission Carry private clound mark logging request.
Step 404, the version information that corresponding application programming interfaces are identified with private clound is obtained according to logging request.
When data encapsulate, each layer in network hierarchy can interact with interface and provide service between each other, Interface between middle application layer and user is known as application programming interfaces API (Application Programming Interface).The application programming interfaces of different editions can be deployed to different applications, can also be deployed to different services It is independent to each other on device.The version information of application programming interfaces includes the version numbers of the application programming interfaces, release content, domain Name information and interface number, IP address etc..
Public cloud can identify the private clound carried in the logging request after the logging request for receiving terminal transmission It is identified, obtains the private clound and identify corresponding private clound.Public cloud can find the application program of corresponding private clound Interface, then obtain the version information of the private clound application programming interfaces.
Step 406, operation requests are obtained, corresponding application programming interfaces are identified according to operation requests and with private clound Version information searches corresponding public cloud application programming interfaces.
When terminal exits public cloud and logs in not yet, public cloud can get the operation requests of terminal transmission.The behaviour It can include action type in asking.Terminal is wanted to call the application programming interfaces of private clound, just has to by publicly-owned Cloud application routine interface could call private clound application programming interfaces, and therefore, the application programming interfaces of each public cloud can have Corresponding private clound application programming interfaces are realized.
Public cloud can according in operation requests action type and application programming interfaces corresponding with private clound mark Version information find corresponding public cloud application programming interfaces, and called by the public cloud application programming interfaces corresponding Private clound application programming interfaces.
Step 408, response results corresponding with operation requests are obtained, wherein response results pass through public cloud application program Interface calls corresponding private clound application programming interfaces to execute service logic and obtains.
Service logic includes data pick-up, operation and update etc..Public cloud according to the action type in operation requests with And identify the version informations of corresponding application programming interfaces with private clound and search and call corresponding public cloud application programming interfaces, Corresponding private clound application programming interfaces are called by public cloud again, is executed by the private clound application programming interfaces and is asked with operation Seek the corresponding service logic of middle action type.After having executed service logic, public cloud can get the response of private clound transmission As a result, the response results are corresponding with operation requests.
The logging request that private clound mark is carried by obtaining obtains corresponding with private clound mark according to logging request The version information of application programming interfaces obtains operation requests, according to operation requests and corresponding with private clound mark using journey The version information of sequence interface searches corresponding public cloud application programming interfaces, obtains response results corresponding with operation requests, In, response results are called corresponding private clound application programming interfaces to execute service logic and are obtained by public cloud application programming interfaces It arrives.By obtaining the version information of private clound application programming interfaces, adjusted again after finding corresponding public cloud application programming interfaces With private clound application programming interfaces, since to have corresponding private clound application programming interfaces real for each public cloud application programming interfaces It is existing, it does not need all private clounds and adjusts the application programming interfaces of oneself and can be achieved with communication between public cloud and private clound, To improve the efficiency of interface adaptation.Since the private clound application programming interfaces for not needing be all are adjusted, to reduce Cost, and then economize on resources.
As shown in figure 5, in one embodiment, a kind of method for interface adaptation provided can also include obtaining private clound to answer With the process of routine interface version information, specific steps include:
Step 502, corresponding private clound is identified to private clound according to logging request and sends information acquisition request.
Private clound mark is carried in logging request, public cloud passes through the private clound identifier lookup in logging request to correspondence Private clound and pass through network connection.Public cloud can send information acquisition request, acquisition of information by network to the private clound Ask the version information for obtaining private clound application programming interfaces.
Step 504, the version information for the corresponding application programming interfaces that private clound is returned according to information acquisition request is obtained.
Private clound, can be by the version of corresponding application programming interfaces after the information acquisition request for receiving public cloud transmission Information is sent to public cloud, to establish the user conversation between public cloud and private clound.
Corresponding private clound is identified to private clound according to logging request and send information acquisition request, obtain private clound according to letter Breath obtains the version information for the corresponding application programming interfaces that request returns.Public cloud is asked by sending acquisition of information to private clound The version information for seeking to obtain the corresponding application programming interfaces of private clound, does not need private clound and becomes to application programming interfaces More, it to reduce cost, economizes on resources.
In one embodiment, as shown in fig. 6, a kind of method for interface adaptation provided can also include reacquiring to log in The process of request, specific steps include:
Step 602, detection carries the user conversation of private clound mark.
Public cloud can be detected user conversation, and user conversation refers to that connection is established between public cloud and private clound Session.Private clound mark can be carried in the user conversation of publicly-owned cloud detection, public cloud can be according to private clound identifier lookup To the private clound for establishing user conversation with public cloud.
Step 604, when user conversation fails, the logging request for carrying private clound mark is reacquired.
User conversation fail message can cause user conversation to fail, and keep the connection between public cloud and private clound disconnected The information opened.It logs off for example, user conversation fail message can be user, can also be that network is bad, lead to public cloud Connection between private clound disconnects, and can not communicate.Public cloud can be established according to private clound identifier lookup to user conversation and be lost The private clound of effect.
When user conversation fails, public cloud can reacquire logging request, can be carried in logging request privately owned Cloud identifies, and public cloud can get private clound mark by logging request.
The user conversation that private clound mark is carried by detection, when user conversation fails, reacquisition carries private There is the logging request that cloud identifies.With the failure of user conversation, the version information of corresponding private clound application programming interfaces is also marked It is denoted as failure, the connection between public cloud and private clound also disconnects, and public cloud can reacquire logging request, and according to login Acquisition request private clound identifies, to maintain the connection relation established between public cloud and private clound.
As shown in fig. 7, in one embodiment, a kind of method for interface adaptation provided can also include that storage private clound is answered With the process of routine interface version information, specific steps include:
Step 702, the version information pass corresponding with private clound application programming interfaces of private clound application programming interfaces is established System.
Public cloud, can be according to the private clound application of acquisition after the version information for obtaining private clound application programming interfaces The version information of routine interface finds corresponding private clound application programming interfaces, and public cloud can also be by establishing correspondence Mode, the version information of private clound application programming interfaces is mapped with private clound application programming interfaces.Due to each The version information of private clound application programming interfaces is all different, and public cloud can be according to the version of private clound application programming interfaces Information searching is to corresponding unique private clound application programming interfaces.
Step 704, the version information of private clound application programming interfaces is stored to active user's session according to correspondence.
User conversation is established between public cloud and private clound, is communicated with private clound for public cloud.And work as Preceding user conversation is used only for public cloud and carries out present communications with private clound.Public cloud is getting private clound application programming interfaces Version information and application programming interfaces correspondence after, can be according to correspondence by the version of private clound application programming interfaces This information is carried out with application programming interfaces in active user's session that is corresponding and storing public cloud and private clound.
When receiving the operation requests of terminal transmission, public cloud can be first according to the operation requests and active user's meeting The version information of private clound application programming interfaces in words searches the version of corresponding public cloud application programming interfaces in the database This information, public cloud can also find private clound corresponding with public cloud application programming interfaces version information and answer in the database With the version information of routine interface, then passes through the version informations of the private clound application programming interfaces and call corresponding private clound application Routine interface, private clound application programming interfaces can execute service logic corresponding with operation requests.
By establishing the correspondence of the version information and private clound application programming interfaces of private clound application programming interfaces, press The version information of private clound application programming interfaces is stored to active user's session according to correspondence.Public cloud can be according to current The version information and operation requests of private clound application programming interfaces in user conversation call the public cloud application in database Routine interface, then call corresponding private clound application programming interfaces by public cloud application programming interfaces, it is not necessary to again to private clound Application programming interfaces change, to improve the efficiency of interface adaptation.
In one embodiment, a kind of method for interface adaptation provided, private clound identify corresponding application programming interfaces Version information is the maximum version information in the version information library of current private clound application programming interfaces.
Private clound can there are one the version information libraries of application programming interfaces, for storing private clound application programming interfaces Version information.Public cloud sends information acquisition request according to logging request, to private clound and identifies corresponding private to obtain private clound It can work as to have the version information of cloud application routine interface, the version information for the application programming interfaces that private clound is returned to public cloud Maximum version information in the version information library of preceding private clound application programming interfaces.
In one embodiment, as shown in figure 8, a kind of method for interface adaptation provided can also include updating public cloud to answer With the process of routine interface, specifically include:
Step 802, the first instruction of change public cloud application programming interfaces is obtained.
Wherein, change public cloud application programming interfaces can be newly-increased public cloud application programming interfaces, can also change or Delete public cloud application programming interfaces.Terminal can send the first instruction of change public cloud application programming interfaces to public cloud, By network connection, public cloud can get the of the change public cloud application programming interfaces of terminal transmission for terminal and public cloud One instruction.
Step 804, public cloud application programming interfaces are updated according to the first instruction.
The first instruction that public cloud can be sent according to terminal updates public cloud application programming interfaces accordingly.Example Such as, the first instruction that terminal is sent, can be in first instruction that terminal is sent to increase a public cloud application programming interfaces newly Including newly-increased public cloud application programming interfaces in need, public cloud can increase a public cloud application journey newly according to the first instruction Sequence interface.
As shown in figure 9, in one embodiment, a kind of method for interface adaptation provided can also include that update private clound is answered With the process of routine interface version information, specific steps include:
Step 902, the second instruction of the version information of update private clound application programming interfaces is obtained.
Terminal can send the second instruction of the version information of update private clound application programming interfaces to public cloud, and second refers to It can include the version information of the private clound application programming interfaces of highest version in order.
Step 904, the version information library of private clound application programming interfaces is updated according to the second instruction, is updated The version information library of private clound application programming interfaces afterwards.
Public cloud can be incited somebody to action by obtaining in the second instruction after the version information of the private clound application programming interfaces of highest version The version information of the private clound application programming interfaces of the highest version is stored in the version information library of private clound application programming interfaces, The version information library of updated private clound application programming interfaces is obtained.Wherein, updated private clound application program connects The version information library of mouth includes the version information of original application programming interfaces and the version of updated application programming interfaces This information.
The second instruction that the version information of private clound application programming interfaces is updated by acquisition, according to the second instruction to privately owned The version information library of cloud application routine interface is updated, and obtains the version information of updated private clound application programming interfaces Library.The version information library of updated private clound application programming interfaces include the version information of original application programming interfaces with And the version information of updated application programming interfaces can be with when needing to call the private clound application programming interfaces of lowest version It is directly called from the version information library of private clound application programming interfaces, reduces cost and the time of interface calling.
In one embodiment, as shown in Figure 10, it can be stored in the version information library of private clound application programming interfaces The version information of multiple application programming interfaces and corresponding interface.For example, private clound application programming interfaces version 100 is corresponding Interface can be-fun1 and-fun2,101 corresponding interface of private clound application programming interfaces version can be-fun2 and- Fun3,102 corresponding interface of private clound application programming interfaces version can be-fun4, private clound application programming interfaces version 103 Corresponding interface can be-fun5 etc..
In one embodiment, as shown in figure 11, a kind of method for interface adaptation is provided, following steps 1102 are specifically included To step 1120.
Step 1102, terminal sends the logging request for carrying private clound and identifying to public cloud.
Step 1104, it after public cloud receives logging request, identifies corresponding private clound to private clound and sends acquisition of information Request.
Step 1106, the information acquisition request that private clound is sent according to public cloud returns to corresponding application programming interfaces Version information.
Step 1108, public cloud stores the version information of private clound application programming interfaces to active user's session.
Step 1110, terminal sends operation requests to public cloud, and the operation requests that terminal is sent are after logging request It sends, and terminal is not logged off also.
Step 1112, public cloud is looked into the database according to operation requests and the version information of private clound application programming interfaces Corresponding public cloud application programming interfaces information is looked for, and calls public cloud application programming interfaces.
Step 1114, public cloud calls corresponding private clound application programming interfaces by public cloud application programming interfaces.
Step 1116, private clound application programming interfaces execute service logic, and meet with a response result.
Step 1118, obtained response results are returned to public cloud by private clound.
Step 1120, public cloud returns again to response results to terminal.
The logging request that private clound mark is carried by obtaining obtains corresponding with private clound mark according to logging request The version information of application programming interfaces obtains operation requests, according to operation requests and corresponding with private clound mark using journey The version information of sequence interface searches corresponding public cloud application programming interfaces, obtains response results corresponding with operation requests, In, response results are called corresponding private clound application programming interfaces to execute service logic and are obtained by public cloud application programming interfaces It arrives.By obtaining the version information of private clound application programming interfaces, adjusted again after finding corresponding public cloud application programming interfaces With private clound application programming interfaces, do not need all private clounds adjust the application programming interfaces of oneself can be achieved with public cloud with Communication between private clound, to improve the efficiency of interface adaptation.
In one embodiment, as shown in figure 12, a kind of method for interface adaptation is provided.The method for interface adaptation is according to such as Number designation in Figure 12 executes successively.
First, public cloud can obtain the logging request for carrying private clound mark.There are one private for each private clound correspondence There is cloud mark, for being distinguished with other private clounds, private clound mark can be string number, can also be a string of generations Code.Terminal can send logging request, the logging request of transmission by way of account and password login public cloud to public cloud In can carry private clound mark, public cloud can get terminal transmission carry private clound mark logging request.
Then, public cloud can establish the version information and private clound application programming interfaces of private clound application programming interfaces Correspondence.Public cloud can answer after the version information for obtaining private clound application programming interfaces according to the private clound of acquisition Corresponding private clound application programming interfaces are found with the version information of routine interface, public cloud can also be by establishing corresponding close The version information of private clound application programming interfaces is mapped by the mode of system with private clound application programming interfaces.Due to each The version information of a private clound application programming interfaces is all different, and public cloud can be according to the version of private clound application programming interfaces This information searching arrives corresponding unique private clound application programming interfaces.Public cloud can be according to correspondence by private clound application The version information of routine interface is stored to active user's session.
Secondly, public cloud receive terminal transmission operation requests when, public cloud can first according to the operation requests with And the version information of the private clound application programming interfaces in active user's session searches corresponding public cloud application in the database The version information of routine interface, public cloud can also be found and public cloud application programming interfaces version information pair in the database The version information for the private clound application programming interfaces answered, then correspondence is called by the version information of the private clound application programming interfaces Private clound application programming interfaces, private clound application programming interfaces can execute service logic corresponding with operation requests.
Then, public cloud can identify corresponding private clound to private clound according to logging request and send information acquisition request. Private clound mark is carried in logging request, public cloud passes through the private clound identifier lookup in logging request to corresponding private clound And pass through network connection.Public cloud can send information acquisition request by network to the private clound, and information acquisition request is used for Obtain the version information of private clound application programming interfaces.Public cloud can also obtain what private clound was returned according to information acquisition request The version information of corresponding application programming interfaces.Private clound, can will be right after the information acquisition request for receiving public cloud transmission The version information for the application programming interfaces answered is sent to public cloud, to establish the user conversation between public cloud and private clound. Wherein, the version information that private clound identifies corresponding application programming interfaces is the version information of current private clound application programming interfaces Maximum version information in library.
Public cloud can also detect the user conversation for carrying private clound mark.Public cloud can examine user conversation It surveys, user conversation refers to the session that connection is established between public cloud and private clound.It can be taken in the user conversation of publicly-owned cloud detection It is identified with private clound, public cloud can be according to private clound identifier lookup to the private clound for establishing user conversation with public cloud.When When user conversation fails, public cloud can reacquire the logging request for carrying private clound mark.User conversation fail message Can be the information for causing user conversation to fail, and the connection between public cloud and private clound being made to disconnect.For example, user conversation loses It can be that user logs off to imitate information, can also be that network is bad, cause the connection between public cloud and private clound to disconnect, nothing Method communicates.Public cloud can establish the private clound of failure according to private clound identifier lookup to user conversation.When user conversation fails When, public cloud can reacquire logging request, private clound mark can be carried in logging request, public cloud can be by stepping on Acquisition request is recorded to identify to private clound.
Then, public cloud can obtain operation requests, according to operation requests and it is corresponding with private clound mark apply journey The version information of sequence interface searches corresponding public cloud application programming interfaces.It is public when terminal exits public cloud and logs in not yet There is cloud that can get the operation requests of terminal transmission.It can include action type in the operation requests.Terminal is wanted to call The application programming interfaces of private clound just have to private clound application program could be called to connect by public cloud application programming interfaces Mouthful, therefore, the application programming interfaces of each public cloud can have corresponding private clound application programming interfaces to realize.Public cloud can be with According in operation requests action type and identify with private clound the version informations of corresponding application programming interfaces and find pair The public cloud application programming interfaces answered, and call corresponding private clound application program to connect by the public cloud application programming interfaces Mouthful.
Finally, public cloud can also obtain response results corresponding with operation requests, and response results are answered by public cloud Execute what service logic obtained with the corresponding private clound application programming interfaces of program interface call.Public cloud is according in operation requests Action type and identify the version informations of corresponding application programming interfaces with private clound and search and call corresponding public cloud Application programming interfaces, then corresponding private clound application programming interfaces are called by public cloud, it is connect by the private clound application program Mouth executes service logic corresponding with action type in operation requests.After having executed service logic, public cloud can get private There are the response results that cloud is sent, the response results corresponding with operation requests.
Public cloud can also obtain the first instruction of change public cloud application programming interfaces, according to the first instruction to public cloud Application programming interfaces are updated.The first instruction that public cloud can be sent according to terminal carries out public cloud application programming interfaces Corresponding update.For example, the first instruction for sending of terminal is increases a public cloud application programming interfaces newly, terminal send this Can include newly-increased public cloud application programming interfaces in need in one instruction, public cloud can be one newly-increased according to the first instruction Public cloud application programming interfaces.
Public cloud can also obtain the second instruction of the version information of update private clound application programming interfaces, and according to second Instruction is updated the version information library of private clound application programming interfaces, obtains updated private clound application programming interfaces Version information library.Public cloud, can by obtaining in the second instruction after the version information of the private clound application programming interfaces of highest version The version information of the private clound application programming interfaces of the highest version to be stored in the version information of private clound application programming interfaces To get to the version information library of updated private clound application programming interfaces in library.Wherein, updated private clound application journey The version information library of sequence interface includes the version information of original application programming interfaces and updated application programming interfaces Version information.
It should be understood that although each step in above-mentioned flow chart is shown successively according to the instruction of arrow, this A little steps are not that the inevitable sequence indicated according to arrow executes successively.Unless expressly state otherwise herein, these steps It executes there is no the limitation of stringent sequence, these steps can execute in other order.Moreover, in above-mentioned flow chart at least A part of step may include that either these sub-steps of multiple stages or stage are not necessarily in same a period of time to multiple sub-steps Quarter executes completion, but can execute at different times, the execution in these sub-steps or stage be sequentially also not necessarily according to Secondary progress, but can either the sub-step of other steps or at least part in stage in turn or replace with other steps Ground executes.
In one embodiment, as shown in figure 13, a kind of interface adaptive device is provided, including:Acquisition request module 1310, data obtaining module 1320, interface lookup module 1330 and result acquisition module 1340, wherein:
Acquisition request module 1310, for obtaining the logging request for carrying private clound mark.
Data obtaining module 1320 identifies corresponding application programming interfaces for being obtained according to logging request with private clound Version information.
Interface lookup module 1330, for obtaining operation requests, according to operation requests and corresponding with private clound mark The version information of application programming interfaces searches corresponding public cloud application programming interfaces.
As a result acquisition module 1340, for obtaining response results corresponding with operation requests, wherein response results pass through public affairs There are the corresponding private clound application programming interfaces of cloud application program interface call to execute service logic to obtain.
In one embodiment, data obtaining module 1320 can be also used for being identified to private clound according to logging request and correspond to Private clound send information acquisition request, obtain the corresponding application programming interfaces that private clound is returned according to information acquisition request Version information.
In one embodiment, acquisition request module 1310 can be also used for user's meeting that detection carries private clound mark Words reacquire the logging request for carrying private clound mark when user conversation fails.
In one embodiment, data obtaining module 1320 can be also used for establishing the version of private clound application programming interfaces The correspondence of information and private clound application programming interfaces, according to correspondence by the version information of private clound application programming interfaces It stores to active user's session.
In one embodiment, the version information that private clound identifies corresponding application programming interfaces is current private clound application Maximum version information in the version information library of routine interface.
In one embodiment, acquisition request module 1310 can be also used for obtaining change public cloud application programming interfaces First instruction is updated public cloud application programming interfaces according to the first instruction.
In one embodiment, acquisition request module 1310 can be also used for obtaining update private clound application programming interfaces Second instruction of version information, is updated the version information library of private clound application programming interfaces according to the second instruction, obtains The version information library of updated private clound application programming interfaces, wherein the version of updated private clound application programming interfaces Information bank includes the version information of original application programming interfaces and the version information of updated application programming interfaces.
Specific about interface adaptive device limits the restriction that may refer to above for method for interface adaptation, herein not It repeats again.Modules in above-mentioned interface adaptive device can be realized fully or partially through software, hardware and combinations thereof.On Stating each module can be embedded in or independently of in the processor in computer equipment, can also store in a software form in the form of hardware In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of computer readable storage medium is also provided, the computer-readable recording medium storage There is computer program, which realizes following steps when being executed by processor:It obtains and carries stepping on for private clound mark Record request obtains the version information for identifying corresponding application programming interfaces with private clound according to logging request, obtains operation requests, The version information that corresponding application programming interfaces are identified according to operation requests and with private clound searches corresponding public cloud application Routine interface obtains response results corresponding with operation requests, wherein response results are called by public cloud application programming interfaces Corresponding private clound application programming interfaces execute service logic and obtain.
In one embodiment, computer program is executed by processor corresponding according to logging request acquisition private clound mark The version information of application programming interfaces, including:Corresponding private clound is identified to private clound send acquisition of information according to logging request Request obtains the version information for the corresponding application programming interfaces that private clound is returned according to information acquisition request.
In one embodiment, following steps can also be realized when computer program is executed by processor:Detection carries The user conversation of private clound mark reacquires the logging request for carrying private clound mark when user conversation fails.
In one embodiment, following steps can also be realized when computer program is executed by processor:Establish private clound The correspondence of the version information and private clound application programming interfaces of application programming interfaces, according to correspondence by private clound application The version information of routine interface is stored to active user's session.
In one embodiment, when computer program is executed by processor, private clound identifies corresponding application programming interfaces Version information be current private clound application programming interfaces version information library in maximum version information.
In one embodiment, following steps can also be realized when computer program is executed by processor:It is public to obtain change The first instruction for having cloud application routine interface, is updated the public cloud application programming interfaces according to the first instruction.
In one embodiment, following steps can also be realized when computer program is executed by processor:It is private to obtain update The second instruction for having the version information of cloud application routine interface believes the version of private clound application programming interfaces according to the second instruction Breath library is updated, and obtains the version information library of updated private clound application programming interfaces, wherein updated private clound is answered Include the version information of original application programming interfaces and updated application program with the version information library of routine interface The version information of interface.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, Any reference to memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above example can be combined arbitrarily, to keep description succinct, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield is all considered to be the range of this specification record.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, under the premise of not departing from the application design, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the protection domain of the application patent should be determined by the appended claims.

Claims (10)

1. a kind of method for interface adaptation, the method includes:
Obtain the logging request for carrying private clound mark;
The version information that corresponding application programming interfaces are identified with the private clound is obtained according to the logging request;
Operation requests are obtained, the version of corresponding application programming interfaces is identified according to the operation requests and with the private clound The corresponding public cloud application programming interfaces of information searching;
Obtain response results corresponding with the operation requests, wherein the response results pass through the public cloud application program Interface calls corresponding private clound application programming interfaces to execute service logic and obtains.
2. according to the method described in claim 1, it is characterized in that, described obtain the private clound mark according to the logging request Know the version information of corresponding application programming interfaces, including:
Corresponding private clound is identified to the private clound send information acquisition request according to the logging request;
Obtain the version information that the private clound obtains the corresponding application programming interfaces that request returns according to described information.
3. according to the method described in claim 1, it is characterized in that, the method further includes:
Detection carries the user conversation of private clound mark;
When the user conversation fails, the logging request for carrying private clound mark is reacquired.
4. according to the method described in claim 1, it is characterized in that, obtaining operation requests, according to the operation requests and Before the version information of the application programming interfaces searches corresponding application programming interfaces step, the method further includes:
Establish the correspondence of the version information and the private clound application programming interfaces of the private clound application programming interfaces;
The version information of the private clound application programming interfaces is stored to active user's session according to the correspondence.
5. according to the method described in claim 1, it is characterized in that, the private clound identifies the version of corresponding application programming interfaces This information is the maximum version information in the version information library of current private clound application programming interfaces.
6. according to the method described in claim 1, it is characterized in that, the method further includes:
Obtain the first instruction for changing the public cloud application programming interfaces;
The public cloud application programming interfaces are updated according to first instruction.
7. according to the method described in claim 1 to 6 any one, which is characterized in that the method further includes:
Obtain the second instruction of the version information of update private clound application programming interfaces;
The version information library of private clound application programming interfaces is updated according to second instruction, is obtained updated privately owned The version information library of cloud application routine interface;
Wherein, the version information library of the updated private clound application programming interfaces includes original application programming interfaces The version information of version information and updated application programming interfaces.
8. a kind of interface adaptive device, which is characterized in that described device includes:
Acquisition request module, for obtaining the logging request for carrying private clound mark;
Data obtaining module identifies corresponding application programming interfaces for being obtained according to the logging request with the private clound Version information;
Interface lookup module, for obtaining operation requests, according to operation requests and corresponding with private clound mark The version information of application programming interfaces searches corresponding public cloud application programming interfaces;
As a result acquisition module, for obtaining response results corresponding with the operation requests, wherein the response results pass through institute Stating public cloud application programming interfaces calls corresponding private clound application programming interfaces execution service logic to obtain.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In when the processor executes the computer program the step of any one of realization claim 1 to 7 the method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claim 1 to 7 is realized when being executed by processor.
CN201810381590.5A 2018-04-25 2018-04-25 Interface adaptation method and device, computer equipment and storage medium Active CN108595280B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810381590.5A CN108595280B (en) 2018-04-25 2018-04-25 Interface adaptation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810381590.5A CN108595280B (en) 2018-04-25 2018-04-25 Interface adaptation method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108595280A true CN108595280A (en) 2018-09-28
CN108595280B CN108595280B (en) 2021-02-19

Family

ID=63609851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810381590.5A Active CN108595280B (en) 2018-04-25 2018-04-25 Interface adaptation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108595280B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110932927A (en) * 2019-10-31 2020-03-27 北京浪潮数据技术有限公司 Service processing method, device, equipment and readable storage medium
CN111866091A (en) * 2020-06-30 2020-10-30 海尔优家智能科技(北京)有限公司 Method, device, server and system for information interaction of cloud platform
CN115150242A (en) * 2022-06-23 2022-10-04 北京青云科技股份有限公司 PaaS application deployment method and system
CN115695555A (en) * 2022-09-06 2023-02-03 恒生电子股份有限公司 Interface calling method, system, processing equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090070759A1 (en) * 2007-09-10 2009-03-12 Samsung Electronics Co., Ltd. Electronic apparatus and program downloading method thereof
CN103440337A (en) * 2013-09-09 2013-12-11 百度在线网络技术(北京)有限公司 API (application program interface) compatibility scanning method and API compatibility scanning device
CN105183484A (en) * 2015-09-28 2015-12-23 北京奇虎科技有限公司 Method and device for compatibility of multi-version application programming interface
US20170163480A1 (en) * 2013-04-03 2017-06-08 Salesforce.Com, Inc. System and method for generic configuration management system application programming interface

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090070759A1 (en) * 2007-09-10 2009-03-12 Samsung Electronics Co., Ltd. Electronic apparatus and program downloading method thereof
US20170163480A1 (en) * 2013-04-03 2017-06-08 Salesforce.Com, Inc. System and method for generic configuration management system application programming interface
CN103440337A (en) * 2013-09-09 2013-12-11 百度在线网络技术(北京)有限公司 API (application program interface) compatibility scanning method and API compatibility scanning device
CN105183484A (en) * 2015-09-28 2015-12-23 北京奇虎科技有限公司 Method and device for compatibility of multi-version application programming interface

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110932927A (en) * 2019-10-31 2020-03-27 北京浪潮数据技术有限公司 Service processing method, device, equipment and readable storage medium
CN110932927B (en) * 2019-10-31 2021-12-03 北京浪潮数据技术有限公司 Service processing method, device, equipment and readable storage medium
CN111866091A (en) * 2020-06-30 2020-10-30 海尔优家智能科技(北京)有限公司 Method, device, server and system for information interaction of cloud platform
CN111866091B (en) * 2020-06-30 2023-10-31 海尔优家智能科技(北京)有限公司 Method, device, server and system for cloud platform information interaction
CN115150242A (en) * 2022-06-23 2022-10-04 北京青云科技股份有限公司 PaaS application deployment method and system
CN115150242B (en) * 2022-06-23 2023-04-25 北京青云科技股份有限公司 Deployment method and system of PaaS application
CN115695555A (en) * 2022-09-06 2023-02-03 恒生电子股份有限公司 Interface calling method, system, processing equipment and storage medium
CN115695555B (en) * 2022-09-06 2023-09-12 恒生电子股份有限公司 Interface calling method, system, processing device and storage medium

Also Published As

Publication number Publication date
CN108595280B (en) 2021-02-19

Similar Documents

Publication Publication Date Title
CN112000348B (en) Control method, device and computer equipment for service gray level release
CN112118565B (en) Multi-tenant service gray level publishing method, device, computer equipment and storage medium
CN108595280A (en) Method for interface adaptation, device, computer equipment and storage medium
CN110365751B (en) Service processing method, device and equipment of gateway system
CN108829459B (en) Nginx server-based configuration method and device, computer equipment and storage medium
CN108965381A (en) Implementation of load balancing, device, computer equipment and medium based on Nginx
US20130347130A1 (en) Methods and apparatus for dynamically providing modified versions of electronic device applications
CN112291298B (en) Data transmission method, device, computer equipment and storage medium of heterogeneous system
US8032624B2 (en) Pluggable contact resolution
US9432321B2 (en) Method and apparatus for messaging in the cloud
CN111327668B (en) Network management method, device, equipment and storage medium
CN109962893B (en) Intelligent calling method and related equipment thereof
CN110677475A (en) Micro-service processing method, device, equipment and storage medium
US7580422B2 (en) Internet protocol phone system and control method for internet protocol phone system
CN114036236A (en) Multi-gateway cluster system
CN116820958A (en) Agent-based multi-environment automation test method and system
US20230412617A1 (en) Hybrid customer premises equipment and cloud-based implementation of dynamic residential threat detection
US20240244414A1 (en) Session binding relationship processing method and apparatus, electronic device, and readable medium
CN113918326B (en) Method and device for processing request
US9686226B1 (en) Domain name system (DNS) query response providing loop-back internet protocol (IP) address to non-activated mobile communication device
US11399067B2 (en) Network access method and apparatus for speech recognition service based on artificial intelligence
CN111970250A (en) Method for identifying account sharing, electronic device and storage medium
CN110475031A (en) Calling system, call processing method, server and readable storage medium storing program for executing
CN116405598B (en) Telephone deployment method and device and electronic equipment
US11909764B1 (en) Man-in-the-middle interceptor for application security testing

Legal Events

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