CN104866383B - A kind of interface call method, device and terminal - Google Patents

A kind of interface call method, device and terminal Download PDF

Info

Publication number
CN104866383B
CN104866383B CN201510289070.8A CN201510289070A CN104866383B CN 104866383 B CN104866383 B CN 104866383B CN 201510289070 A CN201510289070 A CN 201510289070A CN 104866383 B CN104866383 B CN 104866383B
Authority
CN
China
Prior art keywords
interface
parameter
call
request
calling
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
Application number
CN201510289070.8A
Other languages
Chinese (zh)
Other versions
CN104866383A (en
Inventor
刘争辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Seal Interest Technology Co Ltd
Original Assignee
Kingsoft Corp 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 Kingsoft Corp Ltd filed Critical Kingsoft Corp Ltd
Priority to CN201510289070.8A priority Critical patent/CN104866383B/en
Publication of CN104866383A publication Critical patent/CN104866383A/en
Application granted granted Critical
Publication of CN104866383B publication Critical patent/CN104866383B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Abstract

The embodiment of the invention discloses a kind of interface call method and terminals, including:Receiving interface call request, the interface call request carry the corresponding interface identifier of target interface and interface parameters that client script needs to call;According to the interface identifier, the method for calling of the target interface is determined;According to the method for calling and the interface parameters, the first parameter in the input parameter of the corresponding target interface function of the target interface is determined;Using the request of interface call request mark and first parameter as the input parameter of the target interface function, the target interface function is called;The output parameter for calling and returning after the target interface function is obtained, the output parameter includes the request mark and the second parameter;Based on second parameter, the call result that the request identifies corresponding interface call request is returned into the client script.Using the embodiment of the present invention, the development efficiency of expansion interface can be improved.

Description

A kind of interface call method, device and terminal
Technical field
The present invention relates to field of computer technology more particularly to a kind of interface call methods, device and terminal.
Background technique
With the development of internet technology, browser has become one of application software indispensable on mobile terminal, passes through shifting When browser in dynamic terminal browses webpage, browser kernel is explained and is rendered to webpage grammer.In general, browser kernel It provides some standard interfaces to use or call for client script, therefore, by loading client script in webpage, by browsing Device, which is explained, executes the client script, and the Dynamic Display effect of webpage may be implemented, enhance the interactivity of webpage.Such as:It realizes The Special Effect Show of page elements responds to users action, verifies form data etc..
However, the standard interface that browser kernel itself provides is limited, therefore, for the exploitation demand for meeting Web page, open Hair personnel need to develop more expansion interfaces as needed, so that the client script of Web page calls.Currently, due to opening Send out expansion interface standard disunity, it is a kind of uniformly come handle client script call arbitrary extension interface interface tune With method, therefore, developer not only needs when developing expansion interface for Functional Design one provided by the expansion interface A interface function, but also need to design the processing method that client script calls the interface for the expansion interface.Such as: Existing interface exploitation method is as shown in Figure 1a, development interface A and when interface B, except the interface function and interface for developing interface A Outside the interface function of B, also needs call method when developing a set of script calling interface A for interface A and develop one for interface B Call method when script calling interface B is covered, causes development efficiency low.
Summary of the invention
The embodiment of the present invention provides a kind of interface call method, device and terminal, and the exploitation effect of expansion interface can be improved Rate.
In a first aspect, the embodiment of the present invention provides a kind of interface call method, including:
Receiving interface call request, the interface call request carry the target interface pair that client script needs to call The interface identifier and interface parameters answered, the target interface are one of expansion interface provided by browser;
According to the interface identifier, the method for calling of the target interface is determined;
According to the method for calling and the interface parameters, the defeated of the corresponding target interface function of the interface identifier is determined Enter the first parameter in parameter;
Using the request of interface call request mark and first parameter as the input of the target interface function Parameter calls the target interface function;
The output parameter for calling and returning after the target interface function is obtained, the output parameter includes the request mark With the second parameter;
Based on second parameter, the call result that the request identifies corresponding interface call request is returned to described Client script.
In the first possible implementation of the first aspect, the data type of the output parameter is preset first Data type;
It is described according to the method for calling and the interface parameters, determine the corresponding target interface function of the target interface Input parameter in the first parameter after, the method also includes:
First parameter is formatted, the data type of the first parameter after converting is preset second data Type;
Described to obtain the output parameter for calling and returning after the target interface function, the output parameter includes the request After mark and the second parameter, the method also includes:
Second parameter is formatted, the data type of the second parameter after converting is preset third data Type.
With reference to first aspect or the first possible implementation of first aspect, second in first aspect are possible It is described according to the method for calling and the interface parameters in implementation, determine the corresponding target interface of the target interface The first parameter in the input parameter of function includes:
If the method for calling is synchronization call, the input that the interface parameters is determined as the target interface function is joined The first parameter in number;
If the method for calling is asynchronous call, the other parameters in the interface parameters in addition to parameter preset are determined as The first parameter in the input parameter of the target interface function, the parameter preset is for identifying call back function.
With reference to first aspect or the first possible implementation of first aspect, the third in first aspect are possible It is described to be based on second parameter in implementation, the call result that the request identifies corresponding interface call request is returned Include back to the client script:
If the method for calling is synchronization call, second parameter is identified into corresponding interface as the request and is called The call result of request returns to the client script;
If the method for calling is asynchronous call, determine that the request identifies corresponding target call back function, and will be described Input parameter of second parameter as the target call back function runs the target call back function and is exported as a result, in turn The client script is returned to using the output result as the call result of the interface call request.
The third possible implementation with reference to first aspect, in the 4th kind of possible implementation of first aspect In, it is described according to the interface identifier, after the method for calling for determining the target interface, the method also includes:
If the method for calling is asynchronous call, callback information is saved into callback data library, the callback information packet Include the call back function that the request mark is identified with the parameter preset;
The determination request identifies corresponding target call back function, including:
If the method for calling is asynchronous call, asked according to the inquiry from the callback data library of request mark Seek the corresponding callback information of mark;
The call back function that the callback information is specified is determined as target call back function.
The 4th kind of possible implementation with reference to first aspect, in the 5th kind of possible implementation of first aspect In, the call result that second parameter is identified corresponding interface call request as the request returns to the visitor After the end feet sheet of family, the method also includes:
It deletes request described in the callback data library and identifies corresponding callback information.
With reference to first aspect or the first possible implementation of first aspect, the 6th kind in first aspect are possible It is described according to the interface identifier in implementation, determine that the method for calling of the target interface includes:
According to the interface identifier, the corresponding interface message of the interface identifier is inquired from preset interface database, The interface message includes interface identifier and method of calling;
The corresponding method of calling of the interface identifier in the interface database is determined as to the called side of the target interface Formula.
Second aspect, the embodiment of the present invention provide a kind of interface calling device, including:
Receiving module, is used for receiving interface call request, and the interface call request carries client script and needs to adjust The corresponding interface identifier of target interface and interface parameters, the target interface be browser provided by expansion interface it One;
Mode determining module, for determining the method for calling of the target interface according to the interface identifier;
Parameter determination module, for determining that the interface identifier is corresponding according to the method for calling and the interface parameters Target interface function input parameter in the first parameter;
Calling module, for being connect using the request of interface call request mark and first parameter as the target The input parameter of mouth function, calls the target interface function;
Module is obtained, for obtaining the output parameter for calling and returning after the target interface function, the output parameter packet Include the request mark and the second parameter;
The request is identified the calling of corresponding interface call request for being based on second parameter by return module As a result the client script is returned to.
In the first possible implementation of the second aspect, the data type of the output parameter is preset first Data type, described device further include:
First conversion module, for first parameter to be formatted, the data class of the first parameter after conversion Type is preset second data type;
Second conversion module, for second parameter to be formatted, the data class of the second parameter after conversion Type is preset third data type.
In conjunction with the possible implementation of the first of second aspect or second aspect, second in second aspect is possible In implementation, the parameter determination module is specifically used for:
If the method for calling is synchronization call, the input that the interface parameters is determined as the target interface function is joined The first parameter in number;
If the method for calling is asynchronous call, the other parameters in the interface parameters in addition to parameter preset are determined as The first parameter in the input parameter of the target interface function, the parameter preset is for identifying call back function.
In conjunction with the possible implementation of the first of second aspect or second aspect, the third in second aspect is possible In implementation, the return module includes:
Synchronous return unit identifies if the method for calling is synchronization call using second parameter as the request The call result of corresponding interface call request returns to the client script;
Asynchronous return unit determines that the request identifies corresponding target readjustment if the method for calling is asynchronous call Function, and using second parameter as the input parameter of the target call back function, it runs the target call back function and obtains Output is as a result, return to client's end feet using the output result as the call result of the interface call request in turn This.
In conjunction with the third possible implementation of second aspect, in the 4th kind of possible implementation of second aspect In, described device further includes:
Preserving module saves callback information into callback data library, institute if being asynchronous call for the method for calling Stating callback information includes the request mark and the call back function that the parameter preset is identified;
The synchronous return unit is specifically used for:
If the method for calling is asynchronous call, asked according to the inquiry from the callback data library of request mark Seek the corresponding callback information of mark;
The call back function that the callback information is specified is determined as target call back function.
In conjunction with the 4th kind of possible implementation of second aspect, in the 5th kind of possible implementation of second aspect In, described device further includes:
Removing module identifies corresponding callback information for deleting request described in the callback data library.
In conjunction with the 5th kind of possible implementation of second aspect or second aspect, the 6th kind in second aspect is possible In implementation, the mode determining module is specifically used for:
According to the interface identifier, the corresponding interface message of the interface identifier is inquired from preset interface database, The interface message includes interface identifier and method of calling;
The corresponding method of calling of the interface identifier in the interface database is determined as to the called side of the target interface Formula.
The third aspect, the embodiment of the present invention provide a kind of terminal, which is characterized in that call and fill including interface as described above It sets.
In the embodiment of the present invention, receiving interface call request, the interface call request carries client script needs The corresponding interface identifier of the target interface of calling and interface parameters, the target interface be browser provided by expansion interface it One;According to the interface identifier, the method for calling of the target interface is determined;Joined according to the method for calling and the interface Number, determines the first parameter in the input parameter of the corresponding target interface function of the interface identifier;Interface calling is asked The request mark and input parameter of first parameter as the target interface function asked, call the target interface letter Number;Obtain the output parameter for calling and returning after the target interface function, the output parameter includes the request mark and the Two parameters;Based on second parameter, the call result that the request identifies corresponding interface call request is returned to described Client script.Using the embodiment of the present invention, called by the design and interface of normalized interface function, browser can use Unified interface call method realizes the client script to the calling of any expansion interface.To which developer develops extension When interface, the corresponding interface function of the expansion interface only need to be developed, the development efficiency of expansion interface can be improved.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, for ability For the those of ordinary skill of domain, without creative efforts, it can also be obtained according to these attached drawings other attached Figure.
Fig. 1 a is the schematic diagram that a kind of interface that existing method provides calls;
Fig. 1 is a kind of flow diagram of interface call method provided in an embodiment of the present invention;
Fig. 1 b is the schematic diagram that a kind of interface that Fig. 1 is provided calls;
Fig. 2 is a kind of another flow diagram of interface call method provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of interface calling device provided in an embodiment of the present invention;
Fig. 4 is a kind of another structural schematic diagram of interface calling device provided in an embodiment of the present invention;
Fig. 4 a is the structural schematic diagram for one of return module that Fig. 4 is provided;
Fig. 5 is a kind of another structural schematic diagram of interface calling device provided in an embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of terminal provided in an embodiment of the present invention;
Fig. 7 is a kind of another structural schematic diagram of interface calling device provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that the described embodiments are merely a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention provides a kind of interface call method, device and terminals, below in conjunction with attached drawing 1- attached drawing 7 It describes in detail respectively to a kind of interface call method provided in an embodiment of the present invention, device and terminal.
Referring to Figure 1, Fig. 1 is a kind of flow diagram of interface call method provided in an embodiment of the present invention, in this hair In bright embodiment, this method be may comprise steps of.
S101:Receiving interface call request, the interface call request carry the target that client script needs to call The corresponding interface identifier of interface and interface parameters, the target interface are one of expansion interface provided by browser.
Described method can be used for the browser in terminal or the production similar to browser in embodiments of the present invention In product, the terminal can be the terminals such as computer, IPAD, mobile phone, be also possible to other smart machines, specifically, of the invention Embodiment is not intended to be limited in any.
In general, the Dynamic Display effect of horn of plenty webpage, enhances the interactivity of webpage and user, browser is provided to webpage A large amount of interfaces are called for the client script loaded in webpage, and browser-interpreted executes the client script.Such as:Browsing When device receives the interface call request of client script, information meaning is run according to the information that the interface call request carries The corresponding interface function of fixed target interface, to realize corresponding function.Therefore, browser is during loading webpage, If the expansion interface that the client script in webpage needs that browser is called to provide, receiving interface call request.
S102:According to the interface identifier, the method for calling of the target interface is determined.
The method of calling of interface includes synchronization call and asynchronous call, wherein synchronization call is a kind of block type calling, is adjusted It is just returned after waiting called side to be finished with side, belongs to unidirectional calling;Asynchronous call is a kind of two-way calling, is similar to Operation requests only occur for the treatment mechanism of message or event, called side, and not etc. called side is not finished and returns immediately, are adjusted The call back function (callback) for actively calling called side to provide after being finished with side, returns to calling for implementing result Side, therefore, asynchronous call can promote the efficiency that browser executes webpage.In general, developer develops connecing for expansion interface After mouth function, the method for calling of the interface can be preset according to the function that expansion interface is realized.For example, it is assumed that client's end feet When this calling interface A, i.e. executable subsequent operation is returned the result without interface A, then is the operational efficiency for improving webpage, it can be with Asynchronous call is set by the method for calling of interface A, thus, there are one in the interface parameters of interface A to indicate call back function Parameter, the parameter is unrelated with the concrete function that interface needs to realize, for returning to the operation result of interface.For another example assuming visitor When end feet this calling interface B of family, the premise of interface B returned the result as subsequent operation can then be set the method for calling of interface B It is set to synchronization call.
As an example, it can be the interface message that record in preset interface database has expansion interface, it is described to connect Message breath includes interface identifier and method of calling, and the interface identifier can be the interface name of interface function, be also possible to Interface name other identifiers correspondingly, specifically, the embodiment of the present invention is with no restriction;Method of calling includes synchronization call And asynchronous call.For convenience of description, it is assumed that interface identifier is interface name, and provided expansion interface has 3, then interface data The storage form in library can be as shown in table 1, and table 1 is that the embodiment of the present invention provides a kind of storage signal of interface database.
Table 1
Interface identifier Method of calling
recordHistory Asynchronous call
downloadUrl Asynchronous call
playAudio Synchronization call
As known from Table 1, in the expansion interface provided by browser, interface identifier be respectively " recordHistory " and Method of calling corresponding to the interface of " downloadUrl " is asynchronous call, and interface identifier is right for the interface of " playAudio " The method of calling answered is synchronization call.It therefore, can be according to interface entrained in interface call request in the embodiment of the present invention Mark, inquires the method for calling of the corresponding target interface of the interface identifier from interface database.
As another example, it is also possible in interface parameters entrained by interface call request include that mark target connects The parameter of the method for calling of mouth.Such as:It assume that first in interface parameters parameter is used to indicate the calling of target interface Mode indicates synchronization call with " 1 ", indicates that asynchronous call indicates the parameter of the method for calling of target interface certainly with " 0 " It can be parameter located in other position in interface parameters, indicate that the specific value of method of calling is also possible to other characters, The embodiment of the present invention is with no restriction.But based on this it is assumed that can be determined according to the specific value of first parameter in interface parameters The method of calling of target interface can determine the calling of the corresponding target interface of interface identifier if getting the parameter is " 1 " Mode is synchronization call;If " 0 ", then it can determine that the method for calling of the corresponding target interface of interface identifier is asynchronous call. It is worth noting that the embodiment of the present invention to the concrete form of the parameter of the method for calling of spotting interface with no restriction, in advance First appoint calibration rule.It, can be according to interface parameters entrained in interface call request, really in the embodiment of the present invention Determine the method for calling of the corresponding target interface of the interface identifier.For convenience of the explanation of subsequent step, the embodiment of the present invention is with For a kind of example.
S103:According to the method for calling and the interface parameters, the corresponding target interface letter of the interface identifier is determined The first parameter in several input parameters.
Since browser has differences when handling the interface call request of asynchronous call and synchronization call respectively, asynchronous tune With needing called side to provide the parameter of a mark call back function, the side that is called returns to mesh by the call back function after being finished Mark the implementing result of interface function;Synchronization call is the execution that called side directly returns to target interface function after being finished As a result.Therefore, if method of calling is asynchronous call, there are one in interface parameters entrained by interface call request to be identified back The parameter preset of letter of transfer number (callback), the parameter preset are provided by called side, and the side that is called is responsible for calling the parameter preset The call back function of mark.
In the embodiment of the present invention, the mode for the client script calling interface that standardizes, for example, indicating synchronization call and asynchronous The script of calling can be as shown in code 1.
Code 1
// synchronization call, operating result are obtained by return value
function syncInterface(arg1,arg2,......);
// asynchronous call, operating result are obtained by call back function callback
function asyncInterface(arg1,arg2,......,callback);
// call back function specification
function asyncCallback(Object);
The specification of script calling interface from code 1 as can be seen that the embodiment of the present invention has been standardized, wherein interface parameters The number and data type of (arg1, arg2 etc.) are set according to actual needs.It, can will be in interface parameters in asynchronous call The last one parameter is used to indicate the parameter of call back function, it is of course also possible to be ginseng located in other position in interface parameters Number, specifically, the embodiment of the present invention with no restriction, reaches agreement in advance.Call back function in asynchronous call will be for that will adjust With result notice to client script, wherein the specification of call back function is also listed in code 1, it receives an input parameter, The type of input parameter can be the general data type of script support, such as:Object object.
In the embodiment of the present invention, if method of calling be synchronization call, according to interface call request carry interface parameters, The first parameter in the input parameter that the interface parameters is the corresponding target interface function of target interface can be directly determined.If adjusting It is asynchronous call with mode, then the interface parameters carried according to interface call request determines in the interface parameters except parameter preset Outer other parameters are the first parameter in the input parameter of the corresponding target interface function of target interface, wherein parameter preset For identifying call back function, the corresponding call back function of each parameter preset.
S104:Using the request of interface call request mark and first parameter as the target interface function Parameter is inputted, the target interface function is called.
In the specific implementation, being connect using the request of interface call request mark and first parameter as the target The input parameter of mouth function before calling the target interface function, can determine the request mark of the interface call request. Further, it is contemplated that browser is during loading webpage, the case where existing while handle multinomial interface call request, Therefore, each interface call request of client script calling interface is demarcated using request mark, request mark is right with it All information associations for the interface call request answered, the information include the interface identifier of the interface call request, interface parameters, Call result etc., thus, each interface call request and call result are tracked by request mark.In the embodiment of the present invention, After receiving interface call request, the request mark of the interface call request is determined, wherein request mark can be in browser Core receives to be distributed when interface call request automatically.It is found that request mark uniquely one interface call request of calibration, and Request mark is associated with interface identifier entrained by this interface call request and interface parameters.
In the embodiment of the present invention, the design method of interface function is standardized, i.e., each interface function receives one One of parameter of the request mark as input parameter, and the request is identified also as one of ginseng of output parameter Number.Such as:One of parameter by request mark as the input parameter of interface function, i.e. input parameter include request mark With the first parameter;One of parameter by request mark as the output parameter of interface function, i.e. output parameter include asking Ask mark and the second parameter, request mark and the second parameter association.To obtain the interface letter after interface function is finished Several output parameters, output parameter is identified including request and the second parameter, and it is associated to distinguish request mark by request mark Second parameter is the call result of which interface call request.
In the specific implementation, the input that request identifies target interface function corresponding as target interface with the first parameter is joined Number, calls the target interface function, that is, runs the target interface function.
S105:The output parameter for calling and returning after the target interface function is obtained, the output parameter includes described asks Ask mark and the second parameter.
In the embodiment of the present invention, the output parameter of interface function includes request mark and the second parameter, wherein the second parameter It is used to return to the parameter of client script after realizing interface function for the interface function, request mark is used to identify second ginseng Number is the call result of which interface call request of client script.
In the specific implementation, being returned after the acquisition calling target interface function defeated after target interface function operation Parameter out, the output parameter include the request mark and the second parameter.
S106:Based on second parameter, the call result that the request identifies corresponding interface call request is returned To the client script.
As an example, if method of calling is synchronization call, calling knot is returned since called side needs to wait for called side Subsequent operation is just executed after fruit, it is therefore, the second parameter is straight as the call result of the corresponding interface call request of request mark It connects and returns to called side, wherein request mark and second parameter association.
As another example, if method of calling is asynchronous call, adjusted since called side is returned without waiting for called side With that can continue to execute subsequent operation after result, call result returns to called side by call back function.Therefore, being called side will Input parameter of second parameter as call back function returns to request by way of calling the call back function and identifies corresponding interface The call result of call request is to called side, wherein request mark and second parameter association, call back function are request mark pair The parameter preset demarcated in interface parameters entrained by the interface call request answered.It should be understood that called side is client's end feet This, the side that is called is browser.To which the call result of interface call request is returned to client script, completes interface It calls.
For convenience of description, the method for the present invention can be interpreted as to interface middle layer, as shown in Figure 1 b, Fig. 1 b is Fig. 1 offer A kind of interface call schematic diagram.Browser is during executing webpage, if the client script in webpage needs to call The expansion interface that browser provides, then interface middle layer receiving interface call request carry client in the interface call request The corresponding interface identifier of the target interface that this needs of end feet call and interface parameters, wherein target interface is provided by browser Expansion interface in any expansion interface;Using the corresponding target interface function of above method invocation target interface, and should The operation result of target interface function returns to client script as the call result of the interface call request.To lead to The call flow that interface is uniformly processed in the interface middle layer is crossed, developer need to only connect when developing expansion interface for extension Mouth develops corresponding interface function, without designing the call method of a set of interface, drop for each expansion interface Low workload improves development efficiency.
In the interface call method of description of the embodiment of the present invention, receiving interface call request, the interface call request The corresponding interface identifier of target interface and interface parameters that client script needs to call are carried, the target interface is browsing One of expansion interface provided by device;According to the interface identifier, the method for calling of target interface is determined;According to the called side Formula and the interface parameters determine the first parameter in the input parameter of the corresponding target interface function of the target interface;It will The request mark and input parameter of first parameter as the target interface function of the interface call request, call institute State target interface function;The output parameter for calling and returning after the target interface function is obtained, the output parameter includes described Request mark and the second parameter;Based on second parameter, the request is identified to the calling knot of corresponding interface call request Fruit returns to the client script.Using the embodiment of the present invention, called by the design and interface of normalized interface function, it is clear Device of looking at can realize client script to the calling of any expansion interface using unified interface call method.To exploitation When staff development expansion interface, the corresponding interface function of the expansion interface need to be only developed, improves development efficiency.
Fig. 2 is referred to, Fig. 2 is a kind of another flow diagram of interface call method provided in an embodiment of the present invention, In the embodiment of the present invention, this method be may comprise steps of.
S201:Receiving interface call request, the interface call request carry the target that client script needs to call The corresponding interface identifier of interface and interface parameters.
S202:According to the interface identifier, the method for calling of the target interface is determined.
In the specific implementation, determining the called side of the target interface according to the interface call request target interface to be called Formula, the method for calling include synchronization call and asynchronous call.In general, the interface message of each interface is stored in advance in interface data In library, the interface message includes interface identifier and method of calling.When browser receives the interface call request, according to this The interface identifier carried in interface call request inquires the corresponding interface message of the interface identifier, interface from interface database Information includes interface identifier and method of calling;To which the corresponding method of calling of the interface identifier in interface database is determined as The method of calling of target interface.Certainly, when the method for calling of target interface is also possible to client script and calls the target interface, It is demarcated in the interface parameters of interface call request, specifically, the embodiment of the present invention is with no restriction.
But as a preferred embodiment, determine that the method for calling of target interface can be according to interface identifier, from The corresponding interface message of the interface identifier is inquired in preset interface database, the interface message includes interface identifier and calling Mode;The corresponding method of calling of the interface identifier inquired from interface database is determined as to the tune of the target interface Use mode.
S203:According to the method for calling and the interface parameters, the corresponding target interface letter of the interface identifier is determined The first parameter in several input parameters.
In the embodiment of the present invention, asynchronous call needs client script to carry a mark call back function in interface parameters The parameter for identifying call back function is known as parameter preset for convenience of describing by parameter.For example, the interface of asynchronous call can be joined The last one parameter in number is used to store parameter preset, it is of course also possible to which parameter preset is arranged in interface according to making an appointment Other positions in parameter, specifically, the embodiment of the present invention is with no restriction.In one implementation, however, it is determined that go out called side Formula is asynchronous call, obtains the parameter preset for identifying call back function in interface parameters, callback information is saved to preset readjustment In database, the callback information includes the request mark and the call back function that the parameter preset is identified, certainly, readjustment Information can also include the other information such as environmental variance required when running the call back function, specifically, the embodiment of the present invention is not It is restricted.To when subsequent step (for example, step S208) being facilitated to return to the call result of asynchronous call, according to invocation target Request mark in the output parameter returned after interface function, the request is inquired from the callback data library and identifies corresponding target Call back function.
As an example, indicate that the script of synchronization call and asynchronous call can be such as 1 institute of code in above-described embodiment Show.It is found that the interface parameters of synchronization call is parameter required for the corresponding target interface function of target interface, asynchronous interface Interface parameters in be used to indicate the parameter preset (callback) of call back function in the corresponding target interface function of target interface In do not need, but after target interface function operation, need to call call back function represented by the parameter preset, return and adjust With result.In the embodiment of the present invention, the corresponding mesh of target interface is determined according to the method for calling of target interface and interface parameters Mark the first parameter in the input parameter of interface function.In the specific implementation, interface calling is asked if method of calling is synchronization call The interface parameters of carrying is asked to be determined as the first parameter in the input parameter of the corresponding target interface function of target interface;If adjusting It is asynchronous call with mode, the other parameters in interface parameters that interface call request carries in addition to parameter preset is determined as mesh Mark the first parameter in the input parameter of interface function, wherein parameter preset is for identifying call back function, each parameter preset pair Answer a call back function.
S204:First parameter is formatted, the data type of the first parameter after converting is preset Two data types.
It since current browser is mostly multi-core browser, i.e., include two or more browsers in browser Kernel, existing method need to all design one for each browser kernel when for multi-core browser exploitation expansion interface Interface function identical with the function that the expansion interface to be realized, not only development cost is high, but also due to different browsers Kernel is different to the design specification of interface function, and different browser kernels is directed to the interface that identical interface identifier is called Function is different, causes interface call flow complicated, thus, the low efficiency of calling interface.
In the embodiment of the present invention, the design specification of interface function is adopted regardless of which type of browser kernel be directed to With identical specification come design interface function.For example, the design specification of interface function can be as shown in code 2, in addition interface When function, developer need to only realize corresponding function according to the specification.It is worth noting that code 2 is merely illustrative, The present invention is not limited to the examples.
// interface function specification, id indicate request mark corresponding with interface call request, and it is incoming that kv_map saves script Parameter
Value InterfaceFunction(int id,KeyValueMap kv_map);
In this specification, id is request mark, for tracking the interface call request and call result;The of interface function The data type of one parameter kv_map is preset second data type, and second data type can be use predetermined In the type of data structure for receiving any type data, the general data class being also possible in the included database of programming language Type, the data type can receive the data of any data type.Such as:KeyValueMap type or Value type, specifically , the embodiment of the present invention is with no restriction.For convenience of description, the embodiment of the present invention is with the second data type for KeyValueMap class For type, but it should be stated that, being not intended to limit the second data type is KeyValueMap type.Wherein, KeyValueMap Or Value is a kind of data type, the type can be used to save a variety of different types of data, example as storage tank Such as:Integer, floating number, character string etc..Specifically, KeyValueMap is a kind of key-value (Key-Value) mapping table, it should The one-to-one relationship of key (Key) and value (Value) is saved in mapping table, key (Key) can be digital (sequence of parameter) Or character string (title of parameter), value (Value) are the occurrences that some key is corresponded in parameter.
In the embodiment of the present invention, identified first parameter is formatted, the data of the first parameter after conversion Type is preset second data type.Needed before the corresponding target interface function of invocation target interface scripts pass into The first parameter come is converted, such as by the first Parameter Switch at a KeyValueMap object.
For convenience of description, it is assumed that client script is intended to call the interface of an addition web-page histories record, and the interface Method of calling is asynchronous call, then the interface specification that client script provides can be:function recordHistory (url, date, callback), first parameter indicate to need the network address (url, it is assumed that be http of incoming webpage:\\ Www.liebao.cn), second parameter indicates to need the time (time, it is assumed that be 2014-07-2020 of incoming access:00: 00), the last one parameter is script function object, which and is used in interface letter not as the parameter of calling interface function Number notifies script after operating successfully, and therefore, step S103 first parameter according to determined by interface parameters does not include by the parameter. After identified first parameter is formatted, the first parameter of the KeyValueMap type after being converted can be as Shown in table 2, table 2 is a kind of signal of second data type provided in an embodiment of the present invention.
Table 2
To can pass through after guaranteeing the interface call request that different browser kernels receives client script First Parameter Switch is the identical parameter of data type by this step, is realized to the data type of the input parameter of interface function Unified, therefore, developer need to only design an interface function when developing a socket for multi-core browser.
S205:Using the request of interface call request mark and first parameter as the target interface function Parameter is inputted, the target interface function is called.
In the specific implementation, being connect using the request of interface call request mark and first parameter as the target The input parameter of mouth function before calling the target interface function, can determine the request mark of the interface call request. In view of browser is during loading webpage, the case where existing while handle multinomial interface call request, therefore, use Request identifies to demarcate each interface call request of client script calling interface, which identifies corresponding interface tune With all information associations of request, the information includes the interface identifier of the interface call request, interface parameters, call result Deng, thus, each interface call request and call result are tracked by request mark.In the embodiment of the present invention, receive After mouth call request, the request mark of the interface call request is determined, wherein request mark can be browser kernel and receive It is distributed automatically when interface call request.It is found that request mark uniquely one interface call request of calibration, and request mark It is associated with interface identifier entrained by this interface call request and interface parameters.
In general, the relevant information of the interface is stored in preset interface after developer develops a set of expansion interface In database, wherein the relevant information of interface includes interface identifier and interface function, and the interface identifier can be interface name Claim.If developer has been provided for target interface specified by interface call request, connect by what is carried in interface call request Mouthful mark can be found in preset information bank one uniquely with the matched interface function of the interface identifier.The present invention is real It applies in example, according to the interface identifier carried in interface call request, whether there is and the interface mark in query interface database Know matched interface function.If it exists, illustrate that browser provides target interface specified by the interface identifier, called according to interface The first parameter after requesting corresponding request mark and conversion runs found target interface function;If it does not exist, explanation Browser does not provide the target interface, then returns to preset error message.
If inquire in interface database exist with the matched target interface function of interface identifier, will request mark and step Input parameter of first parameter as the target interface function found after converting in rapid S204, calls the target interface letter Number.In other words, the first parameter after request being identified and converted substitutes into found target interface function, runs or holds The found target interface function of row.To after the embodiment of the present invention, adopt for different browser kernels With unified specification calling interface function, the mode of different browser kernel calling interfaces is identical, calling interface it is high-efficient, The execution efficiency of webpage is also improved.
S206:The output parameter for calling and returning after the target interface function is obtained, the output parameter includes described asks Mark and the second parameter are asked, the data type of the output parameter is preset first data type.
After the corresponding target interface function of invocation target interface, the output called and returned after the target interface function is obtained Parameter, the output parameter include request mark and the second parameter, and the data type of the output parameter is preset the One data type, wherein the second parameter is used to indicate the operation result of target interface function.In the specific implementation, first number It can be the data type predetermined for being used to receive any type data according to type, be also possible to the included number of programming language According to the general data type in library, which can receive the data of any data type.Such as:KeyValueMap class Type or Value type, specifically, the embodiment of the present invention is with no restriction.For convenience of description, in code 2 or the embodiment of the present invention with First data type be Value type for, but the embodiment of the present invention be not intended to limit the first data type be Value type.From And developer is when developing expansion interfaces for different browser kernel, and it only need to be according to one interface function of Specification Design, nothing An interface function, and the tune without designing the corresponding interface of the interface function need to be separately designed for different browser kernels With method, development cost can be not only reduced, but also improves development efficiency.
It is worth noting that in the concrete realization, the data type for being also possible to the second parameter is preset first data Type, the data type of the output parameter of interface function are structural body, which includes request mark and the second parameter.Example Such as, by taking the first data type is Value type as an example, the specification of structural body can be as shown in code 3.
Code 3
struct InterfaceResult
{
Value val;
int id;
};
S207:Second parameter is formatted, the data type of the second parameter after converting is preset Three data types.
As a preferred embodiment, by the output parameter returned after accessed invocation target interface function The second parameter format, the data type of the second parameter after converting is preset third data type.Wherein, Three data types can be the type of data structure predetermined for being used to receive any type data, be also possible to client's end feet General data type in this language, for example, Object object, specifically, the embodiment of the present invention is with no restriction.Thus to returning Standardization processing is carried out back to the call result of client script, improves the execution efficiency of script.It is worth noting that can also be with It is not formatted for the second parameter, skips this step and execute step S208.
S208:Based on second parameter, the call result that the request identifies corresponding interface call request is returned To the client script.
According to the method for calling of target interface, corresponding interface is identified using the second parameter as the request in the output parameter The call result of call request returns to the client script.In the specific implementation, if the method for calling of target interface is to synchronize It calls, the tune of corresponding interface call request is identified using the second parameter or the second parameter after format is converted as the request The client script is returned to result;If the method for calling is asynchronous call, is identified according to the request, determine that this is asked The corresponding target call back function of mark is sought, adjusts back letter using the second parameter or the second parameter after format is converted as the target Several input parameters runs the target call back function and is exported as a result, in turn using the output result as the interface The call result of call request returns to client script.
In one embodiment, if method of calling is asynchronous call, it is determined that the request identifies corresponding target readjustment The mode of function can be:It is identified according to the request, the request is inquired from the callback data library and is identified corresponding time Adjust information;The call back function that the callback information is specified is determined as target call back function.Meanwhile if getting the callback information In be stored with the other information for running the target call back function, then current environmental variance is set according to these information, is guaranteed just The target call back function is often run, call result is notified to client script.
As a kind of feasible embodiment, after call result is returned to client script, the callback data is deleted Request described in library identifies corresponding callback information.To reduce data volume, improve the search efficiency of target call back function.
In the interface call method of description of the embodiment of the present invention, receiving interface call request, the interface call request The corresponding interface identifier of target interface and interface parameters that client script needs to call are carried, the target interface is browsing One of expansion interface provided by device;According to the interface identifier, the method for calling of target interface is determined;According to the called side Formula and the interface parameters determine the first parameter in the input parameter of the corresponding target interface function of the target interface;It will The request mark and input parameter of first parameter as the target interface function of the interface call request, call institute State target interface function;The output parameter for calling and returning after the target interface function is obtained, the output parameter includes described Request mark and the second parameter;Based on second parameter, the request is identified to the calling knot of corresponding interface call request Fruit returns to the client script.Using the embodiment of the present invention, called by the design and interface of normalized interface function, it is clear Device of looking at can realize client script to the calling of any expansion interface using unified interface call method.To exploitation When staff development expansion interface, the corresponding interface function of the expansion interface need to be only developed, improves development efficiency.
The following is an embodiment of the apparatus of the present invention, and apparatus of the present invention embodiment and embodiment of the present invention method belong to same structure Think, for executing method described in embodiment of the present invention method.For ease of description, apparatus of the present invention embodiment only show with The relevant part of apparatus of the present invention embodiment, it is disclosed by specific technical details, the description of embodiment of the present invention method is please referred to, It no longer repeats one by one herein.
Fig. 3 is referred to, Fig. 3 is a kind of structural schematic diagram of interface calling device provided in an embodiment of the present invention, in this hair In bright embodiment, the apparatus may include:Receiving module 101, parameter determination module 103, calls mould at mode determining module 102 Block 104 obtains module 105 and return module 106.
Receiving module 101, is used for receiving interface call request, and the interface call request carries client script needs The corresponding interface identifier of the target interface of calling and interface parameters, the target interface are in expansion interface provided by browser Any expansion interface.
Mode determining module 102, for determining the method for calling of the target interface according to the interface identifier.
Parameter determination module 103, for determining the target interface pair according to the method for calling and the interface parameters The first parameter in the input parameter for the target interface function answered.
Calling module 104, for using the request of interface call request mark and first parameter as the mesh The input parameter for marking interface function, calls the target interface function.
Module 105 is obtained, for obtaining the output parameter for calling and returning after the target interface function, the output parameter Including request mark and the second parameter.
The request is identified the tune of corresponding interface call request for being based on second parameter by return module 106 The client script is returned to result.
In the interface calling device of description of the embodiment of the present invention, receiving interface call request, the interface call request The corresponding interface identifier of target interface and interface parameters that client script needs to call are carried, the target interface is browsing One of expansion interface provided by device;According to the interface identifier, the method for calling of target interface is determined;According to the called side Formula and the interface parameters determine the first parameter in the input parameter of the corresponding target interface function of the target interface;It will The request mark and input parameter of first parameter as the target interface function of the interface call request, call institute State target interface function;The output parameter for calling and returning after the target interface function is obtained, the output parameter includes described Request mark and the second parameter;Based on second parameter, the request is identified to the calling knot of corresponding interface call request Fruit returns to the client script.Using the embodiment of the present invention, called by the design and interface of normalized interface function, it is clear Device of looking at can realize client script to the calling of any expansion interface using unified interface call method.To exploitation When staff development expansion interface, the corresponding interface function of the expansion interface need to be only developed, improves development efficiency.
Fig. 4 is referred to, Fig. 4 is a kind of another structural schematic diagram of interface calling device provided in an embodiment of the present invention, In the embodiment of the present invention, the apparatus may include:Receiving module 201, parameter determination module 203, is adjusted mode determining module 202 With module 204, obtain module 205, return module 206, the first conversion module 207, the second conversion module 208, preserving module 301 With removing module 302.
Receiving module 201, is used for receiving interface call request, and the interface call request carries client script needs The corresponding interface identifier of the target interface of calling and interface parameters, the target interface be browser provided by expansion interface it One.
Mode determining module 202, for determining the method for calling of the target interface according to the interface identifier.
Parameter determination module 203, for determining the target interface pair according to the method for calling and the interface parameters The first parameter in the input parameter for the target interface function answered.
Calling module 204, for using the request of interface call request mark and first parameter as the mesh The input parameter for marking interface function, calls the target interface function.
Module 205 is obtained, for obtaining the output parameter for calling and returning after the target interface function, the output parameter Including request mark and the second parameter.
The request is identified the tune of corresponding interface call request for being based on second parameter by return module 206 The client script is returned to result.
In one embodiment, the data type of the output parameter is preset first data type.
First conversion module 207, for first parameter to be formatted, the data of the first parameter after conversion Type is preset second data type.
Second conversion module 208, for second parameter to be formatted, the data of the second parameter after conversion Type is preset third data type.
Preserving module 301 saves callback information to callback data library if being asynchronous call for the method for calling In, the callback information includes the request mark and the call back function that the parameter preset is identified.
Removing module 302 identifies corresponding callback information for deleting request described in the callback data library.
In another embodiment, parameter determination module 203 is specifically used for:
If the method for calling is synchronization call, the input that the interface parameters is determined as the target interface function is joined The first parameter in number;
If the method for calling is asynchronous call, the other parameters in the interface parameters in addition to parameter preset are determined as The first parameter in the input parameter of the target interface function, the parameter preset is for identifying call back function.
In another embodiment, return module 206 includes:Synchronous return unit 2061 and asynchronous return unit 2062, As shown in fig. 4 a, Fig. 4 a is the structural schematic diagram for one of return module that Fig. 4 is provided.
Synchronous return unit 2061, if the method for calling is synchronization call, using second parameter as the request The call result for identifying corresponding interface call request returns to the client script;
Asynchronous return unit 2062 determines that the request identifies corresponding target if the method for calling is asynchronous call Call back function, and using second parameter as the input parameter of the target call back function, run the target call back function It is exported as a result, returning to client's end feet using the output result as the call result of the interface call request in turn This.
In another embodiment, synchronous return unit 2061 is specifically used for:
It is identified according to the request, the request is inquired from the callback data library and identifies corresponding callback information;
The call back function that the callback information is specified is determined as target call back function.
In another embodiment, mode determining module 202 is specifically used for:
According to the interface identifier, the corresponding interface message of the interface identifier is inquired from preset interface database, The interface message includes interface identifier and method of calling;
The corresponding method of calling of the interface identifier in the interface database is determined as to the called side of the target interface Formula.
In the interface calling device of description of the embodiment of the present invention, receiving interface call request, the interface call request The corresponding interface identifier of target interface and interface parameters that client script needs to call are carried, the target interface is browsing One of expansion interface provided by device;According to the interface identifier, the method for calling of target interface is determined;According to the called side Formula and the interface parameters determine the first parameter in the input parameter of the corresponding target interface function of the target interface;It will The request mark and input parameter of first parameter as the target interface function of the interface call request, call institute State target interface function;The output parameter for calling and returning after the target interface function is obtained, the output parameter includes described Request mark and the second parameter;Based on second parameter, the request is identified to the calling knot of corresponding interface call request Fruit returns to the client script.Using the embodiment of the present invention, called by the design and interface of normalized interface function, it is clear Device of looking at can realize client script to the calling of any expansion interface using unified interface call method.To exploitation When staff development expansion interface, the corresponding interface function of the expansion interface need to be only developed, improves development efficiency.
Fig. 5 is referred to, Fig. 5 is a kind of another structural schematic diagram of interface calling device provided in an embodiment of the present invention, In the embodiment of the present invention, the apparatus may include:Parameter converter 301, interface proxy 302, interface transponder 303, interface are logical Know device 304, interface Register 305, interface database 306 and call request database 307.
In the specific implementation, this connects if the method for calling of target interface specified by interface call instruction is asynchronous call Mouth calling device can also include callback data library 308 and readjustment device 309.Developer needs when adding interface to interface Register 305 provides the registration informations such as interface identifier and the method for calling of interface, for convenience of description, it is assumed that interface identifier is interface Title, wherein being embodied in host process for interface function provides.Interface Register 305 records these registration informations, and Browser create rendering process after, these registration informations are sent to rendering process by way of interprocess communication, render into Journey is buffered in these registration informations in interface database 306, thus, record has the interface of each interface in interface database 306 Information, for example, the storage form of interface database can be as shown in table 1.Callback data library 308 is asynchronous tune for method of calling Used time, the request mark and the request for storing the asynchronous call identify the readjustment letter carried in demarcated interface call request It counts, thus, readjustment device 309 can go in callback data library 308 to inquire the corresponding target time of request mark according to request mark Letter of transfer number returns to call result to script by way of calling the target call back function.Call request database 307 is for depositing The request mark called and method of calling are stored up, thus, interface notification device 304 gets defeated after target interface function operation Out after parameter, it is corresponding to go in call request database 307 to inquire request mark according to the request mark in the output parameter Output parameter is then directly sent to interface proxy 302 if synchronization call by method of calling;It, then will output if asynchronous call Parameter is sent to readjustment device 309.It is worth noting that the interface calling device can be used in the browser of one process, it can also With in the browser for multi-process, but for convenience of description, by taking the browser of multi-process as an example.
In general, browser shows as multi-process mostly in the process of running, the multi-process include at least rendering process and Host process, wherein rendering process is used to handle the renderings of web page contents, host process for handle user interface and manage it is all its Its process etc..Since rendering process can only execute webpage, and other operations cannot be executed, therefore, the specific reality of expansion interface Existing (i.e. the realization of interface function) must provide in host process.For convenience of description, it is assumed that browser starts in the process of running Rendering process and host process, then in the interface call flow for realizing client script, rendering process receives client script Interface call request, the interface call request carries client script and needs the corresponding interface mark of target interface that calls Know and interface parameters, the target interface are any expansion interface in expansion interface provided by browser.Due to render into Cheng Benshen cannot the corresponding target interface function of operational objective interface, therefore, according to client script be passed to interface identifier And interface parameters, interface call request is reconfigured, sends the interface call request to host process, thus, it is run by host process Target interface function specified by the interface call request, and operation result is returned into rendering process and/or client script, Realize the calling of script.
In the embodiment of the present invention, parameter converter 301 receives the interface call request of client script 201, the interface Call request carries the corresponding interface identifier of target interface and interface parameters that client script 201 needs to call, the mesh Tag splice mouth is that extension provided by browser one of connects.It is connect in 301 query interface database 306 of parameter converter with the presence or absence of this Mouth identifies corresponding interface message, and if it does not exist, then specification interface call error directly returns to preset error message;If depositing , it is determined that the method for calling of the corresponding interface name of interface identifier target interface corresponding with the interface identifier.Further , in the input parameter of the corresponding target interface function of target interface is determined according to the method for calling and the interface parameters One parameter.Parameter converter 301 formats the first parameter, and the data type of the first parameter after converting is preset Second data type, for example, KeyValueMap type or Value type.
Tune needed for interface proxy 302 (Interface Proxy) obtains interface call request from parameter converter 301 Recalls information is sent to interface proxy 302 with information or parameter converter 301, the recalls information includes interface tune With the request mark of request, interface name, the first parameter and method of calling, if method of calling is asynchronous call, the calling letter Breath further includes call back function.Certainly, the request mark is also possible to that interface proxy 302 determines or generation, specifically, this Inventive embodiments are with no restriction.If method of calling is asynchronous call, interface proxy 302 according to accessed recalls information, Request mark and call back function corresponding with request mark are added in callback data library 308.It is received to adjust back device 309 After the output parameter for the target interface function that interface notification device 304 into host process returns, according to asking in the output parameter It asks mark to inquire the request from callback data library 308 and identifies corresponding target call back function.Meanwhile interface proxy 302 is to position 303 transmission interface call request of interface transponder in host process, the interface call request can be as shown in code 4.
For example, the method for calling of the target interface if desired called is asynchronous call, it is assumed that the interface name of target interface For recordHistory, then client script calls the code of the target interface can be:recordHi story(' http:\\www.liebao.cn','2014-07-2020:00:00', onRecordHistoryDone), it is known that, the first parameter Including " http:\\www.liebao.cn,""2014-07-2020:00:00, " function name of call back function is onRecordHistoryDone.Therefore, parameter converter 301 receives client script invocation target interface recordHistory Interface call request, determine the interface call request request mark and the target interface method of calling;According to institute Method of calling and the interface parameters are stated, determines first in the input parameter of the corresponding target interface function of the target interface Parameter.Parameter converter 301 formats the first parameter, and the first parameter after format conversion can be as shown in table 2. The request for identifying the interface call request can be identified (request_id) by interface proxy 302, call back function object (is here OnRecordH istoryDone function) and the information such as environmental variance needed for normally executing the call back function be added to readjustment In database 308, guarantee that call result can be returned success to foot according to the information saved in callback data library 308 by readjustment device This.Meanwhile interface proxy 302 reconfigures interface call request according to accessed recalls information, and by leading between process The interface call request is sent to the interface transponder 303 in browser host process by the mode of letter, and the call request of interface can With as shown in code 4, the call request of the interface can carry request mark request_id, interface name interface, the One parameter arguments and method of calling syn c, wherein the data type of the first parameter is preset second data type.
The call request of asynchronous interface is illustrated in code 4, wherein request_id, which is used to identify interface calling, to be asked It asks, the corresponding interface identifier of invocation target interface is wanted in interface expression, and arguments is converted by parameter converter 301 The data type obtained afterwards is the first parameter of preset first data type, and sync is used to indicate the called side of target interface Formula.
Code 4
If desired the target interface called is sync cap, then the parameter sync in interface call request is true, similarly, Interface proxy 302 is sent to the call request of the interface constructed in browser host process by way of interprocess communication Interface transponder 303.If method of calling is synchronization call, interface proxy 302 sends call request to interface transponder 303 Afterwards, interface proxy 302 can suspend execution, just continue after browser host process executes completion and transmits return value.If calling Mode is asynchronous call, then after interface proxy 302 sends call request to interface transponder 303, interface proxy 302 can immediately It returns, thus, rendering process can continue to execute other operations, and the execution efficiency of webpage is high.
After interface transponder 303 receives the call request of interface proxy transmission, entrained by the call request The request mark and method of calling that identify the call request are added in call request database 307 by recalls information, thus, Call request database 307 in host process preserves the tune of each request mark and target interface specified by call request With the corresponding relationship between mode.Interface transponder 303 goes inquiry and the interface name in interface Register 305 according to interface identifier Claim corresponding target interface function, obtain the position of the corresponding target interface function 401 of target interface, request is identified The input parameter of request_id and the first parameter arguments as the target interface function 401 inquired, calling should Target interface function, wherein the implementation of target interface function can be asynchronous implement mode and be also possible to synchronous realization side Formula.
In general, needing to return to operation result after interface function is run, whether such as operation succeeds, it is desirable that the number of reading According to etc., these data are the output parameter of interface function, and the data type of the output parameter is preset first data type, Such as KeyValueMap type or Value type.So, target interface function can transmit output parameter after being finished To interface notification device 304, wherein output parameter includes request mark and the second parameter, and the second parameter is request mark pair The call result for the interface call request answered, thus, interface notification device 304 is according to request mark in call request database 307 Call request corresponding to middle lookup and method of calling.
If method of calling is synchronization call, request mark and the second parameter are sent to interface generation by interface notification device 304 Reason 302, thus, after interface proxy 302 receives the output parameter of the target interface function of the return of interface notification device 304, continue Execute other operations.Parameter converter 301 formats the second parameter in output parameter, the second parameter after conversion Data type be preset third data type, for example, the Object object inside script, in turn, return to request mark Corresponding call result is completed to script, synchronization call.After the completion of synchronization call, is identified according to request and delete call request number According to the respective items in library 307, to reduce data volume, search efficiency is improved.
If method of calling is synchronization call, interface proxy 302 is to meeting after the call request of 303 transmission interface of interface transponder It returns immediately, continues to execute the other parts of script.And returning the result for calling interface is needed by specified by call request Call back function returns.Therefore, interface notification device 304 is identified according to the request in output parameter from call request database 307 In inquire the request identifies after corresponding target interface is asynchronous call, request mark and the second parameter are sent to render into Readjustment device 309 in journey, it is corresponding that readjustment device 309 uses request mark to inquire request mark from callback data library 308 Target call back function, meanwhile, call parameters converter 301 formats the second parameter, the second parameter after conversion Data type is preset third data type, for example, the Object object of script, using the second parameter after conversion as target The input parameter of call back function, the target call back function that Run Script provides, thus, call result is returned to, asynchronous interface calls It completes.After the completion of asynchronous call, pair deleted in call request database 307 and callback data library 308 is identified according to request Ying Xiang improves search efficiency to reduce data volume.
In the interface calling device of description of the embodiment of the present invention, receiving interface call request, the interface call request The corresponding interface identifier of target interface and interface parameters that client script needs to call are carried, the target interface is browsing One of expansion interface provided by device;According to the interface identifier, the method for calling of target interface is determined;According to the called side Formula and the interface parameters determine the first parameter in the input parameter of the corresponding target interface function of the target interface;It will The request mark and input parameter of first parameter as the target interface function of the interface call request, call institute State target interface function;The output parameter for calling and returning after the target interface function is obtained, the output parameter includes described Request mark and the second parameter;Based on second parameter, the request is identified to the calling knot of corresponding interface call request Fruit returns to the client script.Using the embodiment of the present invention, called by the design and interface of normalized interface function, it is clear Device of looking at can realize client script to the calling of any expansion interface using unified interface call method.To exploitation When staff development expansion interface, the corresponding interface function of the expansion interface need to be only developed, improves development efficiency.
Fig. 6 is referred to, Fig. 6 is a kind of structural schematic diagram of terminal provided in an embodiment of the present invention, in the embodiment of the present invention In, terminal 10 includes interface calling device as described above.In embodiments of the present invention, the terminal may include:Intelligent hand The terminal devices such as mechanical, electrical brain, tablet computer, laptop, palm PC and mobile internet device (MID), PAD.Tool Body, the embodiment of the present invention is with no restriction.
It is worth noting that terminal 10 includes any one interface calling device as described above, the terminal receiving interface Call request, the interface call request carry client script and need the corresponding interface identifier of target interface called and connect Mouth parameter, the target interface are one of expansion interface provided by browser;According to the interface identifier, target interface is determined Method of calling;According to the method for calling and the interface parameters, the corresponding target interface function of the target interface is determined Input parameter in the first parameter;Using the request of interface call request mark and first parameter as the target The input parameter of interface function calls the target interface function;Obtain the output called and returned after the target interface function Parameter, the output parameter include the request mark and the second parameter;Based on second parameter, by request mark pair The call result for the interface call request answered returns to the client script.Using the embodiment of the present invention, connect by standardization The design and interface of mouth function are called, and browser can realize client script to any using unified interface call method The calling of expansion interface.To, when developer develops expansion interface, the corresponding interface function of the expansion interface only need to be developed, Improve development efficiency.
Fig. 7 is referred to, Fig. 7 is a kind of another structural schematic diagram of interface calling device provided in an embodiment of the present invention, is used In executing interface call method disclosed by the embodiments of the present invention, the apparatus may include:At least one processor 401, such as CPU, at least one network interface 404 or other users interface 403, memory 405, at least one communication bus 402.It is logical Believe bus 402 for realizing the connection communication between these components.Wherein, user interface 403 optionally may include USB interface And other standards interface, wireline interface.Network interface 404 optionally may include Wi-Fi interface and other wireless interfaces. Memory 405 may include high speed RAM memory, it is also possible to further include non-labile memory (non-volatile Memory), a for example, at least magnetic disk storage.Memory 405 optionally may include at least one and be located remotely from aforementioned place Manage the storage device of device 401.As shown in fig. 7, as may include operation in a kind of memory 405 of computer storage medium System 4051 and application program 4052.
In some embodiments, memory 405 stores following element, executable modules or data structures, or Their subset of person or their superset:
Operating system 4051 includes various system programs, hardware based for realizing various basic businesses and processing Task;
Application program 4052, the setting program of the deblocking parameter comprising target network data, target data block are drawn The comparison program of data block in branch, target data block and database and the deletion program of target data block etc. are various to answer With program, for realizing various applied business.
Specifically, processor 401 executes following operation for calling the program stored in memory 405:
Receiving interface call request, the interface call request carry the target interface pair that client script needs to call The interface identifier and interface parameters answered, the target interface are one of expansion interface provided by browser;
According to the interface identifier, the method for calling of the target interface is determined;
According to the method for calling and the interface parameters, the defeated of the corresponding target interface function of the target interface is determined Enter the first parameter in parameter;
Using the request of interface call request mark and first parameter as the input of the target interface function Parameter calls the target interface function;
The output parameter for calling and returning after the target interface function is obtained, the output parameter includes the request mark With the second parameter;
Based on second parameter, the call result that the request identifies corresponding interface call request is returned to described Client script.
In one embodiment, the data type of the output parameter is preset first data type;
Processor 401 executes described according to the method for calling and the interface parameters, determines that the target interface is corresponding Target interface function input parameter in the first parameter operation after, further include executing following operation:
First parameter is formatted, the data type of the first parameter after converting is preset second data Type;
Processor 401 executes the output parameter for obtaining and calling and returning after the target interface function, the output ginseng It further include executing following operation after operation of the number including the request mark and the second parameter:
Second parameter is formatted, the data type of the second parameter after converting is preset third data Type.
In one embodiment, processor 401 executes described according to the method for calling and the interface parameters, determines institute The operation of the first parameter in the input parameter of target interface function is stated, including executes following operation:
If the method for calling is synchronization call, the input that the interface parameters is determined as the target interface function is joined The first parameter in number;
If the method for calling is asynchronous call, the other parameters in the interface parameters in addition to parameter preset are determined as The first parameter in the input parameter of the target interface function, the parameter preset is for identifying call back function.
In one embodiment, processor 401 executes described based on second parameter, the request is identified corresponding The call result of interface call request returns to the client script, including executes following operation:
If the method for calling is synchronization call, second parameter is identified into corresponding interface as the request and is called The call result of request returns to the client script;
If the method for calling is asynchronous call, determine that the request identifies corresponding target call back function, and will be described Input parameter of second parameter as the target call back function runs the target call back function and is exported as a result, in turn Client script is returned to using the output result as the call result of the interface call request.
In one embodiment, processor 401 executes described according to the interface identifier, determines the tune of the target interface It further include executing following operation after the operation of mode:
If the method for calling is asynchronous call, callback information is saved into callback data library, the callback information packet Include the call back function that the request mark is identified with the parameter preset;
Wherein, processor 401 executes the determination request and identifies the operation of corresponding target call back function, including holds The following operation of row:
If the method for calling is asynchronous call, asked according to the inquiry from the callback data library of request mark Seek the corresponding callback information of mark;
The call back function that the callback information is specified is determined as target call back function.
In one embodiment, processor 401 executes described corresponding using second parameter as request mark It further include executing following operation after the call result of interface call request returns to the operation of the client script:
It deletes request described in the callback data library and identifies corresponding callback information.
In one embodiment, processor 401 is executed according to the interface identifier, determines the called side of the target interface The operation of formula, including execute following operation:
According to the interface identifier, the corresponding interface message of the interface identifier is inquired from preset interface database, The interface message includes interface identifier and method of calling;
The corresponding method of calling of the interface identifier in the interface database is determined as to the called side of the target interface Formula.
In the technical solution of description of the embodiment of the present invention, receiving interface call request, the interface call request is carried The corresponding interface identifier of target interface and interface parameters, the target interface for having client script needs to call are browser institute One of expansion interface of offer;According to the interface identifier, the method for calling of target interface is determined;According to the method for calling and The interface parameters determines the first parameter in the input parameter of the corresponding target interface function of the target interface;It will be described The request mark and input parameter of first parameter as the target interface function of interface call request, call the mesh Mark interface function;The output parameter for calling and returning after the target interface function is obtained, the output parameter includes the request Mark and the second parameter;Based on second parameter, the call result that the request identifies corresponding interface call request is returned Back to the client script.Using the embodiment of the present invention, called by the design and interface of normalized interface function, browser Client script can be realized to the calling of any expansion interface using unified interface call method.To developer When developing expansion interface, the corresponding interface function of the expansion interface need to be only developed, improves development efficiency.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not Must must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be It can be combined in any suitable manner in any one or more embodiment or examples.In addition, without conflicting with each other, this field Technical staff can carry out the feature of different embodiments or examples described in this specification and different embodiments or examples Combination and combination.
Those skilled in the art can be by different embodiments described in this specification and the feature of different embodiments It is combined.Module or unit in all embodiments of the invention can pass through universal integrated circuit, such as CPU (Central Processing Unit, central processing unit), or pass through ASIC (Application Specific Integrated Circuit, specific integrated circuit) it realizes.
Step in all embodiments of the invention method can be sequentially adjusted, merged and deleted according to actual needs; Module or unit in all embodiments of the invention device can be combined, divided and deleted according to actual needs.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, to execute function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or pass Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment It sets.The more specific example (non-exhaustive list) of computer-readable medium includes following:Electricity with one or more wiring Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable Medium, because can then be edited, be interpreted or when necessary with it for example by carrying out optical scanner to paper or other media His suitable method is handled electronically to obtain described program, is then stored in computer storage.
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing module It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above The embodiment of the present invention is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as to limit of the invention System, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of the invention Type.
Above disclosed is only presently preferred embodiments of the present invention, cannot limit the right of the present invention with this certainly Range, those skilled in the art can understand all or part of the processes for realizing the above embodiment, and according to right of the present invention Equivalent variations made by it is required that, still belongs to the scope covered by the invention.

Claims (9)

1. a kind of interface call method, which is characterized in that including:
Receiving interface call request, it is corresponding that the interface call request carries the target interface that client script needs to call Interface identifier and interface parameters, the target interface are one of expansion interface provided by browser;
According to the interface identifier, the method for calling of the target interface is determined, including:According to the interface identifier, from default Interface database in inquire the corresponding interface message of the interface identifier, the interface message includes interface identifier and called side Formula;The corresponding method of calling of the interface identifier in the interface database is determined as to the method for calling of the target interface;
According to the method for calling and the interface parameters, the input ginseng of the corresponding target interface function of the interface identifier is determined The first parameter in number;
Determine the request mark of the interface call request;
Using the request of interface call request mark and first parameter as the input parameter of the target interface function, Call the target interface function;
Obtain the output parameter for calling and returning after the target interface function, the output parameter includes the request mark and the Two parameters;
Based on second parameter, the call result that the request identifies corresponding interface call request is returned into the client End feet sheet.
2. the method as described in claim 1, which is characterized in that the data type of the output parameter is preset first data Type;
It is described according to the method for calling and the interface parameters, determine the defeated of the corresponding target interface function of the target interface After entering the first parameter in parameter, the method also includes:
First parameter is formatted, the data type of the first parameter after converting is preset second data class Type;
Described to obtain the output parameter for calling and returning after the target interface function, the output parameter includes the request mark After the second parameter, the method also includes:
Second parameter is formatted, the data type of the second parameter after converting is preset third data class Type.
3. method according to claim 1 or 2, which is characterized in that it is described according to the method for calling and the interface parameters, Determine that the first parameter in the input parameter of the corresponding target interface function of the target interface includes:
If the method for calling is synchronization call, the interface parameters is determined as in the input parameter of the target interface function The first parameter;
If the method for calling is asynchronous call, the other parameters in the interface parameters in addition to parameter preset are determined as described The first parameter in the input parameter of target interface function, the parameter preset is for identifying call back function.
4. method according to claim 1 or 2, which is characterized in that it is described to be based on second parameter, the request is identified The call result of corresponding interface call request returns to the client script:
If the method for calling is synchronization call, corresponding interface call request is identified using second parameter as the request Call result return to the client script;
If the method for calling is asynchronous call, the corresponding target call back function of request mark is determined, and by described second Input parameter of the parameter as the target call back function runs the target call back function and is exported as a result, in turn by institute Output result is stated as the call result of the interface call request and returns to the client script.
5. method as claimed in claim 4, which is characterized in that it is described according to the interface identifier, determine the target interface Method of calling after, the method also includes:
If the method for calling is asynchronous call, callback information is saved into callback data library, the callback information includes institute State the call back function that request mark is identified with parameter preset;
The determination request identifies corresponding target call back function, including:
If the method for calling is asynchronous call, the request is inquired from the callback data library according to request mark and is marked Know corresponding callback information;
The call back function that the callback information is specified is determined as target call back function.
6. method as claimed in claim 5, which is characterized in that described identify second parameter as the request corresponds to Interface call request call result return to the client script after, the method also includes:
It deletes request described in the callback data library and identifies corresponding callback information.
7. a kind of interface calling device, which is characterized in that including:
Receiving module, is used for receiving interface call request, and the interface call request carries what client script needed to call The corresponding interface identifier of target interface and interface parameters, the target interface are one of expansion interface provided by browser;
Mode determining module determines the method for calling of the target interface for according to the interface identifier, including:According to institute Interface identifier is stated, the corresponding interface message of the interface identifier, the interface message packet are inquired from preset interface database Include interface identifier and method of calling;The corresponding method of calling of the interface identifier in the interface database is determined as the target The method of calling of interface;
Parameter determination module, for determining the corresponding mesh of the interface identifier according to the method for calling and the interface parameters Mark the first parameter in the input parameter of interface function;
Calling module, for determining that the request of the interface call request identifies;The request of the interface call request is identified Input parameter with first parameter as the target interface function calls the target interface function;
Module is obtained, for obtaining the output parameter for calling and returning after the target interface function, the output parameter includes institute State request mark and the second parameter;
The request is identified the call result of corresponding interface call request for being based on second parameter by return module Return to the client script.
8. device as claimed in claim 7, which is characterized in that the data type of the output parameter is preset first data Type, described device further include:
First conversion module, for formatting first parameter, the data type of the first parameter after conversion is Preset second data type;
Second conversion module, for formatting second parameter, the data type of the second parameter after conversion is Preset third data type.
9. a kind of terminal, which is characterized in that including the described in any item interface calling devices of such as claim 7-8.
CN201510289070.8A 2015-05-29 2015-05-29 A kind of interface call method, device and terminal Active CN104866383B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510289070.8A CN104866383B (en) 2015-05-29 2015-05-29 A kind of interface call method, device and terminal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510289070.8A CN104866383B (en) 2015-05-29 2015-05-29 A kind of interface call method, device and terminal
PCT/CN2016/083359 WO2016192556A1 (en) 2015-05-29 2016-05-25 Interface invoking method, device and terminal

Publications (2)

Publication Number Publication Date
CN104866383A CN104866383A (en) 2015-08-26
CN104866383B true CN104866383B (en) 2018-11-23

Family

ID=53912231

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510289070.8A Active CN104866383B (en) 2015-05-29 2015-05-29 A kind of interface call method, device and terminal

Country Status (2)

Country Link
CN (1) CN104866383B (en)
WO (1) WO2016192556A1 (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104866383B (en) * 2015-05-29 2018-11-23 北京金山安全软件有限公司 A kind of interface call method, device and terminal
CN106649078B (en) * 2015-11-02 2019-06-25 阿里巴巴集团控股有限公司 Application interface test method and device
CN107135073B (en) * 2016-02-26 2021-05-25 北京京东尚科信息技术有限公司 Interface calling method and device
CN106412009A (en) * 2016-08-29 2017-02-15 郑州悉知信息科技股份有限公司 Interface calling method and device
CN107194014B (en) * 2017-07-04 2021-05-28 贵州数据宝网络科技有限公司 Data source calling method and device
CN109426570A (en) * 2017-08-29 2019-03-05 阿里巴巴集团控股有限公司 A kind of acquisition methods of data, device and equipment
CN108009026A (en) * 2017-10-27 2018-05-08 深圳市买买提乐购金融服务有限公司 Interface call method, third party's data access platform and computer-readable medium
CN107809332A (en) * 2017-11-10 2018-03-16 中国民生银行股份有限公司 Compound interface configures and compound interface call method, device
CN109871285A (en) * 2017-12-05 2019-06-11 北京嘀嘀无限科技发展有限公司 Dynamic adjusting method, device, server, mobile terminal and readable storage medium storing program for executing
CN108650093A (en) * 2018-03-30 2018-10-12 深圳市富途网络科技有限公司 A kind of interface realizing method based on idempotence
CN108874557A (en) * 2018-05-24 2018-11-23 广东睿江云计算股份有限公司 A kind of front end interface processing method and system
CN110618875A (en) * 2018-06-20 2019-12-27 北京三快在线科技有限公司 Communication method, distributed system, electronic device, and storage medium
CN109218841B (en) * 2018-08-17 2021-01-01 武汉斗鱼网络科技有限公司 Barrage message transmission method, device, equipment and storage medium
CN109445960B (en) * 2018-10-18 2021-03-02 腾讯科技(深圳)有限公司 Application routing method, device and storage medium
CN109446261A (en) * 2018-10-31 2019-03-08 北京酷我科技有限公司 It is a kind of to mix the method and its system for calling data based on multiple interfaces
CN111190950A (en) * 2019-10-31 2020-05-22 腾讯科技(深圳)有限公司 Asset retrieval method and device
CN111030111A (en) * 2019-12-30 2020-04-17 广东电网有限责任公司电力调度控制中心 Method, device, system and medium for configuring stable control section parameters of power system
CN113452721A (en) * 2021-08-30 2021-09-28 湖南高至科技有限公司 Network interaction function optimization system, method, computer equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103226474A (en) * 2013-05-10 2013-07-31 北京奇虎科技有限公司 Method, device and system for interaction between webpage script and browser program
CN103309728A (en) * 2012-03-12 2013-09-18 腾讯科技(深圳)有限公司 Asynchronous request processing method and equipment
CN104281455A (en) * 2014-10-11 2015-01-14 北京金山安全软件有限公司 Method, device and terminal for invoking interfaces

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7359911B2 (en) * 2001-03-23 2008-04-15 S2 Technologies, Inc. System and method for building a database defining a plurality of communication interfaces
US8019839B2 (en) * 2009-05-11 2011-09-13 Accenture Global Services Limited Enhanced network adapter framework
CN103177040A (en) * 2011-12-26 2013-06-26 腾讯科技(深圳)有限公司 Method and device for calling functions of webpage application
CN104866383B (en) * 2015-05-29 2018-11-23 北京金山安全软件有限公司 A kind of interface call method, device and terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309728A (en) * 2012-03-12 2013-09-18 腾讯科技(深圳)有限公司 Asynchronous request processing method and equipment
CN103226474A (en) * 2013-05-10 2013-07-31 北京奇虎科技有限公司 Method, device and system for interaction between webpage script and browser program
CN104281455A (en) * 2014-10-11 2015-01-14 北京金山安全软件有限公司 Method, device and terminal for invoking interfaces

Also Published As

Publication number Publication date
CN104866383A (en) 2015-08-26
WO2016192556A1 (en) 2016-12-08

Similar Documents

Publication Publication Date Title
CN104866383B (en) A kind of interface call method, device and terminal
CN102567516B (en) Script loading method and device
US20140282370A1 (en) Methods for managing applications using semantic modeling and tagging and devices thereof
CN105740048A (en) Image management method, device and system
CN104881318B (en) A kind of interface call method, device and terminal
CN104112002B (en) A kind of methods, devices and systems of list adaptation
US9275165B2 (en) Method and apparatus for defining an application to allow polymorphic serialization
Espada et al. Extensible architecture for context-aware mobile web applications
CN101211364A (en) Method and system for social bookmarking of resources exposed in web pages
EP2616955A2 (en) Method and apparatus for polymorphic serialization
US20170004221A1 (en) Establishment of state representation of a web page represented in a web browser
CN104281455A (en) Method, device and terminal for invoking interfaces
CN108572965B (en) Resource loading method and device
US6766350B1 (en) Shared management of data objects in a communication network
US20160072927A1 (en) Odata enabled mobile software applications
CN108156022A (en) A kind of service calling method, device and electronic equipment
CN103268257A (en) Hardware resource access system and method for accessing hardware resource of electric device
CN108769109A (en) Method and system are uniformly processed in a kind of Internet of Things heterogeneous device data
US20210240784A1 (en) Method, apparatus and storage medium for searching blockchain data
US20210357461A1 (en) Method, apparatus and storage medium for searching blockchain data
CN108829467B (en) Third-party platform docking implementation method, device, equipment and storage medium
CN106648569B (en) Target serialization realization method and device
CN104270257A (en) Network element level network management service configuration adaptive system and method based on PB and XPATH
JP5039946B2 (en) Technology for relaying communication between client devices and server devices
CN108536617A (en) Buffer memory management method, medium, system and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
EXSB Decision made by sipo to initiate substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20181203

Address after: Room 105-53811, No. 6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province

Patentee after: Zhuhai Seal Interest Technology Co., Ltd.

Address before: 100085 East District, Second Floor, 33 Xiaoying West Road, Haidian District, Beijing

Patentee before: Kingsoft Corporation Limited

TR01 Transfer of patent right