CN107046482B - A kind of management method and device of API service - Google Patents
A kind of management method and device of API service Download PDFInfo
- Publication number
- CN107046482B CN107046482B CN201710277732.9A CN201710277732A CN107046482B CN 107046482 B CN107046482 B CN 107046482B CN 201710277732 A CN201710277732 A CN 201710277732A CN 107046482 B CN107046482 B CN 107046482B
- Authority
- CN
- China
- Prior art keywords
- service
- data packet
- 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.)
- Active
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 the management method and device of a kind of application programming interface (Application Programming Interface, API) service, method includes: to obtain at least one API service object;Obtain the service data packet and interface data packet of the API service object;The service data packet is disposed, and provides a user the interface data packet;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 data packet;Based on the user service call request, target service data packet corresponding with the user service call request is run, service result is obtained;The service result is exported.
Description
Technical field
This application involves technical field of data processing, in particular to the management method and device of a kind of API service.
Background technique
Application programming interface (Application Programming Interface, API) service freely customizes
Have the characteristics that light, quick, personalized, reusability is high.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 needs to develop oneself API service, and medium-sized and small enterprises user, which also has, freely to be determined
The demand of API service processed.
Summary of the invention
In view of this, a kind of management method and device for being designed to provide API service of the application, existing to solve
The technical issues of how user freely customizes API service in technology.
This application provides a kind of management methods of API service, comprising:
Obtain at least one API service object;
Obtain the service data packet and interface data packet of the API service object;
The service data packet is disposed, and provides a user the interface data packet;
User service call request is received, the user service call request utilizes required target interface number based on user
Generation is operated according to carried out input is wrapped;
Based on the user service call request, destination service number corresponding with the user service call request is run
According to packet, service result is obtained;
The service result is exported.
The above method, it is preferred that obtain the service data packet and interface data packet of the API service object, comprising:
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 packet and the service interface of the service providing module are generated
The interface data packet of module.
The above method, it is preferred that be based on the user service call request, operation and the user service call request phase
Corresponding target service data packet, obtains service result, comprising:
Determine the corresponding configuration parameter of the user service call request and required parameter;
Based on the required parameter, target service data packet corresponding with the user service call request is determined;
Based on the configuration parameter, the target service data packet is run, service result is obtained.
The above method, it is preferred that after described at least one API service object of acquisition, the method also includes:
Object identity is arranged to each API service object, and the object ginseng of each API service object is set
Number.
The above method, it is preferred that further include:
Billing operation is carried out based on the service result.
Present invention also provides a kind of managing devices of API service, comprising:
Object obtaining unit, for obtaining at least one API service object;
Data packet obtaining unit, for obtaining the service data packet and interface data packet of the API service object;
Data packet deployment unit for disposing the service data packet, and provides a user the interface data
Packet;
Request reception unit, for receiving user service call request, the user service call request is based on user's benefit
The input operation carried out with the target interface data packet learned generates;
Service call unit, for being based on the user service call request, operation and the user service call request
Corresponding target service data packet, obtains service result;
As a result output unit, for exporting the service result.
Above-mentioned apparatus, it is preferred that the data packet obtaining unit includes:
Module generates subelement, for being based on MVC model, generates the service providing module kimonos of the API service object
Business interface module;
Data packet generates subelement, for utilizing maven, generates the service data packet of the service providing module and described
The interface data packet of service interface module.
Above-mentioned apparatus, it is preferred that the service call unit includes:
Parameter determines subelement, for determining the corresponding configuration parameter of the user service call request and required parameter.
Target determines subelement, and for being based on the required parameter, determination is corresponding with the user service call request
Target service data packet;
Data packet runs subelement, for being based on the configuration parameter, runs the target service data packet, is serviced
As a result.
Above-mentioned apparatus, it is preferred that further include:
Object setting unit, for after the object obtaining unit obtains at least one API service object, to each
Object identity is arranged in the API service object, and the image parameter of each API service object is arranged.
Above-mentioned apparatus, it is preferred that further include:
Service charging unit, for carrying out billing operation based on the service result.
By above scheme it is found that the management method and device of a kind of API service provided by the present application, by being needed
After the API service object disposed, the service data packet and interface data packet of API service object are generated, and then user can
To carry out input operation according to the interface data packet of offer, such as write the call method of oneself, configuration various parameters, Jin Ersheng
At user service call request, the application runs corresponding service data packet after receiving this request, and acquisition can be defeated
Out to the service result of user, API service is provided for user thus according to the demand of user itself, is realized for user's
API service freely customizes.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow chart of the management method for API service that the embodiment of the present application one provides;
Fig. 2 and Fig. 3 is 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 provides;
Fig. 5 is a kind of flow chart of the management method for API service that the embodiment of the present application three provides;
Fig. 6 is a kind of structural schematic diagram of the managing device for API service that the embodiment of the present application four provides;
Fig. 7 and Fig. 8 is respectively the partial structure diagram of the embodiment of the present application four;
Fig. 9 is a kind of structural schematic diagram of the managing device for API service that the embodiment of the present application five provides;
Figure 10 is a kind of structural schematic diagram of the managing device for API service that the embodiment of the present application six provides;
Figure 11 and Figure 12 is respectively the application exemplary diagram of the embodiment of the present application.
Specific embodiment
With full-service field internet+development, not only only large and medium-sized enterprise user need to develop oneself API clothes
Business, the demand that medium-sized and small enterprises user also has API service freely to customize.API service freely customizes, without being directed to each user
The api interface service of oneself is developed, only need to pass through pumping the resources open for being only facing large enterprise originally to SME users
Common API demand is taken just to be able to satisfy the demand of most enterprises user.However under normal conditions, API service template can not
All general, the management method efficiency of the existing API service freely customized is lower, and the reusability of resource is also relatively low.
In view of this, effectively managing the API freely customized by proposing a kind of management method of API service in the application
Access improves resource multiplex rate, and user oriented provides the API service of same high quality, and a set of general API is only needed to take
The template of business is capable of forming the API utility ecological chain an of cycling and reutilization, promotes money by integrating these templates
Source sustainable development, unique novel color that there is environmentally friendly " green " to combine with scientific and technological " blue ", for " internet+API clothes
Business " process is done one's bit.
The application is suitable in management global wide area network (World Wide Web, WEB) project being medium-sized and small enterprises user
The method of service of open general API service freely customized, 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 calling, and
These API services are integrated into the public ecological chain of a set of API service, deployment is run in WEB project.
With reference to Fig. 1, it is a kind of implementation flow chart of the management method for API service that the embodiment of the present application one provides, is applicable in
API service freely customizes in WEB project.
In the present embodiment, this method be may comprise steps of:
Step 101: 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, practicability is stronger
API generic service potentiality, such as mobile telephone real-name authentication service, identity card real-name authentication service, and then extract general API
The demand of service obtains at least one API service object.
It should be noted that above mentioned general API service may include having: developed to be used towards large enterprise
The API service at family and the API service towards medium-sized and small enterprises' User Exploitation of extraction.
Step 102: obtaining the service data packet and interface data packet of the API service object.
Wherein, general API service can be developed in the present embodiment based on MVC model, can specifically refer to Fig. 2, step
Rapid 102 can be realized by following steps:
Step 201: being based on MVC model, generate the service providing module and service interface module of the API service object.
Step 202: utilizing maven, generate the service data packet and the service interface module of the service providing module
Interface data packet.
That is, by generating the service data packet and interface data packet of API service object in the present embodiment, with service
Data packet and interface data packet indicate corresponding API service, and API service is thus transformed into subsequent API that can be general
Service.
Wherein, the service data packet and the interface data packet can be realized for jar packet.For example, base in the present embodiment
After API service object is generated service providing module and service interface module by MVC model, using maven by two modules
It is packaged into compressed file respectively, such as jar packet.
Step 103: the service data packet being disposed, and provides a user the interface data packet.
Specifically, service data packet and interface data packet can be registered on service platform in the present embodiment, here
Service platform can be third-party platform, be also possible to supplier's platform of general API service.
For example, service data packet and interface data packet are published to service after obtaining service data packet by the present embodiment
On the Distributed Architecture of platform, service platform provides logical between the supplier of general API service and general API service consumer
Telecommunications services, for example, general API service consumer between client such as mobile phone or computer terminal and service platform by leading to
Letter.
Service platform freely customizes service to consumer, that is, user's offer API service as a result, and provides and can call
The interface data packet of API service and all kinds of configuration parameters, corresponding calling study course or configuration study course etc..
Step 104: receiving user service call request.
Wherein, the input that the user service call request is carried out based on user using required target interface data packet
Operation generates.For example, the consumer of general API service is freely customizing service to the supplier of API service purchase API service
Later, service platform provides a user the interface data packet of various API services, can also provide a user and call study course or configuration
The examples such as study course, user can be compiled by client based on required target interface data packet according to examples such as study courses as a result,
The parameters such as oneself call method, the service data packet of configuration link information and desired request and its version number are written from, and then are generated
User service call request, client are communicated with the foundation of the service platform of the supplier of API service, become API service requestor
Start to carry out service call.The present embodiment starts to accept API service requestor by receiving user service call request
Service call demand.
Wherein, user configuration link information example is as follows:
Dubbo file is 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>
<!-- service of Yao Yinyong: 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>
<!-- service of Yao Yinyong: 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: being based on the user service call request, run mesh corresponding with the user service call request
Service data packet is marked, service result is obtained.
Wherein, target service data can be realized according to the various parameters in user service call request in the present embodiment
The calling and operation of packet, with specific reference to Fig. 3, step 105 can be realized by following steps:
Step 301: determining the corresponding configuration parameter of the user service call request and required parameter.
Wherein, comprising the parameter for the target packet called required for user in the required parameter.
Step 302: being based on the required parameter, determine target service data corresponding with the user service call request
Packet;
Step 303: being based on the configuration parameter, run the target service data packet, obtain service result.
Step 106: the service result is exported.
Service result can be transferred in the client of user by data transmission interface etc., be supplied in the present embodiment
User.
By above scheme it is found that a kind of management method for API service that the embodiment of the present application one provides, by being needed
After the API service object disposed, the service data packet and interface data packet of API service object, and then user are generated
Input operation can be carried out according to the interface data packet of offer, such as write the call method of oneself, configuration various parameters, in turn
User service call request is generated, the present embodiment runs corresponding service data packet after receiving this request, obtains energy
Enough output provides API service thus according to the demand of user itself for user, realizes and be directed to user to the service result of user
API service freely customize.
It is a kind of implementation flow chart of the management method for API service that the embodiment of the present application two provides, in step with reference to Fig. 4
After rapid 101, this method may also comprise the following steps::
Step 107: object identity being arranged to each API service object, and each API service object is set
Image parameter.
Wherein, object identity can uniquely indicate its corresponding API service object, which can be used for subsequent
In the generation and calling of the service data packet and interface data packet of API service.
And the image parameter can be the various input/output arguments of interface etc. of API service object.Input parameter by
Preset parameter and oneself parameter two parts of each specific API service form, for example, preset parameter: yw_id=65c55123-
3a49-417e-8ae8-e103666ac7cb_idIdentify;Authz=55729cb9bf7da72db70c19186b2733
7c.Service custom parameter such as identity real name authentication service: idcard=350XXXXXXXXXXXXXXX;The old XX of name=.
Output parameter is such as: and " result ": 0, " msg ": " successful inquiring, name are consistent with identification card number ", "
serialno":"5a69774425944bea93f5c768e4541123"}
It should be noted that the customized input parameter of different API services is different, the preset parameter in parameter is inputted
It is constant.And the return parameters of different API services are different.
It is a kind of implementation flow chart of the management method for API service that the embodiment of the present application three provides, in step with reference to Fig. 5
After rapid 106, this method may also comprise the following steps::
Step 108: billing operation is carried out based on the service result.
Wherein, it can deduct fees by service times in the present embodiment, it is every to 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, verifying are consistent;
Successful inquiring, it is inconsistent;
Following return code is not deducted fees:
101- inquiry failure, parameter error
102- inquiry failure, channel errors
That is, user formally calls API service primary, judge whether to deduct fees according to the corresponding rule of deducting fees of return code,
If desired it deducts fees, when at once secondary call successfully is deducted fees after returning to the parameter of service result to user.If not needing to deduct fees, return
The parameter of service result is returned to user, is not deducted fees.
It is a kind of structural schematic diagram of the managing device for API service that the embodiment of the present application four provides, the dress with reference to Fig. 6
Set may include with flowering structure:
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, practicability is stronger
API generic service potentiality, such as mobile telephone real-name authentication service, identity card real-name authentication service, and then extract general API
The demand of service obtains at least one API service object.
It should be noted that above mentioned general API service may include having: developed to be used towards large enterprise
The API service at family and the API service towards medium-sized and small enterprises' User Exploitation of extraction.
Data packet obtaining unit 602, for obtaining the service data packet and interface data packet of the API service object.
Wherein, general API service can be developed in the present embodiment based on MVC model, can specifically refer to Fig. 7, number
It can be by being realized with flowering structure according to packet obtaining unit 602:
Module generate subelement 701, for be based on MVC model, generate the API service object service providing module and
Service interface module;
Data packet generate subelement 702, for utilize maven, generate the service providing module service data packet and
The interface data packet of the service interface module.
That is, by generating the service data packet and interface data packet of API service object in the present embodiment, with service
Data packet and interface data packet indicate corresponding API service, and API service is thus transformed into subsequent API that can be general
Service.
Wherein, the service data packet and the interface data packet can be realized for jar packet.For example, base in the present embodiment
After API service object is generated service providing module and service interface module by MVC model, using maven by two modules
It is packaged into compressed file respectively, such as jar packet.
Data packet deployment unit 603 for disposing the service data packet, and provides a user the number of ports
According to packet.
Specifically, service data packet and interface data packet can be registered on service platform in the present embodiment, here
Service platform can be third-party platform, be also possible to supplier's platform of general API service.
For example, service data packet and interface data packet are published to service after obtaining service data packet by the present embodiment
On the Distributed Architecture of platform, service platform provides logical between the supplier of general API service and general API service consumer
Telecommunications services, for example, general API service consumer between client such as mobile phone or computer terminal and service platform by leading to
Letter.
Service platform freely customizes service to consumer, that is, user's offer API service as a result, and provides and can call
The interface data packet of API service and all kinds of configuration parameters, corresponding calling 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 data packet
Operation generates.For example, the consumer of general API service is freely customizing service to the supplier of API service purchase API service
Later, service platform provides a user the interface data packet of various API services, can also provide a user and call study course or configuration
The examples such as study course, user can be compiled by client based on required target interface data packet according to examples such as study courses as a result,
The parameters such as oneself call method, the service data packet of configuration link information and desired request and its version number are written from, and then are generated
User service call request, client are communicated with the foundation of the service platform of the supplier of API service, become API service requestor
Start to carry out 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 being based on the user service call request, operation is asked with user service calling
Corresponding target service data packet is sought, service result is obtained.
Wherein, target service data can be realized according to the various parameters in user service call request in the present embodiment
The calling and operation of packet, with specific reference to Fig. 8, service call unit 605 can be by being realized with flowering structure:
Parameter determines subelement 801, for determining the corresponding configuration parameter of the user service call request and request ginseng
Number.
Wherein, comprising the parameter for the target packet called required for user in the required parameter.
Target determines subelement 802, and for being based on the required parameter, determination is corresponding with the user service call request
Target service data packet.
Data packet runs subelement 803, for being based on the configuration parameter, runs the target service data packet, obtains
Service result.
As a result output unit 606, for exporting the service result.
By above scheme it is found that a kind of managing device for API service that the embodiment of the present application four provides, by being needed
After the API service object disposed, the service data packet and interface data packet of API service object, and then user are generated
Input operation can be carried out according to the interface data packet of offer, such as write the call method of oneself, configuration various parameters, in turn
User service call request is generated, the present embodiment runs corresponding service data packet after receiving this request, obtains energy
Enough output provides API service thus according to the demand of user itself for user, realizes and be directed to user to the service result of user
API service freely customize.
It is a kind of structural schematic diagram of the managing device for API service that the embodiment of the present application five provides, the dress with reference to Fig. 9
Setting can also include with flowering structure:
Object setting unit 607 is used for after the object obtaining unit 601 obtains at least one API service object,
Object identity is arranged to each API service object, and the image parameter of each API service object is set.
Wherein, object identity can uniquely indicate its corresponding API service object, which can be used for subsequent
In the generation and calling of the service data packet and interface data packet of API service.
And the image parameter can be the various input/output arguments of interface etc. of API service object.
It is a kind of structural schematic diagram of the managing device for API service that the embodiment of the present application six provides, the dress with reference to Figure 10
Setting can also include with flowering structure:
Service charging unit 608, for carrying out billing operation based on the service result.
Wherein, it can deduct fees by service times in the present embodiment, it is every to call successfully and meet rule of deducting fees, just deduct fees
Once.
The above embodiments herein can be adapted on the service platform for the supplier for being capable of providing API service, such as
In the WEB system 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:
Firstly, arranging general API service demand, investigating which service, versatility is higher, practicability is stronger with being transformed into
API generic service potentiality (such as: mobile telephone real-name certification, identity card real-name authentication), extract the need of API generic service
It asks, then assigns each API generic service unique identification, and the standards such as input/output argument for formulating each interface.
Then, it is based on the general API service of MVC model development, including implements WEB project (service providing module) and mentions
Interface (service interface module) this two parts that user calls are supplied, service providing module and service interface module are packaged into
Jar packet is respectively as follows: service data packet and interface data packet.
Secondly, the API generic service specific implementation WEB project with unique identification is deployed to Distributed Architecture such as WEB
In system, or it is known as: is registered to service platform, and is provided as the service of API generic service (API service i.e. hereinbefore)
After person, with API generic service consumer communication, both sides can normally provide service and consumption service.
Again, user opened in WEB system purchase API generic service, WEB system can provide a user call example and
The jar (interface data packet) of ISP's method is called, is obtained after calling API generic service jar packet (interface data packet), is used
The study course prompt that family only needs to provide according to WEB project is called.
Later, user provides according to WEB system and calls use-case, writes the call method of oneself, configures link information and thinks
The parameters such as the method for servicing to be requested and version number, the server communication with API generic service provider, become service requester
And start to call.
Subsequently, service platform will request assignment to registered according to the configuration information and required parameter of service requester
ISP's method, i.e. service data packet, ISP's method of reruning processing related service logic requests and returns
As a result.
Finally, user obtains the result that service platform returns as service consumer.Calling terminates, and implements success of deducting fees,
Process terminates.
As a result, in above scheme, the requesting method that user carries out service call is convenient, safe, passes through jar packet and accesses service
The service platform of supplier, and request to service, jar only includes calling interface, does not include and realizes code, efficiently and safe.And
Request method has lower coupling, good safety and stability.
Meanwhile additional deploying projects are not necessarily in this programme, and it is not necessarily to redundancy operation cost, it can be light using a set of Template User
Pine nut shows API service request.
As a result, by the application user can the general API service of unrestricted choice, as shown in figure 12, as identity real name certification,
Mobile telephone real-name certification and other API etc. (API1~API6) form ecology industry entirely after freely customize of opening API service
Business line API achievement, provides Self-Service for more medium-sized and small enterprises, oneself to tailor service plan, realizes privatization, fixed
Inhibition and generation effect moves towards middle-size and small-size market from large and medium-sized duration.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/
Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).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 instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
The management method and device of a kind of API service provided herein are described in detail above, it is public to institute
The above description for the embodiment opened makes professional and technical personnel in the field can be realized or use the application.To these embodiments
A variety of modifications will be readily apparent to those skilled in the art, and the general principles defined herein can be
In the case where not departing from spirit herein or range, realize in other embodiments.Therefore, the application is not intended to be limited to
The embodiments shown herein, and it is to fit to widest model consistent with the principles and novel features disclosed in this article
It encloses.
Claims (10)
1. a kind of manager of application programming interface (Application Programming Interface, API) service
Method characterized by comprising
Obtain at least one API service object;
Obtain the service data packet and interface data packet of the API service object;
The service data packet is disposed, and provides a user the interface data packet;
User service call request is received, the user service call request utilizes required target interface data packet based on user
The input operation carried out generates;
Based on the user service call request, target service data corresponding with the user service call request is run
Packet, obtains service result;
The service result is exported.
2. the method according to claim 1, wherein obtaining the service data packet of the API service object and connecing
Mouth data packet, comprising:
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 packet and the service interface module of the service providing module are generated
Interface data packet.
3. the method according to claim 1, wherein be based on the user service call request, operation with it is described
The corresponding target service data packet of user service call request, obtains service result, comprising:
Determine the corresponding configuration parameter of the user service call request and required parameter;
Based on the required parameter, target service data packet corresponding with the user service call request is determined;
Based on the configuration parameter, the target service data packet is run, service result is obtained.
4. the method according to claim 1, wherein after described at least one API service object of acquisition, institute
State method further include:
Object identity is arranged to each API service object, and the image parameter of each API service object is set.
5. the method according to claim 1, wherein further include:
Billing operation is carried out based on the service result.
6. a kind of managing device of API service characterized by comprising
Object obtaining unit, for obtaining at least one API service object;
Data packet obtaining unit, for obtaining the service data packet and interface data packet of the API service object;
Data packet deployment unit for disposing the service data packet, and provides a user the interface data packet;
Request reception unit, for receiving user service call request, the user service call request is based on user and utilizes institute
The input that target interface data packet is carried out, which operates, to be generated;
Service call unit is run opposite with the user service call request for being based on the user service call request
The target service data packet answered, obtains service result;
As a result output unit, for exporting the service result.
7. device according to claim 6, which is characterized in that the data packet obtaining unit includes:
Module generates subelement, and for being based on MVC model, the service providing module and service for generating the API service object are connect
Mouth mold block;
Data packet generate subelement, for utilize maven, generate the service providing module service data packet and the service
The interface data packet of interface module.
8. device according to claim 6, which is characterized in that the service call unit includes:
Parameter determines subelement, for determining the corresponding configuration parameter of the user service call request and required parameter;
Target determines subelement, for being based on the required parameter, determines target corresponding with the user service call request
Service data packet;
Data packet runs subelement, for being based on the configuration parameter, runs the target service data packet, obtains service knot
Fruit.
9. device according to claim 6, which is characterized in that further include:
Object setting unit, for after the object obtaining unit obtains at least one API service object, to each described
Object identity is arranged in API service object, and the image parameter of each API service object is arranged.
10. device according to claim 6, which is characterized in that further 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 CN107046482A (en) | 2017-08-15 |
CN107046482B true 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) |
Families Citing this family (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 |
CN108055248B (en) * | 2017-11-30 | 2020-12-25 | 平安科技(深圳)有限公司 | Dubbo framework-based remote calling method, server and storage medium |
CN108173957B (en) * | 2018-01-03 | 2020-12-15 | 福建博士通信息有限责任公司 | Rapid configuration joint debugging platform for Http interface |
CN108768928B (en) * | 2018-04-04 | 2021-04-13 | 厦门集微科技有限公司 | Information acquisition method, terminal and server |
CN109144512B (en) * | 2018-08-22 | 2022-05-03 | 杭州数澜科技有限公司 | Method and system for generating API |
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 |
CN111049877B (en) * | 2019-10-21 | 2022-08-09 | 贝壳技术有限公司 | 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 |
Also Published As
Publication number | Publication date |
---|---|
CN107046482A (en) | 2017-08-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107046482B (en) | A kind of management method and device of API service | |
CN110187912B (en) | Node selection method and device | |
CN106101258A (en) | A kind of interface interchange method of mixed cloud, Apparatus and system | |
JP5751561B2 (en) | Application store system and development method using the application store system | |
CN103186466A (en) | Information interaction device and method based on automatic generation of associated test cases | |
TW202044019A (en) | Access method based on H5 access mode, access component thereof and mobile terminal | |
CN105260292B (en) | A kind of log recording method, apparatus and system | |
CN106201850B (en) | A kind of compatibility test method and device | |
CN106021091B (en) | Internet bank's simulation system and method | |
CN101950257B (en) | Mobile phone application development method and system | |
CN108933838B (en) | Application data processing method and device | |
CN103246606B (en) | The performance test methods of ESB platform and system | |
CN102073536A (en) | Method for editing template into warehouse by cloud platform and generating virtual machines in bulk | |
CN109376088A (en) | A kind of automatization test system and automated testing method | |
CN101986740A (en) | JAVA card | |
CN106909406A (en) | A kind of method and device of the APK plug-in units of loading application programs | |
CN109104368A (en) | A kind of request connection method, device, server and computer readable storage medium | |
CN104754287A (en) | Video monitoring equipment configuration parameter issuing method and system | |
CN110187986A (en) | A kind of command management method, system, device and computer readable storage medium | |
CN104503768A (en) | Call method and device for application programming interface (API) | |
US20200274758A1 (en) | Provisioning hybrid cloud resources in an operating environment | |
CN109086091A (en) | A kind of interface loading method, device and the equipment of software development kit | |
CN104598525A (en) | Application copy method, device and system | |
CN106529950A (en) | Payment method and device | |
CN107770165B (en) | Method and device for sending request by analog equipment |
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 |