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.