CN107046482A - The management method and device of a kind of API service - Google Patents
The management method and device of a kind of API service Download PDFInfo
- Publication number
- CN107046482A CN107046482A CN201710277732.9A CN201710277732A CN107046482A CN 107046482 A CN107046482 A CN 107046482A CN 201710277732 A CN201710277732 A CN 201710277732A CN 107046482 A CN107046482 A CN 107046482A
- Authority
- CN
- China
- Prior art keywords
- service
- data bag
- api
- user
- call request
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/50—Network service management, e.g. ensuring proper service fulfilment according to agreements
- H04L41/5041—Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
- H04L41/5051—Service on demand, e.g. definition and deployment of services in real time
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephonic Communication Services (AREA)
Abstract
This application discloses a kind of management method of application programming interface (Application Programming Interface, API) service and device, method includes:Obtain at least one API service object;Obtain the service data bag and interface data bag of the API service object;The service data bag is disposed, and provides a user the interface data bag;User service call request is received, the user service call request is generated based on the input operation that user is carried out using required target interface packet;Based on the user service call request, the target service data bag corresponding with the user service call request is run, service result is obtained;The service result is exported.
Description
Technical field
The application is related to technical field of data processing, the management method and device of more particularly to a kind of API service.
Background technology
What application programming interface (Application Programming Interface, API) was serviced freely customizes
With it is light, quick, personalized, reusability is high the features such as.And with the development of network technology, the application of API service is also more next
More extensive, not only only large and medium-sized enterprise user is needed to develop the API service of oneself, and medium-sized and small enterprises user, which also has, freely to be determined
The demand of API service processed.
The content of the invention
In view of this, the purpose of the application is the management method and device for providing a kind of API service, existing to solve
How user freely customizes the technical problem of API service in technology.
This application provides a kind of management method of API service, including:
Obtain at least one API service object;
Obtain the service data bag and interface data bag of the API service object;
The service data bag is disposed, and provides a user the interface data bag;
User service call request is received, the user service call request utilizes required target interface number based on user
Generated according to carried out input operation is wrapped;
Based on the user service call request, the destination service number corresponding with the user service call request is run
According to bag, service result is obtained;
The service result is exported.
The above method, it is preferred that obtain the service data bag and interface data bag of the API service object, including:
Based on model-view-controller (Model View Controller, MVC) model, the API service pair is generated
The service providing module and service interface module of elephant;
Using item objects model maven, the service data bag and the service interface of the service providing module are generated
The interface data bag of module.
The above method, it is preferred that based on the user service call request, operation and the user service call request phase
Corresponding target service data bag, obtains service result, including:
Determine the corresponding configuration parameter of the user service call request and required parameter;
Based on the required parameter, it is determined that target service data bag corresponding with the user service call request;
Based on the configuration parameter, the target service data bag is run, service result is obtained.
The above method, it is preferred that after described at least one API service object of acquisition, methods described also includes:
Object identity is set to each API service object, and the object ginseng of each API service object is set
Number.
The above method, it is preferred that also include:
Billing operation is carried out based on the service result.
Present invention also provides a kind of managing device of API service, including:
Object obtaining unit, for obtaining at least one API service object;
Packet obtaining unit, service data bag and interface data bag for obtaining the API service object;
Packet deployment unit, for the service data bag to be disposed, and provides a user the interface data
Bag;
Request reception unit, for receiving user service call request, the user service call request is based on user's profit
The input operation generation carried out with the target interface packet learned;
Service call unit, for based on the user service call request, operation and the user service call request
Corresponding target service data bag, obtains service result;
As a result output unit, for the service result to be exported.
Said apparatus, it is preferred that the packet obtaining unit includes:
Module generates subelement, for based on MVC models, generating the service providing module kimonos of the API service object
Business interface module;
Packet generates subelement, for utilizing maven, generates the service data bag of the service providing module and described
The interface data bag of service interface module.
Said apparatus, it is preferred that the service call unit includes:
Parameter determination subelement, for determining the corresponding configuration parameter of the user service call request and required parameter.
Target determination subelement, for based on the required parameter, it is determined that corresponding with the user service call request
Target service data bag;
Packet runs subelement, for based on the configuration parameter, running the target service data bag, being serviced
As a result.
Said apparatus, it is preferred that also include:
Object setting unit, after obtaining at least one API service object in the object obtaining unit, to each
The API service object sets object identity, and sets the image parameter of each API service object.
Said apparatus, it is preferred that also include:
Service charging unit, for carrying out billing operation based on the service result.
The management method and device of a kind of API service provided from such scheme, the application, by being needed
After the API service object disposed, the service data bag and interface data bag of API service object are generated, and then user can
To carry out input operation according to the interface data bag of offer, call method, the configuration various parameters, Jin Ersheng of oneself are such as write
Into user service call request, the application runs corresponding service data bag after this request is received, and acquisition can be defeated
Go out the service result to user, API service is provided the user thus according to the demand of user itself, realize for user's
API service is freely customized.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is a kind of flow chart of the management method for API service that the embodiment of the present application one is provided;
Fig. 2 and Fig. 3 are respectively the partial process view of the embodiment of the present application one;
Fig. 4 is a kind of flow chart of the management method for API service that the embodiment of the present application two is provided;
Fig. 5 is a kind of flow chart of the management method for API service that the embodiment of the present application three is provided;
Fig. 6 is a kind of structural representation of the managing device for API service that the embodiment of the present application four is provided;
Fig. 7 and Fig. 8 are respectively the part-structure schematic diagram of the embodiment of the present application four;
Fig. 9 is a kind of structural representation of the managing device for API service that the embodiment of the present application five is provided;
Figure 10 is a kind of structural representation of the managing device for API service that the embodiment of the present application six is provided;
Figure 11 and Figure 12 are respectively the application exemplary plot of the embodiment of the present application.
Embodiment
With full-service field internet+development, not only only large and medium-sized enterprise user need develop oneself API clothes
Business, medium-sized and small enterprises user also has the demand that API service is freely customized.API service is freely customized, without for each user
The api interface service of oneself is developed, the resources open of large enterprise script need to be only only facing to SME users, by taking out
Common API demands are taken with regard to the demand of most enterprises user can be met.But under normal circumstances, API service template can not
All general, the management method of the existing API service freely customized is less efficient, and the reusability of resource is also than relatively low.
In view of this, the API freely customized is effectively managed by proposing a kind of management method of API service in the application
Access, improve resource multiplex rate, user oriented provides equal high-quality API service, and only needs to a set of general API clothes
The template of business, by integrating these templates, can form the API utility ecological chains of a cycling and reutilization, promote money
Source sustainable development, the unique novel color being combined with environmentally friendly " green " with scientific and technological " blueness " is that " internet+API takes
Business " process is done one's bit.
It is medium-sized and small enterprises user that the application, which is applied in management global wide area network (World Wide Web, WEB) project,
The method of service freely customized of open general API service so that the API service crossed before towards large enterprises' User Exploitation connects
Mouth resource can be multiplexed to medium-sized and small enterprises user, extract common API service and be supplied to each enterprise customer to call, and
These API services are integrated into the public ecological chain of a set of API service, deployment is run in WEB projects.
With reference to Fig. 1, it is a kind of implementation process figure of the management method for API service that the embodiment of the present application one is provided, is applicable
API service freely customizes in WEB projects.
In the present embodiment, this method may comprise steps of:
Step 101:Obtain at least one API service object.
Wherein, which API service can have by inquiry in the present embodiment and be transformed into that versatility is higher, practicality is stronger
API generic services potentiality, such as mobile telephone real-name authentication service, identity card real-name authentication service, and then extracts general API
The demand of service, obtains at least one API service object.
It should be noted that above mentioned general API service can include:That has developed uses towards large enterprise
The API service at family and the API service towards medium-sized and small enterprises' User Exploitation of extraction.
Step 102:Obtain the service data bag and interface data bag of the API service object.
Wherein, general API service can be developed in the present embodiment based on MVC models, Fig. 2 is specifically may be referred to, walked
Rapid 102 can be realized by following steps:
Step 201:Based on MVC models, the service providing module and service interface module of the API service object are generated.
Step 202:Using maven, the service data bag and the service interface module of the service providing module are generated
Interface data bag.
That is, by generating the service data bag and interface data bag of API service object in the present embodiment, to service
Packet and interface data bag represent corresponding API service, thus by API service be transformed into subsequently can be general API
Service.
Wherein, the service data bag can be realized with the interface data bag for jar bags.For example, base in the present embodiment
After API service object to be generated to MVC models service providing module and service interface module, using maven by two modules
Compressed file, such as jar bags are packaged into respectively.
Step 103:The service data bag is disposed, and provides a user the interface data bag.
Specifically, service data bag and interface data bag can be registered on service platform in the present embodiment, here
Service platform can be third-party platform or supplier's platform of general API service.
For example, service data bag and interface data bag are published to service by the present embodiment after service data bag is obtained
On the Distributed Architecture of platform, service platform provides logical between the supplier and general API service consumer of general API service
Telecommunications services, for example, general API service consumer between client such as mobile phone or computer terminal and service platform by being led to
Letter.
Thus, service platform to consumer be user API service is provided freely customize service, and offer can be called
The interface data bag and all kinds of configuration parameters of API service, corresponding call study course or configuration study course etc..
Step 104:Receive user service call request.
Wherein, the input that the user service call request is carried out based on user using required target interface packet
Operation generation.For example, the consumer of general API service freely customizes service in supplier's purchase API service to API service
Afterwards, service platform provides a user the interface data bag of various API services, can also provide a user and call study course or configuration
The examples such as study course, thus, user can be compiled according to examples such as study courses by client based on required target interface packet
The parameters such as oneself call method, the service data bag of configuration link information and desired request and its version number are written from, and then are generated
User service call request, client is set up with the service platform of the supplier of API service and communicated, as API service requestor
Proceed by service call.The present embodiment starts to accept API service requestor by receiving user service call request
Service call demand.
Wherein, user configuring link information example is as follows:
Dubbo files are configured, consumer is registered as, the main following dubbo information of configuration:
<dubbo:Application name=" dubbo_consumer " owner=" XXX " organization="
XXX"></dubbo:application>
<dubbo:Registry protocol=" zookeeper " address=" XXX.XXX.XXX.XX:2181"
Check=" false "></dubbo:registry>
<!-- the service to be quoted:Identity card real-name authentication -->
<dubbo:Reference interface=" com.XXX.XXX.XXX.XXClientService " id="
XXClientService " timeout=" 120000 " retries=" 0 " check=" false " version=" XXX "></
dubbo:reference>
<!-- the service to be quoted:Mobile telephone real-name certification -->
<dubbo:Referenceinterface=" com.XXX.XXX.XXX.PhoneXXXClientService " id
=" phoneXXXClientService " retries=" 0 " timeout=" 120000 " check=" false " version
=" XXX "></dubbo:reference>
Step 105:Based on the user service call request, the mesh corresponding with the user service call request is run
Service data bag is marked, service result is obtained.
Wherein, various parameters that can be in user service call request in the present embodiment realize target service data
That wraps is called and runs, and with specific reference to Fig. 3, step 105 can be realized by following steps:
Step 301:Determine the corresponding configuration parameter of the user service call request and required parameter.
Wherein, the parameter of the target data bag called required for user is included in the required parameter.
Step 302:Based on the required parameter, it is determined that target service data corresponding with the user service call request
Bag;
Step 303:Based on the configuration parameter, the target service data bag is run, service result is obtained.
Step 106:The service result is exported.
In the present embodiment can by data transmission interface etc. by service result be transferred in the client of user there is provided to
User.
The management method of a kind of API service provided from such scheme, the embodiment of the present application one, by being needed
After the API service object disposed, the service data bag and interface data bag of API service object, and then user are generated
Input operation can be carried out according to the interface data bag of offer, such as write call method, the configuration various parameters of oneself, and then
User service call request is generated, the present embodiment runs corresponding service data bag after this request is received, and obtains energy
Enough service results exported to user, API service is provided the user thus according to the demand of user itself, is realized and is directed to user
API service freely customize.
It is a kind of implementation process figure of the management method for API service that the embodiment of the present application two is provided, in step with reference to Fig. 4
After rapid 101, this method can also comprise the following steps:
Step 107:Object identity is set to each API service object, and each API service object is set
Image parameter.
Wherein, object identity can uniquely represent its corresponding API service object, and the object identity can be used for follow-up
The generation of the service data bag and interface data bag of API service and call.
And the image parameter can be various input/output arguments of interface of API service object etc..Input parameter by
Preset parameter is constituted with each specific API service oneself parameter two parts, for example, preset parameter:Yw_id=65c55123-
3a49-417e-8ae8-e103666ac7cb_idIdentify;Authz=
55729cb9bf7da72db70c19186b27337c.Service custom parameter such as identity real name authentication service:Idcard=
350XXXXXXXXXXXXXXX;The old XX of name=.
Output parameter is such as:{"result":0,"msg":" successful inquiring, name is consistent with identification card number ", "
serialno":"5a69774425944bea93f5c768e4541123"}
It should be noted that the self-defined input parameter of different API services is different, the preset parameter in input parameter
It is constant.And the return parameters of different API services are different.
It is a kind of implementation process figure of the management method for API service that the embodiment of the present application three is provided, in step with reference to Fig. 5
After rapid 106, this method can also comprise the following steps:
Step 108:Billing operation is carried out based on the service result.
Wherein, it can be deducted fees in the present embodiment by service times, often call successfully and meet rule of deducting fees, just deduct fees
Once.
For example, by taking the rule of deducting fees of identity real name authentication service as an example, it is as follows:
Identity real name certification is deducted fees according to service result such as return code:
Following return code is deducted fees:
Successful inquiring, checking is consistent;
Successful inquiring, it is inconsistent;
Following return code is not deducted fees:
101- inquiry failures, parameter error
102- inquiry failures, channel errors
That is, user formally calls API service once, whether deducted fees according to the corresponding rule judgment of deducting fees of return code,
If desired deduct fees, when at once secondary call successfully is deducted fees after the parameter of return service result is to user.If need not deduct fees, return
The parameter of service result is returned to user, is not deducted fees.
It is a kind of structural representation of the managing device for API service that the embodiment of the present application four is provided, the dress with reference to Fig. 6
Following structure can be included by putting:
Object obtaining unit 601, for obtaining at least one API service object.
Wherein, which API service can have by inquiry in the present embodiment and be transformed into that versatility is higher, practicality is stronger
API generic services potentiality, such as mobile telephone real-name authentication service, identity card real-name authentication service, and then extracts general API
The demand of service, obtains at least one API service object.
It should be noted that above mentioned general API service can include:That has developed uses towards large enterprise
The API service at family and the API service towards medium-sized and small enterprises' User Exploitation of extraction.
Packet obtaining unit 602, service data bag and interface data bag for obtaining the API service object.
Wherein, general API service can be developed in the present embodiment based on MVC models, Fig. 7 is specifically may be referred to, number
It can be realized according to bag obtaining unit 602 by following structure:
Module generates subelement 701, for based on MVC models, generate the API service object service providing module and
Service interface module;
Packet generates subelement 702, for utilizing maven, generate the service providing module service data bag and
The interface data bag of the service interface module.
That is, by generating the service data bag and interface data bag of API service object in the present embodiment, to service
Packet and interface data bag represent corresponding API service, thus by API service be transformed into subsequently can be general API
Service.
Wherein, the service data bag can be realized with the interface data bag for jar bags.For example, base in the present embodiment
After API service object to be generated to MVC models service providing module and service interface module, using maven by two modules
Compressed file, such as jar bags are packaged into respectively.
Packet deployment unit 603, for the service data bag to be disposed, and provides a user the number of ports
According to bag.
Specifically, service data bag and interface data bag can be registered on service platform in the present embodiment, here
Service platform can be third-party platform or supplier's platform of general API service.
For example, service data bag and interface data bag are published to service by the present embodiment after service data bag is obtained
On the Distributed Architecture of platform, service platform provides logical between the supplier and general API service consumer of general API service
Telecommunications services, for example, general API service consumer between client such as mobile phone or computer terminal and service platform by being led to
Letter.
Thus, service platform to consumer be user API service is provided freely customize service, and offer can be called
The interface data bag and all kinds of configuration parameters of API service, corresponding call study course or configuration study course etc..
Request reception unit 604, for receiving user service call request.
Wherein, the input that the user service call request is carried out based on user using required target interface packet
Operation generation.For example, the consumer of general API service freely customizes service in supplier's purchase API service to API service
Afterwards, service platform provides a user the interface data bag of various API services, can also provide a user and call study course or configuration
The examples such as study course, thus, user can be compiled according to examples such as study courses by client based on required target interface packet
The parameters such as oneself call method, the service data bag of configuration link information and desired request and its version number are written from, and then are generated
User service call request, client is set up with the service platform of the supplier of API service and communicated, as API service requestor
Proceed by service call.The present embodiment starts to accept API service requestor by receiving user service call request
Service call demand.
Service call unit 605, for based on the user service call request, operation is called with the user service please
Corresponding target service data bag is sought, service result is obtained.
Wherein, various parameters that can be in user service call request in the present embodiment realize target service data
That wraps is called and runs, and with specific reference to Fig. 8, service call unit 605 can be realized by following structure:
Parameter determination subelement 801, for determining the corresponding configuration parameter of the user service call request and request ginseng
Number.
Wherein, the parameter of the target data bag called required for user is included in the required parameter.
Target determination subelement 802, for based on the required parameter, it is determined that corresponding with the user service call request
Target service data bag.
Packet runs subelement 803, for based on the configuration parameter, running the target service data bag, obtaining
Service result.
As a result output unit 606, for the service result to be exported.
The managing device of a kind of API service provided from such scheme, the embodiment of the present application four, by being needed
After the API service object disposed, the service data bag and interface data bag of API service object, and then user are generated
Input operation can be carried out according to the interface data bag of offer, such as write call method, the configuration various parameters of oneself, and then
User service call request is generated, the present embodiment runs corresponding service data bag after this request is received, and obtains energy
Enough service results exported to user, API service is provided the user thus according to the demand of user itself, is realized and is directed to user
API service freely customize.
It is a kind of structural representation of the managing device for API service that the embodiment of the present application five is provided, the dress with reference to Fig. 9
Following structure can also be included by putting:
Object setting unit 607, after obtaining at least one API service object in the object obtaining unit 601,
Object identity is set to each API service object, and the image parameter of each API service object is set.
Wherein, object identity can uniquely represent its corresponding API service object, and the object identity can be used for follow-up
The generation of the service data bag and interface data bag of API service and call.
And the image parameter can be various input/output arguments of interface of API service object etc..
It is a kind of structural representation of the managing device for API service that the embodiment of the present application six is provided, the dress with reference to Figure 10
Following structure can also be included by putting:
Service charging unit 608, for carrying out billing operation based on the service result.
Wherein, it can be deducted fees in the present embodiment by service times, often call successfully and meet rule of deducting fees, just deduct fees
Once.
Above embodiments herein goes on the service platform of supplier that can provide API service, such as
In the WEB systems of service company, the specific example of the present embodiment is said below in conjunction with the service development flow chart in Figure 11
It is bright:
First, general API service demand is arranged, which service investigated has and be transformed into that versatility is higher, practicality is stronger
API generic services potentiality (such as:Mobile telephone real-name certification, identity card real-name authentication etc.), extract the need of API generic services
Ask, then assign each API generic service unique mark, and formulate the standards such as the input/output argument of each interface.
Then, based on the general API service of MVC model developments, including WEB projects (service providing module) is implemented and are carried
Interface (service interface module) this two parts that supply user calls, service providing module and service interface module are packaged into
Jar bags, be respectively:Service data bag and interface data bag.
Secondly, the API generic services with unique mark are implemented into WEB projects and are deployed to Distributed Architecture such as WEB
In system, or it is referred to as:Service platform is registered to, and is provided as the service of API generic services (API service i.e. hereinbefore)
After person, with API generic service consumer communications, both sides can normally provide service and consumption service.
Again, user opened in WEB systems purchase API generic services, WEB systems can provide a user call example and
The jar (interface data bag) of ISP's method is called, acquisition is called after API generic service jar bags (interface data bag), is used
The study course prompting that family only needs to provide according to WEB projects is called.
Afterwards, user provides according to WEB systems and calls use-case, writes the call method of oneself, configures link information and thinks
The parameter such as the method for servicing to be asked and version number, the server communication with API generic service providers, as service requester
And start to call.
Subsequently, service platform will be requested assignment to registered according to the configuration information and required parameter of service requester
ISP's method, i.e. service data bag, ISP's method of reruning processing related service logic asks and returns
As a result.
Finally, user obtains the result that service platform is returned as service consumer.End is called, implements success of deducting fees,
Flow terminates.
Thus, in such scheme, the requesting method that user carries out service call is convenient, safe, passes through jar bags and accesses service
The service platform of supplier, and service is asked, jar only includes calling interface, efficiently and safe not comprising code is realized.And
Request method has lower coupling, good safety and stability.
Meanwhile,, can be light using a set of Template User without redundancy operation cost without extra deploying projects in this programme
The existing API service request of pine nut.
Thus, by the application user can the general API service of unrestricted choice, as shown in figure 12, such as identity real name certification,
Mobile telephone real-name certification and other API etc. (API1~API6), opening API service freely customize after, formed full ecology industry
Business line API achievements, provide Self-Service for more medium-sized and small enterprises, are that oneself tailors service plan, realize privatization, fixed
Inhibition and generation effect, middle-size and small-size market is moved towards from big-and-middle-sized duration.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality
Body or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or deposited between operating
In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to
Nonexcludability is included, so that process, method, article or equipment including a series of key elements not only will including those
Element, but also other key elements including being not expressly set out, or also include being this process, method, article or equipment
Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that
Also there is other identical element in process, method, article or equipment including the key element.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system or computer program
Product.Therefore, the application can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the application can be used in one or more computers for wherein including computer usable program code
The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The application is the flow with reference to method, equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram are described.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram
Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which is produced, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and internal memory.
Memory potentially includes the volatile memory in computer-readable medium, random access memory (RAM) and/
Or the form, such as read-only storage (ROM) or flash memory (flash RAM) such as Nonvolatile memory.Memory is computer-readable Jie
The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved
State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus
Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein
Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
The management method and device to a kind of API service provided herein are described in detail above, public to institute
The described above for the embodiment opened, enables professional and technical personnel in the field to realize or use the application.To these embodiments
A variety of modifications will be apparent for those skilled in the art, and generic principles defined herein can be
In the case of not departing from spirit herein or scope, realize in other embodiments.Therefore, the application is not intended to be limited to
The embodiments shown herein, and it is to fit to the most wide model consistent with features of novelty with principles disclosed herein
Enclose.
Claims (10)
1. a kind of manager of application programming interface (Application Programming Interface, API) service
Method, it is characterised in that including:
Obtain at least one API service object;
Obtain the service data bag and interface data bag of the API service object;
The service data bag is disposed, and provides a user the interface data bag;
User service call request is received, the user service call request utilizes required target interface packet based on user
The input operation generation carried out;
Based on the user service call request, the target service data corresponding with the user service call request is run
Bag, obtains service result;
The service result is exported.
2. according to the method described in claim 1, it is characterised in that obtain the service data bag of the API service object and connect
Mouth packet, including:
Based on model-view-controller (Model View Controller, MVC) model, the API service object is generated
Service providing module and service interface module;
Using item objects model maven, the service data bag and the service interface module of the service providing module are generated
Interface data bag.
3. according to the method described in claim 1, it is characterised in that based on the user service call request, operation with it is described
The corresponding target service data bag of user service call request, obtains service result, including:
Determine the corresponding configuration parameter of the user service call request and required parameter;
Based on the required parameter, it is determined that target service data bag corresponding with the user service call request;
Based on the configuration parameter, the target service data bag is run, service result is obtained.
4. according to the method described in claim 1, it is characterised in that after described at least one API service object of acquisition, institute
Stating method also includes:
Object identity is set to each API service object, and the image parameter of each API service object is set.
5. according to the method described in claim 1, it is characterised in that also include:
Billing operation is carried out based on the service result.
6. a kind of managing device of API service, it is characterised in that including:
Object obtaining unit, for obtaining at least one API service object;
Packet obtaining unit, service data bag and interface data bag for obtaining the API service object;
Packet deployment unit, for the service data bag to be disposed, and provides a user the interface data bag;
Request reception unit, for receiving user service call request, the user service call request utilizes institute based on user
The input operation generation that target interface packet is carried out;
Service call unit, for based on the user service call request, running relative with the user service call request
The target service data bag answered, obtains service result;
As a result output unit, for the service result to be exported.
7. device according to claim 6, it is characterised in that the packet obtaining unit includes:
Module generates subelement, for based on MVC models, the service providing module and service for generating the API service object to connect
Mouth mold block;
Packet generates subelement, for utilizing maven, generates the service data bag of the service providing module and the service
The interface data bag of interface module.
8. device according to claim 6, it is characterised in that the service call unit includes:
Parameter determination subelement, for determining the corresponding configuration parameter of the user service call request and required parameter;
Target determination subelement, for based on the required parameter, it is determined that target corresponding with the user service call request
Service data bag;
Packet runs subelement, for based on the configuration parameter, running the target service data bag, obtains service knot
Really.
9. device according to claim 6, it is characterised in that also include:
Object setting unit, after obtaining at least one API service object in the object obtaining unit, to each described
API service object sets object identity, and sets the image parameter of each API service object.
10. device according to claim 6, it is characterised in that also include:
Service charging unit, for carrying out billing operation based on the service result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710277732.9A CN107046482B (en) | 2017-04-25 | 2017-04-25 | A kind of management method and device of API service |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710277732.9A CN107046482B (en) | 2017-04-25 | 2017-04-25 | A kind of management method and device of API service |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107046482A true CN107046482A (en) | 2017-08-15 |
CN107046482B CN107046482B (en) | 2019-10-11 |
Family
ID=59545781
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710277732.9A Active CN107046482B (en) | 2017-04-25 | 2017-04-25 | A kind of management method and device of API service |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107046482B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107707368A (en) * | 2017-09-12 | 2018-02-16 | 厦门集微科技有限公司 | The fee deduction treatment method and server of a kind of API service |
CN108055248A (en) * | 2017-11-30 | 2018-05-18 | 平安科技(深圳)有限公司 | Remote invocation method, server and storage medium based on dubbo frames |
CN108173957A (en) * | 2018-01-03 | 2018-06-15 | 福建博士通信息有限责任公司 | A kind of Http interfaces rapid configuration joint debugging platform |
CN108768928A (en) * | 2018-04-04 | 2018-11-06 | 厦门集微科技有限公司 | A kind of information acquisition method, terminal and server |
CN109144512A (en) * | 2018-08-22 | 2019-01-04 | 杭州数澜科技有限公司 | A kind of method and system generating API |
CN109445841A (en) * | 2018-11-08 | 2019-03-08 | 深圳乐信软件技术有限公司 | Interface document management method, device, server and storage medium |
CN110007950A (en) * | 2019-04-10 | 2019-07-12 | 优信拍(北京)信息科技有限公司 | A kind of management method of application programming interfaces, device and server |
CN111049877A (en) * | 2019-10-21 | 2020-04-21 | 贝壳技术有限公司 | Big data external output method and device and data open platform |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102255867A (en) * | 2010-05-18 | 2011-11-23 | 华为技术有限公司 | Service request processing method, device and system |
CN103345420A (en) * | 2013-06-03 | 2013-10-09 | 百度在线网络技术(北京)有限公司 | Method for massively calling API interfaces, system for massively calling API interfaces and device for massively calling API interfaces |
US9246778B2 (en) * | 2013-08-12 | 2016-01-26 | International Business Machines Corporation | System to enhance performance, throughput and reliability of an existing cloud offering |
-
2017
- 2017-04-25 CN CN201710277732.9A patent/CN107046482B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102255867A (en) * | 2010-05-18 | 2011-11-23 | 华为技术有限公司 | Service request processing method, device and system |
CN103345420A (en) * | 2013-06-03 | 2013-10-09 | 百度在线网络技术(北京)有限公司 | Method for massively calling API interfaces, system for massively calling API interfaces and device for massively calling API interfaces |
US9246778B2 (en) * | 2013-08-12 | 2016-01-26 | International Business Machines Corporation | System to enhance performance, throughput and reliability of an existing cloud offering |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107707368A (en) * | 2017-09-12 | 2018-02-16 | 厦门集微科技有限公司 | The fee deduction treatment method and server of a kind of API service |
CN108055248A (en) * | 2017-11-30 | 2018-05-18 | 平安科技(深圳)有限公司 | Remote invocation method, server and storage medium based on dubbo frames |
CN108173957B (en) * | 2018-01-03 | 2020-12-15 | 福建博士通信息有限责任公司 | Rapid configuration joint debugging platform for Http interface |
CN108173957A (en) * | 2018-01-03 | 2018-06-15 | 福建博士通信息有限责任公司 | A kind of Http interfaces rapid configuration joint debugging platform |
CN108768928B (en) * | 2018-04-04 | 2021-04-13 | 厦门集微科技有限公司 | Information acquisition method, terminal and server |
CN108768928A (en) * | 2018-04-04 | 2018-11-06 | 厦门集微科技有限公司 | A kind of information acquisition method, terminal and server |
CN109144512A (en) * | 2018-08-22 | 2019-01-04 | 杭州数澜科技有限公司 | A kind of method and system generating API |
CN109144512B (en) * | 2018-08-22 | 2022-05-03 | 杭州数澜科技有限公司 | Method and system for generating API |
CN109445841A (en) * | 2018-11-08 | 2019-03-08 | 深圳乐信软件技术有限公司 | Interface document management method, device, server and storage medium |
CN109445841B (en) * | 2018-11-08 | 2022-04-22 | 深圳乐信软件技术有限公司 | Interface document management method, device, server and storage medium |
CN110007950A (en) * | 2019-04-10 | 2019-07-12 | 优信拍(北京)信息科技有限公司 | A kind of management method of application programming interfaces, device and server |
CN111049877A (en) * | 2019-10-21 | 2020-04-21 | 贝壳技术有限公司 | Big data external output method and device and data open platform |
CN111049877B (en) * | 2019-10-21 | 2022-08-09 | 贝壳技术有限公司 | Big data external output method and device and data open platform |
Also Published As
Publication number | Publication date |
---|---|
CN107046482B (en) | 2019-10-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107046482A (en) | The management method and device of a kind of API service | |
CN109150607A (en) | Classification management-control method and device for block chain network | |
CN107608689A (en) | The update method of application program, device and electronic equipment in client | |
CN109800056A (en) | A kind of block chain dispositions method based on container | |
CN106101258A (en) | A kind of interface interchange method of mixed cloud, Apparatus and system | |
CN104516738A (en) | Integrated implementing method for development and release of APP | |
CN110213058A (en) | A kind of block chain all-in-one machine for realizing data cochain | |
CN103716356B (en) | Storing process operating method, device and system based on web | |
CN105260292B (en) | A kind of log recording method, apparatus and system | |
CN107766738A (en) | A kind of binding method of smart machine, device and system, communication system | |
CN106406826B (en) | Joint debugging task creation method, system joint debugging method and device | |
CN106021091B (en) | Internet bank's simulation system and method | |
CN102073536A (en) | Method for editing template into warehouse by cloud platform and generating virtual machines in bulk | |
TW202044019A (en) | Access method based on H5 access mode, access component thereof and mobile terminal | |
CN101950257B (en) | Mobile phone application development method and system | |
CN105068818A (en) | Channel package generation method and apparatus and channel package batch generation method and system | |
CN107222324A (en) | The business collocation method and device of network service | |
WO2021223278A1 (en) | Sim card configuration distribution method and system | |
JP2013542504A (en) | Application store system and development method using the application store system | |
CN106909406A (en) | A kind of method and device of the APK plug-in units of loading application programs | |
CN107395784A (en) | The method and apparatus that a kind of batch imports Internet protocol IP pond | |
CN107634989A (en) | A kind of cloud wallet construction method and server | |
CN108259942A (en) | Obtain the method, apparatus and system of preview advertisement | |
CN109104368A (en) | A kind of request connection method, device, server and computer readable storage medium | |
CN106506182A (en) | A kind of method and system of configuration PTN business |
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 | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: A management method and device of API service Effective date of registration: 20220425 Granted publication date: 20191011 Pledgee: China Everbright Bank Limited by Share Ltd. Xiamen branch Pledgor: XIAMEN JIWEI TECHNOLOGY CO.,LTD. Registration number: Y2022980004792 |
|
PE01 | Entry into force of the registration of the contract for pledge of patent right |