CN116800769A - Processing method and processing device of API remote call request, user terminal and server - Google Patents

Processing method and processing device of API remote call request, user terminal and server Download PDF

Info

Publication number
CN116800769A
CN116800769A CN202311095694.7A CN202311095694A CN116800769A CN 116800769 A CN116800769 A CN 116800769A CN 202311095694 A CN202311095694 A CN 202311095694A CN 116800769 A CN116800769 A CN 116800769A
Authority
CN
China
Prior art keywords
api
execution result
call request
remote call
server
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
CN202311095694.7A
Other languages
Chinese (zh)
Other versions
CN116800769B (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.)
Vita Technology Beijing Co ltd
Original Assignee
Vita Technology Beijing 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 Vita Technology Beijing Co ltd filed Critical Vita Technology Beijing Co ltd
Priority to CN202311095694.7A priority Critical patent/CN116800769B/en
Publication of CN116800769A publication Critical patent/CN116800769A/en
Application granted granted Critical
Publication of CN116800769B publication Critical patent/CN116800769B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1087Peer-to-peer [P2P] networks using cross-functional networking aspects
    • H04L67/1091Interfacing with client-server systems or between P2P systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]
    • 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)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure relates to a processing method, a processing device, a user terminal and a server for an API remote call request, wherein the method comprises the following steps: receiving a first API remote call request sent by a user terminal; searching at least one second API associated with the first API; acquiring an execution result of the first API and an execution result of the at least one second API; and sending the execution result of the first API and the execution result of the at least one second API to a user terminal through the first API.

Description

Processing method and processing device of API remote call request, user terminal and server
Technical Field
The present disclosure relates to remote call technology, and more particularly, to a processing method, a processing apparatus, a user terminal, and a server for an API remote call request.
Background
The RPC (Remote Procedure Call ) may let the developer call the API directly at the remote node as if it were calling the API locally (Application Programming Interface ). The method is widely applied to the Internet micro-service architecture, and also has a plurality of applications in the field of operating system virtualization.
While RPC brings much flexibility and possibility, RPC brings some performance penalty compared to native API calls. The execution time of an API is negligible compared to the transmission time of the execution result of each API call. The execution result of each API call is transferred once, which obviously causes no small transfer overhead. Therefore, it is necessary to provide a technical solution for reducing the number of times of transmission of the execution result of the API remote call.
Disclosure of Invention
An object of the present invention is to provide a new technical solution of a processing method of an API remote call request.
According to a first aspect of the present invention, there is provided a method for processing an API remote call request, including:
receiving a first API remote call request sent by a user terminal;
searching at least one second API associated with the first API;
acquiring an execution result of the first API and an execution result of the at least one second API;
and sending the execution result of the first API and the execution result of the at least one second API to a user terminal through the first API.
Optionally, before said searching for at least one second API associated with said first API, said method further comprises:
acquiring pre-stored information of APIs associated with each API;
the looking up at least one second API associated with the first API includes:
and searching at least one second API associated with the first API according to the pre-stored information of the APIs associated with each API.
Optionally, before obtaining the execution result of the at least one second API, the method further includes:
acquiring pre-stored information of an API capable of pre-fetching an execution result;
determining whether name information of the at least one second API exists according to pre-stored information of the API capable of pre-fetching the execution result;
in the case that it is determined that the name information of the at least one second API exists, performing a step of acquiring an execution result of the at least one second API;
and transmitting an execution result of the first API to a user terminal through the first API in the case that the name information of the at least one second API does not exist.
Optionally, the API capable of prefetching execution results is the same for each execution result called in a time period.
Optionally, the method further comprises:
and sending the execution result of the first API to a user terminal through the first API under the condition that at least one second API associated with the first API is not found.
According to a second aspect of the present invention, there is provided a method for processing an API remote call request, including:
sending a first API remote call request to a server;
and receiving an execution result of the first API and an execution result of at least one second API returned by the server through the first API, wherein the at least one second API is associated with the first API.
Optionally, before sending the first API remote call request to the server, the method further includes:
acquiring pre-stored information of an API capable of pre-fetching an execution result;
determining whether name information of a first API exists according to pre-stored information of the API capable of pre-fetching an execution result;
acquiring a locally stored execution result of the first API under the condition that the existence of name information of the first API is determined;
in the case that it is determined that the name information of the first API does not exist, the step of sending a first API remote call request to the server is performed.
Optionally, before the obtaining the execution result of the first API stored locally, the method further includes:
acquiring pre-stored information of an execution result of the API;
determining whether the execution result of the first API is locally stored according to pre-stored information of the execution result of the API;
executing the step of acquiring the execution result of the first API stored locally under the condition that the execution result of the first API stored locally is determined;
and a step of sending a first API remote call request to the server, in case it is determined that the executing step of the first API is not stored locally.
Optionally, after receiving the execution result of the first API and the execution result of the at least one second API returned by the server through the first API, the method further includes:
storing the name information of the at least one second API in the pre-stored information of the API capable of prefetching the execution result, and storing the name information of the first API in the pre-stored information of the API capable of prefetching the execution result under the condition that the execution result of the first API which is called each time in a time period is the same;
storing the execution result of the at least one second API in pre-stored information of the execution result of the API, and storing the execution result of the first API in pre-stored information of the execution result of the API when the execution result of the first API called each time in a period of time is the same.
According to a third aspect of the present invention, there is provided an apparatus for processing an API remote call request, the apparatus comprising:
the receiving module is used for receiving a first API remote call request sent by the user terminal;
a search module for searching at least one second API associated with the first API;
the first acquisition module is used for acquiring an execution result of the first API and an execution result of the at least one second API;
and the sending module is used for sending the execution result of the first API and the execution result of the at least one second API to the user terminal through the first API.
According to a fourth aspect of the present invention there is provided a server comprising a memory and a processor, the memory storing a computer program for controlling the processor to operate to perform the method according to any one of the first aspects.
According to a fifth aspect of the present invention, there is provided an apparatus for processing an API remote call request, the apparatus comprising:
the sending module is used for sending a first API remote call request to the server;
and the receiving module is used for receiving an execution result of the first API and an execution result of at least one second API returned by the server through the first API, wherein the at least one second API is associated with the first API.
According to a sixth aspect of the present invention there is provided a user terminal comprising a memory and a processor, the memory storing a computer program for controlling the processor to operate to perform the method according to any of the second aspects.
According to the processing method of the API remote call request, the first API remote call request sent by the user terminal is received, at least one second API related to the first API is searched, the execution result of the first API and the execution result of the at least one second API are obtained, the execution result of the first API and the execution result of the at least one second API are sent to the user terminal through the first API, and the transmission times of the API remote call are reduced.
Features of the embodiments of the present specification and their advantages will become apparent from the following detailed description of exemplary embodiments of the present specification with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and, together with the description, serve to explain the principles of the embodiments of the specification.
FIG. 1 is a process flow diagram of a method of processing an API remote call request in accordance with one embodiment of the invention.
Fig. 2a is a schematic diagram of a prior art processing method of an API remote call request.
FIG. 2b is a schematic diagram of a method of processing an API remote call request, according to one embodiment of the invention.
FIG. 3 illustrates yet another process flow diagram of a method of processing an API remote call request in accordance with one embodiment of the invention.
FIG. 4 illustrates yet another process flow diagram of a method of processing an API remote call request in accordance with one embodiment of the invention.
FIG. 5 illustrates a functional block diagram of an API remote call request processing device according to one embodiment of the invention.
Fig. 6 shows a hardware configuration diagram of a server according to an embodiment of the present invention.
FIG. 7 illustrates yet another functional block diagram of an API remote call request processing apparatus according to one embodiment of the invention.
Fig. 8 illustrates a hardware configuration diagram of a user terminal according to an embodiment of the present invention.
Detailed Description
Various exemplary embodiments of the present specification will now be described in detail with reference to the accompanying drawings.
The following description of at least one exemplary embodiment is merely exemplary in nature and is in no way intended to limit the disclosure, its application, or uses.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
< method example >
In this embodiment, a method for processing an API remote call request is provided. The processing method of the API remote call request is implemented by a server. According to fig. 1, the processing method of the API remote call request of the present embodiment may include the following steps S110 to S140.
Step S110, a first API remote call request sent by a user terminal is received.
The first API remote call request includes at least name information of the first API.
Step S120, at least one second API associated with the first API is found.
Based on the historical data of the API call, when the first API is called, a second API can be called within a preset time period after the first API is called, and the second API is used as an associated API of the first API.
In one embodiment, the server stores pre-stored information for APIs associated with each API. The pre-stored information of the APIs associated with each API includes at least the name information of the API and the name information of the corresponding associated API. The name information of an API and the name information of an associated API have a one-to-one correspondence.
Taking API a as an example, the APIs associated with API a include API C and API E, and the pre-stored information corresponding to API a includes name information of API a, name information of API C, and name information of API E.
Prior to step S120, pre-stored information of APIs associated with each API is acquired. At least one second API associated with the first API is searched according to pre-stored information of APIs associated with each API.
Specifically, the name information of the first API is searched from the prestored information of the APIs associated with each API. Because the name information of the first API and the name information of the associated second API have a one-to-one correspondence in each piece of pre-stored information, the name information of the second API associated with the first API can be searched according to the name information of the first API.
Step S130, obtaining an execution result of the first API and an execution result of at least one second API.
In one embodiment, the pre-stored information of the APIs that can prefetch the execution results is obtained before the execution results of the at least one second API are obtained, and whether the name information of the at least one second API exists is determined according to the pre-stored information of the APIs that can prefetch the execution results.
The API that can prefetch execution results is the same for each execution result that is called in a period of time.
The server stores pre-stored information of the API that can pre-fetch the execution result. The pre-stored information of the API of the prefetchable execution result at least includes name information of the API of the prefetchable execution result.
And searching whether at least one name information of the second API exists in the prestored information of the API capable of prefetching the execution result by using the name information of the second API.
In case it is determined that there is name information of at least one second API, the step of acquiring an execution result of the at least one second API is performed. And transmitting an execution result of the first API to the user terminal through the first API in the case that it is determined that the name information of the at least one second API does not exist.
Step S140, the execution result of the first API and the execution result of the at least one second API are sent to the user terminal through the first API.
And synthesizing the execution result of the first API and the execution result of at least one second API into a data packet, and transmitting the data packet to the user terminal.
In one embodiment, in the case that at least one second API associated with the first API is not found, the execution result of the first API is transmitted to the user terminal through the first API.
In one embodiment, the APIs associated with API A are API C and API E. Referring to fig. 2a, in the prior art, a user terminal sends a remote call request of an API a to a server, and the server sends an execution result of the API a to the user terminal through the API a. The user terminal sends a remote call request of the API C to the server, and the server sends an execution result of the API C to the user terminal through the API C. Then, the user terminal sends a remote call request of the API E to the server, and the server sends an execution result of the API E to the user terminal through the API E.
Referring to fig. 2b, in the embodiment of the present invention, the user terminal sends a remote call request of API a to the server, and the server first obtains the associated APIs of API a, that is, API C and API E. And when the execution result of the API C and the execution result of the API E are prefetchable execution results, acquiring the execution results of the API A, the API C and the API E. And sending the execution results of the API A, the API C and the API E to the user terminal through the API A.
In the prior art, three transmissions are required, and execution results of the API A, the API C and the API E are sent to the user terminal. In the embodiment of the invention, the execution results of the API A, the API C and the API E are sent to the user terminal through the API A only through one-time transmission, so that the transmission times are reduced, and the overall performance of the remote calling of the API is improved.
In another embodiment, a method for processing an API remote call request is provided. The processing method of the API remote call request is implemented by the user terminal. The user terminal is, for example, a terminal device such as a mobile phone, a computer, or a wearable device, and is not limited herein. The user terminal is provided with a plurality of clients and operates.
According to the method of processing the API remote call request of the present embodiment, as shown in fig. 3, may include the following steps S310 to S320.
Step S310, a first API remote call request is sent to the server.
The first API remote call request includes at least name information of the first API.
The user can complete the first API remote call request through the client installed by the user terminal.
Step S320, receiving an execution result of the first API and an execution result of at least one second API returned by the server through the first API, where the at least one second API is associated with the first API.
Based on the historical data of the API call, when the first API is called, a second API is called within a preset time period after the first API is called, and the second API is used as an associated API of the first API.
In one embodiment, prior to execution of step S210, pre-stored information of the API that can prefetch execution results is obtained; and determining whether the name information of the first API exists according to the pre-stored information of the API capable of pre-fetching the execution result.
The execution result of each remote call by the API during a time period may be the same or different. In the case that the execution result of the API remotely called each time in a period of time is the same, the server receives the execution result of the API and stores the execution result of the API. When the user terminal sends the remote call request of the API to the server again, the execution result of the API can be directly obtained from the local.
In this embodiment, the API that can prefetch execution results is the same each time the execution results are called in a period of time.
The user terminal stores pre-stored information of the API capable of pre-fetching the execution result. The pre-stored information of the API of the prefetchable execution result at least includes name information of the API of the prefetchable execution result.
And searching whether the name information of the first API exists or not from prestored information of the API capable of prefetching the execution result by utilizing the name information of the first API.
And acquiring an execution result of the locally stored first API under the condition that the existence of the name information of the first API is determined. In the case where it is determined that the name information of the first API does not exist, the step of transmitting a first API remote call request to the server is performed.
In one embodiment, pre-stored information of the execution result of the API is obtained before the execution result of the locally stored first API is obtained; and determining whether the execution result of the first API is locally stored according to the pre-stored information of the execution result of the API.
The user terminal stores pre-stored information of the execution result of the API. The pre-stored information of the execution result of the API at least comprises name information of the API and a corresponding execution result. The name information of the API and the execution result have a one-to-one correspondence.
For example, the execution result of each API is recorded using a hash table, and the hash table is stored. Or, recording the execution result of each API by using the class object member, and storing the class object member.
Specifically, the name information of the first API is searched from the pre-stored information of the execution result of the API by using the name information of the first API. Because the name information of the first API and the execution result have a one-to-one correspondence in each piece of pre-stored information, the execution result of the first API can be found according to the name information of the first API.
In the case where it is determined that the execution result of the first API is stored locally, the step of acquiring the execution result of the first API stored locally is performed. And a step of transmitting a first API remote call request to the server in the case that it is determined that the execution step of the first API is not stored locally.
In one embodiment, after receiving the execution result of the first API and the execution result of the at least one second API returned by the server through the first API, name information of the at least one second API is stored in pre-stored information of the APIs that can prefetch the execution result, and in case that the execution result of the first API that is called each time within a period of time is the same, name information of the first API is stored in pre-stored information of the APIs that can prefetch the execution result. Storing the execution result of the at least one second API in pre-stored information of the execution result of the API, and storing the execution result of the first API in pre-stored information of the execution result of the API in case that the execution result of the first API called each time is the same in one time period.
FIG. 4 illustrates another process flow diagram of a method for processing an API remote call request provided in accordance with one embodiment of the invention. According to fig. 4, the processing method of the API remote call request of the present embodiment may include the following steps S401 to S415.
In this embodiment, before the user terminal sends the first API remote call request to the server, step S401 is executed to obtain the pre-stored information of the API that can prefetch the execution result.
In step S402, it is determined whether the name information of the first API exists in the pre-stored information of the API capable of pre-fetching the execution result.
If the determination result in step S402 is no, step S403 is executed to send a first API remote call request to the server.
If the determination result in step S402 is yes, step S404 is executed to obtain pre-stored information of the execution result of the API.
Step S405, determining whether there is an execution result of the first API in the pre-stored information of the execution result of the API.
If the determination result in step S405 is no, step S403 is executed.
If the determination result in step S405 is yes, step S406 is executed to obtain the execution result of the first API locally.
The server executes step S407 to receive a first API remote call request sent by the user terminal;
step S408, pre-stored information of APIs associated with each API is acquired.
Step S409, judging whether the pre-stored information of the APIs associated with each API exists in the associated APIs of the first API.
If the determination result in step S409 is no, step S410 is executed to obtain the execution result of the first API.
In step S411, the execution result of the first API is sent to the user terminal through the first API.
If the determination result in step S409 is yes, step S412 is performed to obtain the pre-stored information of the API that can prefetch the execution result.
In step S413, it is determined whether there is name information of at least one second API in the pre-stored information of the APIs capable of pre-fetching the execution result.
If the determination result in step S413 is no, step S411 is executed.
If the determination result in step S413 is yes, step S414 is performed to obtain the execution result of the first API and the execution result of the at least one second API.
Step S415, the execution result of the first API and the execution result of the at least one second API are sent to the user terminal through the first API.
< device example >
One embodiment of the present invention provides a processing apparatus for an API remote call request, as shown in fig. 5. The processing device 500 for an API remote call request includes a receiving module 510, a searching module 520, a first obtaining module 530, and a sending module 540.
The receiving module 510 is configured to receive a first API remote call request sent by a user terminal.
The lookup module 520 is configured to lookup at least one second API associated with the first API.
The first obtaining module 530 is configured to obtain an execution result of the first API and an execution result of the at least one second API.
The sending module 540 is configured to send the execution result of the first API and the execution result of the at least one second API to the user terminal through the first API.
In one embodiment of the present invention, the processing device of the API remote call request further includes a second acquisition module. The second acquisition module is used for acquiring pre-stored information of APIs associated with the APIs.
The lookup module 520 is further configured to lookup at least one second API associated with the first API based on pre-stored information of APIs associated with the APIs.
In one embodiment of the present invention, the first obtaining module 530 is further configured to obtain pre-stored information of the API that can prefetch the execution result.
The processing device of the API remote call request further includes a name information determination module of the second API. The name information determining module of the second API is used for determining whether at least one name information of the second API exists according to pre-stored information of the API capable of pre-fetching the execution result.
In case it is determined that there is name information of at least one second API, the first acquisition module 530 acquires an execution result of the at least one second API. In case it is determined that there is no name information of at least one second API, the transmitting module 540 transmits the execution result of the first API to the user terminal through the first API.
In one embodiment of the invention, the API that can prefetch execution results is the same for each execution result that is called in a period of time.
In one embodiment of the present invention, the sending module is further configured to send, when at least one second API associated with the first API is not found, an execution result of the first API to the user terminal through the first API.
One embodiment of the present invention provides a server as shown in fig. 6. The server 600 includes a memory 620 and a processor 610. The memory 620 stores a computer program for controlling the processor 610 to operate to perform any of the above-described processing methods of the API remote call request implemented by the server.
One embodiment of the present invention provides a processing apparatus for an API remote call request, as shown in fig. 7. The processing device 700 of the API remote call request includes a sending module 710 and a receiving module 720.
The sending module 710 is configured to send a first API remote call request to a server.
The receiving module 720 is configured to receive an execution result of the first API and an execution result of at least one second API returned by the server through the first API, where the at least one second API is associated with the first API.
In one embodiment of the present invention, the processing device of the API remote call request further includes an acquisition module and a determination module of name information of the first API.
The acquisition module is used for acquiring pre-stored information of the API capable of pre-fetching the execution result.
The determining module of the name information of the first API is used for determining whether the name information of the first API exists according to the pre-stored information of the API capable of pre-fetching the execution result.
The acquisition module is further configured to acquire an execution result of the locally stored first API in case it is determined that the name information of the first API exists.
In the case that the name information of the first API does not exist, the sending module sends a first API remote call request to the server.
In one embodiment of the present invention, the obtaining module is further configured to obtain pre-stored information of an execution result of the API.
The processing device of the API remote call request further includes a determination module of an execution result of the first API. The determining module of the execution result of the first API is used for determining whether the execution result of the first API is stored locally according to pre-stored information of the execution result of the API.
The acquisition module also acquires the execution result of the locally stored first API under the condition that the execution result of the locally stored first API is determined.
The sending module sends a first API remote call request to the server if it is determined that the executing step of the first API is not stored locally.
In one embodiment of the present invention, the processing device of the API remote call request further includes a storage module.
The storage module is used for storing the name information of at least one second API in the pre-stored information of the API capable of prefetching the execution result, and storing the name information of the first API in the pre-stored information of the API capable of prefetching the execution result under the condition that the execution result of the first API which is called each time in a time period is the same; storing the execution result of the at least one second API in pre-stored information of the execution result of the API, and storing the execution result of the first API in pre-stored information of the execution result of the API in case that the execution result of the first API called each time is the same in one time period.
One embodiment of the present invention provides a user terminal as shown in fig. 8. The user terminal 800 includes a memory 820 and a processor 810. The memory 820 stores a computer program for controlling the processor 810 to operate to perform any of the above-described processing methods of the API remote call request implemented by the user terminal.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. For the electric vehicle embodiment, the relevant points are referred to in the description of the method embodiment.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Embodiments of the present description may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer instructions for causing a processor to implement aspects of embodiments of the present description.
The computer readable storage medium may be a tangible device that can hold and store computer instructions for use by a computer instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: portable computer disks, hard disks, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static Random Access Memory (SRAM), portable compact disk read-only memory (CD-ROM), digital Versatile Disks (DVD), memory sticks, floppy disks, mechanical coding devices, punch cards or in-groove protrusion structures such as punch cards or grooves having computer instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media, as used herein, are not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., optical pulses through fiber optic cables), or electrical signals transmitted through wires.
The computer instructions described herein may be downloaded from a computer readable storage medium to a respective computing/processing device or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers and/or edge servers. The network interface card or network interface in each computing/processing device receives computer instructions from the network and forwards the computer instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present description. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of computer instructions, which comprises one or more executable computer instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are all equivalent.
The embodiments of the present specification have been described above, and the above description is illustrative, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the improvement of technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (13)

1. A method for processing an API remote call request, comprising:
receiving a first API remote call request sent by a user terminal;
searching at least one second API associated with the first API;
acquiring an execution result of the first API and an execution result of the at least one second API;
and sending the execution result of the first API and the execution result of the at least one second API to a user terminal through the first API.
2. The method of claim 1, wherein prior to said locating at least one second API associated with said first API, said method further comprises:
acquiring pre-stored information of APIs associated with each API;
the looking up at least one second API associated with the first API includes:
and searching at least one second API associated with the first API according to the pre-stored information of the APIs associated with each API.
3. The method of claim 1, wherein prior to obtaining the execution result of the at least one second API, the method further comprises:
acquiring pre-stored information of an API capable of pre-fetching an execution result;
determining whether name information of the at least one second API exists according to pre-stored information of the API capable of pre-fetching the execution result;
in the case that it is determined that the name information of the at least one second API exists, performing a step of acquiring an execution result of the at least one second API;
and transmitting an execution result of the first API to a user terminal through the first API in the case that the name information of the at least one second API does not exist.
4. A method according to claim 3, wherein the API of the prefetchable execution result is identical for each execution result called in a time period.
5. The method according to claim 1, wherein the method further comprises:
and sending the execution result of the first API to a user terminal through the first API under the condition that at least one second API associated with the first API is not found.
6. A method for processing an API remote call request, comprising:
sending a first API remote call request to a server;
and receiving an execution result of the first API and an execution result of at least one second API returned by the server through the first API, wherein the at least one second API is associated with the first API.
7. The method of claim 6, wherein prior to sending the first API remote call request to the server, the method further comprises:
acquiring pre-stored information of an API capable of pre-fetching an execution result;
determining whether name information of the first API exists according to pre-stored information of the API capable of pre-fetching an execution result;
acquiring a locally stored execution result of the first API under the condition that the existence of name information of the first API is determined;
in the case that it is determined that the name information of the first API does not exist, the step of sending a first API remote call request to the server is performed.
8. The method of claim 7, wherein prior to the retrieving the locally stored execution result of the first API, the method further comprises:
acquiring pre-stored information of an execution result of the API;
determining whether the execution result of the first API is locally stored according to pre-stored information of the execution result of the API;
executing the step of acquiring the execution result of the first API stored locally under the condition that the execution result of the first API stored locally is determined;
and a step of sending a first API remote call request to the server, in case it is determined that the executing step of the first API is not stored locally.
9. The method of claim 8, wherein after receiving the execution result of the first API and the execution result of the at least one second API returned by the server through the first API, the method further comprises:
storing the name information of the at least one second API in the pre-stored information of the API capable of prefetching the execution result, and storing the name information of the first API in the pre-stored information of the API capable of prefetching the execution result under the condition that the execution result of the first API which is called each time in a time period is the same;
storing the execution result of the at least one second API in pre-stored information of the execution result of the API, and storing the execution result of the first API in pre-stored information of the execution result of the API when the execution result of the first API called each time in a period of time is the same.
10. An apparatus for processing an API remote call request, said apparatus comprising:
the receiving module is used for receiving a first API remote call request sent by the user terminal;
a search module for searching at least one second API associated with the first API;
the first acquisition module is used for acquiring an execution result of the first API and an execution result of the at least one second API;
and the sending module is used for sending the execution result of the first API and the execution result of the at least one second API to the user terminal through the first API.
11. A server comprising a memory and a processor, the memory storing a computer program for controlling the processor to operate to perform the method according to any one of claims 1-5.
12. An apparatus for processing an API remote call request, said apparatus comprising:
the sending module is used for sending a first API remote call request to the server;
and the receiving module is used for receiving an execution result of the first API and an execution result of at least one second API returned by the server through the first API, wherein the at least one second API is associated with the first API.
13. A user terminal comprising a memory and a processor, the memory storing a computer program for controlling the processor to operate to perform the method according to any of claims 6-9.
CN202311095694.7A 2023-08-29 2023-08-29 Processing method and processing device of API remote call request, user terminal and server Active CN116800769B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311095694.7A CN116800769B (en) 2023-08-29 2023-08-29 Processing method and processing device of API remote call request, user terminal and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311095694.7A CN116800769B (en) 2023-08-29 2023-08-29 Processing method and processing device of API remote call request, user terminal and server

Publications (2)

Publication Number Publication Date
CN116800769A true CN116800769A (en) 2023-09-22
CN116800769B CN116800769B (en) 2023-12-29

Family

ID=88038894

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311095694.7A Active CN116800769B (en) 2023-08-29 2023-08-29 Processing method and processing device of API remote call request, user terminal and server

Country Status (1)

Country Link
CN (1) CN116800769B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100268921A1 (en) * 2009-04-15 2010-10-21 Advanced Micro Devices, Inc. Data collection prefetch device and methods thereof
US20140297809A1 (en) * 2013-03-27 2014-10-02 Samsung Electronics Co., Ltd. Apparatus and method for processing multiple open apis
CN104142856A (en) * 2013-05-07 2014-11-12 华为技术有限公司 Service program call method, service program call system and intelligent equipment thereof
US20190196796A1 (en) * 2017-12-21 2019-06-27 Fujitsu Limited Api mashup generation
CN111277599A (en) * 2020-01-21 2020-06-12 浙江大华技术股份有限公司 Remote call processing method and device
CN114691024A (en) * 2020-12-31 2022-07-01 华为技术有限公司 Data prefetching method, device and equipment
CN114860834A (en) * 2022-06-01 2022-08-05 北京字节跳动网络技术有限公司 Processing method, device, equipment and storage medium of associated query request

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100268921A1 (en) * 2009-04-15 2010-10-21 Advanced Micro Devices, Inc. Data collection prefetch device and methods thereof
US20140297809A1 (en) * 2013-03-27 2014-10-02 Samsung Electronics Co., Ltd. Apparatus and method for processing multiple open apis
CN104142856A (en) * 2013-05-07 2014-11-12 华为技术有限公司 Service program call method, service program call system and intelligent equipment thereof
US20190196796A1 (en) * 2017-12-21 2019-06-27 Fujitsu Limited Api mashup generation
CN111277599A (en) * 2020-01-21 2020-06-12 浙江大华技术股份有限公司 Remote call processing method and device
CN114691024A (en) * 2020-12-31 2022-07-01 华为技术有限公司 Data prefetching method, device and equipment
CN114860834A (en) * 2022-06-01 2022-08-05 北京字节跳动网络技术有限公司 Processing method, device, equipment and storage medium of associated query request

Also Published As

Publication number Publication date
CN116800769B (en) 2023-12-29

Similar Documents

Publication Publication Date Title
CN107622135B (en) Method and apparatus for displaying information
US20070220083A1 (en) Estimation of initial dynamic rendering control data
EP2963567A1 (en) Method, device, server and terminal for visiting webpage
CN110069919B (en) Information acquisition method and device
EP3192027A1 (en) Accounts control
CN111459822B (en) Method, device, equipment and readable medium for extracting system component data
CN110489474B (en) Data processing method, device, medium and electronic equipment
CN110336592B (en) Data transmission method suitable for Bluetooth card reader, electronic equipment and storage medium
CN106789832B (en) Data processing method, device and system in call process
CN116800769B (en) Processing method and processing device of API remote call request, user terminal and server
CN112925788A (en) Data set management method, system, device, electronic equipment and storage medium
CN109471713B (en) Method and device for inquiring information
CN110619101B (en) Method and apparatus for processing information
WO2023178952A1 (en) Method and apparatus for integrating native program with applet, and device and medium
CN110704760A (en) Data processing method and device
CN110929195A (en) Data caching strategy determining method and device and electronic equipment
CN108228370B (en) Activation method and device for user rights
CN107547437B (en) Application identification method and device
CN113268179B (en) Session message processing method, device, equipment and storage medium
CN115576458A (en) Application window display method, device, equipment and medium
CN112839071B (en) Training system, training data access method and device, electronic equipment and medium
CN115113787A (en) Message processing method, device, equipment and medium
CN105760396B (en) A kind of webpage loading method and device
CN112905355B (en) Method, apparatus and computer storage medium for information processing
CN110740477B (en) Management method, manager, equipment and medium for network slice information

Legal Events

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