Program interface calling method, device, equipment and storage medium

By obtaining and grouping the call information of each program interface of the application, generating and sending it to the server, the short-term effect caused by inconsistent interface time and time, and improving the startup speed and call efficiency of the application.

CN115061742BActive Publication Date: 2025-03-21CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210621844.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-02
Publication Date
2025-03-21
Estimated Expiration
2042-06-02

AI Technical Summary

Technical Problem

When the existing technology optimizes the startup time through interface merging during the application startup stage, it fails to effectively solve the short-term effect caused by inconsistent interface time and time, affecting the startup speed of the application.

Method used

By obtaining the call start time and time-consuming of each program interface of the application, the merge interface is generated after grouping, and the merge interface is sent to the server, shortening the program interface call time of the application.

Benefits of technology

It improves the efficiency of program interface calling of the application, shortens the application startup time, and avoids the short-term effect caused by inconsistent interface time and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115061742B_ABST
    Figure CN115061742B_ABST
Patent Text Reader

Abstract

The present invention discloses a program interface calling method, device, equipment and storage medium, the method comprising: obtaining the calling start time and calling time duration corresponding to each program interface of an application program; grouping the program interfaces according to the calling start time and calling time duration, wherein the time difference between the calling start times corresponding to the program interfaces belonging to the same group and the time difference between the corresponding calling time durations are both less than a preset threshold; generating at least one merged interface according to the program interfaces belonging to the same group, and sending the merged interface to a server. The present invention improves the calling efficiency of the application program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a program interface calling method, device, equipment and storage medium. Background Art

[0002] With the continuous development of smart devices, it is common for users to use applications on smart devices for work, study, and life. The startup time of an application will affect the user experience and even determine whether the user is willing to continue using the application.

[0003] In order to optimize the startup time of the application, interfaces with similar call times will be merged during the startup phase of the application, and then the server will merge the return values ​​of each interface and return them to the client. However, the interface merging process only considers whether the program interface call time is close. After receiving the request to merge the interface, the server needs to wait until the return values ​​of all interfaces are obtained before returning them to the client together. Since each program interface call takes a longer or shorter time, this will result in the interface short board effect, that is, the interface with the longest time determines the time of the entire merged interface, which will affect the startup time of the application. Summary of the invention

[0004] The main purpose of the present invention is to provide a program interface calling method, apparatus, device and storage medium, aiming to solve the problem of how to improve the stability of program interface calling.

[0005] To achieve the above object, the present invention provides a program interface calling method, which comprises the following steps:

[0006] Get the call start time and call duration corresponding to each program interface of the application;

[0007] The program interfaces are grouped according to the call start time and the call consuming time, wherein the time difference between the call start times and the time difference between the corresponding call consuming time of the program interfaces belonging to the same group are both less than a preset threshold;

[0008] At least one merged interface is generated according to the program interfaces belonging to the same group, and the merged interface is sent to the server.

[0009] In one embodiment, the step of grouping the program interfaces according to the call start time and the call consuming time comprises:

[0010] Determine a time distribution image of the program interface according to the call start time and the call consuming time;

[0011] Sliding a sliding window of a preset size on the time distribution image to determine an interface set;

[0012] The program interfaces are grouped according to the interface set.

[0013] In one embodiment, the step of sliding a sliding window of a preset size on the time distribution image to determine the interface set includes:

[0014] In the time distribution image, a sliding window of a preset size is used to slide according to a preset step length;

[0015] Determining a target sliding window according to the density of the sliding window;

[0016] The interface set is determined according to the program interfaces in the target sliding window.

[0017] In one embodiment, the step of determining a target sliding window according to the density of the sliding window comprises:

[0018] Determine a first density of the sliding window after sliding;

[0019] Determine a center point of the sliding window after sliding, and determine a second density of the sliding window centered on the center point;

[0020] If the first density is consistent with the second density, the target sliding window is determined according to the sliding window corresponding to the center point.

[0021] In one embodiment, the step of determining the center point of the sliding window after sliding includes:

[0022] Determine an average value of the coordinate information of the interface within the sliding window;

[0023] The center point of the sliding window is determined according to the average value.

[0024] To achieve the above object, the present invention further provides a program interface calling device, the program interface calling device comprising:

[0025] An acquisition module is used to obtain the call start time and call duration corresponding to each program interface of the application program;

[0026] A grouping module, used to group the program interfaces according to the call start time and the call consuming time, wherein the time difference between the call start times and the time difference between the corresponding call consuming time of the program interfaces belonging to the same group are both less than a preset threshold;

[0027] The calling module is used to generate at least one combined interface according to the program interfaces belonging to the same group, and send the combined interface to the server.

[0028] In one embodiment, the step of determining the target sliding window according to the center point and the sliding window with constant density includes:

[0029] Determine a plurality of sliding windows to be determined according to the sliding window corresponding to the center point;

[0030] If there is an overlap between the plurality of sliding windows to be determined, the sliding window to be determined with the largest density is determined as the target sliding window.

[0031] To achieve the above object, the present invention further provides a program interface calling device, the program interface calling device comprising:

[0032] A receiving module, used for receiving a combined interface sent by a smart device;

[0033] A request module, used for requesting application data corresponding to each program interface in the merged interface;

[0034] A sending module is used to send the application data to the smart device.

[0035] To achieve the above-mentioned purpose, the present invention also provides a program interface calling device, which includes a memory, a processor, and a program interface calling program stored in the memory and executable on the processor. The program interface calling device is an intelligent device or a server. When the program interface calling program is executed by the processor, it implements the various steps of the program interface calling method described above.

[0036] To achieve the above objectives, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program interface calling program, and when the program interface calling program is executed by a processor, the various steps of the program interface calling method described above are implemented.

[0037] The present invention provides a program interface calling method, device, equipment and storage medium, which obtains the calling start time and calling time duration corresponding to each program interface of an application program; groups the program interfaces according to the calling start time and calling time duration, wherein the difference in calling start time and calling time duration of program interfaces belonging to the same group are both less than a preset threshold; generates at least one merged interface according to program interfaces belonging to the same group, and sends the merged interface to a server. Interfaces with similar calling start time and calling time duration are merged into a merged interface, and the merged interface is sent to a server, which shortens the calling time of the program interface of the application program and improves the calling efficiency of the application program. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1A schematic diagram of the hardware structure of a program interface calling device involved in an embodiment of the present invention;

[0039] Figure 2 A schematic diagram of a flow chart of an embodiment of a program interface calling method of the present invention;

[0040] Figure 3 This is a detailed flow chart of step S20 of another embodiment of the program interface calling method of the present invention;

[0041] Figure 4 A schematic diagram of a time distribution image of a program interface calling method of the present invention;

[0042] Figure 5 A schematic diagram of a sliding window moving path of a program interface calling method of the present invention;

[0043] Figure 6 A flowchart of another embodiment of the program interface calling method of the present invention;

[0044] Figure 7 A schematic diagram of the logical structure of the program interface calling device of the present invention;

[0045] Figure 8 It is a schematic diagram of the logical structure of the program interface calling device of the present invention.

[0046] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0048] The main solution of the embodiment of the present invention is: obtaining the call start time and call consuming time corresponding to each program interface of the application; grouping the program interfaces according to the call start time and call consuming time, wherein the difference in the call start time and the difference in the call consuming time of the program interfaces belonging to the same group are both less than a preset threshold; generating at least one merged interface according to the program interfaces belonging to the same group, and sending the merged interface to the server. Merging interfaces with similar call start times and call consuming time into a merged interface, and sending the merged interface to the server, shortens the program interface call time of the application and improves the calling efficiency of the application.

[0049] As an implementation, the program interface calling device can be as follows Figure 1 shown.

[0050] The embodiment of the present invention relates to a program interface calling device, which includes: a processor 101, such as a CPU, a memory 102, and a communication bus 103. The communication bus 103 is used to realize connection and communication between these components.

[0051] The memory 102 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Figure 1 As shown, the memory 102 as a computer-readable storage medium may include a program interface calling program; and the processor 101 may be used to call the program interface calling program stored in the memory 102 and perform the following operations:

[0052] Get the call start time and call duration corresponding to each program interface of the application;

[0053] The program interfaces are grouped according to the call start time and the call consuming time, wherein the time difference between the call start times and the time difference between the corresponding call consuming time of the program interfaces belonging to the same group are both less than a preset threshold;

[0054] At least one merged interface is generated according to the program interfaces belonging to the same group, and the merged interface is sent to the server.

[0055] In one embodiment, the processor 101 may be used to call a program interface calling program stored in the memory 102, and perform the following operations:

[0056] Determine a time distribution image of the program interface according to the call start time and the call consuming time;

[0057] Sliding a sliding window of a preset size on the time distribution image to determine an interface set;

[0058] The program interfaces are grouped according to the interface set.

[0059] In one embodiment, the processor 101 may be used to call a program interface calling program stored in the memory 102, and perform the following operations:

[0060] In the time distribution image, sliding a sliding window of a preset size according to a preset step length;

[0061] Determining a target sliding window according to the density of the sliding window;

[0062] The interface set is determined according to the program interfaces in the target sliding window.

[0063] In one embodiment, the processor 101 may be used to call a program interface calling program stored in the memory 102, and perform the following operations:

[0064] Determine a first density of the sliding window after sliding;

[0065] Determine a center point of the sliding window after sliding, and determine a second density of the sliding window centered on the center point;

[0066] If the first density is consistent with the second density, the target sliding window is determined according to the sliding window corresponding to the center point.

[0067] In one embodiment, the processor 101 may be used to call a program interface calling program stored in the memory 102, and perform the following operations:

[0068] Determine an average value of the coordinate information of the interface within the sliding window;

[0069] The center point of the sliding window is determined according to the average value.

[0070] In one embodiment, the processor 101 may be used to call a program interface calling program stored in the memory 102, and perform the following operations:

[0071] Determine a plurality of sliding windows to be determined according to the sliding window corresponding to the center point;

[0072] If there is an overlap between the plurality of sliding windows to be determined, the sliding window to be determined with the largest density is determined as the target sliding window.

[0073] Or, if Figure 1 As shown, the memory 102 as a computer-readable storage medium may include a program interface calling program; and the processor 101 may be used to call the program interface calling program stored in the memory 102 and perform the following operations:

[0074] Receive the merged interface sent by the smart device;

[0075] Requesting application data corresponding to each program interface in the merged interface;

[0076] The application data is sent to the smart device.

[0077] Based on the hardware architecture of the program interface calling device described above, an embodiment of the program interface calling method of the present invention is proposed.

[0078] Reference Figure 2 , Figure 2 This is an embodiment of the program interface calling method of the present invention, and the program interface calling method includes the following steps:

[0079] Step S10, obtaining the call start time and call consuming time corresponding to each program interface of the application program.

[0080] Specifically, the program interface is API (Application Programming Interface), which is the agreement for connecting different components of a software system. The program interface is the code provided by a computer operating system or program library for application programs to call and use.

[0081] An application corresponds to multiple program interfaces. For example, 5 program interfaces are initiated about 0.5 seconds after the application is started, 8 program interfaces are initiated about 1.5 seconds after the application is started, and 9 program interfaces are initiated about 2.0 seconds after the application is started. However, there are time differences in the call start times corresponding to the program interfaces. For example, the call start time of program interface A is 0.5 seconds, the call start time of program interface B is 0.5 seconds, the call start time of program interface C is 1.5 seconds, the call start time of program interface D is 2 seconds, the call start time of program interface E is 2 seconds, and the call start time of program interface F is 2 seconds. There are time differences in the call durations corresponding to the program interfaces. For example, program interface A is 100 milliseconds, program interface B is 200 milliseconds, program interface C is 1 second, program interface D is 1.2 seconds, program interface E is 3 seconds, and program interface F is 2.9 seconds.

[0082] Get the call start time and call consuming time corresponding to each program interface of the application. Optionally, the total duration of the application startup is 3 seconds, and the call start time and call consuming time of each program interface issued within these 3 seconds are collected. Optionally, the start time and consuming time of the same program interface A after the application is started are collected multiple times, and the start time and consuming time are averaged. The average start time is used as the call start time of program interface A, and the average consuming time is used as the call consuming time of program interface A.

[0083] Step S20, grouping the program interfaces according to the call start time and the call consuming time, wherein the time difference between the call start times corresponding to the program interfaces belonging to the same group and the time difference between the corresponding call consuming time are both less than a preset threshold.

[0084] Specifically, the program interfaces are grouped according to the call start time and the call duration, wherein the time difference between the call start times and the time difference between the corresponding call durations of the program interfaces belonging to the same group are both less than a preset threshold. Optionally, the program interfaces to be determined whose call start time difference and call duration are within a preset interval are determined, and when the data of the program interfaces to be determined is greater than a preset number, the program interfaces to be determined are divided into one group.

[0085] The interface call start time and call duration of program interfaces belonging to the same group are similar. For example, the program interfaces corresponding to the application are grouped to obtain four groups of data, and the interfaces contained in each group are marked. For example, the first group is marked as interfaceGroup1, the second group is marked as interfaceGroup2, the third group is marked as interfaceGroup3, and the fourth group is marked as interfaceGroup4. The marking information is also stored in the local database.

[0086] Step S30: Generate at least one merged interface according to the program interfaces belonging to the same group, and send the merged interface to the server.

[0087] Specifically, at least one merged interface is generated based on the program interfaces belonging to the same group. For example, the application starts with 8 program interfaces, namely program interface A, program interface B, program interface C, program interface D, program interface E, program interface F, program interface G, and program interface H. Program interface A, program interface B, and program interface D belong to the first group interfaceGroup1, program interface C and program interface E belong to the second group interfaceGroup2, program interface F and program interface G belong to the third group interfaceGroup3, and program interface H belongs to the fourth group interfaceGroup4. The program interfaces marked in the same group will be merged together, and the data will be spliced ​​and sent to the server.

[0088] When program interfaces A, B, and D, which all belong to interfaceGroup1, initiate a request, they will be merged into a merged interface. The input parameter format is JSON format, which contains the information of the program interfaces to be merged. The JSON content is an array, and one array element corresponds to one program interface. The information of one program interface includes five fields: method, url, header, body, and identifierId. Among them, method is the method of HTTP (Hyper Text Transfer Protocol) request, including fields such as GET, POST, and DELETE; url is the scheme, host, port, and path of the interface request; header is the header information of the request interface; body is the parameter information of the request interface; identifierId is the unique identifier of the interface, which is obtained by concatenating the url, method, and body in the input parameter and calculating it with the MD5 algorithm.

[0089] Optional, the input format is as follows:

[0090]

[0091]

[0092] Optional. The output format is JSON, which contains the full data returned by the merged interface, with identifierId as the key and value as the return value of the interface.

[0093] For example, the output parameter format is as follows:

[0094]

[0095] The server merges the application data corresponding to the merged interface and returns it to the smart device. The smart device parses the application data and distributes it to each business layer or application for processing. For example, after receiving the merged interface of the first group interfaceGroup1, the server will request the data required by program interface A, program interface B, and program interface D respectively. When the application data of program interface A, program interface B, and program interface D are obtained, they are spliced ​​and processed and then returned to the smart device. The smart device then parses the application data of interface A, interface B, and interface D, and distributes it to the business party or application that initiated the interface.

[0096] In the technical solution of this embodiment, the call start time and call consuming time corresponding to each program interface of the application are obtained; the program interfaces are grouped according to the call start time and the call consuming time, wherein the difference in the call start time and the call consuming time of the program interfaces belonging to the same group are both less than a preset threshold; at least one merged interface is generated according to the program interfaces belonging to the same group, and the merged interface is sent to the server. Interfaces with similar call start times and call consuming times are merged into a merged interface, and the merged interface is sent to the server, which shortens the program interface call time of the application and improves the calling efficiency of the application.

[0097] Reference Figure 3 , Figure 3 This is another embodiment of the program interface calling method of the present invention. Based on the above embodiment, step S20 includes:

[0098] Step S21, determining a time distribution image of the program interface according to the call start time and the call consuming time;

[0099] Step S22, sliding a sliding window of a preset size on the time distribution image to determine an interface set;

[0100] Step S23: grouping the program interfaces according to the interface set.

[0101] Specifically, the smart device determines the time distribution image of the program interface according to the call start time and the call consuming time. Optionally, the call start time Ts is used as the horizontal axis and the call consuming time Ti is used as the vertical axis to draw the time distribution image, and the measurement units of the horizontal axis and the vertical axis are both seconds, such as Figure 4 As shown, 5 interfaces were initiated about 0.5 seconds after the application was started, 8 interfaces were initiated about 1.5 seconds after the application was started, and 9 interfaces were initiated about 2.0 seconds after the application was started.

[0102] like Figure 5 As shown, a sliding window of a preset size is used to slide on the time distribution image to determine the interface set. Optionally, in the time distribution image, a sliding window of a preset size is used to slide according to a preset step length, and the preset step length can be 300 milliseconds. In each movement, the sliding window moves to a higher density area, such as a hill climbing algorithm, and moves to a higher density area in each iteration until convergence; the target sliding window is determined according to the density of the sliding window, and optionally, the center point in the sliding window and the density in the sliding window are calculated until there is no direction in which more points can be accommodated in the sliding window, that is, the density in the sliding window is moved until it no longer increases; the interface set is determined according to the program interface in the target sliding window.

[0103] Optionally, determine the first density of the sliding window after sliding; determine the center point of the sliding window after sliding, and determine the second density of the sliding window centered on the center point; if the first density and the second density are consistent, determine the target sliding window according to the sliding window corresponding to the center point. Exemplarily, the sliding window slides in the direction A, but the center point determined by the mean of each point in the sliding window will adjust the position of the sliding window. For example, the sliding window originally slides to the position centered on (a, b), but due to the recalculation of the center point, the sliding window will reach the position centered on (a, c) in the next step, and the direction is from (a, b) to (a, c).

[0104] Determine the center point of the sliding window after sliding, and optionally determine the average value of the coordinate information of the interface in the sliding window; determine the center point of the sliding window according to the average value. Exemplarily, the sliding window contains a(1s, 1s), b(2s, 2s), and c(3s, 3s), then the average value of the sliding window, i.e., the center point, is (2s, 2s).

[0105] The target sliding window is determined according to the density of the sliding window. Optionally, multiple sliding windows to be determined are determined according to the sliding window corresponding to the center point. If there are overlapping parts in the multiple sliding windows to be determined, the sliding window to be determined with the largest density is determined as the target sliding window. For example, the sliding window A to be determined has (a, c) as the center point and a radius of R, and the sliding window B to be determined has (a, b) as the center point and a radius of R. The distance between the center points (a, c) and (a, b) is less than 2R, then it is determined that there is an overlapping part between the sliding windows A and B to be determined, and the sliding window to be determined with the largest density is determined as the target sliding window.

[0106] In the technical solution of this embodiment, the time distribution image of the program interface is determined according to the call start time and the call duration; a sliding window of a preset size is used to slide on the time distribution image to determine the interface set; the program interfaces are grouped according to the interface set, so as to facilitate merging interfaces with similar call start times and call durations into a merged interface, and the merged interface is sent to the server, thereby shortening the program interface call time of the application and improving the calling efficiency of the application.

[0107] Reference Figure 6 , Figure 6 Another embodiment of the program interface calling method of the present invention comprises the following steps:

[0108] Step S40, receiving the merged interface sent by the smart device;

[0109] Step S50, requesting application data corresponding to each program interface in the merged interface;

[0110] Step S60: sending the application data to the smart device.

[0111] Specifically, the server receives the merged interface sent by the smart device, requests the application data corresponding to each program interface in the merged interface, merges the application data corresponding to the merged interface and returns it to the smart device. The smart device parses the application data and distributes it to each business layer or application for processing. For example, after receiving the merged interface of the first group interfaceGroup1, the server will request the data required by program interface A, program interface B, and program interface D respectively. When the application data of program interface A, program interface B, and program interface D are obtained, they are spliced ​​and returned to the smart device. The smart device then parses the application data of interface A, interface B, and interface D, and distributes it to the business party or application that initiated the interface.

[0112] In the technical solution of this embodiment, a merged interface sent by a smart device is received; application data corresponding to each program interface in the merged interface is requested; and the application data is sent to the smart device, thereby avoiding the situation where the different start times and call durations of multiple program interface calls result in a long application call time, shortening the program interface call time of the application and improving the calling efficiency of the application.

[0113] Reference Figure 7 The present invention also provides a program interface calling device, the program interface calling device comprising:

[0114] An acquisition module 100 is used to acquire the call start time and call consuming time corresponding to each program interface of the application program;

[0115] A grouping module 200 is used to group the program interfaces according to the call start time and the call consuming time, wherein the time difference between the call start times and the time difference between the corresponding call consuming time of the program interfaces belonging to the same group are both less than a preset threshold;

[0116] The calling module 300 is used to generate at least one merged interface according to the program interfaces belonging to the same group, and send the merged interface to the server.

[0117] In one embodiment, in terms of grouping the program interfaces according to the call start time and the call consuming time, the grouping module 200 is specifically used to:

[0118] Determine a time distribution image of the program interface according to the call start time and the call consuming time;

[0119] Sliding a sliding window of a preset size on the time distribution image to determine an interface set;

[0120] The program interfaces are grouped according to the interface set.

[0121] In one embodiment, in determining the interface set by sliding a sliding window of a preset size on the time distribution image, the grouping module 200 is specifically used to:

[0122] In the time distribution image, sliding a sliding window of a preset size according to a preset step length;

[0123] Determining a target sliding window according to the density of the sliding window;

[0124] The interface set is determined according to the program interfaces in the target sliding window.

[0125] In one embodiment, in determining the target sliding window according to the density of the sliding window, the grouping module 200 is specifically configured to:

[0126] Determine a first density of the sliding window after sliding;

[0127] Determine a center point of the sliding window after sliding, and determine a second density of the sliding window centered on the center point;

[0128] If the first density is consistent with the second density, the target sliding window is determined according to the sliding window corresponding to the center point.

[0129] In one embodiment, in determining the center point of the sliding window after sliding, the grouping module 200 is specifically used to:

[0130] Determine an average value of the coordinate information of the interface within the sliding window;

[0131] The center point of the sliding window is determined according to the average value.

[0132] In one embodiment, in determining the target sliding window according to the center point and the sliding window with constant density, the grouping module 200 is specifically configured to:

[0133] Determine a plurality of sliding windows to be determined according to the sliding window corresponding to the center point;

[0134] If there is an overlap between the plurality of sliding windows to be determined, the sliding window to be determined with the largest density is determined as the target sliding window.

[0135] Reference Figure 8 The present invention also provides a program interface calling device, the program interface calling device comprising:

[0136] The receiving module 400 is used to receive the merged interface sent by the smart device;

[0137] A request module 500, used for requesting application data corresponding to each program interface in the merged interface;

[0138] The sending module 600 is used to send the application data to the smart device.

[0139] The present invention also provides a program interface calling device, which includes a memory, a processor, and a program interface calling program stored in the memory and executable on the processor. The program interface calling device is an intelligent device or a server. When the program interface calling program is executed by the processor, the various steps of the program interface calling method described in the above embodiment are implemented.

[0140] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program interface calling program, and when the program interface calling program is executed by a processor, the various steps of the program interface calling method described in the above embodiment are implemented.

[0141] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0142] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, system, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, system, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, system, article or device including the element.

[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment system can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a parking management device, an air conditioner, or a network device, etc.) to execute the system described in each embodiment of the present invention.

[0144] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A program interface calling method, characterized in that: Applied to smart devices, the program interface calling method includes: Get the call start time and call duration corresponding to each program interface of the application; Determine a time distribution image of the program interface according to the call start time and the call consuming time; Sliding a sliding window of a preset size on the time distribution image to determine an interface set; The program interfaces are grouped according to the interface set; wherein the time difference between the call start times corresponding to the program interfaces belonging to the same group and the time difference between the corresponding call consuming times are both less than a preset threshold; At least one merged interface is generated according to the program interfaces belonging to the same group, and the merged interface is sent to the server.

2. The program interface calling method according to claim 1, characterized in that: The step of sliding a sliding window of a preset size on the time distribution image to determine the interface set comprises: In the time distribution image, sliding a sliding window of a preset size according to a preset step length; Determining a target sliding window according to the density of the sliding window; The interface set is determined according to the program interfaces in the target sliding window.

3. The program interface calling method according to claim 2, characterized in that: The step of determining the target sliding window according to the density of the sliding window comprises: Determine a first density of the sliding window after sliding; Determine a center point of the sliding window after sliding, and determine a second density of the sliding window centered on the center point; If the first density is consistent with the second density, the target sliding window is determined according to the sliding window corresponding to the center point.

4. The program interface calling method according to claim 3, characterized in that: The step of determining the center point of the sliding window after sliding comprises: Determine an average value of the coordinate information of the interface within the sliding window; The center point of the sliding window is determined according to the average value.

5. The program interface calling method according to claim 3, characterized in that: The step of determining the target sliding window according to the sliding window corresponding to the center point comprises: Determine a plurality of sliding windows to be determined according to the sliding window corresponding to the center point; If there is an overlap between the plurality of sliding windows to be determined, the sliding window to be determined with the largest density is determined as the target sliding window.

6. A program interface calling method, characterized in that: Applied to the server, the program interface calling method includes: Receive a merged interface sent by a smart device, wherein the merged interface is a call start time and a call consuming time corresponding to each program interface of an application program obtained by the smart device; determine a time distribution image of the program interface according to the call start time and the call consuming time; slide a sliding window of a preset size on the time distribution image to determine an interface set; group the program interfaces according to the interface set; generate at least one merged interface according to the program interfaces belonging to the same group; wherein the time difference between the call start times corresponding to the program interfaces belonging to the same group and the time difference between the corresponding call consuming times are both less than a preset threshold; Requesting application data corresponding to each program interface in the merged interface; The application data is sent to the smart device.

7. A program interface calling device, characterized in that: The program interface calling device comprises: An acquisition module is used to obtain the call start time and call duration corresponding to each program interface of the application program; A grouping module is used to determine a time distribution image of the program interface according to the call start time and the call consuming time; slide a sliding window of a preset size on the time distribution image to determine an interface set; group the program interfaces according to the interface set; wherein the time difference between the call start times corresponding to the program interfaces belonging to the same group and the time difference between the corresponding call consuming time are both less than a preset threshold; The calling module is used to generate at least one combined interface according to the program interfaces belonging to the same group, and send the combined interface to the server.

8. A program interface calling device, characterized in that: The program interface calling device includes a memory, a processor, and a program interface calling program stored in the memory and executable on the processor. When the program interface calling device is an intelligent device, the program interface calling program implements the various steps of the program interface calling method as described in any one of claims 1 to 5 when executed by the processor. When the program interface calling device is a server, the program interface calling program implements the various steps of the program interface calling method as described in any one of claim 6 when executed by the processor.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program interface calling program, and when the program interface calling program is executed by a processor, the program interface calling program implements the various steps of the program interface calling method according to any one of claims 1 to 5 or claim 6.

Citation Information

Patent Citations

  • Intelligent interface merging method, mobile terminal and computer readable storage medium

    CN108037959A