Method and storage medium for improving interface access efficiency
An interface access and interface technology, applied in the direction of bootloader, program control device, etc., can solve the problems of slow application startup process and affect user experience, and achieve the effect of improving cache speed, reducing time consumption, 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 , the first embodiment of the present invention is:
[0055] A method for improving the efficiency of interface access, including:
[0056] S1: Sort and classify each interface that needs to be called when the application starts, and divide it into a cached interface and a non-cached interface.
[0057] The cached interface is some configuration information or information that has already been cached; the non-cached interface is an interface that requires real-time query and business processing.
[0058] S2: Obtain each non-cached interface, and set the priority of each non-cached interface according to the calling sequence when the application is started.
[0059] S3: When the application is started, a UDP packet storing the parameter information of each non-cached interface is sent to the server in advance.
[0060] Among them, the UDP information packet carries parameter information that may need to be used by all non-cached interfaces, s...
Embodiment 2
[0075] This embodiment provides a specific application scenario based on Embodiment 1:
[0076] Assume that when an APP application starts, it will call three interfaces, one is the interface to obtain whether to upgrade; the other is the interface to obtain personalized information according to deviceId (referred to as interface B); the other is to obtain the unique code according to the unique code automatically generated by the application. The interface of the application's secret key and other information (referred to as interface A).
[0077] Among them, whether to upgrade the interface is judged by the upgrade version number. The version number is cached in the server cache, so the interface is a cached interface; the other two (interface A and interface B) need to obtain personalized information according to the parameters. Server-side caching is not possible, so it is a non-cached interface. The A interface has a higher priority.
[0078] When the application starts...
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, the program can implement the above-mentioned Embodiment 1 or Embodiment 2. All steps included in a method to improve the efficiency of interface access. The specific steps will not be repeated here. For details, please refer to the description of the first embodiment or the second embodiment.
[0082] In summary, the present invention provides a method and storage medium for improving interface access efficiency; it not only greatly reduces the time consuming of http requests, but also improves interface access efficiency, thereby significantly improving application startup speed; and can ensure the validity of request result data. further, it can also reduce the occupation of memory resources as much as possible. Thus, the overall solution of the present invention is more prac...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


