Specific implementation mode
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
The 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.Usually, program module includes routines performing specific tasks or implementing specific abstract data types, program, object, member
Part, data structure etc..The present invention can also be put into practice 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 device.
In the present invention, " module ", " system " etc. refer to the related entities 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
Can be element with program or shell script, server.One or more elements can in the process of execution and/or thread,
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 is run.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" include not only 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.
Referring to FIG. 1, it illustrates one embodiments of method for issuing API in Intelligent dialogue development platform of the present invention
Flow chart, the method that API is issued in Intelligent dialogue development platform of the present embodiment can be adapted for putting down in Intelligent dialogue exploitation
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 publications 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 publications interface, is compiled based on scheduled serverless template-directeds developer
Write the function code of API to be released, wherein serverless templates include at least following code:The solicited message of acquisition user,
It obtains the mandate of API to be called and is asked 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 services 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 publications circle is provided on the API delivery systems of intelligent development platform
Face, the developer of API can input essential information, input parameter and the return parameters of API to be released according to the guiding at interface.Its
In, essential information may include API names and API descriptions, and input parameter, that is, API needs the input from the user obtained ginseng
Number, such as navigation API may may require that and use departure place and destination input by user, return parameters, that is, API is handled later most
It needs to return to those parameters eventually, such as navigation API needs to return to various feasible routes.Later, it for step 102, is issued in API
It is additionally provided with scheduled serverless templates on interface, helps developer that the API of oneself is deployed as serverless services,
Developer can directly change on the basis of template, oneself function and processing procedure is added.Wherein, serverless templates
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 before originator automatically generates corresponding code;Also needed in template include developer obtain it is original to be called
The mandate of API then needs the mandate for obtaining certain navigation API for example, developer is the API developed on the basis of certain navigation API
Information;Later, the first response address that oriented API to be called is also needed in template sends the code of user's request, 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 systems in response to the test request of developer, test API to be developed can normal use, for example, in API
Issue on interface can there are one " test " button, when developer front template on code revision finish after, may
It needs the code after test modifications whether feasible, clicks the testing button, tested according to preset instructions, in the process of test
In, it may be necessary to developer inputs the corresponding information of corresponding input parameter, and 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 services 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 publications interface
The Publish button, after developer clicks on, API delivery systems will API to be released be corresponding issues with this is generated
Address.It should be noted that second response address, that is, issue address, and the first response address, i.e., by API Calls to be released
Original API address it is different, to which when developer issues the API of oneself, other API users, which see, will be packaged
Address afterwards, on the one hand, on the other hand can shield the complicated authorization Algorithm of original called API will not expose original
The encryption parameters such as the mandate Key of called API, are presented on new response address in face of other users.
In some optional embodiments, the API gateway of the second response address and Intelligent dialogue development platform other
API formats having the same in ground can be supported so as to be opened to the outside world with the unified address format of API gateway with API gateway
Unified mandate 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, it is exploitation that the API delivery systems of intelligent development platform, which can be 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 systems, 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 be sent 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 templates 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 after-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 asking and obtaining the first response address;
Later, in step 205, after-treatment is carried out to feedback information with the feedback information that obtains that treated;
Finally, in step 206, treated feedback information is returned to user.
In the present embodiment, it is mainly further added out in previous embodiment is to the description of serverless templates
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 that oneself one is added
Then a little processing just feed back to user, then the processing of oneself can be added at this by developer.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, other developers are called in Intelligent dialogue development platform in response to developer
The API of exploitation obtains the response that the account of developer is issued with the API called 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 secret keys;
Later, in step 303, using unified authorization secret key, call request is sent to response address;
Finally, in step 304, the recalls information to third party API returned based on response address is initiated 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
Originator exploitation API whether call 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 systems
One mandate secret key accesses 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 secret key, the response address issued to the API gateway send request.Finally, in step 304, API Calls system base
In the recalls information to third party API that response address returns, such as it 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 the encryption information such as the mandate Key of third party API are hidden well, with the mandate Key that API gateway is unified
Opening, and have system to do safety higher, complicated authorization Algorithm can be shielded.
A, Fig. 4 b and Fig. 4 c are please referred to Fig.4, it illustrates one embodiment of the invention to send out in Intelligent dialogue development platform
The interface sectional drawing of one application scenarios of the method for cloth API.
A is please referred to Fig.4, it illustrates in " resource transfer ", we can select " not using data resource ", " use
API resources " (API of calling platform local), " writing Function ".What we did in this application is exactly " to write
Function " (writes function), we can select " the new function of+establishment " to create the function of including developer oneself
The API of logic, relevant example can be checked by clicking " Function writes example " on side.Certainly, we select "+establishment
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 show developer's selection " the new function of+establishment ", the top half at interface is popped up, Fig. 4 c show
Go out after developer's selection " the new function of+establishment ", 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 sectional drawing of scene.
As shown in Figure 5 a, when selecting " using API resources " in " resource transfer " as developer, developer can select to make
All it is 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 secret key of these API, because theirs is oneself
What login name and the unified secret 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 names, API descriptions
2, API parameter designings
3, serverless codes are write
Function(input)
1, user's required parameter is obtained from input
2, parameter after-treatment in 1
3, original API is authorized
4, it sends request to original API http address (old) and (executes and service or obtain using being authorized in parameter and 3 in 2
Data)
5, the response of original API is obtained
6, after-treatment is responded in 5
7, returned data
End
4, API returned datas describe
5, API is tested
6, automatic deployment API services for servless
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 authorizations key is generated based on developer's account and the API called
2, using unified authorization key, http post requests are sent to address new
Wherein, third party API is issued to the method for API gateway, including:Third party API to API is issued 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
First response address information of the first authorization message and third party API for obtaining third party API;For the third party of acquisition
The first response address of API, which is created, to be developed corresponding to the second response address of API gateway and the second authorization message for other
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, including:Developer is received 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, call request include the log-on message of developer and the second response address of third party API;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;If being judged as having permission, 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 technologies risen instantly, developer to edit one section of code, complete reflecting for API
It penetrates.Complicated authorization Algorithm can be shielded in this way, does not expose the encryption datas such as mandate key, with the mandate key that API gateway is unified
It is open to outside.API by encapsulation is unified with HTTP POST requests, and JSON asks the form publication of body to use.
It should be noted that for each method embodiment above-mentioned, for simple description, therefore it is all expressed as a series of
Action merge, but those skilled in the art should understand that, the present invention is not limited by the described action sequence because
According to the present invention, certain steps can be performed in other orders or simultaneously.Secondly, those skilled in the art should also know
It knows, embodiment described in this description belongs to preferred embodiment, and involved action and module are 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, it may refer to the associated description of other embodiment.
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 flat in Intelligent dialogue exploitation
Platform.
As shown in fig. 6, the system 600 for issuing API in Intelligent dialogue development platform that the embodiment of the present invention is provided, 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 on the API publications interface of Intelligent dialogue development platform in response to developer, is obtained to be released
Essential information, input parameter and the return parameters of API;Function writes module 620, is configured on API publications interface, based on pre-
Fixed serverless template-directed developers write the function code of API to be released, wherein serverless templates are at least wrapped
It includes and obtains the solicited message of user, obtains the mandate of API to be called and send user to the first response address of API to be called
Ask 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, in response to using normally, generate the second response address using the publication as API to be released
API to be released is deployed as serverless services 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 for calling API in Intelligent dialogue development platform that the embodiment of the present invention is provided, 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 obtains the response that the account of developer is issued with the API called 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 secret keys;
First calling module 730, is configured so that unified authorization secret key, and call request is sent 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 all modules described in Fig. 6 and Fig. 7 and each step in the method with reference to described in figure 1 and Fig. 3
It is corresponding.The operation above with respect to method description and feature and corresponding technique 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 daily record
Collection module can be described as collector journal and be stored in the module in daily record 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 present invention additionally provides a kind of nonvolatile computer storage media, calculates
Machine storage medium is stored with computer executable instructions, which can perform 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 are set as:
In response to input operation of the developer on the API publications interface of Intelligent dialogue development platform, API to be released is obtained
Essential information, input parameter and return parameters;
On API publications interface, write based on scheduled serverless template-directeds developer described to be released
The function code of API, wherein the serverless templates include at least following code:It obtains the solicited message of user, obtain
It the mandate of API to be called and sends the user to the first response address of the API to be called and asks 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 field, wherein storage journey
It sequence area can storage program area, the required application program of at least one function;Storage data field can be stored according to right in intelligence
The device of publication API uses created data etc. in words development platform.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 not limited to internet, intranet, LAN,
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 of the method for publication API can also include in Intelligent dialogue development platform:Input unit 830 and output fill
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.
Processor 810 is stored in non-volatile software program, instruction and module in memory 820 by operation, from
And various function application and the data processing of execute server, that is, realize above method embodiment 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.
The said goods can perform the method that the embodiment of the present invention is provided, and has the corresponding function module of execution method and has
Beneficial effect.The not technical detail of detailed description in the present embodiment, reference can be made to the method that the embodiment of the present invention is provided.
As an implementation, above-mentioned electronic apparatus application in Intelligent dialogue development platform issue API platform,
Including: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 is executed by least one processor, so that at least one processor can:
In response to input operation of the developer on the API publications interface of Intelligent dialogue development platform, API to be released is obtained
Essential information, input parameter and return parameters;
On API publications interface, write based on scheduled serverless template-directeds developer described to be released
The function code of API, wherein the serverless templates include at least following code:It obtains the solicited message of user, obtain
It the mandate of API to be called and sends the user to the first response address of the API to be called and asks 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 mobile 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 work(
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 includes:Audio,
Video player (such as iPod), handheld device, e-book and intelligent toy and portable car-mounted navigation equipment.
(4) server:The equipment for providing the service of calculating, the composition of server include 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 the unit illustrated as separating component can
It is physically separated with being or may not be, the component shown as unit may or may not be physics list
Member, you can be located at a place, or may be distributed over multiple network units.It can be selected according to the actual needs
In some or all of module 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 expressed in the form of software products the part that the relevant technologies contribute, the computer
Software product can store in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including some instructions to
So that computer equipment (can be personal computer, server either network equipment etc.) execute each embodiment or
Method described in certain parts of embodiment.
Finally it should be noted that:Above example is 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, it will be understood by those of ordinary skill in the art that:It still may be used
With technical scheme described in the above embodiments is modified or equivalent replacement of some of the technical features;
And these modifications or replacements, each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution spirit and
Range.