CN111026563A - Method and device for calling interface, storage medium and electronic equipment - Google Patents

Method and device for calling interface, storage medium and electronic equipment Download PDF

Info

Publication number
CN111026563A
CN111026563A CN201911129193.XA CN201911129193A CN111026563A CN 111026563 A CN111026563 A CN 111026563A CN 201911129193 A CN201911129193 A CN 201911129193A CN 111026563 A CN111026563 A CN 111026563A
Authority
CN
China
Prior art keywords
interface
file
identification information
target
storage address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911129193.XA
Other languages
Chinese (zh)
Other versions
CN111026563B (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.)
Beijing Feisike Technology Co ltd
Original Assignee
Beijing Bee Box 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 Beijing Bee Box Technology Co ltd filed Critical Beijing Bee Box Technology Co ltd
Priority to CN201911129193.XA priority Critical patent/CN111026563B/en
Publication of CN111026563A publication Critical patent/CN111026563A/en
Application granted granted Critical
Publication of CN111026563B publication Critical patent/CN111026563B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure relates to a method, a device, a storage medium and an electronic device for calling an interface, wherein the method comprises the steps of receiving an interface calling request sent by a client, wherein the interface calling request comprises a target interface which is requested to be called by the client; if the target interface is a newly added interface, acquiring a first storage address corresponding to an interface identifier of the target interface; acquiring a stored target interface file of the target interface according to the first storage address; and calling the target interface according to the target interface file. Therefore, when the target interface is called, if the target interface is a newly added interface, the stored target interface file of the target interface is obtained according to the first storage address; calling the target interface according to the target interface file; the interface updating efficiency can be improved, the interface function can be flexibly expanded, and the user experience can be favorably improved.

Description

Method and device for calling interface, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for invoking an interface, a storage medium, and an electronic device.
Background
The Web server is used for providing online information browsing service, and when receiving a webpage request sent by terminal equipment such as a mobile phone or a computer, the Web server provides corresponding webpage service for the terminal equipment by calling a service interface. In order to better provide Web services, the Web server needs to update the existing interface or add a new interface frequently to expand the interface service content.
At present, when a new interface is developed and added, the function corresponding to the added interface is usually solidified during development, and cannot be flexibly updated in the subsequent calling process, if the interface is required to be updated, function expansion is realized, and only all contents of the interface file added with the newly added function can be compiled again, and then the interface file is packaged and released.
Disclosure of Invention
The present disclosure aims to provide a method, an apparatus, a storage medium, and an electronic device for calling an interface, which are used to solve the technical problem that the current interface has low updating efficiency and is not beneficial to the expansion of the interface function.
In order to achieve the above object, a first aspect of the present disclosure provides a method for calling an interface, which is applied to a server, and the method includes:
receiving an interface calling request sent by a client, wherein the interface calling request comprises a target interface which is requested to be called by the client;
if the target interface is a newly added interface, acquiring a first storage address corresponding to an interface identifier of the target interface;
acquiring a stored target interface file of the target interface according to the first storage address;
and calling the target interface according to the target interface file.
Optionally, the obtaining the first storage address corresponding to the interface identifier of the target interface includes:
acquiring an interface file mapping table, wherein the interface file mapping table comprises a corresponding relation between the interface identifier and the first storage address;
and determining the first storage address through the interface file mapping table according to the interface identifier.
Optionally, before receiving the interface call request sent by the client, the method further includes:
acquiring first identification information of an installed interface;
acquiring second identification information of a pre-stored interface file;
if the second identification information comprises identification information of other interfaces except the first identification information, determining the other interfaces as newly added interfaces;
acquiring a second storage address of the interface file corresponding to the newly added interface in the server,
and establishing and storing the corresponding relation between the identification information of the newly-added interface and the second storage address.
Optionally, the method further comprises:
if the second identification information does not include identification information of other interfaces except the first identification information, determining whether an interface file to be updated exists in the installed interface, and determining an interface corresponding to the interface file to be updated as the new interface when determining that the interface file to be updated exists.
Optionally, the calling the target interface according to the target interface file includes:
and installing the target interface file to generate and start the target interface.
In a second aspect of the present disclosure, there is provided an apparatus for invoking an interface, applied to a server, the apparatus including:
the system comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving an interface calling request sent by a client, and the interface calling request comprises a target interface which is requested to be called by the client;
the first obtaining module is used for obtaining a first storage address corresponding to the interface identifier of the target interface if the target interface is a newly added interface;
the second acquisition module is used for acquiring a stored target interface file of the target interface according to the first storage address;
and the calling module is used for calling the target interface according to the target interface file.
Optionally, the first obtaining module includes:
the obtaining submodule is used for obtaining an interface file mapping table, and the interface file mapping table comprises a corresponding relation between the interface identifier and the first storage address;
and the determining submodule is used for determining the first storage address through the interface file mapping table according to the interface identifier.
Optionally, the device further comprises
The third acquisition module is used for acquiring the first identification information of the installed interface;
the fourth acquisition module is used for acquiring second identification information of the pre-stored interface file;
a first determining module, configured to determine, if the second identification information includes identification information of other interfaces except the first identification information, that the other interfaces are newly added interfaces;
a fifth obtaining module, configured to obtain a second storage address of the interface file corresponding to the newly added interface in the server,
and the storage module is used for establishing and storing the corresponding relation between the identification information of the newly-added interface and the second storage address.
Optionally, the apparatus further comprises:
and a second determining module, configured to determine whether an interface file to be updated exists in the installed interface if the second identification information does not include identification information of other interfaces except the first identification information, and determine, when it is determined that the interface file to be updated exists, an interface corresponding to the interface file to be updated as the new interface.
Optionally, the calling module is configured to install the target interface file to generate and start the target interface.
In a third aspect of the present disclosure there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of the first aspect above.
In a fourth aspect of the present disclosure, there is provided an electronic device comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of the first aspect above.
According to the technical scheme, an interface calling request sent by a client is received, wherein the interface calling request comprises a target interface which is requested to be called by the client; if the target interface is a newly added interface, acquiring a first storage address corresponding to an interface identifier of the target interface; acquiring a stored target interface file of the target interface according to the first storage address; and calling the target interface according to the target interface file. In this way, when a target interface is called, if the target interface is a newly added interface, the stored target interface file of the target interface is obtained according to the first storage address; calling the target interface according to the target interface file; the interface updating efficiency can be improved, the interface function can be flexibly expanded, and the user experience can be favorably improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a flow chart illustrating a method of invoking an interface in accordance with an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating a method of invoking an interface in accordance with another exemplary embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating a method of invoking an interface in accordance with the embodiment shown in FIG. 2 of the present disclosure;
FIG. 4 is a block diagram of an apparatus for invoking an interface, shown in yet another exemplary embodiment of the present disclosure;
FIG. 5 is a block diagram of an apparatus for invoking an interface according to the embodiment shown in FIG. 4 of the present disclosure;
fig. 6 is a block diagram of an electronic device shown in yet another exemplary embodiment of the present disclosure.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
Before introducing the specific embodiments of the present disclosure, an application scenario of the present disclosure is first described, and the present disclosure may be applied to a process in which a Web server implements function expansion when performing interface call. In order to better provide Web services, the Web server needs to update the existing interface frequently, and expand the service content by developing and adding a new interface. When developing and increasing new service interface at present, the interface that adds is that can't nimble be updated (the function that every interface corresponds just has been solidified when developing usually, the unable nimble function of carrying on is expanded), if will carry out the interface update, carry out the function expansion, can only compile again with adding the whole contents that the interface file that has new functional module corresponds, then packing and publishing, the process of this update interface is comparatively loaded down with trivial details, be unfavorable for promoting interface update efficiency, also be unfavorable for the expansion of interface function, also be unfavorable for promoting user experience.
In order to solve the technical problem, the present disclosure provides a method, an apparatus, a storage medium, and an electronic device for invoking an interface, where the method invokes a request by receiving an interface sent by a client, where the interface invokes the request including a target interface that the client requests to invoke; if the target interface is a newly added interface, acquiring a first storage address corresponding to an interface identifier of the target interface; acquiring a stored target interface file of the target interface according to the first storage address; and calling the target interface according to the target interface file. Therefore, when the target interface is called, if the target interface is a newly added interface, the stored target interface file of the target interface is obtained according to the first storage address; calling the target interface according to the target interface file; the interface updating efficiency can be improved, the interface function can be flexibly expanded, and the user experience can be favorably improved.
FIG. 1 is a flow chart illustrating a method of invoking an interface in accordance with an exemplary embodiment of the present disclosure; referring to fig. 1, the method is applied to a server and may include the following steps:
step 101, receiving an interface calling request sent by a client.
And the interface calling request comprises a target interface which is called by the client request.
It should be noted that the client may be a mobile phone, a computer or a personal PC, and the interface may be a static web page or a functional module; the interface calling request can be a calling request of a static webpage or a calling request of a function module, and the calling request can include an interface identifier of a called interface.
And 102, if the target interface is a newly added interface, acquiring a first storage address corresponding to the interface identifier of the target interface.
The new interface may be an uninstalled interface or an installed interface with an update, and the implementation of determining whether the new interface is the new interface may be: acquiring first identification information of an installed interface; acquiring second identification information of a pre-stored interface file; if the second identification information comprises identification information of other interfaces except the first identification information, determining the other interfaces as newly added interfaces; if the second identification information does not include identification information of other interfaces except the first identification information, determining whether an interface file to be updated exists in the installed interface, and determining an interface corresponding to the interface file to be updated as the new interface when determining that the interface file to be updated exists.
The embodiment of obtaining the first storage address corresponding to the interface identifier of the target interface in this step may be: acquiring an interface file mapping table, wherein the interface file mapping table comprises a corresponding relation between the interface identifier and the first storage address; and determining the first storage address through the interface file mapping table according to the interface identifier.
Before step 101, the interface file mapping table may be established by the following two embodiments:
in the first mode, second identification information of a pre-stored interface file and a second storage address of the interface file corresponding to the second identification information are acquired, and a corresponding relationship between the second identification information and the second storage address is established to generate the interface file mapping table. The pre-stored interface files comprise interface files corresponding to interfaces which are installed and generated and interface files corresponding to interfaces which are not installed and generated.
Acquiring first identification information of the installed interface; acquiring second identification information of a pre-stored interface file; if the second identification information comprises identification information of other interfaces except the first identification information, determining the other interfaces as newly added interfaces; if the second identification information does not include identification information of other interfaces except the first identification information, determining whether an interface file to be updated exists in the installed interface, and determining an interface corresponding to the interface file to be updated as the new interface when determining that the interface file to be updated exists; and acquiring a second storage address of the interface file corresponding to the newly added interface in the server, and establishing and storing a corresponding relation between the identification information of the newly added interface and the second storage address.
It should be noted that the interface identifier may be an interface name, a code, an icon, or a symbol, the first storage address may be one of the second storage addresses, the first storage address and the second storage address may be storage locations for storing the interface file, and the storage locations may include access paths, such as C: \ Users \ Desktop, or URL (Uniform Resource Locator), such as a local disk, or a computer on a local area network, or a site on the Internet.
And 103, acquiring a stored target interface file of the target interface according to the first storage address.
The target interface file may be a file of an installable operation format stored in the first storage address, and may be a format file such as a dex file, an exe file, or a bin file.
And 104, calling the target interface according to the target interface file.
After the target interface file is found through the first storage address, the target interface file is analyzed and installed to generate and start the target interface.
Therefore, when the target interface is called, if the target interface is a newly added interface, the stored target interface file of the target interface is obtained according to the first storage address; calling the target interface according to the target interface file; the interface updating efficiency can be improved, the interface function can be flexibly expanded, and the user experience can be favorably improved.
FIG. 2 is a flow chart illustrating a method of invoking an interface in accordance with another exemplary embodiment of the present disclosure; referring to fig. 2, the method may include the steps of:
step 201, obtaining first identification information of an installed interface.
The first identification information may be a URL address of the interface, or information such as a name, a code, or an icon of the interface.
Step 202, obtaining second identification information of the interface file stored in advance.
The second identification information may be an interface name, an interface code, or an interface icon corresponding to the interface file, or an access path or a URL address corresponding to the interface file.
Step 203, determining whether the second identification information includes identification information of other interfaces besides the first identification information.
In this step, if it is determined that the second identification information includes identification information of other interfaces except the first identification information, step 204 is executed; if the second identification information does not include identification information of other interfaces except the first identification information, step 205 is executed.
And step 204, determining the other interfaces as the newly added interfaces.
Step 205, determine whether there is an interface file to be updated in the installed interface.
In this step, when it is determined that the interface file to be updated exists, step 206 is performed, and when it is determined that the interface file to be updated does not exist, steps 201 to 203 are continuously performed.
For example, when determining whether an installed interface has an interface file to be updated, it may be determined that the installed interface program has been modified and an update exists by determining whether MD5 corresponding to the interface file of the installed interface is changed (Message Digest 5), and if MD5 is changed; if the MD5 has not changed, it may be determined that the installed interface program has not been modified and there is no interface file to be updated.
Step 206, determining the interface corresponding to the interface file to be updated as the new interface.
After the new interface is determined through the above steps, the history correspondence may be updated through the following steps 208 to 209 to obtain the updated interface file mapping table.
Step 207, obtaining a second storage address of the interface file corresponding to the newly added interface in the server.
And step 208, establishing and storing the corresponding relationship between the identification information of the newly added interface and the second storage address to obtain the interface file mapping table.
After obtaining the interface file mapping table, if an interface call request is to be received, the interface call may be completed by referring to the following steps shown in fig. 3, where fig. 3 is a flowchart of a method for calling an interface according to the embodiment shown in fig. 2 of the present disclosure; referring to fig. 3, the method may include the steps of:
step 209, receiving an interface call request sent by the client.
And the interface calling request comprises a target interface which is called by the client request. The interface can be a static webpage or a functional module; the interface calling request can be a calling request of a static webpage or a calling request of a function module, and the calling request can include an interface identifier of a called interface.
Step 210, determine whether the target interface is a new interface.
In this step, if it is determined that the target interface is the newly added interface, step 211 is executed; if the target interface is determined to be a non-added interface, step 215 is performed.
It should be noted that the new interface may be an uninstalled interface or an installed interface but with an update. The implementation of determining whether the new interface is determined may be: acquiring first identification information of an installed interface; acquiring second identification information of a pre-stored interface file; if the second identification information comprises identification information of other interfaces except the first identification information, determining the other interfaces as newly added interfaces; if the second identification information does not include identification information of other interfaces except the first identification information, determining whether an interface file to be updated exists in the installed interface, and determining an interface corresponding to the interface file to be updated as the new interface when determining that the interface file to be updated exists.
Step 211, obtain the mapping table of the interface file.
The interface file mapping table comprises the corresponding relation between the interface identifier and the first storage address.
It should be noted that the interface file mapping table may be the interface file mapping table obtained by establishing and storing the corresponding relationship between the identification information of the new interface and the second storage address in step 209.
Step 212, determining the first storage address through the interface file mapping table according to the interface identifier.
And step 213, acquiring the stored target interface file of the target interface according to the first storage address.
It should be noted that: and if the first storage address is a URL address, acquiring the target interface file through an access path corresponding to the URL address. If the first storage address is a storage location, the target interface file can be acquired by accessing the storage location.
For example, if the first storage address is C: \ Users \ Desktop, the target interface file can be obtained on the Desktop of the user.
Step 214, installing the target interface file to generate and start the target interface.
Step 215 calls the target interface.
Illustratively, the newly added development code is compiled and packaged into a dex file, the dex file is stored in a specified position in a file storage device (the specified position can be any storage position which can be scanned by a server program in a file system), and a Webserver program waits for scanning of the Webserver program, and stores the scanning result in a loader index file, wherein the loader index file comprises a correspondence table of the identification of the dex file and the corresponding storage address. The front end web page can call the new Interface function corresponding to the dex file through an Interface, when the new Interface function is called, an API (Application Programming Interface) request is sent by the front end web page, after the Webserver server program receives the Interface calling request, a routing module is called, the corresponding dex file is found according to a storage address in the loader index file, and the dex file is installed to generate and start an Interface corresponding to the dex file, so that the call of the new Interface is realized.
Therefore, when the target interface is called, if the target interface is a newly added interface, the stored target interface file of the target interface is obtained according to the first storage address; calling the target interface according to the target interface file; the interface updating efficiency can be improved, the interface function can be flexibly expanded, and the user experience can be favorably improved.
FIG. 4 is a block diagram of an apparatus for invoking an interface, shown in yet another exemplary embodiment of the present disclosure; referring to fig. 4, the apparatus includes:
the receiving module 401 is configured to receive an interface call request sent by a client, where the interface call request includes a target interface requested to be called by the client.
A first obtaining module 402, configured to obtain a first storage address corresponding to the interface identifier of the target interface if the target interface is a newly added interface.
A second obtaining module 403, configured to obtain a stored target interface file of the target interface according to the first storage address.
A calling module 404, configured to call the target interface according to the target interface file.
Therefore, when the target interface is called, if the target interface is a newly added interface, the stored target interface file of the target interface is obtained according to the first storage address; calling the target interface according to the target interface file; the interface updating efficiency can be improved, the interface function can be flexibly expanded, and the user experience can be favorably improved.
FIG. 5 is a block diagram of an apparatus for invoking an interface according to the embodiment shown in FIG. 4 of the present disclosure; referring to fig. 5, the first obtaining module 402 includes:
the obtaining submodule 4021 is configured to obtain an interface file mapping table, where the interface file mapping table includes a correspondence between the interface identifier and the first storage address;
the determining submodule 4022 is configured to determine the first storage address through the interface file mapping table according to the interface identifier.
Optionally, the device further comprises
A third obtaining module 405, configured to obtain first identification information of an installed interface;
a fourth obtaining module 406, configured to obtain second identification information of a pre-stored interface file;
a first determining module 407, configured to determine, if the second identification information includes identification information of other interfaces except the first identification information, that the other interfaces are newly added interfaces;
a fifth obtaining module 408, configured to obtain a second storage address of the interface file corresponding to the newly added interface in the server,
the storage module 409 is configured to establish and store a corresponding relationship between the identification information of the newly added interface and the second storage address.
Optionally, the apparatus further comprises:
the second determining module 410 determines whether an interface file to be updated exists in the installed interface if the second identification information does not include identification information of other interfaces except the first identification information, and determines an interface corresponding to the interface file to be updated as the new interface when determining that the interface file to be updated exists.
Optionally, the invoking module 404 is configured to install the target interface file to generate and start the target interface.
Therefore, when the target interface is called, if the target interface is a newly added interface, the stored target interface file of the target interface is obtained according to the first storage address; calling the target interface according to the target interface file; the interface updating efficiency can be improved, the interface function can be flexibly expanded, and the user experience can be favorably improved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 6 is a block diagram of an electronic device 600 shown in yet another exemplary embodiment of the present disclosure. For example, the electronic device 600 may be provided as a server. Referring to fig. 6, the electronic device 600 includes a processor 622, which may be one or more in number, and a memory 632 for storing computer programs executable by the processor 622. The computer program stored in memory 632 may include one or more modules that each correspond to a set of instructions. Further, the processor 622 may be configured to execute the computer program to perform the method of calling the interface described above.
Additionally, electronic device 600 may also include a power component 626 that may be configured to perform power management of electronic device 600 and a communication component 650 that may be configured to enable communication, e.g., wired or wireless communication, of electronic device 600. The electronic device 600 may also include input/output (I/O) interfaces 658. The electronic device 600 may operate based on an operating system stored in the memory 632, such as Windows Server, Mac OSXTM, UnixTM, LinuxTM, and the like.
In another exemplary embodiment, a computer readable storage medium is also provided, which comprises program instructions, which when executed by a processor, implement the steps of the method of invoking an interface described above. For example, the computer readable storage medium may be the memory 632 described above that includes program instructions that are executable by the processor 622 of the electronic device 600 to perform the methods described above for invoking an interface.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that, in the foregoing embodiments, various features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various combinations that are possible in the present disclosure are not described again.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (10)

1. A method for calling an interface, applied to a server, the method comprising:
receiving an interface calling request sent by a client, wherein the interface calling request comprises a target interface which is requested to be called by the client;
if the target interface is a newly added interface, acquiring a first storage address corresponding to an interface identifier of the target interface;
acquiring a stored target interface file of the target interface according to the first storage address;
and calling the target interface according to the target interface file.
2. The method of claim 1, wherein the obtaining the first storage address corresponding to the interface identifier of the target interface comprises:
acquiring an interface file mapping table, wherein the interface file mapping table comprises a corresponding relation between the interface identifier and the first storage address;
and determining the first storage address through the interface file mapping table according to the interface identifier.
3. The method of claim 1, wherein prior to receiving the interface call request sent by the client, the method further comprises:
acquiring first identification information of an installed interface;
acquiring second identification information of a pre-stored interface file;
if the second identification information comprises identification information of other interfaces except the first identification information, determining the other interfaces as newly added interfaces;
acquiring a second storage address of the interface file corresponding to the newly added interface in the server,
and establishing and storing the corresponding relation between the identification information of the newly-added interface and the second storage address.
4. The method of claim 3, further comprising:
if the second identification information does not include identification information of other interfaces except the first identification information, determining whether an interface file to be updated exists in the installed interface, and determining an interface corresponding to the interface file to be updated as the new interface when determining that the interface file to be updated exists.
5. The method of any of claims 1 to 3, wherein said invoking said target interface according to said target interface file comprises:
and installing the target interface file to generate and start the target interface.
6. An apparatus for calling an interface, applied to a server, the apparatus comprising:
the system comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving an interface calling request sent by a client, and the interface calling request comprises a target interface which is requested to be called by the client;
the first obtaining module is used for obtaining a first storage address corresponding to the interface identifier of the target interface if the target interface is a newly added interface;
the second acquisition module is used for acquiring a stored target interface file of the target interface according to the first storage address;
and the calling module is used for calling the target interface according to the target interface file.
7. The apparatus of claim 6, wherein the first obtaining module comprises:
the obtaining submodule is used for obtaining an interface file mapping table, and the interface file mapping table comprises a corresponding relation between the interface identifier and the first storage address;
and the determining submodule is used for determining the first storage address through the interface file mapping table according to the interface identifier.
8. The apparatus of claim 6, further comprising:
the third acquisition module is used for acquiring the first identification information of the installed interface;
the fourth acquisition module is used for acquiring second identification information of the pre-stored interface file;
a first determining module, configured to determine, if the second identification information includes identification information of other interfaces except the first identification information, that the other interfaces are newly added interfaces;
a fifth obtaining module, configured to obtain a second storage address of the interface file corresponding to the newly added interface in the server,
and the storage module is used for establishing and storing the corresponding relation between the identification information of the newly-added interface and the second storage address.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
10. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 5.
CN201911129193.XA 2019-11-18 2019-11-18 Interface calling method and device, storage medium and electronic equipment Active CN111026563B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911129193.XA CN111026563B (en) 2019-11-18 2019-11-18 Interface calling method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911129193.XA CN111026563B (en) 2019-11-18 2019-11-18 Interface calling method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111026563A true CN111026563A (en) 2020-04-17
CN111026563B CN111026563B (en) 2024-03-15

Family

ID=70200448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911129193.XA Active CN111026563B (en) 2019-11-18 2019-11-18 Interface calling method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111026563B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0416470D0 (en) * 2004-07-23 2004-08-25 King S College London A method of mapping a first interface to a second interface
CN104683308A (en) * 2013-12-02 2015-06-03 腾讯科技(深圳)有限公司 Method and device for executing instruction
CN108255905A (en) * 2017-05-04 2018-07-06 平安科技(深圳)有限公司 Interface calls data processing method, device and computer equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0416470D0 (en) * 2004-07-23 2004-08-25 King S College London A method of mapping a first interface to a second interface
CN104683308A (en) * 2013-12-02 2015-06-03 腾讯科技(深圳)有限公司 Method and device for executing instruction
CN108255905A (en) * 2017-05-04 2018-07-06 平安科技(深圳)有限公司 Interface calls data processing method, device and computer equipment

Also Published As

Publication number Publication date
CN111026563B (en) 2024-03-15

Similar Documents

Publication Publication Date Title
CN108055248B (en) Dubbo framework-based remote calling method, server and storage medium
CN110221872B (en) Page jump method and device, electronic equipment and storage medium
EP2129148B1 (en) Content distribution system
CN109558320B (en) System testing method, device, system, equipment and computer readable storage medium
CN107015870B (en) Method and device for realizing communication between web page and local application and electronic equipment
CN106406961A (en) Method and device for loading and providing application based on browser
EP3197122B1 (en) Method of forwarding in-application traffic on smart mobile terminal
WO2007108866A1 (en) Estimation of initial dynamic rendering control data
CN111045833A (en) Interface calling method and device
CN108845800B (en) Method, device, equipment and storage medium for realizing component extension function
CN105260200A (en) Processing method and device for upgrading operating system
CN105159692A (en) Application identifying method, application identifying device and server
CN112860398A (en) Data processing method, device, equipment and medium based on rule engine
CN114253441B (en) Method and device for enabling target function, storage medium and electronic device
CN111026563B (en) Interface calling method and device, storage medium and electronic equipment
CN110737450A (en) dynamic application security enhancement method, device, equipment and computer medium
CN111131436B (en) Method and device for quickly searching proxy and readable storage medium
CN111488286B (en) Method and device for independently developing Android modules
KR100601848B1 (en) Method for Processing Download Descriptor in Mobile Communication Terminal
CN111737218A (en) File sharing method and device
CN111078571A (en) Test method for simulation response, terminal device and computer readable storage medium
CN116974653B (en) Class loading method and system
CN112486539B (en) Application updating method, device, equipment and storage medium
CN111917807B (en) Method and system for invoking download client by android system WAP webpage
CN106028321A (en) Identification code processing method and device

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240208

Address after: No. 17, 1st Floor, Building 10, No. 5 Tangjia Village, Guangqu East Road, Chaoyang District, Beijing, 100000

Applicant after: Beijing Feisike Technology Co.,Ltd.

Country or region after: China

Address before: 100085 2207, 22 / F, building 2, yard 1, shangdishi street, Haidian District, Beijing

Applicant before: BEIJING BEE BOX TECHNOLOGY Co.,Ltd.

Country or region before: China

GR01 Patent grant
GR01 Patent grant