Summary of the invention
In order at least solve the disunity due to form of authorisation in the prior art, the verification information generated in authentication is mixed
Disorderly, process is complicated, has security hidden trouble.
In a first aspect, the embodiment of the present invention provides a kind of application programming interfaces authentication configuration method of voice dialogue platform,
Include:
The application programming interfaces authorized application that voice dialogue platform response is uploaded in developer, Xiang Suoshu developer send special
Belong to key, the exclusive key is related with the type of the ID of developer and application programming interfaces;
Voice dialogue platform provides the authentication the configuration dialog box for corresponding to the exclusive key, to provide for the developer
Authenticate the tabs of limitation, wherein the authentication limitation includes: domain address, IP white list, API key;
Voice dialogue platform response is at least one mirror of tabs input of the developer based on the authentication limitation
Restricted information is weighed, the authentication configuration and authorization of the exclusive key are completed.
Second aspect, the embodiment of the present invention provide a kind of application programming interfaces call method of voice dialogue platform, comprising:
Voice dialogue platform response obtains the key of the product in the calling application of the application programming interfaces of product;
When the key described in the voice dialogue platform validation is the exclusive key allotted, inquiry corresponds to the exclusive key
Authentication configuration, obtain corresponding authentication restricted information, wherein it includes: domain address, IP white list, API that the authentication, which limits,
key;
Voice dialogue platform obtains at least one in the domain address information, IP address information, API key of the product
Information allows when the one of them information at least one of described information limits verifying by the authentication of the authentication configuration
The calling of the application programming interfaces of the product.
The third aspect, the embodiment of the present invention provide a kind of application programming interfaces authentication configuration system of voice dialogue platform,
Include:
Key allots program module, for voice dialogue platform response in the application programming interfaces authorization Shen that developer uploads
Please, Xiang Suoshu developer sends exclusive key, and the exclusive key is related with the type of the ID of developer and application programming interfaces;
Authentication configuration interface routine module provides the authentication configuration for corresponding to the exclusive key for voice dialogue platform
Dialog box, to provide the tabs of authentication limitation for the developer, wherein it includes: domain address, IP white that the authentication, which limits,
List, API key;
Authoring program module, for voice dialogue platform response in tabs input of the developer based on the authentication limitation
At least one authentication restricted information, complete the authentication configuration and authorization of the exclusive key.
Fourth aspect, the embodiment of the present invention provide a kind of application programming interfaces calling system of voice dialogue platform, comprising:
Key obtains program module, for voice dialogue platform response in the calling application of the application programming interfaces of product,
Obtain the key of the product;
Authentication configuration obtains program module, is the exclusive key allotted for working as key described in voice dialogue platform validation
When, the authentication that inquiry corresponds to the exclusive key configures, and obtains corresponding authentication restricted information, wherein the authentication limitation
It include: domain address, IP white list, API key;
Calling program module, for voice dialogue platform obtain the domain address information of the product, IP address information,
At least one information in API key, when the one of them information at least one of described information passes through the authentication configuration
When authentication limitation verifying, allow the calling of the application programming interfaces of the product.
5th aspect, provides a kind of electronic equipment comprising: at least one processor, and with described at least one
Manage the memory of device communication connection, wherein the memory is stored with the instruction that can be executed by least one described processor, institute
It states instruction to be executed by least one described processor, so that at least one described processor is able to carry out any embodiment of the present invention
Method the step of.
6th aspect, the embodiment of the present invention provide a kind of storage medium, are stored thereon with computer program, and feature exists
In when the program is executed by processor the step of the method for realization any embodiment of the present invention.
The embodiment of the present invention realizes the application programming interfaces authentication configuration of voice dialogue platform, passes through voice dialogue platform
Providing optional various forms of authentication configuration modes to different application programming interfaces will be authenticated with being used for authority checking
Configuration is given developer and is uniformly processed, so which kind of verification information developer clearly requires in development, simplifies authentication and matches
Step is set, so that the development efficiency of developer is improved, meanwhile, the limited authentication type of voice dialogue platform processes accelerates
The efficiency of authentication, and the limited types for the authentication limitation that voice development platform is prepared avoid due to authentication limits disunity
Bring security risk.
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.
A kind of application programming interfaces authentication configuration of the voice dialogue platform provided as shown in Figure 1 for one embodiment of the invention
The flow chart of method, includes the following steps:
S11: the application programming interfaces authorized application that voice dialogue platform response is uploaded in developer, Xiang Suoshu developer's hair
Exclusive key is sent, the exclusive key is related with the type of the ID of developer and application programming interfaces;
S12: voice dialogue platform provides the authentication the configuration dialog box for corresponding to the exclusive key, for the developer
There is provided the tabs of authentication limitation, wherein the authentication limitation includes: domain address, IP white list, API key;
S13: voice dialogue platform response is at least one institute of tabs input of the developer based on the authentication limitation
Authentication restricted information is stated, the authentication configuration and authorization of the exclusive key are completed.
In the present embodiment, this method authenticates configuration for the application programming interfaces of voice dialogue platform, in voice pair
When talking about platform creation technical ability, generally for the realization of the technical ability, control and calling function can be added in the technical ability
Application programming interfaces.Wherein, the function of control includes the beautification at technical ability interface;The function of application programming interfaces is for the skill
Corresponding function can be provided.
It is directed to different functions to realize, can choose the application programming interfaces of different function.For example, traffic trip side
Face, the application programming interfaces that can be called include: train ticket inquiry, and address resolution, bus ticket inquiry, Perimeter, hotel are fast
Victory inquiry, traffic in advance.In terms of service for life, the application programming interfaces that can be called include: water, electricity and gas inquiry, express delivery reservation,
Weather lookup, menu are complete works of.Video display audition, social sharing, news, shopping, game, in terms of, can all have various answer
It is called with routine interface.
And voice dialogue platform is when providing these application programming interfaces for developer, in order to ensure these application programs
Interface can maliciously be called by the smooth calling of developer, will be to using the developer of application programming interfaces to carry out
Authentication.Verify the whether qualified calling of developer.The calling that application programming interfaces are given for qualified developer, without
The developer of qualification can weigh to the calling of platform application application programming interfaces.
For step S11, the application programming interfaces authorized application that voice dialogue platform response is uploaded in developer, Xiang Kaifa
Person sends exclusive key.Wherein, application programming interfaces are divided into open for free call type and charge usage type, are directed to and exempt from
Take the application programming interfaces of open call type, voice dialogue platform can be sent to developer authorizes the call type that opens for free to answer
With the exclusive key of routine interface, and the application programming interfaces for usage type of charging, after developer pays usage charges, voice pair
The exclusive key of application programming interfaces of authorization of charge usage type can be sent to developer by talking about platform.Meanwhile voice dialogue is flat
Platform can identify the type of the identity ID for going out developer and application programming interfaces in exclusive key.
For step S12, in step s 11, after voice dialogue platform has sent exclusive key to developer, while to open
Originator provides the dialog box of the authentication configuration of the exclusive key.Wherein, developer provides in selection voice dialogue platform
The tabs for authenticating limitation carries out selection and limits with the authentication that the product is adapted.Wherein, authentication limitation includes domain name net
Location, IP white list, API key.
For step S13, when developer has selected any option in authentication limited option card, voice dialogue platform can be rung
Information. dialog corresponding with the selected authentication limitation of developer should be generated in the selection of developer, by receiving developer
The restricted information inputted in information. dialog carries out authentication limitation.
When the domain address option that voice dialogue platform response is selected in developer, the dialogue of domain address restricted information is generated
Frame, as shown in Figure 2, wherein including used agreement, domain name and request Path information, when developer inputs corresponding letter
It after breath, clicks and determines, voice dialogue platform will receive domain address information, and as authentication restricted information, wherein exploitation
Person can be using batch setting domain address as authentication restricted information.
When the IP white list option that voice dialogue platform response is selected in developer, the dialogue of IP white list restricted information is generated
Frame, as shown in Figure 3, wherein after developer inputs IP address in IP address text box, after clicking "+", can will be inputted
IP address add in advance, meanwhile, generate pre- addition IP address text box, the pre- addition IP address text box is developed for showing
The IP address of person's input, while being emptied in IP address text box, next IP address is inputted for developer, is clicked in response to developer
Confirming button, using the IP address in pre- addition IP address text box as authentication restricted information.
When the API key option that voice dialogue platform response is selected in developer, the dialogue of API key restricted information is generated
Frame, as shown in Figure 4, wherein input specified API key in API key text box in developer, clicked in response to developer
Confirming button, using API key as authentication restricted information, wherein developer can limit using batch setting API key as authentication
Information.Voice dialogue platform receives at least one authentication restricted information of developer's input, to complete the mirror of the exclusive key
Power configuration and authorization.
It can be seen that the implementation method by the implementation method and provide a kind of application programming interfaces of voice dialogue platform
Configuration method is authenticated, the voice dialogue platform provides optional various forms of authentications to different application programming interfaces and matches
Mode is set, to be used for authority checking, meanwhile, it gives authentication configuration to developer and is uniformly processed, so that developer is in development
In clearly require which kind of verification information, simplify authentication configuration step, to improve the development efficiency of developer, meanwhile, voice
The limited authentication type of dialogue platform processing, accelerates the efficiency of authentication, and the authentication limitation that voice development platform is prepared
Limited types avoid bring security risk due to authentication limits disunity.
As an implementation, the API key is related to the operation system of software of the product, the product it is soft
Part operating system includes: Android, IOS, embedded system.
In the present embodiment, API key is used to state the operating system of product, and wherein operation system of software includes, and pacifies
Tall and erect, IOS and embedded, wherein the API key of Android system can be obtained by Android Studio editing machine,
According to the Terminal tool of the Android Studio, the file path of the Android product is determined, to obtain corresponding
API key, wherein the API key include by using sha256 algorithm determine value.The API of IOS, embedded system
Key can also be obtained by corresponding software, and details are not described herein.
It can be seen that by the implementation method and set different API key, voice dialogue platform according to different operating systems
According to the API key of not homologous ray, corresponding application programming interfaces can be provided.And API key is determined using sha256 algorithm
Value there is uniqueness, and be not easy to be cracked, improve the safety of API key.
A kind of application programming interfaces call method of voice dialogue platform of one embodiment of the invention offer is provided
Flow chart, include the following steps:
S21: voice dialogue platform response obtains the close of the product in the calling application of the application programming interfaces of product
Key;
S22: when the key described in the voice dialogue platform validation is the exclusive key allotted, inquiry corresponds to described exclusive
The authentication of key configures, and obtains corresponding authentication restricted information, wherein the authentication limitation includes: domain address, the white name of IP
Single, API key;
S23: voice dialogue platform obtains in the domain address information, IP address information, API key of the product at least
One information, when the one of them information at least one of described information limits verifying by the authentication of the authentication configuration,
Allow the calling of the application programming interfaces of the product.
In the present embodiment, developer will fit in developer in the exclusive key of voice dialogue platform application and be developed
Product in, and in said products deployment authentication configuration information.Wherein, the authentication configuration is all voluntarily being produced by developer
It is disposed in product.After deployment, for the realization of the product function, the product is to voice dialogue platform request application journey
The calling of sequence interface.
For step S21, for voice dialogue platform response in the calling application of the application programming interfaces of product, voice dialogue is flat
Platform obtains the key of the product to the product.
Step S22 verifies it after voice dialogue platform gets the exclusive key of the product, when
When key described in the voice dialogue platform validation is the exclusive key allotted, inquired by the record of internal database pair
The authentication of exclusive key described in Ying Yu configures, and the authentication by inquiring exclusive key configures, to obtain corresponding authentication limitation
Information.Wherein authentication limitation includes domain address, IP white list and API key.Wherein, authentication limitation can be only domain name net
Any one of location, IP white list and API key are as authentication limitation, or and wherein any two are used as authentication limitation,
Or wherein three common configurations, it is configured as authentication.
For step S23, voice dialogue platform is configured according to the authentication, obtains corresponding authentication limitation letter to product
Breath, the domain address information of product, IP address information, in API key at least one of information.For example, the voice dialogue is flat
The authentication stored in platform is configured to IP white list and API key, and voice dialogue platform is obtained by described configure to the product
Take corresponding authentication restricted information (IP address of product, the API key of product).
For example, the authentication stored in the voice dialogue platform is configured to IP white list, voice dialogue platform passes through described
It configures to the product and obtains corresponding authentication restricted information (IP address of product).
For example, the authentication stored in the voice dialogue platform is configured to domain address information, IP white list and API
Key, voice dialogue platform by it is described configure to the product obtain corresponding authentication restricted information (domain address of product,
The IP address of product, the API key of product).
After obtaining corresponding authentication restricted information, the authentication restricted information is verified, when domain name network address
Information, the IP address information, in the API key at least one of Information Authentication when passing through, the authentication limitation of the product
Information is proved to be successful.Such as the authentication stored in voice dialogue platform is configured to domain address information, IP white list and API
Key, and voice dialogue platform only gets the authentication stored in the voice dialogue platform that be configured to domain address information, IP white
List and product API key, if the product API key passes through verifying, and domain address information, IP white list are by testing
When card, it is considered as authentication restricted information and is proved to be successful.Allow the calling of the application programming interfaces of the product.Because domain address is believed
Breath, any information of IP white list and product API key all there is special nature, and be all specified by developer it is defeated
Enter.It is difficult to be forged by other people.
After calling, connect as shown in fig. 6, the application program transferred away can be inquired by voice dialogue platform
Mouthful.Wherein it is possible to inquire the function of the application programming interfaces, type, allocating time, calling state.According to the calling
List can help developer to monitor whether application programming interfaces are called.
It can be seen that the implementation method by the implementation method and provide a kind of application programming interfaces of voice dialogue platform
Call method inquires the corresponding authentication configuration of the exclusive key, to verify product by receiving the exclusive key of product
Authentication restricted information allows the calling of the application programming interfaces of the product when the authentication restricted information of product is proved to be successful
By exclusive key and authentication restricted information double verification, the security performance of calling is improved.
As an implementation, it is configured when any one information no at least one of described information passes through the authentication
Authentication limit verifying when, notify it is described authentication limitation authentication failed object, the object includes: domain address and/or IP
Address and/or API key.
In the present embodiment, voice dialogue platform is logical without any one in the authentication restricted information for verifying the product
When crossing the authentication limitation verifying of the authentication configuration, Xiang Suoshu product notifies the object of the authentication limitation authentication failed.For example,
In authentication configuration, it is only configured with domain address, in the verification, the domain address of product described in voice dialogue platform validation is believed
Breath, if authentication failed, voice dialogue platform sends the notice of domain address authentication failed to product.
If in authentication configuration, while being configured with domain address and IP white list, in the verification, voice dialogue platform is tested
The domain address information of the product and the IP address of product are demonstrate,proved, if the domain address and IP address information of the product
It all verifies and does not pass through, then voice dialogue platform sends domain address authentication failed and IP address not in white list to product
Notice.
If in authentication configuration, while being configured with domain address, IP white list and API key, in the verification, voice pair
The API key of the domain address information of product described in platform validation, the IP address of product and product is talked about, if the product
Domain address, IP address, API key are standard not to be passed through, then voice dialogue platform to product send domain address authentication failed,
The notice of API key of the IP address not in white list and there is no this product.
It can be seen that by the implementation method and configured according to authentication, verify different restricted informations, will verify unacceptable
Fail Type can adjust the product to product feedback, developer according to the feedback information.Convenient for developer's exploitation, mention
High development efficiency.
A kind of application programming interfaces authentication configuration of voice dialogue platform of one embodiment of the invention offer is provided
The structural schematic diagram of system, the technical solution of the present embodiment are applicable to the application programming interfaces to the voice dialogue platform of equipment
Configuration method is authenticated, the application programming interfaces authentication which can be performed voice dialogue platform described in above-mentioned any embodiment is matched
Method is set, and is configured in the terminal.
A kind of application programming interfaces authentication configuration system of voice dialogue platform provided in this embodiment includes: that key is allotted
Program module 11, authentication configuration interface routine module 12 and authoring program module 13.
Wherein, key allots program module 11 and is used for the application programming interfaces that voice dialogue platform response is uploaded in developer
Authorized application, Xiang Suoshu developer send exclusive key, the class of the ID and application programming interfaces of the exclusive key and developer
Type is related;Authentication configuration interface routine module 12 is provided for voice dialogue platform and is configured corresponding to the authentication of the exclusive key
Dialog box, to provide the tabs of authentication limitation for the developer, wherein it includes: domain address, IP white that the authentication, which limits,
List, API key;Authoring program module 13 is for voice dialogue platform response in option of the developer based on the authentication limitation
Block at least one authentication restricted information of input, completes the authentication configuration and authorization of the exclusive key.
Further, the API key is related to the operation system of software of the product, and the software of the product operates system
System includes: Android, IOS, embedded system.
A kind of application programming interfaces calling system of voice dialogue platform of one embodiment of the invention offer is provided
Structural schematic diagram, the technical solution of the present embodiment is applicable to the application programming interfaces tune to the language voice dialogue platform of equipment
With method, which can be performed the application programming interfaces call method of voice dialogue platform described in above-mentioned any embodiment, and
Configuration is in the terminal.
A kind of application programming interfaces calling system of voice dialogue platform provided in this embodiment includes: that key obtains program
Module 21, authentication configuration obtain program module 22 and calling program module 23.
Wherein, key obtains program module 21 for voice dialogue platform response in the calling of the application programming interfaces of product
Application, obtains the key of the product;Authentication configuration obtains program module 22 and is used to work as key described in voice dialogue platform validation
For allotted exclusive key when, the authentication that inquiry corresponds to the exclusive key configures, obtain corresponding authentication restricted information,
Wherein, the authentication limitation includes: domain address, IP white list, API key;Calling program module 23 is flat for voice dialogue
Platform obtains at least one information in the domain address information, IP address information, API key of the product, when described at least one
When one of them information in item information limits verifying by the authentication of the authentication configuration, allow the application program of the product
The calling of interface.
Further, when the authentication for not having any one information to pass through the authentication configuration at least one described information limits
System verifying when, notify it is described authentication limitation authentication failed object, the object include: domain address and/or IP address and/or
API key。
Further, the API key is related to the operation system of software of the product, and the software of the product operates system
System includes: Android, IOS, embedded system.
The embodiment of the invention also provides a kind of nonvolatile computer storage media, computer storage medium is stored with meter
Answering for the voice dialogue platform in above-mentioned any means embodiment can be performed in calculation machine executable instruction, the computer executable instructions
Configuration method is authenticated with routine interface;
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:
The application programming interfaces authorized application that voice dialogue platform response is uploaded in developer, Xiang Suoshu developer send special
Belong to key, the exclusive key is related with the type of the ID of developer and application programming interfaces;
Voice dialogue platform provides the authentication the configuration dialog box for corresponding to the exclusive key, to provide for the developer
Authenticate the tabs of limitation, wherein the authentication limitation includes: domain address, IP white list, API key;
Voice dialogue platform response is at least one mirror of tabs input of the developer based on the authentication limitation
Restricted information is weighed, the authentication configuration and authorization of the exclusive key are completed.
The embodiment of the invention also provides a kind of nonvolatile computer storage media, computer storage medium is stored with meter
Answering for the voice dialogue platform in above-mentioned any means embodiment can be performed in calculation machine executable instruction, the computer executable instructions
With program interface call 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:
Voice dialogue platform response obtains the key of the product in the calling application of the application programming interfaces of product;
When the key described in the voice dialogue platform validation is the exclusive key allotted, inquiry corresponds to the exclusive key
Authentication configuration, obtain corresponding authentication restricted information, wherein it includes: domain address, IP white list, API that the authentication, which limits,
key;
Voice dialogue platform obtains at least one in the domain address information, IP address information, API key of the product
Information allows when the one of them information at least one of described information limits verifying by the authentication of the authentication configuration
The calling of the application programming interfaces of the product.
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 corresponding program instruction/mould of the method for the test software in the embodiment of the present invention
Block.One or more program instruction is stored in non-volatile computer readable storage medium storing program for executing, when being executed by a processor, is held
The application programming interfaces authentication configuration method and voice dialogue of voice dialogue platform in the above-mentioned any means embodiment of row are flat
The application programming interfaces call method of platform.
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 test software
Device use created data etc..In addition, non-volatile computer readable storage medium storing program for executing may include that high speed is deposited at random
Access to memory, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or other are non-
Volatile solid-state part.In some embodiments, it includes relative to place that non-volatile computer readable storage medium storing program for executing is optional
The remotely located memory of device is managed, these remote memories can be by being connected to the network to the device of test software.Above-mentioned network
Example 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 electronic equipment comprising: at least one processor, and with described at least one
The memory of a processor communication connection, wherein the memory is stored with the finger that can be executed by least one described processor
Enable, described instruction executed by least one described processor so that at least one described processor be able to carry out it is of the invention any
The application programming interfaces authentication configuration method of the voice dialogue platform of embodiment and the application programming interfaces of voice dialogue platform
The step of call method.
The client 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) other electronic devices with data interaction function.
Herein, relational terms such as first and second and the like be used merely to by an entity or operation with it is another
One entity or operation distinguish, and without necessarily requiring or implying between these entities or operation, there are any this reality
Relationship or sequence.Moreover, the terms "include", "comprise", include not only those elements, but also including being not explicitly listed
Other element, or further include for elements inherent to such a process, method, article, or device.Do not limiting more
In the case where system, the element that is limited by sentence " including ... ", it is not excluded that including process, method, the article of the element
Or there is also other identical elements in equipment.
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.Those of ordinary skill in the art are not paying creativeness
Labour in the case where, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on
Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should
Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers
It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation
Method described in certain parts of example or embodiment.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned 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, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and
Range.