CN108415710B - The method and system of API is issued, called in Intelligent dialogue development platform - Google Patents

The method and system of API is issued, called in Intelligent dialogue development platform Download PDF

Info

Publication number
CN108415710B
CN108415710B CN201810209297.0A CN201810209297A CN108415710B CN 108415710 B CN108415710 B CN 108415710B CN 201810209297 A CN201810209297 A CN 201810209297A CN 108415710 B CN108415710 B CN 108415710B
Authority
CN
China
Prior art keywords
api
response
developer
address
released
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810209297.0A
Other languages
Chinese (zh)
Other versions
CN108415710A (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.)
Sipic Technology Co Ltd
Original Assignee
AI Speech 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 AI Speech Ltd filed Critical AI Speech Ltd
Priority to CN201810209297.0A priority Critical patent/CN108415710B/en
Publication of CN108415710A publication Critical patent/CN108415710A/en
Application granted granted Critical
Publication of CN108415710B publication Critical patent/CN108415710B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention is disclosed in the method and device that API is issued in Intelligent dialogue development platform, wherein, method includes: the input operation in response to developer on the API publication interface of Intelligent dialogue development platform, obtains the essential information, input parameter and return parameters of API to be released;On API publication interface, the function code of API to be released is write based on scheduled serverless template-directed developer;Can API to be released be tested normal use;It is normal in response to using, the second response address is generated using the publication address as API to be released, and API to be released is deployed as serverless service and API to be released and corresponding second response address are distributed to the API gateway of Intelligent dialogue development platform.The solution of the present invention can shield complicated authorization Algorithm, not expose the encryption datas such as authorization key, open to outside with the unified authorization key of API gateway.

Description

The method and system of API is issued, called in Intelligent dialogue development platform
Technical field
The invention belongs to log analysis technical fields, more particularly to issue in Intelligent dialogue development platform, call API's Method and system.
Background technique
The venture company of small-to-medium business, especially internet industry, there is no too many technical staff for itself, if set Need to consider many technical problems when meter systems, such as how Web Application Server configures, how database configures, message How service middleware is built etc., and personnel cost, system cost can be very high for them for that, Serverless framework Such case can may significantly be improved for the appearance of (serverless backup framework).
In current mainstream cloud computing IaaS (Infrastructure-as-a-Service, infrastructure i.e. service) and In PaaS (Platform-as-a-Service, platform service), when developer carries out business development, it is still desirable to be concerned about The many and relevant server-side development of server, such as caching, messaging service, Web Application Server, database, and Performance optimization is carried out to server, it is also necessary to consider storage and computing resource, consider load balancing and ability extending transversely, consider The exploitation of the amateur logics such as server disaster tolerance stability.The O&M and exploitation knowledge, experience of these servers greatly limit Developer carries out the efficiency of business development.Imagine, if the direct rental service of developer or exploitation service and need not It is concerned with how to run deployment services in the server, if can greatly promote development efficiency and product quality? it is this to go to take Be engaged in device and directly using service framework, we term it Serverless frameworks.
API (Application Programming Interface, application programming interface) is some pre-defined Function, it is therefore an objective to provide application program and developer based on certain software or hardware be able to access one group of routine ability, and It is not necessarily to access source code again, or understands the details of internal work mechanism.
Application Internet-based just becomes more and more popular, and in this process, has more websites by the money of itself Source opens to developer and calls.The API Calls externally provided make the content relevance between website stronger, while these are opened The platform put also is that user, developer and medium and small website bring bigger value.
Opening is current development trend, and more and more products move towards to open.In order to which the API for externally providing unified connects Mouthful, need the website for calling API to developer's open source to provide open unified api interface environment, to help user to visit Ask the function and resource of website.
API gateway is a server, is the sole inlet of system.From the point of view of Object-Oriented Design, it and appearance Mode is similar.API gateway encapsulates internal system framework, provides the API of a customization for each client.It may also have Other responsibilities, such as authentication, monitoring, load balancing, caching, request fragment and management, steady-error coefficient processing.
Inventor has found in the implementation of the present invention: in the related technology, typically passing through input parameter mapping API is published to API gateway by mode.But the parameters such as the authorization of most of API encryption are calculated by complicated algorithm , API directly can not be published to API gateway by way of input parameter mapping.
Summary of the invention
The embodiment of the present invention provides a kind of method and system issued in Intelligent dialogue development platform, call API, is used for At least solve one of above-mentioned technical problem.
In a first aspect, the embodiment of the present invention provides a kind of method for issuing API in Intelligent dialogue development platform, comprising: In response to input operation of the developer on the API publication interface of Intelligent dialogue development platform, the basic letter of API to be released is obtained Breath, input parameter and return parameters;On API publication interface, it is based on scheduled serverless template-directed developer It writes the function code of the API to be released, wherein the serverless template includes at least following code: obtaining user Solicited message, obtain the authorization of API to be called and send the user to the first response address of the API to be called and ask Seek and obtain the feedback information of first response address;In response to the test request of developer, the API energy to be released is tested No normal use;In response to using the posting request of normal and developer, the second response address is generated using as described to be released The API to be released is deployed as serverless and serviced and by the API to be released and corresponding institute by the publication address of API State the API gateway that the second response address is distributed to the Intelligent dialogue development platform.
Second aspect, the embodiment of the present invention provide a kind of method that API is called in Intelligent dialogue development platform, comprising: The API for calling other developers to develop in Intelligent dialogue development platform in response to developer, obtains the account of the developer The response address issued with the API called in the API gateway of Intelligent dialogue development platform;Account based on the developer and The API called generates API unified authorization code key;Using the unified authorization code key, Xiang Suoshu response address sends to call and ask It asks;And the recalls information to third party API returned based on the response address, initiate the calling to the third party API Request.
The third aspect, the embodiment of the present invention provide a kind of system that API is issued in Intelligent dialogue development platform, comprising: Data obtaining module is configured to the input operation in response to developer on the API publication interface of Intelligent dialogue development platform, obtains Take the essential information, input parameter and return parameters of API to be released;Function writes module, is configured to issue interface in the API On, the function code of the API to be released is write based on scheduled serverless template-directed developer, wherein described Serverless template includes at least and obtains the solicited message of user, obtains the authorization of API to be called and to described to be called The first response address of API sends the feedback information that the user requests and obtains first response address;Test module is matched It is set to the test request in response to the developer, can test the API to be released normal use;And release module, match It is set to the posting request in response to using the normal and described developer, generates the second response address using as the API to be released Publication address, the API to be released is deployed as serverless and is serviced and by the API to be released and corresponding described Two response addresses are distributed to the API gateway of the Intelligent dialogue development platform.
Fourth aspect, the embodiment of the present invention provide a kind of system that API is called in Intelligent dialogue development platform, comprising: Respond module is configured to the API for calling other developers to develop in Intelligent dialogue development platform in response to developer, obtains institute The response address that the account and the API called for stating developer are issued in the API gateway of the Intelligent dialogue development platform;Authorization Module, the account and the API called for being configured to the developer generate API unified authorization code key;And request is sent Module, is configured so that the unified authorization code key, and Xiang Suoshu response address sends call request.
5th aspect, provides a kind of electronic equipment comprising: at least one processor, and with described at least one Manage the memory of device communication connection, wherein the memory is stored with the instruction that can be executed by least one described processor, institute It states instruction to be executed by least one described processor, so that at least one described processor is able to carry out any embodiment of the present invention In Intelligent dialogue development platform issue, call API method the step of.
6th aspect, the embodiment of the present invention also provide a kind of computer program product, and the computer program product includes The computer program being stored on non-volatile computer readable storage medium storing program for executing, the computer program include program instruction, when When described program instruction is computer-executed, the computer is made to execute the flat in Intelligent dialogue exploitation of any embodiment of the present invention It issued on platform, call the step of method of API.
The beneficial effect of the embodiment of the present invention is: in conjunction with the serverless technology risen instantly, developer is based on pre- If one section of code of edit model, completes the mapping of API.Complicated authorization Algorithm, not exposed authorization key etc. can be shielded in this way to add Ciphertext data, it is open to outside with the unified authorization key of API gateway.And developer can be opened with release quickly API to API gateway Without considering the various agreements of gateway when originator develops the API service of oneself.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, required use in being described below to embodiment Attached drawing be briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, for ability For the those of ordinary skill of domain, without creative efforts, it can also be obtained according to these attached drawings other attached Figure.
Fig. 1 is a kind of process for method that API is issued in Intelligent dialogue development platform that one embodiment of the invention provides Figure;
Fig. 2 is a kind of sub-step for method that API is issued in Intelligent dialogue development platform that one embodiment of the invention provides Rapid flow chart;
Fig. 3 is a kind of process for method that API is called in Intelligent dialogue development platform that one embodiment of the invention provides Figure;
Fig. 4 a, Fig. 4 b and Fig. 4 c are the method that API is issued in Intelligent dialogue development platform of one embodiment of the invention The interface screenshot of one application scenarios;
Fig. 5 a and Fig. 5 b are that one of the method that API is called in Intelligent dialogue development platform of one embodiment of the invention answers With the interface screenshot of scene;
Fig. 6 is a kind of block diagram for system that API is issued in Intelligent dialogue development platform that one embodiment of the invention provides;
Fig. 7 is a kind of block diagram for system that API is called in Intelligent dialogue development platform that one embodiment of the invention provides;
Fig. 8 is the structural schematic diagram for the electronic equipment that one embodiment of the invention provides.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.
The present invention can describe in the general context of computer-executable instructions executed by a computer, such as program Module.Generally, program module includes routines performing specific tasks or implementing specific abstract data types, programs, objects, member Part, data structure etc..The present invention can also be practiced in a distributed computing environment, in these distributed computing environments, by Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with In the local and remote computer storage media including storage equipment.
In the present invention, " module ", " system " etc. refer to the related entities for being applied to computer, such as hardware, hardware and soft Combination, software or software in execution of part etc..In detail, for example, element can with but be not limited to run on processor Process, processor, object, executable element, execution thread, program and/or computer.In addition, running on answering on server It can be element with program or shell script, server.One or more elements can in the process and/or thread of execution, And element can be localized and/or be distributed between two or multiple stage computers on one computer, and can be by various Computer-readable medium operation.Element can also be according to the signal with one or more data packets, for example, from one and this Another element interacts in ground system, distributed system, and/or the network in internet passes through signal and other system interactions The signal of data is communicated by locally and/or remotely process.
Finally, it is to be noted that, herein, the terms "include", "comprise" not only include those elements, but also Further include other elements that are not explicitly listed, or further include for this process, method, article or equipment it is intrinsic Element.In the absence of more restrictions, the element limited by sentence " including ... ", it is not excluded that including the element Process, method, article or equipment in there is also other identical elements.
One embodiment of method of API is issued referring to FIG. 1, it illustrates of the invention in Intelligent dialogue development platform Flow chart, the method that API is issued in Intelligent dialogue development platform of the present embodiment can be adapted for developing in Intelligent dialogue flat The system that the platform of API issues API in Intelligent dialogue development platform in other words is issued on platform.
As shown in Figure 1, in a step 101, in response to developer on the API publication interface of Intelligent dialogue development platform Input operation obtains the essential information, input parameter and return parameters of API to be released;
Later, in a step 102, it on API publication interface, is compiled based on scheduled serverless template-directed developer Write the function code of API to be released, wherein serverless template include at least following code: obtain user solicited message, It obtains the authorization of API to be called and is requested to the first response address of API to be called transmission user and obtain first responsively The feedback information of location;
Later, in step 103, in response to the test request of developer, can test API to be released normal use;
Finally, at step 104, in response to using the posting request of normal and developer, generate the second response address with As the publication address of API to be released, API to be released is deployed as serverless service and by API to be released and corresponding Second response address is distributed to the API gateway of Intelligent dialogue development platform.
In the present embodiment, for step 101, API publication circle is provided on the API delivery system of intelligent development platform Face, the developer of API can input the essential information, input parameter and return parameters of API to be released according to the guidance at interface.Its In, essential information may include API name and API description, the input from the user ginseng that input parameter, that is, API needs to obtain Number, such as navigation API may may require that the departure place and destination for using user's input, after return parameters, that is, API processing most Need to return those parameters eventually, such as navigation API needs to return various feasible routes.Later, it for step 102, is issued in API It is additionally provided with scheduled serverless template on interface, helps developer that the API of oneself is deployed as serverless service, Developer can directly modify on the basis of template, oneself function and treatment process is added.Wherein, serverless template In include at least the solicited message that following code developer obtains user, such as can be above-mentioned departure place and destination And the parameter that developer's follow-up function may be used, specific parameter need developer oneself to be arranged, or also can be according to opening The content filled in front of originator automatically generates corresponding code;Also needed in template include developer obtain it is original to be called The authorization of API then needs to obtain the authorization of certain navigation API for example, developer is the API developed on the basis of certain navigates API Information;Later, it also needs the first response address of oriented API to be called to send the code of user's request in template, and obtains and From the various feasible routes of the code of the feedback information of first response address, such as aforementioned return.Later, for step Rapid 103, API delivery system in response to the test request of developer, test API to be developed can normal use, for example, in API Publication interface on can have " test " button, when developer front template on code revision finish after, may Whether the code after needing test modifications is feasible, clicks the testing button, tests according to preset instructions, in the process of test In, it may be necessary to the corresponding information of the corresponding input parameter of developer's input, there is no limit herein by the application.Finally, in step It is and when receiving the posting request of developer, to generate the second sound using normal in response to test result before in 104 It answers address using the publication address as API to be released, which is deployed as serverless service and will be to be released API and second response address are distributed to the API gateway of Intelligent dialogue development platform.For example, can have on API publication interface The Publish button, after developer clicks the button, API delivery system will API to be released be corresponding issues with this is generated Address.It should be noted that second response address, i.e. publication address, and the first response address, i.e., by API Calls to be released Original API address it is different, thus, when developer issues the API of oneself, other API users, which see, will be packaged Address afterwards, on the one hand, the on the other hand complicated authorization Algorithm that can shield original called API will not expose original The encryption parameters such as the authorization Key of called API, are presented in face of other users with new response address.
In some alternative embodiments, other of the second response address and the API gateway of Intelligent dialogue development platform API format having the same in ground can be supported so as to the address format opening unified with API gateway with API gateway Unified authorization key is open to outside.To which developer can develop oneself with release quickly API to API gateway, developer Without the various agreements for considering gateway when API service.
In other optional embodiments, the API delivery system of intelligent development platform can be exploitation based on API gateway The API of person's exploitation provides unified O&M and management.To which more convenient developer uses the API delivery system, exploitation is promoted The usage experience of person.
With further reference to Fig. 2, it illustrates one kind that one embodiment of the invention provides to send out in Intelligent dialogue development platform The flow chart of the sub-step of the method for cloth API, the mainly further description to serverless template in previous embodiment. The method that API is issued in Intelligent dialogue development platform of the present embodiment can be adapted for issuing in Intelligent dialogue development platform The platform of API or the system that API is issued in Intelligent dialogue development platform.
As shown in Fig. 2, in step 201, obtaining the solicited message of user;
In step 202, to user request information secondary treatment with the solicited message that obtains that treated;
Later, in step 203, the authorization message of API to be called is obtained;
Later, in step 204, the first response using treated solicited message and authorization message to API to be called Address sends the feedback information for requesting and obtaining the first response address;
Later, in step 205, secondary treatment is carried out to feedback information with the feedback information that obtains that treated;
Finally, in step 206, to user's feedback information that returns to that treated.
In the present embodiment, it mainly further joined out in description of the previous embodiment to serverless template The new processing logic oneself write, step 201, step 203, step is added in originator on the basis of original called API 204 and step 206 had been described in previous embodiment, details are not described herein.For step 202, developer can be in template The processing logic that oneself is added herein, such as navigation API obtain user departure place and destination, developer exploitation API may also need to do other processing, such as display departure place letter related to the streetscape map of destination or voice broadcast Breath etc., at this point, the processing logic of oneself can be added at this of template by developer.Later, for step 205, for quilt Call the feedback information of API, for example, for navigation API return can row line, developer may also need to be added oneself one Then a little processing just feed back to user, then developer the processing of oneself can be added at this.By guiding out in a template Originator is in the position of certain processing logics and what's new that may have developer oneself, so as to easily facilitate exploitation Person develops the processing logic and function of oneself, promotes the usage experience of developer.
Referring to FIG. 3, it illustrates one kind that one embodiment of the invention provides to call API in Intelligent dialogue development platform Method flow chart.The method of calling API in Intelligent dialogue development platform of the present embodiment can be adapted for developer and exist Other developers are called to issue the API Calls system on the API or platform of the platform in Intelligent dialogue development platform.
As shown in figure 3, in step 301, calling other developers in Intelligent dialogue development platform in response to developer The API of exploitation, the response that the account and the API called for obtaining developer are issued in the API gateway of Intelligent dialogue development platform Address;
Later, in step 302, the account based on developer and the API called generate API unified authorization code key;
Later, in step 303, using unified authorization code key, call request is sent to response address;
Finally, in step 304, based on the recalls information to third party API that response address returns, initiating to third party The call request of API.
In the present embodiment, for step 301, developer can call other developers in Intelligent dialogue development platform The API of exploitation, at this point, the API Calls system of Intelligent dialogue development platform can obtain the account of developer and the API called exists The response address of the API gateway publication of Intelligent dialogue development platform, but developer calls when as not know that other are opened Whether the API of originator exploitation calls others API because developer can see only in the publication address of API gateway.Later For step 302, account of the Intelligent dialogue development platform based on the developer obtained before and the API called generate API system One authorizes code key to access the publication address of the API for developer.Later, in step 303, API Calls system, which uses, is somebody's turn to do Unified authorization code key, the response address issued to the API gateway send request.Finally, in step 304, API Calls system base It in the recalls information to third party API that response address returns, such as may include the authorization message and responsively of third party API Location, API Calls system initiate the call request to third party API.And the calling process to third party API is that developer can not It learns, it is possible to hide the encryption information such as the authorization Key of third party API, well with the authorization Key that API gateway is unified Opening, and have system doing safety is higher, complicated authorization Algorithm can be shielded.
Fig. 4 a, Fig. 4 b and Fig. 4 c are please referred to, it illustrates sending out in Intelligent dialogue development platform for one embodiment of the invention The interface screenshot of one application scenarios of the method for cloth API.
Fig. 4 a is please referred to, it illustrates in " resource transfer ", we can choose " without using data resource ", " use API resource " (API of calling platform local), " writing Function ".What we did in this application is exactly " to write Function " (writes function), we can choose " the new function of+creation " to create the function comprising developer oneself The API of logic, " Function writes example " for clicking side can check relevant example.Certainly, we select "+creation When new function ", it also will appear corresponding template-directed developer and write relevant code, for details, reference can be made to Fig. 4 b and figures 4c.After wherein Fig. 4 b shows developer's selection " the new function of+creation ", the top half at interface is popped up, Fig. 4 c shows Go out after developer's selection " the new function of+creation ", has popped up the lower half portion at interface.Wherein top half, which is shown, needs The parameter of needs can be transferred in Fig. 4 c by the input parameter for the user to be obtained by click "+addition custom parameter " Code frame in, corresponding template is contained in Fig. 4 c, it is only necessary to which developer writes the processing logic of oneself.In Fig. 4 c also It contains " submit test " code of completion can be write to developer and test, developer only needs analog subscriber input phase The parameter or sentence of pass, such as " how is the weather in Shijiazhuang ".
Fig. 5 a and Fig. 5 b are that one of the method that API is called in Intelligent dialogue development platform of one embodiment of the invention answers With the interface screenshot of scene.
As shown in Figure 5 a, when developer selects " using API resource " in " resource transfer ", developer, which can choose, to be made It is all that other developers issue with issued Web API, these API, they are endowed and the local API on platform Identical format, thus when developer calls these API, in this case it is not apparent that the code key of these API, because theirs is oneself What login name and the unified code key of platform logged in, and the API that these can be called also has and much classifies very much, specifically can refer to figure 5b。
Shown below by way of an application example and combine Fig. 4 a, Fig. 4 b, Fig. 4 c, Fig. 5 a and Fig. 5 b, platform for It issues API and calls the processing logic of API.
(1) API is issued
1, API name, API description
2, API parameter designing
3, serverless code is write
Function(input)
1, user's required parameter is obtained from input
2, parameter secondary treatment in 1
3, original API authorization
4, it is authorized in parameter and 3 in use 2 to original API http address (old) and sends request (execution service or acquisition Data)
5, the response of original API is obtained
6, secondary treatment is responded in 5
7, returned data
End
4, API returned data describes
5, API is tested
6, automatic deployment API is servless service
7, new API http address (new) is generated
8, administrator tests audit
9, API is opened to the outside world by API gateway
(2) API is called by API gatew0ay
1, API unified authorization key is generated based on developer's account and the API called
2, using unified authorization key, http post request is sent to address new
Wherein, the method for third party API to API gateway is issued, comprising: issue third party API to API in response to developer The request of gateway shows the acquisition of information interface of third party API to user, wherein the acquisition of information interface of third party API is at least For obtaining the first authorization message of third party API and the first response address information of third party API;For the third party of acquisition The first response address creation of API corresponds to the second response address and the second authorization message of API gateway for other exploitations Person is based on the second response address and the second authorization message accesses third party API, wherein the second authorization message is directed to for API gateway The authorization message of third party API;Based on the second authorization message and the second response address by third party API be distributed to API gateway with Hide the first authorization message and the first response address information of third party API.Further, third party API it is new responsively The response address format having the same of the local API of location and API gateway.
Wherein, the method for third party API being called by API gateway, comprising: receive developer to the first of third party API Call request, wherein third party API has the first authorization message, the first response address information and corresponding to the second of API gateway Response address information includes the log-on message of developer and the second response address of third party API in call request;Parsing is adjusted With request, authorization message corresponding with the log-on message of developer is obtained, judges whether developer has permission and calls third party API;Had permission if being judged as, the first authorization message and the first response address information based on pre-stored third party API to Third party API initiates the second call request, and receives the feedback information of the first response address;Feedback information is sent to exploitation Person.
The present embodiment combines the serverless technology risen instantly, and developer edits one section of code, completes reflecting for API It penetrates.Complicated authorization Algorithm can be shielded in this way, does not expose the encryption datas such as authorization key, with the authorization key that API gateway is unified It is open to outside.API by encapsulation is unified with HTTP POST request, and JSON requests the form of body to issue use.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Movement merge, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, reference can be made to the related descriptions of other embodiments.
Referring to FIG. 6, it illustrates one kind that one embodiment of the invention provides to issue API in Intelligent dialogue development platform System.The method that API is issued in Intelligent dialogue development platform of the present embodiment can be adapted for developing in Intelligent dialogue flat Platform.
As shown in fig. 6, the system 600 of API is issued provided by the embodiment of the present invention in Intelligent dialogue development platform, packet Include data obtaining module 610, function writes module 620, test module 630 and release module 640.Wherein, data obtaining module 610, it is configured to the input operation in response to developer on the API publication interface of Intelligent dialogue development platform, is obtained to be released Essential information, input parameter and the return parameters of API;Function writes module 620, is configured to issue on interface in API, based on pre- Fixed serverless template-directed developer writes the function code of API to be released, wherein serverless template is at least wrapped It includes and obtains the solicited message of user, obtains the authorization of API to be called and send user to the first response address of API to be called Request and obtain the feedback information of the first response address;Test module 630, can be configured to test API to be released normal use; And release module 640, it is configured to generate the second response address using the publication as API to be released in response to using normally API to be released is deployed as serverless service and API to be released and corresponding second response address is distributed to intelligence by location The API gateway of dialog development platform.
Referring to FIG. 7, it illustrates one kind that one embodiment of the invention provides to call API in Intelligent dialogue development platform System, can be adapted for Intelligent dialogue development platform.
As shown in fig. 7, the system 700 of API is called provided by the embodiment of the present invention in Intelligent dialogue development platform, packet Include respond module 710, unified authorization module 720, the first calling module 730 and the second calling module 740.
Wherein, respond module 710 are configured to call other developers in Intelligent dialogue development platform in response to developer The API of exploitation, the response that the account and the API called for obtaining developer are issued in the API gateway of Intelligent dialogue development platform Address;Unified authorization module 720, the account and the API called for being configured to developer generate API unified authorization code key; First calling module 730, is configured so that unified authorization code key, sends call request to response address;And second call mould Block 740, is configured to the recalls information to third party API of response address return, and the calling of third party API is asked in initiation It asks.
It should be appreciated that each step in all modules recorded in Fig. 6 and Fig. 7 and the method with reference to described in Fig. 1 and Fig. 3 It is corresponding.The operation above with respect to method description and feature and corresponding technical effect are equally applicable to Fig. 6 and Fig. 7 as a result, In all modules, details are not described herein.
It is worth noting that, the module in embodiment of the disclosure is not limited to the scheme of the disclosure, such as log Collection module can be described as collector journal and be stored in the module in log warehouse.Furthermore it is also possible to pass through hardware handles Device realizes that related function module, such as log collection module can also realize that details are not described herein with processor.
In further embodiments, the embodiment of the invention also provides a kind of nonvolatile computer storage medias, calculate Machine storage medium is stored with computer executable instructions, which can be performed in above-mentioned any means embodiment In Intelligent dialogue development platform issue API method;
As an implementation, nonvolatile computer storage media of the invention is stored with the executable finger of computer It enables, computer executable instructions setting are as follows:
In response to input operation of the developer on the API publication interface of Intelligent dialogue development platform, API to be released is obtained Essential information, input parameter and return parameters;
On API publication interface, write based on scheduled serverless template-directed developer described to be released The function code of API, wherein the serverless template includes at least following code: it obtains the solicited message of user, obtain The authorization of API to be called and the user is sent to the first response address of the API to be called request and obtain described the The feedback information of one response address;
In response to the test request of the developer, can test the API to be released normal use;
In response to using the posting request of the normal and described developer, the second response address is generated using as described to be released The API to be released is deployed as serverless and serviced and by the API to be released and corresponding institute by the publication address of API State the API gateway that the second response address is distributed to the Intelligent dialogue development platform.
As a kind of non-volatile computer readable storage medium storing program for executing, it can be used for storing non-volatile software program, non-volatile Property computer executable program and module, such as the side for issuing API in Intelligent dialogue development platform in the embodiment of the present invention Corresponding program instruction/the module of method.One or more program instruction is stored in non-volatile computer readable storage medium storing program for executing, When being executed by a processor, the method that API is issued in Intelligent dialogue development platform in above-mentioned any means embodiment is executed.
Non-volatile computer readable storage medium storing program for executing may include storing program area and storage data area, wherein storage journey It sequence area can application program required for storage program area, at least one function;Storage data area can be stored according to right in intelligence That the device of API is issued in words development platform uses created data etc..In addition, non-volatile computer readable storage medium storing program for executing May include high-speed random access memory, can also include nonvolatile memory, a for example, at least disk memory, Flush memory device or other non-volatile solid state memory parts.In some embodiments, non-volatile computer readable storage medium storing program for executing Optional includes the memory remotely located relative to processor, these remote memories can be by network connection to intelligent right Talk about the device that API is issued in development platform.The example of above-mentioned network include but is not limited to internet, intranet, local area network, Mobile radio communication and combinations thereof.
The embodiment of the present invention also provides a kind of computer program product, and computer program product is non-volatile including being stored in Computer program on computer readable storage medium, computer program include program instruction, when program instruction is held by computer When row, computer is made to execute the method that any of the above-described issues API in Intelligent dialogue development platform.
Fig. 8 is the structural schematic diagram of electronic equipment provided in an embodiment of the present invention, as shown in figure 8, the equipment includes:
One or more processors 810 and memory 820, in Fig. 8 by taking a processor 810 as an example.
The equipment that the method for API is issued in Intelligent dialogue development platform can also include: input unit 830 and output dress Set 840.
Processor 810, memory 820, input unit 830 and output device 840 can pass through bus or other modes It connects, in Fig. 8 for being connected by bus.
Memory 820 is above-mentioned non-volatile computer readable storage medium storing program for executing.
Non-volatile software program, instruction and the module that processor 810 is stored in memory 820 by operation, from And the various function application and data processing of execute server, i.e. realization above method embodiment is in Intelligent dialogue development platform The method of upper publication API.
Input unit 830 can receive the number or character information of input, and generates and set with the user of information delivery device It sets and the related key signals of function control inputs.Output device 840 may include that display screen etc. shows equipment.
Method provided by the embodiment of the present invention can be performed in the said goods, has the corresponding functional module of execution method and has Beneficial effect.The not technical detail of detailed description in the present embodiment, reference can be made to method provided by the embodiment of the present invention.
As an implementation, above-mentioned electronic apparatus application in Intelligent dialogue development platform issue API platform, It include: at least one processor;And the memory being connect at least one processor communication;Wherein, be stored with can for memory The instruction executed by least one processor, instruction executed by least one processor so that at least one processor can:
In response to input operation of the developer on the API publication interface of Intelligent dialogue development platform, API to be released is obtained Essential information, input parameter and return parameters;
On API publication interface, write based on scheduled serverless template-directed developer described to be released The function code of API, wherein the serverless template includes at least following code: it obtains the solicited message of user, obtain The authorization of API to be called and the user is sent to the first response address of the API to be called request and obtain described the The feedback information of one response address;
In response to the test request of the developer, can test the API to be released normal use;
In response to using the posting request of the normal and described developer, the second response address is generated using as described to be released The API to be released is deployed as serverless and serviced and by the API to be released and corresponding institute by the publication address of API State the API gateway that the second response address is distributed to the Intelligent dialogue development platform.
The electronic equipment of the embodiment of the present application exists in a variety of forms, including but not limited to:
(1) mobile communication equipment: the characteristics of this kind of equipment is that have mobile communication function, and to provide speech, data Communication is main target.This Terminal Type includes: smart phone (such as iPhone), multimedia handset, functional mobile phone and low Hold mobile phone etc..
(2) super mobile personal computer equipment: this kind of equipment belongs to the scope of personal computer, there is calculating and processing function Can, generally also have mobile Internet access characteristic.This Terminal Type includes: PDA, MID and UMPC equipment etc., such as iPad.
(3) portable entertainment device: this kind of equipment can show and play multimedia content.Such equipment include: audio, Video player (such as iPod), handheld device, e-book and intelligent toy and portable car-mounted navigation equipment.
(4) server: providing the equipment of the service of calculating, and the composition of server includes that processor, hard disk, memory, system are total Line etc., server is similar with general computer architecture, but due to needing to provide highly reliable service, in processing energy Power, stability, reliability, safety, scalability, manageability etc. are more demanding.
(5) other electronic devices with data interaction function.
The apparatus embodiments described above are merely exemplary, wherein described, unit can as illustrated by the separation member It is physically separated with being or may not be, component shown as a unit may or may not be physics list Member, it can it is in one place, or may be distributed over multiple network units.It can be selected according to the actual needs In some or all of the modules achieve the purpose of the solution of this embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can It is realized by the mode of software plus general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, above-mentioned technology Scheme substantially in other words can be embodied in the form of software products the part that the relevant technologies contribute, the computer Software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions to So that computer equipment (can be personal computer, server or the network equipment etc.) execute each embodiment or Method described in certain parts of embodiment.
Finally, it should be noted that above embodiments are only to illustrate the technical solution of the application, rather than its limitations;Although The application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it still may be used To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features; And these are modified or replaceed, each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (9)

1. a kind of method for issuing API in Intelligent dialogue development platform, comprising:
In response to input operation of the developer on the API publication interface of Intelligent dialogue development platform, the base of API to be released is obtained This information, input parameter and return parameters;
On API publication interface, write the API's to be released based on scheduled serverless template-directed developer Function code, wherein the serverless template includes at least following code: obtaining the solicited message of user, obtains wait adjust With the authorization of API and the user is sent to the first response address of the API to be called request and obtain first sound Answer the feedback information of address;
In response to the test request of the developer, can test the API to be released normal use;
In response to using the posting request of the normal and described developer, the second response address is generated as the API's to be released Address is issued not expose first response address, the API to be released is deployed as serverless service and will be described API to be released and corresponding second response address are distributed to the API gateway of the Intelligent dialogue development platform.
2. according to the method described in claim 1, wherein, the serverless template includes:
Obtain the solicited message of user;
To the user request information secondary treatment with the solicited message that obtains that treated;
Obtain the authorization message of API to be called;
It is asked using treated the solicited message and the authorization message to the transmission of the first response address of the API to be called Seek and obtain the feedback information of first response address;
Secondary treatment is carried out to the feedback information with the feedback information that obtains that treated;
Treated the feedback information is returned to the user.
3. method according to claim 1 or 2, wherein second response address and the Intelligent dialogue development platform API gateway other local API formats having the same.
4. according to the method described in claim 3, further include:
Unified O&M and management are provided for the API that the developer develops based on the API gateway.
5. a kind of method for calling API in Intelligent dialogue development platform, comprising:
The API for calling other developers to develop in Intelligent dialogue development platform in response to developer, obtains the developer's The second response address that account and the API called are issued in the API gateway of Intelligent dialogue development platform, wherein second sound Answer address as the publication address of the API to be released to not expose the first response address, first response address is it His developer issues the original response address used before the API;
Account based on the developer generates API unified authorization code key with the API called;
Using the unified authorization code key, the second response address of Xiang Suoshu sends call request;
Based on the recalls information to third party API that second response address returns, the calling to the third party API is initiated Request.
6. a kind of system for issuing API in Intelligent dialogue development platform, comprising:
Data obtaining module is configured to the input behaviour in response to developer on the API publication interface of Intelligent dialogue development platform Make, obtains the essential information, input parameter and return parameters of API to be released;
Function writes module, is configured to issue on interface in the API, is based on scheduled serverless template-directed developer Write the function code of the API to be released, wherein the serverless template includes at least the request letter for obtaining user It ceases, obtain the authorization of API to be called and request and obtain to the first response address of the API to be called transmission user The feedback information of first response address;
Test module is configured to the test request in response to the developer, and can test the API to be released normal use;
Release module is configured to the posting request in response to using the normal and described developer, generates the second response address conduct The API to be released is deployed as by the publication address of the API to be released with not exposing first response address The API to be released and corresponding second response address are simultaneously distributed to the Intelligent dialogue exploitation by serverless service The API gateway of platform.
7. a kind of system for calling API in Intelligent dialogue development platform, comprising:
Respond module is configured to the API for calling other developers to develop in Intelligent dialogue development platform in response to developer, obtains The second response address that the account and the API called for taking the developer are issued in the API gateway of Intelligent dialogue development platform, Wherein second response address does not expose the first response address as the publication address of the API to be released, and described the One response address is that other developers issue the original response address used before the API;
Unified authorization module, the account and the API called for being configured to the developer generate API unified authorization code key;
First calling module, is configured so that the unified authorization code key, and the second response address of Xiang Suoshu sends call request;With And
Second calling module is configured to the recalls information to third party API that second response address returns, initiation pair The call request of the third party API.
8. a kind of electronic equipment comprising: at least one processor, and deposited with what at least one described processor communication was connect Reservoir, wherein the memory be stored with can by least one described processor execute instruction, described instruction by it is described at least One processor executes, so that at least one described processor is able to carry out the step of any one of claim 1 to 5 the method Suddenly.
9. a kind of storage medium, is stored thereon with computer program, which is characterized in that realization when described program is executed by processor The step of any one of claim 1 to 5 the method.
CN201810209297.0A 2018-03-14 2018-03-14 The method and system of API is issued, called in Intelligent dialogue development platform Active CN108415710B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810209297.0A CN108415710B (en) 2018-03-14 2018-03-14 The method and system of API is issued, called in Intelligent dialogue development platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810209297.0A CN108415710B (en) 2018-03-14 2018-03-14 The method and system of API is issued, called in Intelligent dialogue development platform

Publications (2)

Publication Number Publication Date
CN108415710A CN108415710A (en) 2018-08-17
CN108415710B true CN108415710B (en) 2019-07-16

Family

ID=63131305

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810209297.0A Active CN108415710B (en) 2018-03-14 2018-03-14 The method and system of API is issued, called in Intelligent dialogue development platform

Country Status (1)

Country Link
CN (1) CN108415710B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109636504B (en) * 2018-11-07 2021-11-05 北京慧流科技有限公司 Information processing method and device, electronic device and storage medium
WO2020124901A1 (en) * 2018-12-21 2020-06-25 Huawei Technologies Co., Ltd. Mechanism to reduce serverless function startup latency
CN111611357B (en) * 2019-02-25 2023-08-15 北京嘀嘀无限科技发展有限公司 Configuration method of man-machine conversation system, multi-round conversation configuration platform and electronic equipment
CN110460601B (en) * 2019-08-14 2020-12-22 北京三快在线科技有限公司 Dependency package security detection method, dependency package security detection device and storage medium
CN111124427A (en) * 2019-11-13 2020-05-08 山东中磁视讯股份有限公司 Method, system and equipment for extracting and integrating data
CN111416837A (en) * 2020-02-20 2020-07-14 华迪计算机集团有限公司 Government affair system API interface access gateway, method, electronic equipment and storage medium
CN111597048B (en) * 2020-05-15 2022-09-23 上海交通大学 Micro-service scheduling method and system based on service quality and electronic equipment
CN113448593B (en) * 2020-07-31 2024-07-16 心医国际数字医疗***(大连)有限公司 Automatic deployment method and device for diagnosis and treatment system platform application and electronic equipment
CN113296750B (en) * 2021-05-12 2023-12-08 阿里巴巴新加坡控股有限公司 Function creation method and system, function calling method and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581118B (en) * 2012-07-24 2018-05-01 中兴通讯股份有限公司 A kind of resource convergence gateway and cross-platform authorization method and system
CN103716326B (en) * 2013-12-31 2017-02-01 华为技术有限公司 Resource access method and URG
CN107147496A (en) * 2017-04-28 2017-09-08 广东网金控股股份有限公司 Under a kind of service-oriented technological frame between different application unified authorization certification method
CN107632875B (en) * 2017-10-09 2020-07-03 用友网络科技股份有限公司 E-commerce interface integration method, system, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN108415710A (en) 2018-08-17

Similar Documents

Publication Publication Date Title
CN108415710B (en) The method and system of API is issued, called in Intelligent dialogue development platform
CA2915619C (en) Method and apparatus for customized software development kit (sdk) generation
US8504989B2 (en) Service definition document for providing blended services utilizing multiple service endpoints
US10055238B2 (en) Method and apparatus for code virtualization and remote process call generation
CN104823189B (en) Frame is allocated for connect equipment
US9674234B2 (en) Managing an application programming interface in a collaboration space
CN105593835B (en) Multiple second level clouds are managed by main cloud service manager
CN107924411A (en) The recovery of UI states in transaction system
US11755461B2 (en) Asynchronous consumer-driven contract testing in micro service architecture
US20170242737A1 (en) Managing external feeds in an event-based computing system
US20150081798A1 (en) Process-based inter-thing collaboration apparatus and method in web of things environment
Patterson Learn AWS Serverless Computing: A Beginner's Guide to Using AWS Lambda, Amazon API Gateway, and Services from Amazon Web Services
Machiraju et al. Developing Bots with Microsoft Bots Framework
US11368554B2 (en) Systems and methods for regulating service behavior
US11227224B2 (en) Information and data collaboration among multiple artificial intelligence (AI) systems
CN115811481A (en) Interactive service testing method and device, computer equipment and storage medium
Acetozi Pro Java Clustering and Scalability
Kuzmovych ElateMe-backend
Bainomugisha et al. Bringing Scheme programming to the iPhone—Experience
Passini et al. A Framework to Support the Development of Self-adaptive Service-oriented Mobile Applications.
Sodhi et al. Appification of web applications: Architectural aspects
US20230289158A1 (en) Instantiated deployment of microservices
Muñoz Exam Ref AZ-204 Developing Solutions for Microsoft Azure
Romero et al. Adroitness: An android-based middleware for fast development of high-performance apps
Huang et al. Smartly Deploying WeChat Mobile Application on Cloud Foundry PaaS

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
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 215123 14 Tengfei Innovation Park, 388 Xinping street, Suzhou Industrial Park, Suzhou, Jiangsu.

Patentee after: Sipic Technology Co.,Ltd.

Address before: 215123 14 Tengfei Innovation Park, 388 Xinping street, Suzhou Industrial Park, Suzhou, Jiangsu.

Patentee before: AI SPEECH Co.,Ltd.

PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Methods and systems for publishing and calling APIs on intelligent dialogue development platforms

Effective date of registration: 20230726

Granted publication date: 20190716

Pledgee: CITIC Bank Limited by Share Ltd. Suzhou branch

Pledgor: Sipic Technology Co.,Ltd.

Registration number: Y2023980049433