Method for improving interface access efficiency and storage medium
A technology for interface access and efficiency, applied in boot programs, program control devices, etc., can solve problems affecting user experience and slow application startup process, and achieve the effects of reducing time consumption, increasing cache speed, and improving access efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0054] Please refer to figure 2 , Embodiment 1 of the present invention is:
[0055] A method for improving interface access efficiency, including:
[0056] S1: Sort and classify the various interfaces that need to be called when the application starts in advance, and divide them into cache-type interfaces and non-cache-type interfaces.
[0057] Wherein, the caching interface is some configuration information or cached information; the non-caching interface is an interface that requires real-time query and business processing.
[0058] S2: Obtain each non-caching interface, and set the priority of each non-caching interface according to the calling sequence when the application starts.
[0059] S3: When the application starts, send a UDP packet storing the parameter information of each non-caching interface to the server in advance.
[0060] Among them, the UDP information packet carries parameter information that may be used by all non-caching interfaces, such as device I...
Embodiment 2
[0075] This embodiment provides a specific application scenario based on Embodiment 1:
[0076] Assume that when an APP application is started, it will call 3 interfaces, one is to obtain the interface for upgrading; the other is to obtain the personalized information according to the deviceId (interface B for short); the other is to obtain the unique identification code automatically generated according to the application. An interface for application information such as a secret key (referred to as interface A).
[0077] Among them, whether to upgrade the interface is judged by the upgrade version number, which is cached in the server cache, so this interface is a cache interface; the other two (interface A and interface B) need to obtain personalized information according to parameters, Server-side caching cannot be performed, so it is a non-caching interface. Among them, interface A has a higher priority.
[0078] When the application starts, it sends a UDP packet to the...
Embodiment 3
[0081] This embodiment corresponds to Embodiment 1 and Embodiment 2, and provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it can implement the above-mentioned embodiment 1 or embodiment 2. All the steps included in a method for improving interface access efficiency. The specific steps will not be repeated here, please refer to the description of Embodiment 1 or Embodiment 2 for details.
[0082] To sum up, the method and storage medium for improving the interface access efficiency provided by the present invention not only greatly reduce the time consumption of http requests, but also improve the interface access efficiency, thereby significantly increasing the application startup speed; performance; further, it can also reduce the occupation of memory resources as much as possible. Thereby making the scheme of the present invention more practical as a whole.
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


