CN106802797A - The generation method and device of a kind of application programming interface - Google Patents

The generation method and device of a kind of application programming interface Download PDF

Info

Publication number
CN106802797A
CN106802797A CN201611239423.4A CN201611239423A CN106802797A CN 106802797 A CN106802797 A CN 106802797A CN 201611239423 A CN201611239423 A CN 201611239423A CN 106802797 A CN106802797 A CN 106802797A
Authority
CN
China
Prior art keywords
parameter preset
node
interface
application programming
default
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.)
Pending
Application number
CN201611239423.4A
Other languages
Chinese (zh)
Inventor
辛春红
伍孟强
郭鹏
陈尚安
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Micro World (beijing) Technology Co Ltd
Original Assignee
Micro World (beijing) Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Micro World (beijing) Technology Co Ltd filed Critical Micro World (beijing) Technology Co Ltd
Priority to CN201611239423.4A priority Critical patent/CN106802797A/en
Publication of CN106802797A publication Critical patent/CN106802797A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms

Abstract

Embodiment of the invention discloses that the generation method and device of a kind of application programming interface, the method includes:User is obtained by presetting the parameter preset related to pre-set business that interface is input into, and the subordinate relation between the parameter preset;According to the parameter preset and the subordinate relation, application programming interface of the generation corresponding to the parameter preset;After the instruction for checking the application programming interface is received on the default interface, the application programming interface is exported.The generation method of the application programming interface that the present invention is provided, only need to the subordinate relation being input between each parameter preset and each parameter preset at default interface, the application programming interface of the parameter can be obtained accessing automatically according to the subordinate relation between certain parameter preset and other parameter presets, the specialty requirement of generation application programming interface is reduced.

Description

The generation method and device of a kind of application programming interface
Technical field
The present invention relates to mobile internet technical field, more particularly, to a kind of generation method of application programming interface And device.
Background technology
API (Application Programming Interface, application programming interface) is that some are pre-defined Function, it is therefore an objective to provide application program and developer be based on certain software or hardware to access one group of ability of routine, and Source code, or the details for understanding internal work mechanism need not be accessed again.With the abundantization of the product that Web ends are applied, developer Need, for different application products, for different application scenarios, data to be carried out into the abstract of height, carry out api interface Design, the api interface that exploitation is matched with the application scenarios is used for business side.Meanwhile, by corresponding developer to api interface Carry out the maintenance in later stage.In the development scheme of this api interface, data source will be disposable, if business scenario becomes Change, interface will also followed by change, inevitably result in secondary exploitation and adjustment.
During the embodiment of the present invention is realized, inventor has found that existing api interface needs professional for not Same scene is developed, and data user rate is low, development cost is high, strongly professional.
The content of the invention
The technical problems to be solved by the invention are how to solve existing api interface to need professional to be directed to different fields Scape is developed, and data user rate is low, development cost is high, strongly professional problem.
For above technical problem, The embodiment provides a kind of generation method of application programming interface, Including:
Obtain user and pass through the parameter preset related to pre-set business that default interface is input into, and the parameter preset it Between subordinate relation;
According to the parameter preset and the subordinate relation, generation connects corresponding to the application programming of the parameter preset Mouthful;
After the instruction for checking the application programming interface is received on the default interface, the application journey is exported Sequence DLL.
Alternatively, it is described to obtain user by presetting the parameter preset related to pre-set business that interface is input into, Yi Jisuo The subordinate relation between parameter preset is stated, including:
The parameter preset not belonged in the parameter preset with any parameter preset is obtained, as main parameter preset, In input frame corresponding to father's node that the main parameter preset is input into the default interface;
The parameter preset that traversal is not input into the default interface, acquisition belongs to a parameter preset for node, Parameter preset set is obtained, the number of the parameter preset in the parameter preset set, generation belongs to described upper one At least one child node of node, the corresponding input of the child node is added to by the parameter preset in the parameter preset set In frame, in all of parameter preset is added to the default interface, obtain representing the parameter preset and the subordinate The relational tree of relation.
Alternatively, the parameter preset with any parameter preset is not belonged in the acquisition parameter preset, as Main parameter preset, in input frame corresponding to father's node that the main parameter preset is input into the default interface before, Also include:
Judge whether the parameter preset being stored with according to the pre-set business, and the subordinate pass between the parameter preset The relational tree of the generation of system, if so, showing the relational tree on the default interface;
Operation information of the user to each node of the relational tree is obtained, is realized to the behaviour according to the operation information Make the deletion of the node corresponding to information, increase or position exchange.
Alternatively, it is described to obtain user by presetting the parameter preset related to pre-set business that interface is input into, Yi Jisuo Before stating the subordinate relation between parameter preset, also include:
The identity information of the user input is obtained, judges whether the user has by institute according to the identity information The authority that default interface generates application programming interface is stated, if so, then showing the default interface.
Alternatively, described according to the parameter preset and the subordinate relation, generation should corresponding to the parameter preset With Program Interfaces, including:
For the node in the relational tree, obtain by father's node visit to the path of the node, and according to institute Coordinates measurement is stated by path string;
The path string is inserted into the document related to the application programming interface for previously generating, obtained To the application programming interface for accessing the node.
The generation method of the application programming interface that embodiments of the invention are provided, user is input into pre- by default interface If the relation between the parameter preset of business, and these parameter presets, for each parameter preset, according to user input Subordinate relation between parameter preset and parameter preset, finds the path for accessing the parameter preset, according to the path corresponding generation Code can generate the application programming interface for accessing the parameter preset.The generation of the application programming interface that the present invention is provided Method, it is only necessary in the subordinate relation that default interface is input between each parameter preset and each parameter preset, you can automatic Obtain accessing the application programming interface of the parameter according to the subordinate relation between certain parameter preset and other parameter presets, Each parameter of professional in the business is not needed, the application of the parameter is accessed using the generation of corresponding programming language Program Interfaces, reduce the specialty requirement of generation application programming interface.
Further, since there is similar attaching relation between the parameter preset of same business, so generating some industry During the application programming interface of business, relational tree that can be directly to the relation generation between parameter before according to the business enters The corresponding modification of row obtains the relational tree of the business, that is, cause that the data of same business are reused, and improve data Utilization rate.
Second aspect, present invention also offers a kind of generating means of application programming interface, including:
Acquisition module, for obtaining the parameter preset related to pre-set business that user is input into by default interface, and Subordinate relation between the parameter preset;
Generation module, for according to the parameter preset and the subordinate relation, generation to be corresponding to the parameter preset Application programming interface;
Module is checked, after receiving the instruction for checking the application programming interface on the default interface, Export the application programming interface.
Alternatively, the acquisition module includes:
Father's node generation unit, for obtain do not belong in the parameter preset it is default with any parameter preset Parameter, as main parameter preset, is input into corresponding to father's node that the main parameter preset is input into the default interface In frame;
Child node generation unit, for traveling through the parameter preset not being input into the default interface, acquisition is belonged to One parameter preset of node, obtains parameter preset set, the number of the parameter preset in the parameter preset set, raw Into at least one child node for belonging to a upper node, the parameter preset in the parameter preset set is added to institute State in the corresponding input frame of child node, in all of parameter preset is added to the default interface, obtain representing described The relational tree of parameter preset and the subordinate relation.
Alternatively, father's node generation unit is additionally operable to not belong in the parameter preset is obtained described with any The parameter preset of parameter preset, as main parameter preset, the father that the main parameter preset is input into the default interface Before in input frame corresponding to node, judge whether the parameter preset being stored with according to the pre-set business, and it is described default The relational tree of the generation of the subordinate relation between parameter, if so, showing the relational tree on the default interface;Obtain user To the operation information of each node of the relational tree, realized to the section corresponding to the operation information according to the operation information Deletion, increase or the position exchange of point.
Alternatively, the acquisition module is additionally operable to, and is obtaining user by presetting the related to pre-set business of interface input Parameter preset, and before subordinate relation between the parameter preset, obtain the identity information of the user input, according to The identity information judges whether the user has the authority that application programming interface is generated by the default interface, if It is then to show the default interface.
Alternatively, the generation module is additionally operable to, for the node in the relational tree, obtain and visited by father's node Ask to the path of the node, and according to the coordinates measurement by path string;The path string is inserted into pre- Mr. Into the document related to the application programming interface in, obtain access the node application programming interface.
The generating means of the application programming interface that embodiments of the invention are provided, user is input into pre- by default interface If the relation between the parameter preset of business, and these parameter presets, for each parameter preset, according to user input Subordinate relation between parameter preset and parameter preset, finds the path for accessing the parameter preset, according to the path corresponding generation Code can generate the application programming interface for accessing the parameter preset.The generation of the application programming interface that the present invention is provided Device, it is only necessary in the subordinate relation that default interface is input between each parameter preset and each parameter preset, you can automatic Obtain accessing the application programming interface of the parameter according to the subordinate relation between certain parameter preset and other parameter presets, Each parameter of professional in the business is not needed, the application of the parameter is accessed using the generation of corresponding programming language Program Interfaces, reduce the specialty requirement of generation application programming interface.
Further, since there is similar attaching relation between the parameter preset of same business, so generating some industry During the application programming interface of business, relational tree that can be directly to the relation generation between parameter before according to the business enters The corresponding modification of row obtains the relational tree of the business, that is, cause that the data of same business are reused, and improve data Utilization rate.
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 The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are this hairs Some bright embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can be with root Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of the generation method of the application programming interface that one embodiment of the invention is provided;
Fig. 2 is the schematic flow sheet of the generation method of the application programming interface that another embodiment of the present invention is provided;
Fig. 3 is the logical schematic of the generation of the application programming interface that another embodiment of the present invention is provided;
Fig. 4 is the operating process schematic diagram of the generation of the application programming interface that another embodiment of the present invention is provided;
Fig. 5 is the structural representation that shows of layout at the default interface that another embodiment of the present invention is provided;
Fig. 6 is the structural representation of the generating means of the application programming interface that another embodiment of the present invention is provided;
Fig. 7 is the structural representation of the electronic equipment that one embodiment of the invention is provided.
Specific embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Fig. 1 is the schematic flow sheet of the generation method of the application programming interface that the present embodiment is provided.Referring to Fig. 1, should Method includes:
101:User is obtained by presetting the parameter preset related to pre-set business that interface is input into, and the default ginseng Subordinate relation between number;
102:According to the parameter preset and the subordinate relation, generation is compiled corresponding to the application program of the parameter preset Journey interface;
103:After the instruction for checking the application programming interface is received on the default interface, output is described should Use Program Interfaces.
The method that the present embodiment is provided is used to generate application programming interface (API), the mistake that traditional api interface is generated Cheng Zhong, for specific application scenarios, it is necessary to corresponding professional has access to the scene using the generation of corresponding programming language Data api interface.It can be seen that, it is necessary to developer possesses professional knowledge in the generation method of traditional api interface, specialty Property it is strong, and developed for concrete scene each time, cause data user rate low.The method of the present embodiment is by presetting boundary Face (for example, can generate the node with attaching relation in interface, is then input into corresponding parameter at each node Information) attaching relation between the parameter and parameter of certain business is obtained, obtained accessing certain ginseng according to parameter and attaching relation Several paths, the api interface for accessing the parameter can be generated according to the path.The generation method of this api interface is without specialty The limitation of knowledge, as long as have input the attaching relation of parameters and parameters by the default interface, you can generation is accessed The api interface of each parameter, specialty requires low.Simultaneously as the attaching relation of same business is similar, therefore for same business Document (for example, relational tree) that can be only to the attaching relation between the parameter for representing business that generates before does accordingly Modification, improves data user rate.
Default interface is a visualization interface for the attaching relation for obtaining parameter preset and parameter preset, for example, user Presence can add the input frame of the relation of belonging on interface, and after certain parameter is have input in the input frame, can be should Input frame adds child node, and addition belongs to the other specification of the parameter of the input frame in child node.For example, in the input frame In with the addition of Pekinese's relevant information, then add the child node for belonging to the input frame, addition belonging to Beijing in child node Each area (for example, Haidian District, Changping District, Dongcheng District etc.) information.
According to subordinate relation, corresponding path can be generated, for example, the path for accessing Zhong Guan-cun is:Beijing/Haidian District/ Zhong Guan-cun, then (be added in the character string of Json forms in the path and filled out by the path added to the corresponding code of api interface At the position in write access path) in, you can generation accesses the api interface of Zhong Guan-cun.
It is understood that the api interface of generation can be directly displayed on default interface, for users to use, also may be used In user to carry out trigger action to certain node, (for example, right click certain node, selection checks that API connects in the floating window of ejection The button of mouth) after, display accesses the api interface of the content of the node.
It will be appreciated that the input of subordinate relation can be by the way of relational tree, it would however also be possible to employ the mode of form, Obtaining other can represent the method for expressing of the subordinate relation between each parameter preset, as long as each parameter preset can be represented Between subordinate relation, the present embodiment closes to the subordinate between which kind of method representing parameters on default interface using System is not particularly limited.
The generation method of the application programming interface that the present embodiment is provided, user is input into pre-set business by default interface Parameter preset, and the relation between these parameter presets, for each parameter preset, according to the default ginseng of user input Subordinate relation between number and parameter preset, finds the path for accessing the parameter preset, according to the corresponding code in the path Generation accesses the application programming interface of the parameter preset.The generation method of the application programming interface that the present invention is provided, Only need to the subordinate relation being input between each parameter preset and each parameter preset at default interface, you can automatically according to certain Subordinate relation between individual parameter preset and other parameter presets obtains accessing the application programming interface of the parameter, it is not necessary to Each parameter of professional in the business, the application program for accessing the parameter using the generation of corresponding programming language is compiled Journey interface, reduces the specialty requirement of generation application programming interface.
Further, since there is similar attaching relation between the parameter preset of same business, so generating some industry During the application programming interface of business, relational tree that can be directly to the relation generation between parameter before according to the business enters The corresponding modification of row obtains the relational tree of the business, that is, cause that the data of same business are reused, and improve data Utilization rate.
Further, it is described to obtain user by default interface input and default industry on the basis of above-described embodiment The parameter preset of correlation of being engaged in, and the subordinate relation between the parameter preset, including:
The parameter preset not belonged in the parameter preset with any parameter preset is obtained, as main parameter preset, In input frame corresponding to father's node that the main parameter preset is input into the default interface;
The parameter preset that traversal is not input into the default interface, acquisition belongs to a parameter preset for node, Parameter preset set is obtained, the number of the parameter preset in the parameter preset set, generation belongs to described upper one At least one child node of node, the corresponding input of the child node is added to by the parameter preset in the parameter preset set In frame, in all of parameter preset is added to the default interface, obtain representing the parameter preset and the subordinate The relational tree of relation.
Further, on the basis of above-mentioned each embodiment, do not belong to and appoint in the acquisition parameter preset The parameter preset of parameter preset described in, as main parameter preset, the main parameter preset is input into the default interface Father's node corresponding in input frame before, also include:
Judge whether the parameter preset being stored with according to the pre-set business, and the subordinate pass between the parameter preset The relational tree of the generation of system, if so, showing the relational tree on the default interface;
Operation information of the user to each node of the relational tree is obtained, is realized to the behaviour according to the operation information Make the deletion of the node corresponding to information, increase or position exchange.
It should be noted that operation information refers to deletion, increase or the position exchange carried out to each node Operation, for example, right click certain node, selects " deletion " button in the floating window of ejection, then deletes the node;Right click certain section Point, selects " addition child node " button in the floating window of ejection, then add a new node.
Any information of the parameter preset can be stored in each node, for example, for " Beijing " this node, can be with Storage Pekinese's latitude and longitude information, climatic information, and local conditions and customs introduction etc., specific content is by corresponding service needed Fixed, the present embodiment is not particularly limited.
Specifically, as shown in Fig. 2 including following steps:
201:Judge whether the parameter preset being stored with according to pre-set business, and the subordinate pass between the parameter preset The relational tree of the generation of system;
If the parameter preset that is stored with according to pre-set business of judgement, and the subordinate relation between the parameter preset life Into relational tree, then perform step 202 and step 203;
Wherein, 202:The relational tree is shown on default interface;
203:Operation information of the user to each node of the relational tree is obtained, is realized to institute according to the operation information State the deletion of the node corresponding to operation information, increase or position exchange.
If judging the subordinate relation without the parameter preset stored according to pre-set business, and between the parameter preset The relational tree of generation, then perform step 204 to step 208;
204:The parameter preset not belonged in the parameter preset with any parameter preset is obtained, as main default ginseng Number, in input frame corresponding to father's node that the main parameter preset is input into the default interface;
205:Acquisition belongs to a parameter preset for node, parameter preset set is obtained, according to the parameter preset The number of the parameter preset in set, generation belongs at least one child node of a upper node, by the default ginseng Parameter preset during manifold is closed is added in the corresponding input frame of the child node;
206:Judge whether that all of parameter preset is added in the default interface;
If judging also to exist during without the parameter preset being added in the default interface, step 205 is continued executing with, it is no Then, step 207 is performed.
207:According to the relational tree for representing parameter preset, generation connects corresponding to the application programming of the parameter preset Mouthful;
208:After the instruction for checking the application programming interface is received on the default interface, output is described should Use Program Interfaces.
A kind of relation by default interface by each parameter preset of relation tree representation is present embodiments provided, so The path of each parameter preset is accessed according to relational tree generation afterwards, can be generated according to the path and be accessed the parameter preset Api interface.Meanwhile, for same business, if generating the relational tree of the business before, phase can be carried out to the relational tree The modification answered is (for example, the node to relational tree is added, deleted or exchanged between the child node for belonging to same node Order) be the relational tree that can obtain current business.
Further, on the basis of above-mentioned each embodiment, it is described obtain user by preset interface be input into Before the related parameter preset of pre-set business, and subordinate relation between the parameter preset, also include:
The identity information of the user input is obtained, judges whether the user has by institute according to the identity information The authority that default interface generates application programming interface is stated, if so, then showing the default interface.
Identity information refers to the log-on message of user, when user needs to generate api interface by the default interface, can To be first input into the identity information of oneself, the then comparison of each subscriber identity information by being prestored in the equipment judges Whether the user has the authority that api interface is generated by the default interface, if having, the default interface of display, for user Each parameter preset and the subordinate relation of these parameter presets are input on the default interface;Otherwise, prompt window is ejected, to carry Show user without the authority that api interface is generated by the default interface.This checking that identity information is first carried out to user, Permission user ensure that to operate each time by the method that the default interface generates api interface can find the operator of correlation Member, improves security.
Further, it is described to be closed according to the parameter preset and the subordinate on the basis of above-mentioned each embodiment System, generation corresponds to the application programming interface of the parameter preset, including:
For the node in the relational tree, obtain by father's node visit to the path of the node, and according to institute Coordinates measurement is stated by path string;
The path string is inserted into the document related to the application programming interface for previously generating, obtained To the application programming interface for accessing the node.
As a kind of specific embodiment, in the generating process of api interface, as shown in figure 3, by different scene (for example, Scene 1, scene 2, scene 3 in Fig. 3 etc.) in parameter (for example, the region in each scene) be added to corresponding relation In the child node of tree, obtain relational tree, these relational trees as a kind of data source (for example, to tourism scene in each place, Generation POI point datas, according to POI data production Methods tree, are stored as POI data source), then according to each scene pair Api interface corresponding to the scene should can be generated in the relational tree in POI data source.For example, for the scene of the generation of scene 1 1 corresponding API, for the corresponding API of scene 2 of the generation of scene 2, for the corresponding API of scene 3 of the generation of scene 3, successively class Push away, for the corresponding API of scene N of scene N generations.
In specific implementation process, as shown in figure 4, can first login system (for example, dedicated for generation api interface System, realize system login by carrying out authentication to user;
After logging in system by user, (business includes many kinds to the business of selection needs operation, for example, infrastructure class, food and drink Class, amusement class, shopping class etc., the business of user's selection generation.Between it includes due to identical business parameter and parameter Relation has similitude, therefore, if system has prestored the relational tree of the business, directly the relational tree can be repaiied Change, obtain new relational tree, otherwise, it is necessary to regenerate relational tree);
Judge whether the business configured relational tree;
If configuring, the relational tree that display was configured, the node of the relational tree is added, deleted or moved etc. Operation, obtains new relational tree;
If being configured without, father's node is added, create relational tree.
Finally, API of the output for the generation of each node.
Wherein, on default interface the process of production Methods tree as shown in figure 5, for example, " yellow square rafter " is used as father's node, At father's node, then the information such as geographical position, periphery sight spot of the yellow square rafter door of addition add the section of the next stage of " yellow square rafter door " Point " the yellow square rafter door in Tongliang County ", then add the next stage child node of " the yellow square rafter door in Tongliang County ", such as, belong to the tourism of " the yellow square rafter in Tongliang County " Sight spot and accommodation service.As shown in figure 5, have three sight spots can be as tourist attractions, by these three sight spots, " western agricultural are big The world ", " extraordinary splendour dream garden " and " four seasons lake ", while numeral 3 can afterwards be marked in " tourist attractions ", represent that it has three sight spots; Having four sight spots can be as accommodation service, by this four sight spot " Xiu Shui villa gardens ", " Yi Xin gardens rural area is big ... ", " fishing gulf Farm " and " Jia Peng farms ", while numeral 4 can afterwards be marked in " accommodation service ", represent that it has four sight spots.
Second aspect, present embodiments provides a kind of generating means 600 of application programming interface, as shown in fig. 6, bag Include acquisition module 601, generation module 602 and check module 603, wherein,
Acquisition module 601, for obtaining user by presetting the parameter preset related to pre-set business that interface is input into, with And the subordinate relation between the parameter preset;
Generation module 602, for according to the parameter preset and the subordinate relation, generation to correspond to the parameter preset Application programming interface;
Module 603 is checked, for receiving the instruction for checking the application programming interface on the default interface Afterwards, the application programming interface is exported.
The generating means 600 of the application programming interface that the present embodiment is provided are applied to answering described in above-described embodiment With the generation method of Program Interfaces, will not be repeated here.
The generating means 600 of the application programming interface that embodiments of the invention are provided, user is defeated by default interface Enter the relation between the parameter preset of pre-set business, and these parameter presets, it is defeated according to user for each parameter preset Subordinate relation between the parameter preset and parameter preset that enter, finds the path for accessing the parameter preset, according to path correspondence Code can generation access the parameter preset application programming interface.The application programming interface that the present invention is provided Generating means, it is only necessary in the subordinate relation that default interface is input between each parameter preset and each parameter preset, you can Obtain accessing the application programming of the parameter automatically according to the subordinate relation between certain parameter preset and other parameter presets Interface, it is not necessary to each parameter of professional in the business, the parameter is accessed using the generation of corresponding programming language Application programming interface, reduce generation application programming interface specialty requirement.
Further, since there is similar attaching relation between the parameter preset of same business, so generating some industry During the application programming interface of business, relational tree that can be directly to the relation generation between parameter before according to the business enters The corresponding modification of row obtains the relational tree of the business, that is, cause that the data of same business are reused, and improve data Utilization rate.
Further, on the basis of above-described embodiment, the acquisition module includes:
Father's node generation unit, for obtain do not belong in the parameter preset it is default with any parameter preset Parameter, as main parameter preset, is input into corresponding to father's node that the main parameter preset is input into the default interface In frame;
Child node generation unit, for traveling through the parameter preset not being input into the default interface, acquisition is belonged to One parameter preset of node, obtains parameter preset set, the number of the parameter preset in the parameter preset set, raw Into at least one child node for belonging to a upper node, the parameter preset in the parameter preset set is added to institute State in the corresponding input frame of child node, in all of parameter preset is added to the default interface, obtain representing described The relational tree of parameter preset and the subordinate relation.
Further, on the basis of above-mentioned each embodiment, father's node generation unit is additionally operable to obtaining institute The parameter preset not belonged in parameter preset with any parameter preset is stated, as main parameter preset, by the default ginseng of the master Before in number input to input frame corresponding to the father's node in the default interface, judge whether to be stored with according to described default The relational tree of the generation of the subordinate relation between the parameter preset of business, and the parameter preset, if so, on the default boundary The relational tree is shown on face;Operation information of the user to each node of the relational tree is obtained, according to the operation information Realize the deletion to the node corresponding to the operation information, increase or position exchange.
Further, on the basis of above-mentioned each embodiment, the acquisition module is additionally operable to, and is obtaining user by pre- If the parameter preset related to pre-set business of interface input, and before subordinate relation between the parameter preset, acquisition The identity information of the user input, is judged whether the user has and is given birth to by the default interface according to the identity information Into the authority of application programming interface, if so, then showing the default interface.
Further, on the basis of above-mentioned each embodiment, the generation module is additionally operable to in the relational tree Node, obtain by father's node visit to the path of the node, and according to the coordinates measurement by path string;Will The path string is inserted into the document related to the application programming interface for previously generating, and obtains accessing the section The application programming interface of point.
Fig. 7 is the entity structure schematic diagram of electronic equipment provided in an embodiment of the present invention, reference picture 7, including:At least one Processor (processor) 701;
And at least one memory (memory) 702, bus 703 being connected with the processor 701;Wherein,
The processor 701, memory 702 complete mutual communication by the bus 703;
The processor 701 is used to call the programmed instruction in the memory 702, to perform above-mentioned each method embodiment The method for being provided, for example, include:The parameter preset related to pre-set business that user is input into by default interface is obtained, and Subordinate relation between the parameter preset;According to the parameter preset and the subordinate relation, generation corresponds to described default The application programming interface of parameter;The instruction for checking the application programming interface is received on the default interface Afterwards, the application programming interface is exported.
The present embodiment discloses a kind of computer program product, and the computer program product includes storage in non-transient calculating Computer program on machine readable storage medium storing program for executing, the computer program includes programmed instruction, when described program instruction is calculated When machine is performed, computer is able to carry out the method that above-mentioned each method embodiment is provided, for example, include:User is obtained by default The parameter preset related to pre-set business of interface input, and the subordinate relation between the parameter preset;According to described pre- Setting parameter and the subordinate relation, application programming interface of the generation corresponding to the parameter preset;At the default interface On receive the instruction for checking the application programming interface after, export the application programming interface.
The present embodiment provides a kind of non-transient computer readable storage medium storing program for executing, the non-transient computer readable storage medium storing program for executing Storage computer instruction, the computer instruction makes the computer perform the method that above-mentioned each method embodiment is provided, example Such as include:Obtain user and pass through the parameter preset related to pre-set business that default interface is input into, and the parameter preset it Between subordinate relation;According to the parameter preset and the subordinate relation, application program of the generation corresponding to the parameter preset DLL;After the instruction for checking the application programming interface is received on the default interface, the application is exported Program Interfaces.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through Programmed instruction related hardware is completed, and foregoing program can be stored in a computer read/write memory medium, the program Upon execution, the step of including above method embodiment is performed;And foregoing storage medium includes:ROM, RAM, magnetic disc or light Disk etc. is various can be with the medium of store program codes.
The embodiments such as electronic equipment described above be only it is schematical, wherein it is described as separating component illustrate Unit can be or may not be physically separate, and the part shown as unit can be or may not be thing Reason unit, you can with positioned at a place, or can also be distributed on multiple NEs.Can select according to the actual needs Some or all of module therein is selected to realize the purpose of this embodiment scheme.Those of ordinary skill in the art are not paying wound In the case of the work of the property made, you can to understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each implementation method can Realized by the mode of software plus required general hardware platform, naturally it is also possible to by hardware.Based on such understanding, on Stating the part that technical scheme substantially contributes to prior art in other words can be embodied in the form of software product, should Computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including some fingers Order is used to so that a computer equipment (can be personal computer, server, or network equipment etc.) performs each implementation Method described in some parts of example or embodiment.
Finally it should be noted that:Various embodiments above is only used to illustrate the technical scheme of embodiments of the invention, rather than right Its limitation;Although being described in detail to embodiments of the invention with reference to foregoing embodiments, the ordinary skill of this area Personnel should be understood:It can still modify to the technical scheme described in foregoing embodiments, or to which part Or all technical characteristic carries out equivalent;And these modifications or replacement, do not make the essence disengaging of appropriate technical solution The scope of each embodiment technical scheme of embodiments of the invention.

Claims (10)

1. a kind of generation method of application programming interface, it is characterised in that including:
The parameter preset related to pre-set business that user is input into by default interface is obtained, and between the parameter preset Subordinate relation;
According to the parameter preset and the subordinate relation, application programming interface of the generation corresponding to the parameter preset;
After the instruction for checking the application programming interface is received on the default interface, export the application program and compile Journey interface.
2. the method according to claim 1, it is characterised in that the acquisition user by preset that interface is input into it is pre- If the related parameter preset of business, and the subordinate relation between the parameter preset, including:
The parameter preset not belonged in the parameter preset with any parameter preset is obtained, as main parameter preset, by institute In stating input frame corresponding to father's node that main parameter preset is input into the default interface;
The parameter preset that traversal is not input into the default interface, acquisition belongs to a parameter preset for node, obtains Parameter preset set, the number of the parameter preset in the parameter preset set, generation belongs to a upper node At least one child node, by the parameter preset in the parameter preset set be added to the corresponding input frame of the child node In, in all of parameter preset is added to the default interface, obtain representing that the parameter preset and the subordinate are closed The relational tree of system.
3. the method according to claim 2, it is characterised in that do not belong in the acquisition parameter preset with it is any The parameter preset of the parameter preset, as main parameter preset, the main parameter preset is input into the default interface Before in input frame corresponding to father's node, also include:
Judge whether the parameter preset being stored with according to the pre-set business, and subordinate relation between the parameter preset The relational tree of generation, if so, showing the relational tree on the default interface;
Operation information of the user to each node of the relational tree is obtained, is realized to the operation letter according to the operation information Deletion, increase or the position exchange of the corresponding node of breath.
4. the method according to claim 1, it is characterised in that the acquisition user by preset that interface is input into it is pre- If before the related parameter preset of business, and subordinate relation between the parameter preset, also including:
The identity information of the user input is obtained, judges whether the user has by described pre- according to the identity information If interface generates the authority of application programming interface, if so, then showing the default interface.
5. the method according to claim 3, it is characterised in that described to be closed according to the parameter preset and the subordinate System, generation corresponds to the application programming interface of the parameter preset, including:
For the node in the relational tree, obtain by father's node visit to the path of the node, and according to the road Footpath is generated path string;
The path string is inserted into the document related to the application programming interface for previously generating, must visited Ask the application programming interface of the node.
6. a kind of generating means of application programming interface, it is characterised in that including:
Acquisition module is for obtaining the parameter preset related to pre-set business that user is input into by default interface and described Subordinate relation between parameter preset;
Generation module, for according to the parameter preset and the subordinate relation, application of the generation corresponding to the parameter preset Program Interfaces;
Module is checked, after receiving the instruction for checking the application programming interface on the default interface, output The application programming interface.
7. the device according to claim 6, it is characterised in that the acquisition module includes:
Father's node generation unit, for obtaining the default ginseng not belonged in the parameter preset with any parameter preset Number, as main parameter preset, input frame corresponding to father's node that the main parameter preset is input into the default interface In;
Child node generation unit, for traveling through the parameter preset not being input into the default interface, acquisition belongs to one The parameter preset of node, obtains parameter preset set, and the number of the parameter preset in the parameter preset set, generation is returned Belong at least one child node of a upper node, the parameter preset in the parameter preset set is added to the son In the corresponding input frame of node, in all of parameter preset is added to the default interface, obtain representing described default The relational tree of parameter and the subordinate relation.
8. the device according to claim 7, it is characterised in that father's node generation unit is additionally operable to obtaining institute The parameter preset not belonged in parameter preset with any parameter preset is stated, as main parameter preset, by the default ginseng of the master Before in number input to input frame corresponding to the father's node in the default interface, judge whether to be stored with according to described default The relational tree of the generation of the subordinate relation between the parameter preset of business, and the parameter preset, if so, on the default boundary The relational tree is shown on face;Operation information of the user to each node of the relational tree is obtained, according to the operation information Realize the deletion to the node corresponding to the operation information, increase or position exchange.
9. the device according to claim 6, it is characterised in that the acquisition module is additionally operable to, passes through user is obtained Before the parameter preset related to pre-set business of default interface input, and subordinate relation between the parameter preset, obtain The identity information of the user input is taken, judges whether the user has by the default interface according to the identity information The authority of application programming interface is generated, if so, then showing the default interface.
10. the device according to claim 8, it is characterised in that the generation module is additionally operable to for the relational tree In node, obtain by father's node visit to the path of the node, and according to the coordinates measurement by path string; The path string is inserted into the document related to the application programming interface for previously generating, obtains accessing and be somebody's turn to do The application programming interface of node.
CN201611239423.4A 2016-12-28 2016-12-28 The generation method and device of a kind of application programming interface Pending CN106802797A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611239423.4A CN106802797A (en) 2016-12-28 2016-12-28 The generation method and device of a kind of application programming interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611239423.4A CN106802797A (en) 2016-12-28 2016-12-28 The generation method and device of a kind of application programming interface

Publications (1)

Publication Number Publication Date
CN106802797A true CN106802797A (en) 2017-06-06

Family

ID=58985223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611239423.4A Pending CN106802797A (en) 2016-12-28 2016-12-28 The generation method and device of a kind of application programming interface

Country Status (1)

Country Link
CN (1) CN106802797A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019071895A1 (en) * 2017-10-10 2019-04-18 平安科技(深圳)有限公司 Data processing method for multiple associated business systems, electronic device and medium
CN109656453A (en) * 2018-12-20 2019-04-19 树根互联技术有限公司 Rule editing method, apparatus and equipment
CN109976746A (en) * 2018-11-28 2019-07-05 四川商通实业有限公司 A kind of visual configuration application interface method
CN112286510A (en) * 2019-07-24 2021-01-29 深圳市应该科技有限公司 Method and device for realizing automatic programming based on API (application program interface)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133900A (en) * 2014-08-04 2014-11-05 浪潮通用软件有限公司 Definition description method of 360-degree treeview
CN104331315A (en) * 2014-10-31 2015-02-04 北京思特奇信息技术股份有限公司 Analysis and generation method and system of json object of any level
CN104954363A (en) * 2015-04-30 2015-09-30 北京嘀嘀无限科技发展有限公司 Method and device for generating interface document
CN105278946A (en) * 2015-06-12 2016-01-27 浙江大学 RESTful API visualization method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133900A (en) * 2014-08-04 2014-11-05 浪潮通用软件有限公司 Definition description method of 360-degree treeview
CN104331315A (en) * 2014-10-31 2015-02-04 北京思特奇信息技术股份有限公司 Analysis and generation method and system of json object of any level
CN104954363A (en) * 2015-04-30 2015-09-30 北京嘀嘀无限科技发展有限公司 Method and device for generating interface document
CN105278946A (en) * 2015-06-12 2016-01-27 浙江大学 RESTful API visualization method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019071895A1 (en) * 2017-10-10 2019-04-18 平安科技(深圳)有限公司 Data processing method for multiple associated business systems, electronic device and medium
CN109976746A (en) * 2018-11-28 2019-07-05 四川商通实业有限公司 A kind of visual configuration application interface method
CN109656453A (en) * 2018-12-20 2019-04-19 树根互联技术有限公司 Rule editing method, apparatus and equipment
CN112286510A (en) * 2019-07-24 2021-01-29 深圳市应该科技有限公司 Method and device for realizing automatic programming based on API (application program interface)

Similar Documents

Publication Publication Date Title
US11762717B2 (en) Automatically generating testing code for a software application
CN107003906A (en) The type of cloud computing technology part is to type analysis
CN109857668A (en) UI automated function test method, test device, test equipment and storage medium
US9948679B2 (en) Object-relation user interface for viewing security configurations of network security devices
CN106802797A (en) The generation method and device of a kind of application programming interface
CN103761189B (en) Test case management method and system
CN106104472A (en) Specify logic checking rule and logic checking rule is applied to data
CN104123227A (en) Method for automatically generating testing cases
CN106648556A (en) Front end and back end integrated development testing method and device
CN108038052A (en) Automatic test management method, device, terminal device and storage medium
US8326868B2 (en) Web-enabled database access tools
CN107741903A (en) Application compatibility method of testing, device, computer equipment and storage medium
CN105955888A (en) Page debugging and previewing method and system
CN110377522A (en) The test method for scene of trading, calculates equipment and medium at device
CN108132887A (en) User interface method of calibration, device, software testing system, terminal and medium
CN104375943A (en) Embedded software black-box test case generation method based on static models
CN106959952B (en) Obtain the method and device of product object
CN107679141A (en) Data storage method, device, equipment and computer-readable recording medium
CN108009806A (en) Charging regulation collocation method, data system for settling account and computer-readable recording medium
CN108255702A (en) A kind of test case creation method, apparatus, equipment and storage medium
CN109347866A (en) Login method, device, system and computer readable storage medium
CN108255706A (en) Edit methods, device, terminal device and the storage medium of automatic test script
CN107122295A (en) The generation method and device of test case script
BR112021009093A2 (en) website development system, and method for a website development system
CN104239212B (en) Query method and device of test case and establishment method and device of test case

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170606

WD01 Invention patent application deemed withdrawn after publication