CN109669786A - Interface call method, unit and computer readable storage medium - Google Patents

Interface call method, unit and computer readable storage medium Download PDF

Info

Publication number
CN109669786A
CN109669786A CN201811127098.1A CN201811127098A CN109669786A CN 109669786 A CN109669786 A CN 109669786A CN 201811127098 A CN201811127098 A CN 201811127098A CN 109669786 A CN109669786 A CN 109669786A
Authority
CN
China
Prior art keywords
interface
extended protocol
interface call
calling
call method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811127098.1A
Other languages
Chinese (zh)
Inventor
黄世光
冯铁军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201811127098.1A priority Critical patent/CN109669786A/en
Publication of CN109669786A publication Critical patent/CN109669786A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/311Functional or applicative languages; Rewrite languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a kind of interface call method, the interface call method is based on function response type programming framework, comprising: receives the interface call instruction from the page;Configure Extended Protocol corresponding with the interface call instruction;According to the Extended Protocol calling interface.The invention also discloses a kind of interfaces to call unit and computer readable storage medium.Technical solution of the present invention help to realize it is high can match, full decoupling, the interface maintenance of lightweight.

Description

Interface call method, unit and computer readable storage medium
Technical field
The present invention relates to technical field of software development more particularly to a kind of interface call methods, unit and computer Readable storage medium storing program for executing.
Background technique
Currently, in software project development frame, when Configuration network requests relevant content, using the processing of object-oriented Mode.It specifically includes two kinds of processing modes: 1, constructing a super management class, all interfaces are managed by super management class; 2, management class is split according to each functional module, manages each interface by multiple management classes.However, in the first processing mode In, as by the expansion of the scale of exploration project, super management class will expand rapidly, and the degree of coupling between each interface also will be rapid Rise, maintenance difficulties are significantly increased;In second of processing mode, corresponding multiple management classes will generate multiple objects, each Interface requires an additional object as request of data channel, and development difficulty is caused to increase.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of interface call methods, it is intended to solve to connect in above-mentioned software development process Mouthful complicated technical problem of maintenance, thus realize it is high can match, full decoupling, the interface maintenance of lightweight.
To achieve the above object, the present invention provides a kind of interface call method, and interface call method is based on function response type Programming framework, interface call method include:
Receive the interface call instruction from the page;
Configure Extended Protocol corresponding with the interface call instruction;
According to the Extended Protocol calling interface.
Preferably, before the step of configuring Extended Protocol corresponding with the interface call instruction, the interface is called Method is further comprising the steps of:
Obtain page control logic;
Receive the suction parameter determined according to the page control logic.
Preferably, before the step of according to the Extended Protocol calling interface, the interface call method further include with Lower step:
Global configuration network request and corresponding return value.
Preferably, after according to the Extended Protocol calling interface the step of, the interface call method further include with Lower step:
Call result is returned to the page.
Preferably, return call result to the step of page include:
When call result is malloc failure malloc, after the preset lime again according to the Extended Protocol calling interface;
When the call result of continuous preset times is malloc failure malloc, stop calling interface, and generate standby signal.
Preferably, the step of configuration Extended Protocol corresponding with the interface call instruction includes:
According to the interface call instruction, corresponding expansion plugin is obtained;
It is associated with the expansion plugin and corresponding expansion interface;
According to basic agreement, the expansion interface and general-purpose interface are connected;
The expansion plugin is transmitted by the expansion interface and the general-purpose interface, to configure Extended Protocol.
Preferably, the architecture mode of the interface call method is Model-View-view model architecture mode.
To achieve the above object, the present invention also proposes that a kind of interface calls equipment, and it includes: storage that the interface, which calls equipment, Device, processor and it is stored in the computer program that can be run on the memory and on the processor, the computer journey It is realized when sequence is executed by the processor such as the step of interface call method, the interface call method is compiled based on function response type Journey frame, the interface call method include: to receive the interface call instruction from the page;Configuration and the interface call instruction Corresponding Extended Protocol;According to the Extended Protocol calling interface.
To achieve the above object, the present invention also proposes that a kind of interface calling device, the interface calling device are based on function Response type programming framework, the interface calling device include receiving module, configuration module and calling module, wherein the reception Module is to receive the interface call instruction from the page;The configuration module is corresponding with the interface call instruction to configure Extended Protocol;The calling module is to according to the Extended Protocol calling interface.
To achieve the above object, present invention further propose that a kind of computer readable storage medium, described computer-readable It is stored with interface caller on storage medium, interface call method is realized when the interface caller is executed by processor Step, the interface call method are based on function response type programming framework, and the interface call method includes: to receive from the page Interface call instruction;Configure Extended Protocol corresponding with the interface call instruction;According to the Extended Protocol calling interface.
In the technical solution of the present invention, interface call method is based on function response type programming framework, comprising: receives and comes from page The interface call instruction in face;Configure Extended Protocol corresponding with interface call instruction;According to Extended Protocol calling interface.In we In case, it is based on function response type programming framework, that is, be based on ReactiveX (Rx), using the interface management side of Protocol-oriented Formula replaces the interface management mode of current object-oriented, is configured and is optimized to network layer.By the Extended Protocol configured Between it is substantially mutually indepedent, degree of coupling is very low, when needing to realize a certain concrete function, it is only necessary to which configuration is related to the function Extended Protocol, and corresponding interface is called according to Extended Protocol, so that realizing height can match, full decoupling, lightweight Interface maintenance.
Detailed description of the invention
Fig. 1 is the flow diagram of interface call method first embodiment of the present invention;
Fig. 2 is the flow diagram of interface call method second embodiment of the present invention;
Fig. 3 is the flow diagram of interface call method 3rd embodiment of the present invention;
Fig. 4 is the flow diagram of interface call method fourth embodiment of the present invention;
Fig. 5 is the refinement flow diagram of step S200 in interface call method sixth embodiment of the present invention;
Fig. 6 is that the interface for the hardware running environment that the embodiment of the present invention is related to calls the structural schematic diagram of equipment.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The primary solutions of the embodiment of the present invention are: the management interface by way of Protocol-oriented.
Due to the management interface by the way of object-oriented in the prior art, with the expansion of the scale of development project Greatly, the complexity of interface management will be substantially increased.
The present invention provides a solution, the management interface by way of Protocol-oriented, the Extended Protocol configured it Between it is substantially mutually indepedent, degree of coupling is low, with realize height can match, full decoupling, the interface maintenance of lightweight.
First embodiment of the invention provides a kind of interface call method, as shown in Figure 1, interface call method is rung based on function Answer formula programming framework, comprising:
Step S100, the interface call instruction from the page is received;
In the present embodiment, use RactiveX (Rx) for Development Framework, wherein Rx, which is one, can simplify Asynchronous Programming Frame, Rxswift is the swift version of Rx, for a kind of functional expression response type program.In the programming of functional expression response type, most Important concept is " stateless ", and " stateless " is realized by " sequence (sequence) ", that is to say, that is needing to occur When change, a state is regenerated, correspondingly, occurring to change several times, just generates several states.Sequence is to hold above-mentioned state Container, programmed by functional expression response type, the probability to start a leak can be greatly reduced.In the various embodiments of the invention, The architecture mode of interface call method can use mode-view, view model (Model-View-ViewModel, MVVM) mould Formula will hereinafter be illustrated concrete scheme by taking MVVM architecture mode as an example, it is of course also possible to use other architecture modes, And corresponding adjustment is made to interface call method according to the characteristics of each architecture mode, details are not described herein.MVVM architecture mode has Help separate the exploitation of graphic user interface and the exploitation of service logic or back-end logic (data model).Specifically, The view model of MVVM architecture mode is a value converter, and view model is responsible for converting data object from model, so as to light Loose tube reason and presentation object.Tertium quid's mode may be implemented in view model, is supported in tertium quid's mode undertissue view The access of the back-end logic of set of uses case.MVVM architecture mode includes consisting of part: model, view and view model, wherein Model refers to the data access layer of the domain model for representing time of day content or reference table content, view be user on the screen Structure, layout and the appearance seen, view model are the abstract of the view of exposed public attribute and order, declarative data and life Binding is enabled to lie in MVVM architecture mode.MVVM architecture mode is realized on above-mentioned Rxswift frame.By receive come From the interface call instruction of the page, it is responsible for handling corresponding page logic and calling interface by view model, thus by interface tune The configuration layer of network request is transmitted to instruction.
Step S200, configuration Extended Protocol corresponding with interface call instruction;
In the process of development, URL session (URLSession) can be used and carry out network request, but for convenience's sake, It would generally select using third party library as Alamofire, these libraries are fundamentally based on URL session, but seal in library Many details are filled, to keep the correlative code of network request more succinct easy-to-use.Moya be one based on Alamofire more Upper layer network request encapsulation level of abstraction, can be considered as network management, for encapsulating URL, parameter etc. during network request All required essential informations.Directly operate Moya by client code, then by Moya manage request, and do not have to Alamofire is directly contacted, to simplify code.Configuration network request is realized in configuration layer, specifically includes interface Configuration, and interface configuration is realized by the way of protocol extension on the basis of basic agreement, each Extended Protocol and one Corresponding function is corresponding.Due to substantially mutually indepedent between each Extended Protocol, when the popularization of development project, Being substantially increased for interface maintenance difficulties can effectively be avoided.
Step S300, according to Extended Protocol calling interface.
It include information required for realize certain function in Extended Protocol, including interface message etc. to be called, After the Extended Protocol that Moya receives that configuration is completed, according to Extended Protocol calling interface, to realize corresponding function.
In the present embodiment, interface call method is based on function response type programming framework, comprising: receives connecing from the page Mouth call instruction;Configure Extended Protocol corresponding with interface call instruction;According to Extended Protocol calling interface.In the present solution, Based on function response type programming framework, that is, it is based on ReactiveX (Rx), is replaced using the interface management mode of Protocol-oriented The interface management mode of object-oriented at present, configures network layer and is optimized.By base between the Extended Protocol that is configured This is mutually indepedent, and degree of coupling is very low, when needing to realize a certain concrete function, it is only necessary to configuration extension relevant to the function Agreement, and corresponding interface is called according to Extended Protocol, so that realizing height can match, full decoupling, the interface dimension of lightweight Shield.
Based on above-mentioned first embodiment, as shown in Fig. 2, being called in the second embodiment of the present invention in configuration and interface Before the step of instructing corresponding Extended Protocol, interface call method is further comprising the steps of:
Step S410, page control logic is obtained;
Step S420, the suction parameter determined according to page control logic is received.
During network request, it is not only related to the configuration of Extended Protocol, it is other often to also relate to suction parameter etc. Transmission of the parameter to configuration layer, to realize complete function.Page control logic is according to the concrete function to be realized institute Determining, by obtaining page control logic, determined accordingly by the model in MVVM architecture mode according to page control logic Suction parameter, the suction parameter is related to the concrete function that Extended Protocol to be realized, further configuration layer is by receiving entrance Parameter, with the complete configuration of network request to be achieved.
Based on the various embodiments described above, as shown in figure 3, in the third embodiment of the present invention, being called according to Extended Protocol Before the step of interface, interface call method is further comprising the steps of:
Step S500, global configuration network request and corresponding return value.
In configuration process, it is not only related to the configuration of Extended Protocol corresponding with concrete function, it is also necessary to entire Network request and corresponding return value carry out global configuration, with perfect operation environment, avoid the occurrence of the incongruent situation of configuration.Entirely Office's configuration can influence entire development project, specifically, the global configuration of network request and corresponding return value is complete Office's configuration can pass through plug-in unit (plugin) Lai Shixian corresponding in Moya respectively.
Based on the various embodiments described above, as shown in figure 4, in the fourth embodiment of the present invention, being called according to Extended Protocol After the step of interface, interface call method is further comprising the steps of:
Step S600, call result is returned to the page.
After completing interface and calling, according to call result, corresponding data are returned into the page, to change the page in time Display state makes the display state of the page be consistent with virtual condition.
Further, it is based on above-mentioned fourth embodiment, in the fifth embodiment of the present invention, returns to call result to the page The step of include:
Step S610, it when call result is malloc failure malloc, is connect after the preset lime again according to Extended Protocol calling Mouthful;
Step S620, when the call result of continuous preset times is malloc failure malloc, stop calling interface, and generate and mention Show signal.
During calling interface, it may cause to adjust because of factors such as the problems in the interruptions of network, Extended Protocol With failure.If it is because the accidentalia such as network interruption lead to interface malloc failure malloc, then can be by again attempting to realize It calls, but if being that there are problems etc. because of Extended Protocol, call still to fail so many times.Therefore, in the present embodiment In, when call result is malloc failure malloc, after the preset lime again according to Extended Protocol calling interface, to exclude network event The influence of barrier improves the reliability that interface calls.But when the call result of continuous preset times is malloc failure malloc, then Stop calling interface, and generate standby signal and when report an error, prompt related personnel safeguard.
Based on the various embodiments described above, as shown in figure 5, in the sixth embodiment of the present invention, configuration and interface call instruction The step of corresponding Extended Protocol includes:
Step S210, according to interface call instruction, corresponding expansion plugin is obtained;
Step S220, expansion plugin and corresponding expansion interface are associated with;
Step S230, according to basic agreement, expansion interface and general-purpose interface are connected;
Step S240, by expansion interface and general-purpose interface transmitting extended plug-in unit, to configure Extended Protocol.
In the present embodiment, by the cooperation of basic agreement and Extended Protocol, it is further simplified the process of interface calling.Base Plinth agreement, which can be, to be carried in Moya, certain extension and improvement can also be carried out to basic agreement according to self-demand, Common portion content involved during calling interface is write in basic agreement, Extended Protocol is enabled to be absorbed in tool The function that body will be realized, to simplify writing for Extended Protocol.In a specific example, basic agreement includes: request base Location (base_url), the path (path) of request, requesting method (method), required parameter (task), request header information (headers) information general in network requests such as.Extended Protocol is write according to concrete function to be achieved, and pre- It first stores to be called.Wherein, concrete function to be achieved may include that the registration of account, the login of account, user believe substantially The acquisition of breath, the verification of user basic information, is logged off and same account is set other at the modification of user basic information The functions such as this login are disconnected when standby upper login.For each specific function, corresponding expansion plugin can be write (plugin), expansion plugin itself has preferable independence, and mutual coupling is very weak, therefore generally with required function Increase linear growth, without the non-linear growth of significantly expansion plugin number.Expansion plugin with it is corresponding Expansion interface (provider) is associated, the transmitting of expansion plugin inside and outside parameter is completed by expansion interface, to realize extension The normal operation of plug-in unit.In addition, there is also defined the general-purpose interface of a network request in Moya, general-purpose interface can provide logical Road enables expansion plugin to be transmitted to configuration layer under the support of basic agreement by connection expansion interface and general-purpose interface, from And the configuration of Extended Protocol is completed, with to call directly Extended Protocol in subsequent network request process, to realize corresponding function Energy.That is, connecting by expansion interface with general-purpose interface, expansion plugin corresponding to concrete function is transmitted into Moya, Complete the configuration of interface.
As shown in fig. 6, Fig. 6 is the terminal for the hardware running environment that the embodiment of the present invention is related to, i.e. interface calling is set Standby structural schematic diagram.
The terminal of that embodiment of the invention can be server, PC, be also possible to smart phone, tablet computer, e-book reading Device, MP3 (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio Level 3) player, MP4 (Moving Picture Experts Group AudioLayer IV, dynamic image expert compression Standard audio level 3) the packaged type terminal device having a display function such as player, portable computer.
As shown in fig. 6, the terminal may include: processor 1001, such as CPU, network interface 1004, user interface 1003, memory 1005, communication bus 1002.Wherein, communication bus 1002 is for realizing the connection communication between these components. User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user interface 1003 can also include standard wireline interface and wireless interface.Network interface 1004 optionally may include that the wired of standard connects Mouth, wireless interface (such as WI-FI interface).Memory 1005 can be high speed RAM memory, be also possible to stable memory (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor 1001 storage device.
Optionally, terminal can also include camera, RF (Radio Frequency, radio frequency) circuit, sensor, audio Circuit, WiFi module etc..Wherein, sensor such as optical sensor, motion sensor and other sensors.Specifically, light Sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can according to the light and shade of ambient light come The brightness of display screen is adjusted, proximity sensor can close display screen and/or backlight when mobile terminal is moved in one's ear.As One kind of motion sensor, gravity accelerometer can detect the size of (generally three axis) acceleration in all directions, quiet Size and the direction that can detect that gravity when only, the application that can be used to identify mobile terminal posture are (such as horizontal/vertical screen switching, related Game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Certainly, mobile terminal can also match The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor are set, details are not described herein.
It will be understood by those skilled in the art that the restriction of terminal structure shown in Fig. 6 not structure paired terminal, can wrap It includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
As shown in fig. 6, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium Believe module, Subscriber Interface Module SIM and interface caller.
In terminal shown in Fig. 6, network interface 1004 is mainly used for connecting background server, carries out with background server Data communication;User interface 1003 is mainly used for connecting client (user terminal), carries out data communication with client;And processor 1001 can be used for calling the interface caller stored in memory 1005, and interface caller is programmed based on function response type Frame, and execute following operation:
Receive the interface call instruction from the page;
Configure Extended Protocol corresponding with the interface call instruction;
According to the Extended Protocol calling interface.
Further, processor 1001 can be used for calling the interface caller stored in memory 1005, configure Before the operation of Extended Protocol corresponding with the interface call instruction, following operation is also executed:
Obtain page control logic;
Receive the suction parameter determined according to the page control logic.
Further, processor 1001 can be used for calling the interface caller stored in memory 1005, in basis Before the operation of the Extended Protocol calling interface, following operation is also executed:
Global configuration network request and corresponding return value.
Further, processor 1001 can be used for calling the interface caller stored in memory 1005, in basis After the operation of the Extended Protocol calling interface, following operation is also executed:
Call result is returned to the page.
Further, processor 1001 can be used for calling the interface caller stored in memory 1005, returns and adjusts Operation with result to the page includes:
When call result is malloc failure malloc, after the preset lime again according to the Extended Protocol calling interface;
When the call result of continuous preset times is malloc failure malloc, stop calling interface, and generate standby signal.
Further, processor 1001 can be used for calling the interface caller stored in memory 1005, configuration with The operation of the corresponding Extended Protocol of the interface call instruction includes:
According to the interface call instruction, corresponding expansion plugin is obtained;
It is associated with the expansion plugin and corresponding expansion interface;
According to basic agreement, the expansion interface and general-purpose interface are connected;
The expansion plugin is transmitted by the expansion interface and the general-purpose interface, to configure Extended Protocol.
Further, processor 1001 can be used for calling the interface caller stored in memory 1005, described to connect The architecture mode of mouth call method is Model-View-view model architecture mode.
In addition, the embodiment of the present invention also proposes that a kind of interface calling device, interface calling device are compiled based on function response type Journey frame, comprising:
Receiving module, to receive the interface call instruction from the page;
Configuration module, to configure Extended Protocol corresponding with the interface call instruction;
Calling module, to according to the Extended Protocol calling interface.
Further, interface calling device further include:
Page logic module, to obtain page control logic;
Parameter receiving module receives the suction parameter determined according to the page control logic.
Further, interface calling device further include:
Global configuration module, to global configuration network request and corresponding return value.
Further, interface calling device further include:
Return module, to return to call result to the page.
Further, calling module also to when call result be malloc failure malloc when, after the preset lime again according to The Extended Protocol calling interface;When the call result of continuous preset times is malloc failure malloc, stop calling interface;
Return module includes prompt unit, and prompt unit is to generate standby signal.
Further, configuration module includes:
Bound cell, to obtain corresponding expansion plugin according to the interface call instruction;
Associative cell, to be associated with the expansion plugin and corresponding expansion interface;
Connection unit, to connect the expansion interface and general-purpose interface according to basic agreement;
Transmission unit is expanded to transmit the expansion plugin by the expansion interface and the general-purpose interface with configuring Open up agreement.
Further, the architecture mode of the interface call method is Model-View-view model architecture mode.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, deposited on computer readable storage medium Interface caller is contained, interface caller is based on function response type programming framework, and interface caller is executed by processor Shi Shixian is operated as follows:
Receive the interface call instruction from the page;
Configure Extended Protocol corresponding with the interface call instruction;
According to the Extended Protocol calling interface.
Further, when interface caller is executed by processor, expansion corresponding with the interface call instruction is being configured Before the operation for opening up agreement, following operation is also executed:
Obtain page control logic;
Receive the suction parameter determined according to the page control logic.
Further, when interface caller is executed by processor, in the operation according to the Extended Protocol calling interface Before, following operation is also executed:
Global configuration network request and corresponding return value.
Further, when interface caller is executed by processor, in the operation according to the Extended Protocol calling interface Later, following operation is also executed:
Call result is returned to the page.
Further, when interface caller is executed by processor, the operation for returning to call result to the page includes:
When call result is malloc failure malloc, after the preset lime again according to the Extended Protocol calling interface;
When the call result of continuous preset times is malloc failure malloc, stop calling interface, and generate standby signal.
Further, when interface caller is executed by processor, extension corresponding with the interface call instruction is configured The operation of agreement includes:
According to the interface call instruction, corresponding expansion plugin is obtained;
It is associated with the expansion plugin and corresponding expansion interface;
According to basic agreement, the expansion interface and general-purpose interface are connected;
The expansion plugin is transmitted by the expansion interface and the general-purpose interface, to configure Extended Protocol.
Further, when interface caller is executed by processor, the architecture mode of the interface call method is model- View, view model framework mode.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone, Computer, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of interface call method, which is characterized in that the interface call method is based on function response type programming framework, described Interface call method includes:
Receive the interface call instruction from the page;
Configure Extended Protocol corresponding with the interface call instruction;
According to the Extended Protocol calling interface.
2. interface call method as described in claim 1, which is characterized in that corresponding with the interface call instruction configuring Before the step of Extended Protocol, the interface call method is further comprising the steps of:
Obtain page control logic;
Receive the suction parameter determined according to the page control logic.
3. interface call method as described in claim 1, which is characterized in that in the step according to the Extended Protocol calling interface Before rapid, the interface call method is further comprising the steps of:
Global configuration network request and corresponding return value.
4. interface call method as described in claim 1, which is characterized in that in the step according to the Extended Protocol calling interface After rapid, the interface call method is further comprising the steps of:
Call result is returned to the page.
5. interface call method as claimed in claim 4, which is characterized in that return call result to the step of page wrap It includes:
When call result is malloc failure malloc, after the preset lime again according to the Extended Protocol calling interface;
When the call result of continuous preset times is malloc failure malloc, stop calling interface, and generate standby signal.
6. interface call method as described in claim 1, which is characterized in that configuration expansion corresponding with the interface call instruction Open up agreement the step of include:
According to the interface call instruction, corresponding expansion plugin is obtained;
It is associated with the expansion plugin and corresponding expansion interface;
According to basic agreement, the expansion interface and general-purpose interface are connected;
The expansion plugin is transmitted by the expansion interface and the general-purpose interface, to configure Extended Protocol.
7. such as interface call method described in any one of claims 1 to 6, which is characterized in that the interface call method Architecture mode is Model-View-view model architecture mode.
8. a kind of interface calls equipment, which is characterized in that the interface calls equipment to include: memory, processor and be stored in On the memory and the computer program that can run on the processor, the computer program are executed by the processor The step of interface call method of the Shi Shixian as described in any one of claims 1 to 7.
9. a kind of interface calling device, which is characterized in that the interface calling device is based on function response type programming framework, described Interface calling device includes:
Receiving module, to receive the interface call instruction from the page;
Configuration module, to configure Extended Protocol corresponding with the interface call instruction;
Calling module, to according to the Extended Protocol calling interface.
10. a kind of computer readable storage medium, which is characterized in that be stored with interface tune on the computer readable storage medium With program, realize that the interface as described in any one of claims 1 to 7 calls when the interface caller is executed by processor The step of method.
CN201811127098.1A 2018-09-26 2018-09-26 Interface call method, unit and computer readable storage medium Pending CN109669786A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811127098.1A CN109669786A (en) 2018-09-26 2018-09-26 Interface call method, unit and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811127098.1A CN109669786A (en) 2018-09-26 2018-09-26 Interface call method, unit and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109669786A true CN109669786A (en) 2019-04-23

Family

ID=66142079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811127098.1A Pending CN109669786A (en) 2018-09-26 2018-09-26 Interface call method, unit and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109669786A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110366118A (en) * 2019-07-05 2019-10-22 广州市百果园信息技术有限公司 A kind of radio station, application program and the method for realizing radio station function
CN111611024A (en) * 2020-05-09 2020-09-01 上海万间信息技术有限公司 iOS component optimization method, system and terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110366118A (en) * 2019-07-05 2019-10-22 广州市百果园信息技术有限公司 A kind of radio station, application program and the method for realizing radio station function
CN111611024A (en) * 2020-05-09 2020-09-01 上海万间信息技术有限公司 iOS component optimization method, system and terminal
CN111611024B (en) * 2020-05-09 2022-10-11 上海万间信息技术有限公司 iOS component optimization method, system and terminal

Similar Documents

Publication Publication Date Title
US11934352B2 (en) Card rendering method and electronic device
CN108647088A (en) Resource allocation method, device, terminal and storage medium
CN105991354A (en) Method and apparatus for transmitting integrated messages
CN111247510B (en) Display method of application window and terminal
CN103687060B (en) Terminal communicating method, device and terminal
CN104798376A (en) Camera command set host command translation
CN105389325A (en) Content search method and electronic device implementing same
CN108242837A (en) The method of the charging of electronic equipment and control electronics
CN107704245A (en) Protocol accessing method, device and computer-readable recording medium
CN106339405A (en) Method For Displaying Web Content And Electronic Device Supporting The Same
CN112825232B (en) Compensation method and electronic equipment
CN105871600A (en) Application upgrade package detection method, server, and application program upgrade method and system
WO2020233556A1 (en) Call content processing method and electronic device
CN105898890A (en) Device searching method and electronic device for supporting the same
CN109669786A (en) Interface call method, unit and computer readable storage medium
CN104798065A (en) Enabling a metadata storage subsystem
CN106294108A (en) Applied program testing method and device
CN110516218A (en) Generation method, terminal and the computer readable storage medium of table
EP4033354A1 (en) Method and apparatus for installing plug-in, and storage medium
KR20160001076A (en) Method for managing data and an electronic device thereof
KR20150026560A (en) An electronic device including opanable cover and operating method thereof
CN106462191A (en) Electronic device and method of content display
CN109126124A (en) Engine adaptation method, relevant device and computer readable storage medium
CN108475181A (en) Electronic equipment and method of operating an electronic device
CN107765922A (en) Card screen detection is with solving method, mobile terminal and computer-readable recording medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination