CN108415710A - 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
CN108415710A
CN108415710A CN201810209297.0A CN201810209297A CN108415710A CN 108415710 A CN108415710 A CN 108415710A CN 201810209297 A CN201810209297 A CN 201810209297A CN 108415710 A CN108415710 A CN 108415710A
Authority
CN
China
Prior art keywords
api
developer
response
development platform
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.)
Granted
Application number
CN201810209297.0A
Other languages
Chinese (zh)
Other versions
CN108415710B (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

Abstract

The present invention is disclosed in the method and device that API is issued in Intelligent dialogue development platform, wherein method includes:In response to input operation of the developer on the API publications interface of Intelligent dialogue development platform, the essential information, input parameter and return parameters of API to be released are obtained;On API publications interface, the function code of API to be released is write based on scheduled serverless template-directeds 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 services 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 mandate key, open to outside with the unified mandate 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 are issued in Intelligent dialogue development platform, call API's Method and system.
Background technology
The venture company of small-to-medium business, especially internet industry, there is no too many technical staff for itself, if set It needs 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 frameworks 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, messenger 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 qualityIt 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 that some are pre-defined Function, it is therefore an objective to application program and developer are provided and are able to access the ability of one group of routine based on certain software or hardware, 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 is opened calls to developer.The API Calls externally provided make the content relevance between website stronger, while these are opened The platform put also is the value that user, developer and medium and small website bring bigger.
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, it needs to call the website of API to provide open unified api interface environment developer's open source, 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 Pattern is similar.API gateway encapsulates internal system framework, and the API of a customization is provided 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, it is typically mapped by input parameter API is published to API gateway by mode.But the parameters such as the mandate of most of API encryption are calculated by complicated algorithm , can not API be directly published to API gateway by way of input parameter mapping.
Invention content
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, including: In response to input operation of the developer on the API publications interface of Intelligent dialogue development platform, the basic letter of API to be released is obtained Breath, input parameter and return parameters;On API publications interface, it is based on scheduled serverless template-directeds developer Write the function code of the API to be released, wherein the serverless templates include at least following code:Obtain user Solicited message, obtain the mandate 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 for calling API in Intelligent dialogue development platform, including: The API for calling other developers exploitation in Intelligent dialogue development platform in response to developer, obtains the account of the developer The response address issued in the API gateway of Intelligent dialogue development platform with the API called;Account based on the developer and The API called generates API unified authorization secret keys;Using the unified authorization secret key, sends to call to the response address 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 for issuing API in Intelligent dialogue development platform, including: Data obtaining module is configured to the input operation on the API publications interface of Intelligent dialogue development platform in response to developer, 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-directeds developer, wherein described Serverless templates include at least and obtain the solicited message of user, obtain the mandate of API to be called and to described to be called The first response address of API sends the feedback information that the user asks 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 for calling API in Intelligent dialogue development platform, including: 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;It authorizes Module, the account and the API called for being configured to the developer generate API unified authorization secret keys;And request is sent Module is configured so that the unified authorization secret key, and call request is sent to the response address.
5th aspect, provides a kind of electronic equipment comprising:At least one processor, and at least one place Manage the memory of device communication connection, wherein the memory is stored with the instruction that can be executed by least one processor, institute It states instruction to be executed by least one processor, so that at least one 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 advantageous effect of the embodiment of the present invention is:In conjunction with the serverless technologies 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 mandate key etc. can be shielded in this way to add Ciphertext data, it is open to outside with the unified mandate 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.
Description of the drawings
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 flow for method for issuing API in Intelligent dialogue development platform that one embodiment of the invention provides Figure;
Fig. 2 is a kind of sub-step for method for issuing API in Intelligent dialogue development platform that one embodiment of the invention provides Rapid flow chart;
Fig. 3 is a kind of flow of the method for calling API 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 sectional drawing 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 sectional drawing of scene;
Fig. 6 is a kind of block diagram for system for issuing API in Intelligent dialogue development platform that one embodiment of the invention provides;
Fig. 7 is a kind of block diagram of the system for calling API 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 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.

Claims (9)

1. a kind of method for issuing API in Intelligent dialogue development platform, including:
In response to input operation of the developer on the API publications interface of Intelligent dialogue development platform, the base of API to be released is obtained This information, input parameter and return parameters;
On API publications interface, write the API's to be released based on scheduled serverless template-directeds developer Function code, wherein the serverless templates include at least following code:The solicited message of user is obtained, obtains and waits adjusting The user is sent with the mandate of API and to the first response address of the API to be called to ask 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 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.
2. according to the method described in claim 1, wherein, the serverless templates include:
Obtain the solicited message of user;
To the user request information after-treatment with the solicited message that obtains that treated;
Obtain the authorization message of API to be called;
It is asked to the transmission of the first response address of the API to be called using treated the solicited message and the authorization message Seek and obtain the feedback information of first response address;
After-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 including:
Based on the API gateway unified O&M and management are provided for the API that the developer develops.
5. a kind of method for calling API in Intelligent dialogue development platform, including:
The API for calling other developers exploitation in Intelligent dialogue development platform in response to developer, obtains the developer's The response address that account and the API called are issued in the API gateway of Intelligent dialogue development platform;
Account based on the developer generates API unified authorization secret keys with the API called;
Using the unified authorization secret key, call request is sent to the response address;
The calling of the third party API is asked in the recalls information to third party API most returned based on the response address, initiation It asks.
6. a kind of system for issuing API in Intelligent dialogue development platform, including:
Data obtaining module is configured to the input behaviour on the API publications interface of Intelligent dialogue development platform in response to developer Make, obtains the essential information, input parameter and return parameters of API to be released;
Function writes module, is configured on API publications interface, is based on scheduled serverless template-directeds developer Write the function code of the API to be released, wherein the serverless templates include at least the request letter for obtaining user It ceases, obtain the mandate of API to be called and ask 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 to make For the publication address of the API to be released, the API to be released is deployed as serverless and is serviced and will be described to be released API and corresponding second response address are distributed to the API gateway of the Intelligent dialogue development platform.
7. a kind of system for calling API in Intelligent dialogue development platform, including:
Respond module is configured to the API for calling other developers to develop in Intelligent dialogue development platform in response to developer, obtains The response address that the account and the API called for taking the developer are issued in the API gateway of Intelligent dialogue development platform;
Unified authorization module, the account and the API called for being configured to the developer generate API unified authorization secret keys;
First calling module is configured so that the unified authorization secret key, and call request is sent to the response address;And
Second calling module is configured to the recalls information to third party API that the response address returns, and initiates to described The call request of third party API.
8. a kind of electronic equipment comprising:At least one processor, and deposited with what at least one processor communication was connect Reservoir, wherein the memory is stored with the instruction that can be executed by least one processor, described instruction by it is described at least One processor executes, so that at least one 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 realized 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 true CN108415710A (en) 2018-08-17
CN108415710B 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)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109636504A (en) * 2018-11-07 2019-04-16 北京慧流科技有限公司 Information processing method and device, electronic equipment and storage medium
CN110460601A (en) * 2019-08-14 2019-11-15 北京三快在线科技有限公司 Rely on packet safety detecting method, device and storage medium
CN111124427A (en) * 2019-11-13 2020-05-08 山东中磁视讯股份有限公司 Method, system and equipment for extracting and integrating data
WO2020124901A1 (en) * 2018-12-21 2020-06-25 Huawei Technologies Co., Ltd. Mechanism to reduce serverless function startup latency
CN111416837A (en) * 2020-02-20 2020-07-14 华迪计算机集团有限公司 Government affair system API interface access gateway, method, electronic equipment and storage medium
CN111597048A (en) * 2020-05-15 2020-08-28 上海交通大学 Micro-service scheduling method and system based on service quality and electronic equipment
CN111611357A (en) * 2019-02-25 2020-09-01 北京嘀嘀无限科技发展有限公司 Configuration method of man-machine conversation system, multi-turn conversation configuration platform and electronic equipment
CN113296750A (en) * 2021-05-12 2021-08-24 阿里巴巴新加坡控股有限公司 Function creating method and system, and function calling method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581118A (en) * 2012-07-24 2014-02-12 中兴通讯股份有限公司 Resource convergence gateway and cross-platform authorization method and system
CN103716326A (en) * 2013-12-31 2014-04-09 华为技术有限公司 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
CN107632875A (en) * 2017-10-09 2018-01-26 用友网络科技股份有限公司 Electric business Interface integration method, system, computer equipment, readable storage medium storing program for executing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581118A (en) * 2012-07-24 2014-02-12 中兴通讯股份有限公司 Resource convergence gateway and cross-platform authorization method and system
CN103716326A (en) * 2013-12-31 2014-04-09 华为技术有限公司 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
CN107632875A (en) * 2017-10-09 2018-01-26 用友网络科技股份有限公司 Electric business Interface integration method, system, computer equipment, readable storage medium storing program for executing

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109636504A (en) * 2018-11-07 2019-04-16 北京慧流科技有限公司 Information processing method and device, electronic equipment and storage medium
CN109636504B (en) * 2018-11-07 2021-11-05 北京慧流科技有限公司 Information processing method and device, electronic device and storage medium
US11658939B2 (en) 2018-12-21 2023-05-23 Huawei Cloud Computing Technologies Co., Ltd. Mechanism to reduce serverless function startup latency
WO2020124901A1 (en) * 2018-12-21 2020-06-25 Huawei Technologies Co., Ltd. Mechanism to reduce serverless function startup latency
CN111611357A (en) * 2019-02-25 2020-09-01 北京嘀嘀无限科技发展有限公司 Configuration method of man-machine conversation system, multi-turn conversation configuration platform and electronic equipment
CN111611357B (en) * 2019-02-25 2023-08-15 北京嘀嘀无限科技发展有限公司 Configuration method of man-machine conversation system, multi-round conversation configuration platform and electronic equipment
CN110460601A (en) * 2019-08-14 2019-11-15 北京三快在线科技有限公司 Rely on packet safety detecting method, 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
CN111597048A (en) * 2020-05-15 2020-08-28 上海交通大学 Micro-service scheduling method and system based on service quality and electronic equipment
CN111597048B (en) * 2020-05-15 2022-09-23 上海交通大学 Micro-service scheduling method and system based on service quality and electronic equipment
CN113296750A (en) * 2021-05-12 2021-08-24 阿里巴巴新加坡控股有限公司 Function creating method and system, and function calling method and system
CN113296750B (en) * 2021-05-12 2023-12-08 阿里巴巴新加坡控股有限公司 Function creation method and system, function calling method and system

Also Published As

Publication number Publication date
CN108415710B (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN108415710B (en) The method and system of API is issued, called in Intelligent dialogue development platform
US10078511B2 (en) Generating and managing applications using any number of different platforms
US10872000B2 (en) Late connection binding for bots
CA2915619C (en) Method and apparatus for customized software development kit (sdk) generation
US10462018B2 (en) Managing a number of secondary clouds by a master cloud service manager
US8504989B2 (en) Service definition document for providing blended services utilizing multiple service endpoints
US20090112875A1 (en) Shared view of customers across business support systems (bss) and a service delivery platform (sdp)
US20130291121A1 (en) Cloud Abstraction
CN109074265A (en) The preformed instruction of mobile cloud service
US20210304062A1 (en) Parameter sharing in federated learning
US11169992B2 (en) Cognitive program suite for a cognitive device and a mobile device
US10262155B1 (en) Disabling features using feature toggle
Seo et al. Cloud computing for ubiquitous computing on M2M and IoT environment mobile application
CN109189502A (en) A kind of message treatment method and relevant device based on instant messaging public platform
CN106775952A (en) A kind of process management method and device of Android application
US10776180B1 (en) Expression-based feature toggle in an application programming interface (API)
US11632411B2 (en) Method and apparatus for cascaded multi-input content preparation templates for 5G networks
US11368554B2 (en) Systems and methods for regulating service behavior
CN109614778A (en) Dynamic Configuration, gateway and the system of user right
US11227224B2 (en) Information and data collaboration among multiple artificial intelligence (AI) systems
Jeong et al. A service composition model based on user experience in Ubi-cloud comp
CN115811481A (en) Interactive service testing method and device, computer equipment and storage medium
Sefid‐Dashti et al. A reference architecture for mobile SOA
Passini et al. A Framework to Support the Development of Self-adaptive Service-oriented Mobile Applications.
US20220329642A1 (en) Method and apparatus for reverse address mapping when using content preparation in 5g networks

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