Interface scheduling method, system and computer readable storage medium

CN113254236BActive Publication Date: 2026-05-29WEBANK (CHINA)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WEBANK (CHINA)
Filing Date
2021-06-10
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies have low interface scheduling efficiency, requiring developers to manually select and maintain functions, which leads to inefficiency.

Method used

By introducing analysis pool functions, interface information and returned data are automatically analyzed, and target matching functions are automatically assigned, reducing the need for developers to manually select functions.

Benefits of technology

It improves interface scheduling efficiency, supports modular development, reduces the workload of developers, and increases the automation level of interface scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113254236B_ABST
    Figure CN113254236B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of financial technology, and discloses an interface scheduling method and system and a computer readable storage medium. The interface scheduling method comprises the following steps: determining all interfaces triggering an interface scheduling request within a preset time interval, calling an analysis pool function to perform first analysis on interface information of each interface, obtaining a first matching function of each interface and corresponding return data of the first matching function, calling the analysis pool function to perform second analysis on data information of each return data, obtaining a second matching function corresponding to each interface, and determining a first target matching function corresponding to each interface according to the first matching function and the second matching function. According to the application, the analysis pool function returns a target matching function to be scheduled for each interface according to the interface information and the return data of each interface, so that the target matching function to be scheduled for each interface can be autonomously allocated, manual selection is not needed, and the interface scheduling efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of financial technology (Fintech), and more particularly to an interface scheduling method, system, and computer-readable storage medium. Background Technology

[0002] With the development of computer technology, more and more technologies are being applied in the financial field. The traditional financial industry is gradually transforming into financial technology (Fintech). However, due to the security and real-time requirements of the financial industry, higher demands are also being placed on technology.

[0003] Currently, to schedule functions via an API, developers must first manually write `debounce`, `throttle`, etc. functions, and then manually select and use the most suitable function during API calls. However, this method not only requires developers to develop and maintain a large number of functions but also necessitates manually specifying which functions to use. An improved approach is to introduce the Lodash component and use its provided `debounce`, `throttle`, etc. functions. During API calls, the most suitable function is manually selected and used. However, this improved method still requires developers to manually select and use the corresponding functions from the Lodash component. Therefore, the current method of scheduling functions via API results in low API scheduling efficiency. Summary of the Invention

[0004] The main objective of this application is to provide an interface scheduling method, system, and computer-readable storage medium, which aims to improve interface scheduling efficiency.

[0005] To achieve the above objectives, this application provides an interface scheduling method, which includes the following steps:

[0006] All interfaces that triggered interface scheduling requests within a preset time interval are identified, and the analysis pool function is called to perform the first analysis on the interface information of each interface to obtain the first matching function of each interface and its corresponding return data.

[0007] The analysis pool function is invoked to perform a second analysis on the data information of each returned data, thereby obtaining the second matching function corresponding to each interface;

[0008] Based on the first matching function and the second matching function, determine the first target matching function corresponding to each of the interfaces.

[0009] Optionally, the interface information includes the interface name, page address, and interface parameters. The step of calling the analysis pool function to perform a first analysis on the interface information of each interface to obtain the first matching function for each interface includes:

[0010] The analysis pool function is called to determine whether the interface name and page address corresponding to all interfaces are the same; and

[0011] The analysis pool function is called to determine whether the interface parameters corresponding to each interface are the same;

[0012] If all interfaces have the same interface name and page address, and all interfaces have the same interface parameters, then the analysis pool function is called to determine the first matching function for each interface based on the interface parameters.

[0013] Optionally, the interface information also includes the number of interface requests. After the step of calling the analysis pool function to determine whether the interface names and page addresses corresponding to all interfaces are the same, the method further includes:

[0014] If all interfaces have different interface names and page addresses, then determine whether the number of interface requests is greater than a preset number.

[0015] If the number of interface requests is less than or equal to the preset number, then a normal function is assigned to each interface, and the normal function is determined as the first matching function for each interface;

[0016] If the number of interface requests exceeds the preset number, a non-ordinary function is assigned to each interface, and the non-ordinary function is determined as the first matching function for each interface.

[0017] Optionally, after the step of calling the analysis pool function to determine whether the interface parameters corresponding to each interface are the same, the method further includes:

[0018] If all interfaces have different interface parameters, then determine whether the number of requests to the interface is greater than the preset number.

[0019] If the number of requests to the interface is less than or equal to the preset number, then a normal function is assigned to each interface, and the normal function is determined as the first matching function for each interface;

[0020] If the number of requests to the interface exceeds the preset number, a non-ordinary function is assigned to each interface, and the non-ordinary function is determined as the first matching function for each interface.

[0021] Optionally, the step of calling the analysis pool function to perform a second analysis on the data information of each of the returned data to obtain the second matching function corresponding to each of the interfaces includes:

[0022] The analysis pool function is invoked to analyze the data content, data request duration, and / or data size of each data information to obtain the second matching function corresponding to each interface.

[0023] Optionally, the step of determining the first target matching function corresponding to each of the interfaces based on the first matching function and the second matching function includes:

[0024] If the first matching function and the second matching function are functions of the same type, then the second matching function is determined as the first target matching function.

[0025] Optionally, the step of determining the first target matching function corresponding to each of the interfaces based on the first matching function and the second matching function includes:

[0026] If the first matching function and the second matching function are functions of different types, then the function types of the first matching function and the second matching function are determined, wherein the function types include non-ordinary functions and ordinary functions;

[0027] If the function type of the first matching function is a non-ordinary function, and the function type of the second matching function is an ordinary function, then the first matching function is determined as the first target matching function;

[0028] If the function type of the first matching function is a normal function, and the function type of the second matching function is a non-normal function, then the second matching function is determined as the first target matching function.

[0029] Optionally, after determining the first target matching function corresponding to each interface based on the first matching function and the second matching function, the method further includes:

[0030] When a new interface trigger scheduling request is received, it is determined whether the new interface is being triggered for the first time.

[0031] If the new interface is not triggered for the first time, then the second target matching function of the new interface is determined based on the first analysis and the second analysis;

[0032] Based on the first target matching function and the second target matching function corresponding to the new interface, determine the final matching function corresponding to the new interface.

[0033] Optionally, the step of determining the final matching function corresponding to the new interface based on the first target matching function and the second target matching function corresponding to the new interface includes:

[0034] If the first target matching function and the second target matching function corresponding to the new interface are functions of different types, the function type of the first target matching function corresponding to the new interface is a non-ordinary function, and the function type of the second target matching function is an ordinary function, then the first target matching function corresponding to the new interface is determined as the final matching function;

[0035] If the first target matching function and the second target matching function corresponding to the new interface are functions of different types, and the function type of the first target matching function corresponding to the new interface is a normal function, and the function type of the second target matching function is a non-normal function, then the second target matching function is determined as the final matching function.

[0036] Optionally, the step of determining the final matching function corresponding to the new interface based on the first target matching function and the second target matching function corresponding to the new interface includes:

[0037] If the first target matching function and the second target matching function corresponding to the new interface are functions of the same type, and the first target matching function and the second target matching function corresponding to the new interface are functions matched through the second analysis, then the data request duration and / or data size of the first target matching function and the second target matching function corresponding to the new interface are determined.

[0038] If the data request duration of the first target matching function corresponding to the new interface is less than the data request duration of the second target matching function, or / and the data size of the first target matching function corresponding to the new interface is less than the data size of the second target matching function, then the second target matching function is determined as the final matching function.

[0039] In addition, to achieve the above objectives, this application also provides an interface scheduling system, which includes: a memory, a processor, and an interface scheduling program stored in the memory and executable on the processor. When the interface scheduling program is executed by the processor, it implements the steps of the interface scheduling method as described above.

[0040] In addition, to achieve the above objectives, this application also provides a computer-readable storage medium storing an interface scheduler, which, when executed by a processor, implements the steps of the interface scheduling method described above.

[0041] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by the processor, implements the steps of the interface scheduling method described above.

[0042] This application provides an interface scheduling method, system, and computer-readable storage medium. It identifies all interfaces that trigger interface scheduling requests within a preset time interval. An analysis pool function is invoked to perform a first analysis of the interface information for each interface, obtaining a first matching function and its corresponding return data. The analysis pool function is then invoked to perform a second analysis of the returned data, obtaining a second matching function for each interface. Based on the first and second matching functions, a first target matching function is determined for each interface. Therefore, this application adds an analysis pool function to the interface scheduling process. By invoking the analysis pool function to analyze the interface information and return data of each interface, it returns the target matching function to be scheduled for each interface. This allows for the autonomous allocation of target matching functions to each interface, eliminating the need for developers to manually select the matching function for each interface, thus improving interface scheduling efficiency. Attached Figure Description

[0043] Figure 1 This is a schematic diagram of the system architecture of the hardware operating environment involved in the embodiments of this application;

[0044] Figure 2 This is a flowchart illustrating the first embodiment of the interface scheduling method of this application;

[0045] Figure 3 This is a detailed flowchart of step S10 in the first embodiment of the interface scheduling method of this application;

[0046] Figure 4 This is a flowchart illustrating another embodiment of the interface scheduling method of this application;

[0047] Figure 5 This is a flowchart illustrating another embodiment of the interface scheduling method of this application;

[0048] Figure 6 This is a detailed flowchart of step S30 in the first embodiment of the interface scheduling method of this application;

[0049] Figure 7 This is a flowchart illustrating another embodiment of the interface scheduling method of this application;

[0050] Figure 8 This is a detailed flowchart of step S60 of the interface scheduling method in this application.

[0051] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0052] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0053] The main solution of this application embodiment is as follows: First, determine all interfaces that trigger interface scheduling requests within a preset time interval. Then, call the analysis pool function to perform a first analysis of the interface information of each interface, obtaining the first matching function and its corresponding return data for each interface. Next, call the analysis pool function to perform a second analysis of the data information of each returned data, obtaining the second matching function corresponding to each interface. Finally, based on the first and second matching functions, determine the first target matching function corresponding to each interface. Therefore, this application adds an analysis pool function to the interface scheduling process. By calling the analysis pool function to analyze the interface information and return data of each interface, it returns the target matching function to be scheduled for each interface. This allows each interface to be autonomously assigned a target matching function for scheduling, eliminating the need for developers to manually select the matching function for each interface, thus improving interface scheduling efficiency.

[0054] Specifically, refer to Figure 1 , Figure 1 This is a schematic diagram of the system architecture of the hardware operating environment involved in the embodiments of this application.

[0055] like Figure 1 As shown, the system in this application embodiment can be an interface scheduling system or a server with data processing functions.

[0056] like Figure 1 As shown, the system may include: a processor 1001, such as a CPU (Central Processing Unit), a memory 1005, a user interface 1003, a network interface 1004, and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen, an input unit such as a keyboard, and optionally, a standard wired interface (such as a USB (Universal Serial Bus) interface) or a wireless interface (such as a Bluetooth interface). The network interface 1004 may include a standard wired interface and a wireless interface (such as a WiFi (Wireless-Fidelity) interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001. Optionally, the system may also include RF (Radio Frequency) circuitry, sensors, a WiFi module, etc.

[0057] Those skilled in the art will understand that Figure 1The system structure shown does not constitute a limitation on the system and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0058] like Figure 1 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an interface scheduler.

[0059] exist Figure 1 In the terminal shown, network interface 1004 is mainly used to connect to the backend server and communicate with it; user interface 1003 is mainly used to connect to the client and communicate with it; and processor 1001 can call the interface scheduler stored in memory 1005 and perform the following operations:

[0060] All interfaces that triggered interface scheduling requests within a preset time interval are identified, and the analysis pool function is called to perform the first analysis on the interface information of each interface to obtain the first matching function of each interface and its corresponding return data.

[0061] The analysis pool function is invoked to perform a second analysis on the data information of each returned data, thereby obtaining the second matching function corresponding to each interface;

[0062] Based on the first matching function and the second matching function, determine the first target matching function corresponding to each of the interfaces.

[0063] Furthermore, the processor 1001 can call the interface scheduler stored in the memory 1005 and perform the following operations:

[0064] The analysis pool function is called to determine whether the interface name and page address corresponding to all interfaces are the same; and

[0065] The analysis pool function is called to determine whether the interface parameters corresponding to each interface are the same;

[0066] If all interfaces have the same interface name and page address, and all interfaces have the same interface parameters, then the analysis pool function is called to determine the first matching function for each interface based on the interface parameters.

[0067] Furthermore, the processor 1001 can call the interface scheduler stored in the memory 1005 and perform the following operations:

[0068] If all interfaces have different interface names and page addresses, then determine whether the number of interface requests is greater than a preset number.

[0069] If the number of interface requests is less than or equal to the preset number, then a normal function is assigned to each interface, and the normal function is determined as the first matching function for each interface;

[0070] If the number of interface requests exceeds the preset number, a non-ordinary function is assigned to each interface, and the non-ordinary function is determined as the first matching function for each interface.

[0071] Furthermore, the processor 1001 can call the interface scheduler stored in the memory 1005 and perform the following operations:

[0072] If all interfaces have different interface parameters, then determine whether the number of requests to the interface is greater than the preset number.

[0073] If the number of requests to the interface is less than or equal to the preset number, then a normal function is assigned to each interface, and the normal function is determined as the first matching function for each interface;

[0074] If the number of requests to the interface exceeds the preset number, a non-ordinary function is assigned to each interface, and the non-ordinary function is determined as the first matching function for each interface.

[0075] Furthermore, the processor 1001 can call the interface scheduler stored in the memory 1005 and perform the following operations:

[0076] The analysis pool function is invoked to analyze the data content, data request duration, and / or data size of each data information to obtain the second matching function corresponding to each interface.

[0077] Furthermore, the processor 1001 can call the interface scheduler stored in the memory 1005 and perform the following operations:

[0078] If the first matching function and the second matching function are functions of the same type, then the second matching function is determined as the first target matching function.

[0079] Furthermore, the processor 1001 can call the interface scheduler stored in the memory 1005 and perform the following operations:

[0080] If the first matching function and the second matching function are functions of different types, then the function types of the first matching function and the second matching function are determined, wherein the function types include non-ordinary functions and ordinary functions;

[0081] If the function type of the first matching function is a non-ordinary function, and the function type of the second matching function is an ordinary function, then the first matching function is determined as the first target matching function;

[0082] If the function type of the first matching function is a normal function, and the function type of the second matching function is a non-normal function, then the second matching function is determined as the first target matching function.

[0083] Furthermore, the processor 1001 can call the interface scheduler stored in the memory 1005 and perform the following operations:

[0084] When a new interface trigger scheduling request is received, it is determined whether the new interface is being triggered for the first time.

[0085] If the new interface is not triggered for the first time, then the second target matching function of the new interface is determined based on the first analysis and the second analysis;

[0086] Based on the first target matching function and the second target matching function corresponding to the new interface, determine the final matching function corresponding to the new interface.

[0087] Furthermore, the processor 1001 can call the interface scheduler stored in the memory 1005 and perform the following operations:

[0088] If the first target matching function and the second target matching function corresponding to the new interface are functions of different types, the function type of the first target matching function corresponding to the new interface is a non-ordinary function, and the function type of the second target matching function is an ordinary function, then the first target matching function corresponding to the new interface is determined as the final matching function;

[0089] If the first target matching function and the second target matching function corresponding to the new interface are functions of different types, and the function type of the first target matching function corresponding to the new interface is a normal function, and the function type of the second target matching function is a non-normal function, then the second target matching function is determined as the final matching function.

[0090] Furthermore, the processor 1001 can call the interface scheduler stored in the memory 1005 and perform the following operations:

[0091] If the first target matching function and the second target matching function corresponding to the new interface are functions of the same type, and the first target matching function and the second target matching function corresponding to the new interface are functions matched through the second analysis, then the data request duration and / or data size of the first target matching function and the second target matching function corresponding to the new interface are determined.

[0092] If the data request duration of the first target matching function corresponding to the new interface is less than the data request duration of the second target matching function, or / and the data size of the first target matching function corresponding to the new interface is less than the data size of the second target matching function, then the second target matching function is determined as the final matching function.

[0093] This application provides an interface scheduling method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the interface scheduling method of this application.

[0094] This application provides an embodiment of an interface scheduling method. It should be noted that although the logical order is shown in the flowchart, under certain data conditions, the steps shown or described may be completed in a different order than that shown here.

[0095] The execution subject of this embodiment of the application is executed by an interface scheduling system, and the interface scheduling method includes:

[0096] Step S10: Determine all interfaces that triggered the interface scheduling request within the preset time interval, and call the analysis pool function to perform the first analysis on the interface information of each interface to obtain the first matching function of each interface and its corresponding return data.

[0097] When developers need to use the corresponding function through interface scheduling, they must select the interface in the interface scheduling system and trigger an interface scheduling request. Upon receiving a triggered interface scheduling request, the interface scheduling system transmits all front-end requests (interfaces) that have triggered interface scheduling requests within a preset time interval to the analysis pool function through a unified entry point. The analysis pool function contains various functions, primarily including, but not limited to, normal functions, debounce functions, throttle functions, queue functions, and cache functions. The main functions of the analysis pool function include data statistics, data analysis, pattern (function) matching, data return, and interface invocation. After transmitting all interfaces to the analysis pool function, the interface scheduling system calls the analysis pool function to perform an initial analysis of the interface information for each interface, assigning each interface its first matching function and returning its corresponding data. The interface information includes, but is not limited to, the interface name, the number of interface requests, interface parameters, the number of interface requests, and the page address.

[0098] It should be noted that the preset time interval is pre-set. In this embodiment, to reduce the time error between the client and the server, the preset time interval is set to the millisecond level. Specifically: When the project starts, a socket connection is established. After the socket connection is established, the server pushes its current millisecond-level time data to the client. After receiving the server's millisecond-level time data, the client obtains its local millisecond-level time data and compares it with the server's millisecond-level time data to determine the error between the two times. This error is updated every time the backend returns time data. When an interface call is initiated, the local time plus the error time is sent to the server, thus ensuring the consistency of time between the client and the server.

[0099] In this embodiment, for example, an application scenario is as follows: the preset time interval is 1 millisecond (ms). The interface scheduling system transmits all interfaces that triggered interface scheduling requests within 0-1ms to the analysis pool function through a unified entry point; then, it transmits all interfaces that triggered interface scheduling requests within 1-2ms to the analysis pool function through a unified entry point; then, it transmits all interfaces that triggered interface scheduling requests within 2-3ms to the analysis pool function through a unified entry point, and so on.

[0100] Step S20: Call the analysis pool function to perform a second analysis on the data information of each of the returned data to obtain the second matching function corresponding to each of the interfaces.

[0101] After determining the first matching function and its returned data for each interface, the interface scheduling system will again transmit the returned data to the analysis pool function. The analysis pool function will then perform a second analysis on the data information of each returned data, assigning the second matching function to be called for each interface corresponding to the returned data. The data information includes, but is not limited to, data content, data request duration, and / or data size. Therefore, step S20 is specifically explained as step a below. Step a: The analysis pool function is called to analyze the data content, data request duration, and / or data size of each piece of data information to obtain the second matching function corresponding to each interface.

[0102] The interface scheduling system calls the analysis pool function to perform a second analysis on the data content, data request duration, and / or data size of each returned data. Based on the data content, data request duration, and / or data size of each returned data, it assigns a second matching function to be called for each interface corresponding to the returned data. Specifically, for the data content of the returned data, if the content complexity of an interface's data content is lower than a preset complexity, then a normal function (also known as the second matching function) is assigned to that interface. The preset complexity is pre-set and is not limited in this embodiment. If the content complexity of an interface's data content is higher than or equal to the preset complexity, then a non-normal function (also known as the cache function) is assigned to that interface. Regarding the data request duration, if the data request duration of an interface is long (exceeding the debounce interval), and the interval between requests to adjacent identical interfaces is short (not exceeding the debounce interval), then a non-normal function (also known as the debounce function) is assigned to that interface. Regarding the size of the returned data, if the data size of an interface is less than a preset value, then the interface is assigned the normal function, which is also the second matching function. The preset value is pre-defined and is not limited in this embodiment. If the data size of an interface is greater than or equal to the preset value, then the interface is assigned the non-normal function, the queue function, which is also the second matching function.

[0103] Meanwhile, the interface scheduling system transforms the analysis results of the first and second analyses into charts for display, thereby exposing some interfaces that take a long time to process, making it easier to optimize.

[0104] Step S30: Determine the first target matching function corresponding to each of the interfaces based on the first matching function and the second matching function.

[0105] After determining the first and second matching functions for each interface, the interface scheduling system, based on the function types of the first and second matching functions, determines one of them as the target matching function for each interface. The target matching function can also be understood as the function used in the next call to each interface. Specific steps are shown in steps S301 to S304. Function types are mainly divided into ordinary functions and non-ordinary functions. Ordinary functions include, but are not limited to, the `normal` function, while non-ordinary functions include, but are not limited to, the `debounce`, `throttle`, `queue`, and `cache` functions. Furthermore, to more accurately match each interface with its corresponding matching function, the preferred approach regarding function types and their corresponding weight ratios is: for the same function type, the weight ratio of the matching function obtained in the second analysis is higher than that obtained in the first analysis; for different function types, the weight ratio of non-ordinary functions is higher than that of ordinary functions. Therefore, if the first and second matching functions have the same function type, the weight ratio of the second matching function obtained in the second analysis is higher than that of the first matching function obtained in the first analysis. Furthermore, if the function types of the first matching function and the second matching function are different, and the first matching function is a non-ordinary function while the second matching function is an ordinary function, then the weight ratio of the first matching function is higher than that of the second matching function.

[0106] This embodiment identifies all interfaces that trigger interface scheduling requests within a preset time interval. It then calls an analysis pool function to perform a first analysis of the interface information for each interface, obtaining the first matching function and its corresponding return data. Next, the analysis pool function performs a second analysis of the returned data, obtaining the second matching function for each interface. Based on the first and second matching functions, the first target matching function for each interface is determined. Therefore, this embodiment adds an analysis pool function to the interface scheduling process. By calling the analysis pool function to analyze the interface information and return data of each interface, it returns the target matching function to be scheduled for each interface. This allows each interface to be autonomously assigned a target matching function, eliminating the need for developers to manually select the matching function for each interface, thus improving interface scheduling efficiency. Since the functions to be scheduled for each interface are autonomously assigned, it better supports modular development, allowing developers to focus more on module business development and further resolving the issue of interface mode mismatch due to increased user data volume.

[0107] Furthermore, referring to Figure 3 , Figure 3This is a detailed flowchart of step S10 in the first embodiment of the interface scheduling method of this application. Step S10 includes:

[0108] Step S101: Call the analysis pool function to determine whether the interface name and page address corresponding to all interfaces are the same;

[0109] Step S102: Call the analysis pool function to determine whether the interface parameters corresponding to each interface are the same;

[0110] Step S103: If all interfaces have the same interface name and page address, and all interfaces have the same interface parameters, then the analysis pool function is called to determine the first matching function for each interface based on the interface parameters.

[0111] Specifically, the interface scheduling system calls the analysis pool function to determine whether the interface names and page addresses corresponding to all interfaces are the same, and also calls the analysis pool function to determine whether the interface parameters corresponding to each interface are the same. If it is determined that the interface names and page addresses corresponding to all interfaces are the same, and the interface parameters corresponding to all interfaces are the same, then the analysis pool function is called to analyze the parameter types of the interface parameters, and the first matching function corresponding to each interface is determined based on the interface parameters. A preferred approach is as follows: The interface scheduling system calls the analysis pool function to determine whether the interface names and page addresses corresponding to each interface are the same. If it is determined that the interface names and page addresses corresponding to each interface are the same, then all interfaces are determined to be the same interface. Next, the interface scheduling system calls the analysis pool function to determine whether the interface parameters corresponding to each interface are the same. If it is determined that the interface parameters corresponding to each interface are the same, then the analysis pool function is further called to analyze the parameter types of the interface parameters. The parameter types include, but are not limited to, multiple refresh types, single refresh types, and mandatory refresh types. This can also be understood as further calling the analysis pool function to analyze the refresh status corresponding to each interface. For interface parameters whose parameter type requires a refresh and allows additional parameters, i.e., the interface must be refreshed and can have parameters passed, a normal function is assigned to each interface, and the normal function is determined as the first matching function for each interface. For interface parameters whose parameter type requires multiple refreshes within a short period of time, i.e., the interface needs to be refreshed multiple times within a short period of time, a non-normal function is assigned to each interface. In this case, the non-normal function is a cache function, and the cache function is determined as the first matching function for each interface.

[0112] Furthermore, even assuming all interfaces are identical, there are still cases where parameters have non-unique attributes. In this case, a non-ordinary function is assigned, specifically a debouncing function. The specific analysis of non-unique attribute changes is as follows: If a non-unique attribute changes during an interface parameter request, it results in different requests. Therefore, a parameter needs to be added to the analysis pool function to verify the consistency of the two input parameters. This verification process uses the JSON stringify() method to convert the input parameters into strings, and then compares the converted results. If the two input parameters are inconsistent, a deep recursive parsing is performed on the parameter object to extract all attributes. Each attribute is then recursively parsed to extract all sub-attributes of the object. The parsed data is compared to obtain the differing attributes and their values. If the parameter object has multiple attributes, and after parsing and comparing the two input parameter objects, only one attribute differs, and the differing attribute value matches the inclusion relationship, then the debounce function is assigned.

[0113] This embodiment combines the interface name, page address, and interface parameters to autonomously assign a corresponding first matching function to each interface, making the matched first matching function more accurate.

[0114] Furthermore, referring to Figure 4 , Figure 4 This is a flowchart illustrating another embodiment of the interface scheduling method of this application. After step S101, it further includes:

[0115] Step S104: If the interface name and page address corresponding to all interfaces are different, determine whether the number of interface requests is greater than the preset number.

[0116] Step S105: If the number of interface requests is less than or equal to the preset number, then assign a normal function to each interface and determine the normal function as the first matching function of each interface;

[0117] Step S106: If the number of interface requests is greater than the preset number, then a non-ordinary function is assigned to each interface, and the non-ordinary function is determined as the first matching function of each interface.

[0118] Specifically, if the interface scheduling system determines that the interface name and page address corresponding to each interface are different, then all interfaces are considered different. Next, the interface scheduling system determines whether the number of interface requests exceeds a preset number. If the number of interface requests is less than or equal to the preset number, a normal function is assigned to each interface, and this normal function is designated as the first matching function for each interface. If the number of interface requests exceeds the preset number, a non-normal function is assigned to each interface, and this non-normal function is designated as the first matching function for each interface. The preset number is set by technical personnel and is not limited in this embodiment.

[0119] In this embodiment, for example, if the preset number is 5, and the interface scheduling system determines that all interfaces are different and that the number of interface requests is 4, then all interfaces are assigned ordinary functions. If the number of interface requests is determined to be 6, then all interfaces are assigned non-ordinary functions.

[0120] This embodiment combines the interface name, page address, and number of interface requests to autonomously assign a corresponding first matching function to each interface, making the matched first matching function more accurate.

[0121] Furthermore, referring to Figure 5 , Figure 5 This is a flowchart illustrating another embodiment of the interface scheduling method of this application. After step S102, it further includes:

[0122] Step S107: If the interface parameters corresponding to all interfaces are different, determine whether the number of interface requests is greater than the preset number.

[0123] Step S108: If the number of interface requests is less than or equal to the preset number, then assign a normal function to each interface and determine the normal function as the first matching function for each interface;

[0124] Step S109: If the number of interface requests is greater than the preset number, then a non-ordinary function is assigned to each interface, and the non-ordinary function is determined as the first matching function of each interface.

[0125] Specifically, if the interface scheduling system determines that the interface parameters corresponding to each interface are different, it then determines whether the number of interface requests exceeds a preset number. If the number of interface requests is less than or equal to the preset number, a normal function is assigned to each interface, and this normal function is determined as the first matching function for each interface. If the number of interface requests exceeds the preset number, a non-normal function is assigned to each interface, and this non-normal function is determined as the first matching function for each interface. The preset number is set by technical personnel and is not limited in this embodiment.

[0126] In this embodiment, for example, if the preset number is 5, and the interface scheduling system determines that all interfaces have the same interface name and page address, but all interfaces have different interface parameters, and determines that the number of interface requests is 4, then all interfaces are assigned ordinary functions. If the number of interface requests is determined to be 6, then all interfaces are assigned non-ordinary functions.

[0127] This embodiment assigns a corresponding first matching function to each interface by combining the interface name, page address, and number of interface requests, making the matched first matching function more accurate.

[0128] Furthermore, not all interface names and page addresses are the same or different, and not all interface parameters are the same or different. In this case, the specific analysis is as follows: If some interfaces have the same interface name and page address, and some have different interface names and page addresses, then firstly, all interfaces are categorized according to their interface names and page addresses. That is, interfaces with the same interface name and page address are grouped into one category, and interfaces with different interface names and page addresses are grouped into another category. After all interfaces are categorized, steps S103 and S107 to S109 are executed for all interfaces in each category to obtain the first matching function corresponding to each interface in each category.

[0129] In this embodiment, interfaces are categorized based on their names and page addresses. Then, by combining the interface parameters and the number of interface requests, a corresponding first matching function is automatically assigned to each interface, making the matched first matching function more accurate.

[0130] Furthermore, referring to Figure 6 , Figure 6 This is a detailed flowchart of step S30 in the first embodiment of the interface scheduling method of this application. Step S30 includes:

[0131] Step S301: If the first matching function and the second matching function are functions of the same type, then the second matching function is determined as the first target matching function.

[0132] Step S302: If the first matching function and the second matching function are different types of functions, then determine the function types of the first matching function and the second matching function, wherein the function types include non-ordinary functions and ordinary functions;

[0133] Step S303: If the function type of the first matching function is a non-ordinary function and the function type of the second matching function is an ordinary function, then the first matching function is determined as the first target matching function;

[0134] Step S304: If the function type of the first matching function is a normal function and the function type of the second matching function is a non-normal function, then the second matching function is determined as the first target matching function.

[0135] It should be noted that, as described in step S30, in order to more accurately match each interface with its corresponding matching function, the preferred approach regarding function types and their corresponding weight ratios is as follows: for the same function type, the weight ratio of the matching function obtained in the second analysis is higher than that obtained in the first analysis; for different function types, the weight ratio of non-normal functions is higher than that of normal functions. Therefore, the weight ratios of non-normal functions such as the debounce, throttle, queue, and cache functions are higher than that of normal functions.

[0136] Specifically, if the interface scheduling system determines that the first matching function and the second matching function are functions of the same type, then the second matching function is determined as the first target matching function for each interface. If the first matching function and the second matching function are determined to be functions of different types, and the function type of the first matching function is a non-ordinary function while the function type of the second matching function is an ordinary function, then the first matching function is determined as the first target matching function for each interface. If the function type of the first matching function is an ordinary function while the function type of the second matching function is a non-ordinary function, then the second matching function is determined as the first target matching function for each interface.

[0137] This embodiment determines the target matching function for each interface by using function type and weight ratio, making the final target matching function assigned to each interface more accurate. Furthermore, for each interface, i.e., for user data used by each user, the target matching function for each interface is assigned based on the weight values ​​of the first and second matching functions, thereby obtaining a pattern that better matches the user's individual usage habits.

[0138] Furthermore, referring to Figure 7 , Figure 7 This is a flowchart illustrating another embodiment of the interface scheduling method of this application. After step S30, it further includes:

[0139] Step S40: When a new interface triggering interface scheduling request is received, determine whether the new interface is being triggered for the first time.

[0140] Step S50: If the new interface is not triggered for the first time, then determine the second target matching function of the new interface based on the first analysis and the second analysis;

[0141] Step S60: Determine the final matching function corresponding to the new interface based on the first target matching function and the second target matching function corresponding to the new interface.

[0142] When the interface scheduling system receives a new interface trigger scheduling request, it determines whether the new interface is being triggered for the first time. If it is determined that the new interface is being triggered for the first time, meaning that the new interface has not been triggered and steps S10 to S30 have not been executed before, steps S10 to S30 need to be executed to obtain the first target matching function corresponding to the first trigger execution of the new interface. If it is determined that the new interface is not being triggered for the first time, meaning that the new interface has a corresponding first target matching function, steps S10 to S30 also need to be executed to obtain the second target matching function corresponding to the new interface. Then, based on the function types of the first and second target matching functions corresponding to the new interface, and the weight ratio corresponding to the function types, the final matching function of the new interface is obtained. The final matching function is also used as the function for the next call. When the interface scheduling system receives another new interface trigger scheduling request, steps S10 to S30 and steps S40 to S60 are continuously looped. Furthermore, the interface scheduling system will persistently store the final matched function and perform a third analysis on all interface call results, matching the corresponding function according to the weight ratio as the system's recommended interface call function.

[0143] When this embodiment receives a new interface trigger scheduling request, it determines whether the new interface is being triggered for the first time. If the new interface is not being triggered for the first time, a second target matching function is determined based on the first and second analyses. Then, based on the first and second target matching functions corresponding to the new interface, the final matching function corresponding to the new interface is determined. Therefore, this embodiment continuously determines the final matching function corresponding to the interface based on the first and second target matching functions. Through multiple iterations of analysis, the returned final matching function becomes more accurate, meaning the returned final mode better matches the user's usage habits and scenarios.

[0144] Furthermore, referring to Figure 8 , Figure 8 This is a detailed flowchart illustrating step S60 of the interface scheduling method in this application. Step S60 includes:

[0145] Step S601: If the first target matching function and the second target matching function corresponding to the new interface are different types of functions, the function type of the first target matching function corresponding to the new interface is a non-ordinary function, and the function type of the second target matching function is an ordinary function, then the first target matching function corresponding to the new interface is determined as the final matching function;

[0146] Step S602: If the first target matching function and the second target matching function corresponding to the new interface are different types of functions, the function type of the first target matching function corresponding to the new interface is a normal function, and the function type of the second target matching function is a non-normal function, then the second target matching function is determined as the final matching function;

[0147] Step S603: If the first target matching function and the second target matching function corresponding to the new interface are functions of the same type, and the first target matching function and the second target matching function corresponding to the new interface are functions matched by the second analysis, then determine the data request duration and / or data size of the first target matching function and the second target matching function corresponding to the new interface.

[0148] Step S604: If the data request duration of the first target matching function corresponding to the new interface is less than the data request duration of the second target matching function, or / and the data size of the first target matching function corresponding to the new interface is less than the data size of the second target matching function, then the second target matching function is determined as the final matching function.

[0149] It should be noted that if the first target matching function and the second target matching function corresponding to the new interface are both functions matched through the second analysis, then the function with a longer data request time or a larger data size will have a higher weight.

[0150] Specifically, if the interface scheduling system determines that the first target matching function and the second target matching function corresponding to the new interface are different types of functions, and the function type of the first target matching function corresponding to the new interface is a non-ordinary function while the function type of the second target matching function is an ordinary function, then the first target matching function corresponding to the new interface is determined as the final matching function for the new interface. If the function type of the first target matching function corresponding to the new interface is an ordinary function while the function type of the second target matching function is a non-ordinary function, then the second target matching function is determined as the final matching function for the new interface. Further, if the interface scheduling system determines that the first target matching function and the second target matching function corresponding to the new interface are of the same type of function, and both the first target matching function and the second target matching function are functions matched through the second analysis, then the system determines the data request duration and / or data size of the first target matching function and the second target matching function corresponding to the new interface, and determines whether the final matching function is the first target matching function or the second target matching function corresponding to the new interface based on the data request duration and / or data size.

[0151] Specifically: If the data size of the first target matching function corresponding to the new interface is equal to the data size of the second target matching function, and the data request duration of the first target matching function corresponding to the new interface is less than the data request duration of the second target matching function, then the second target matching function is determined as the final matching function for the new interface. If the data request duration of the first target matching function corresponding to the new interface is equal to the data request duration of the second target matching function, and the data size of the first target matching function corresponding to the new interface is less than the data size of the second target matching function, then the second target matching function is determined as the final matching function for the new interface. If the data request duration of the first target matching function corresponding to the new interface is less than the data request duration of the second target matching function, and the data size of the first target matching function corresponding to the new interface is less than the data size of the second target matching function, then the second target matching function is determined as the final matching function for the new interface.

[0152] Furthermore, priorities can be set. For example, the priority of data request duration can be defined as higher than the priority of data size. That is, as long as it is determined that the data request duration of the first target matching function corresponding to the new interface is less than the data request duration of the second target matching function, the second target matching function is directly determined as the final matching function of the new interface, regardless of the data size. Similarly, the priority of data size can be defined as higher than the priority of data request duration. That is, as long as it is determined that the data size of the first target matching function corresponding to the new interface is less than the data size of the second target matching function, the second target matching function is directly determined as the final matching function of the new interface, regardless of the data request duration.

[0153] Furthermore, if the interface scheduling system determines that the first target matching function and the second target matching function corresponding to the new interface are functions of the same type, and one of the first target matching function and the other is a function matched through the first analysis, and the other is a function matched through the second analysis, then if the first target matching function corresponding to the new interface is a function matched through the second analysis, then the first target matching function corresponding to the new interface is determined as the final matching function of the new interface. If the second target matching function is a function matched through the second analysis, then the second target matching function is determined as the final matching function of the new interface.

[0154] This embodiment determines the final matching function for each interface by combining the function type, data request duration, and / or data size, making the returned final matching function more accurate.

[0155] This application also provides a computer-readable storage medium storing an interface scheduler, which, when executed by a processor, implements the steps of the interface scheduling method as described in any of the above embodiments.

[0156] The specific embodiments of the computer-readable storage medium in this application are basically the same as the embodiments of the interface scheduling method described above, and will not be repeated here.

[0157] This application also provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of the interface scheduling method as described in any of the above embodiments.

[0158] The specific embodiments of the computer program product of this application are basically the same as the embodiments of the interface scheduling method described above, and will not be repeated here.

[0159] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0160] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0161] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0162] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. An interface scheduling method, characterized in that, The interface scheduling method includes the following steps: All interfaces that triggered interface scheduling requests within a preset time interval are identified, and the analysis pool function is called to perform the first analysis on the interface information of each interface to obtain the first matching function of each interface and its corresponding return data. The analysis pool function is invoked to perform a second analysis on the data information of each returned data, thereby obtaining the second matching function corresponding to each interface; Based on the first matching function and the second matching function, determine the first target matching function corresponding to each of the interfaces; The interface information includes the interface name, page address, and interface parameters. The step of calling the analysis pool function to perform a first analysis on the interface information of each interface to obtain the first matching function for each interface includes: calling the analysis pool function to determine whether the interface name and page address corresponding to all interfaces are the same; and calling the analysis pool function to determine whether the interface parameters corresponding to each interface are the same; if the interface name and page address corresponding to all interfaces are the same, and the interface parameters corresponding to all interfaces are the same, then calling the analysis pool function to determine the first matching function for each interface based on the interface parameters. The step of calling the analysis pool function to perform a second analysis on the data information of each of the returned data to obtain the second matching function corresponding to each of the interfaces includes: calling the analysis pool function to analyze the data content, data request duration and / or data size in each of the data information to obtain the second matching function corresponding to each of the interfaces; The step of determining the first target matching function corresponding to each interface based on the first matching function and the second matching function includes: If the first matching function and the second matching function are functions of the same type, then the second matching function is determined as the first target matching function; The step of determining the first target matching function corresponding to each interface based on the first matching function and the second matching function includes: If the first matching function and the second matching function are functions of different types, then the function types of the first matching function and the second matching function are determined, wherein the function types include non-ordinary functions and ordinary functions; If the function type of the first matching function is a non-ordinary function, and the function type of the second matching function is an ordinary function, then the first matching function is determined as the first target matching function; If the function type of the first matching function is a normal function, and the function type of the second matching function is a non-normal function, then the second matching function is determined as the first target matching function.

2. The interface scheduling method as described in claim 1, characterized in that, The interface information also includes the number of interface requests. After the step of calling the analysis pool function to determine whether the interface names and page addresses corresponding to all interfaces are the same, the following steps are also included: If all interfaces have different interface names and page addresses, then determine whether the number of interface requests is greater than a preset number. If the number of interface requests is less than or equal to the preset number, then a normal function is assigned to each interface, and the normal function is determined as the first matching function for each interface; If the number of interface requests exceeds the preset number, a non-ordinary function is assigned to each interface, and the non-ordinary function is determined as the first matching function for each interface.

3. The interface scheduling method as described in claim 1, characterized in that, The interface information also includes the number of interface requests. After the step of calling the analysis pool function to determine whether the interface parameters corresponding to each interface are the same, the following steps are also included: If all interfaces have different interface parameters, then determine whether the number of requests to the interface is greater than the preset number. If the number of requests to the interface is less than or equal to the preset number, then a normal function is assigned to each interface, and the normal function is determined as the first matching function for each interface; If the number of requests to the interface exceeds the preset number, a non-ordinary function is assigned to each interface, and the non-ordinary function is determined as the first matching function for each interface.

4. The interface scheduling method as described in any one of claims 1 to 3, characterized in that, After the step of determining the first target matching function corresponding to each interface based on the first matching function and the second matching function, the method further includes: When a new interface trigger scheduling request is received, it is determined whether the new interface is being triggered for the first time. If the new interface is not triggered for the first time, then the second target matching function of the new interface is determined based on the first analysis and the second analysis; Based on the first target matching function and the second target matching function corresponding to the new interface, determine the final matching function corresponding to the new interface.

5. The interface scheduling method as described in claim 4, characterized in that, The step of determining the final matching function corresponding to the new interface based on the first target matching function and the second target matching function corresponding to the new interface includes: If the first target matching function and the second target matching function corresponding to the new interface are functions of different types, the function type of the first target matching function corresponding to the new interface is a non-ordinary function, and the function type of the second target matching function is an ordinary function, then the first target matching function corresponding to the new interface is determined as the final matching function; If the first target matching function and the second target matching function corresponding to the new interface are functions of different types, and the function type of the first target matching function corresponding to the new interface is a normal function, and the function type of the second target matching function is a non-normal function, then the second target matching function is determined as the final matching function.

6. The interface scheduling method as described in claim 4, characterized in that, The step of determining the final matching function corresponding to the new interface based on the first target matching function and the second target matching function corresponding to the new interface includes: If the first target matching function and the second target matching function corresponding to the new interface are functions of the same type, and the first target matching function and the second target matching function corresponding to the new interface are functions matched through the second analysis, then the data request duration and / or data size of the first target matching function and the second target matching function corresponding to the new interface are determined. If the data request duration of the first target matching function corresponding to the new interface is less than the data request duration of the second target matching function, or / and the data size of the first target matching function corresponding to the new interface is less than the data size of the second target matching function, then the second target matching function is determined as the final matching function.

7. An interface scheduling system, characterized in that, The interface scheduling system includes: a memory, a processor, and an interface scheduling program stored in the memory and executable on the processor. When the interface scheduling program is executed by the processor, it implements the steps of the interface scheduling method as described in any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an interface scheduler, which, when executed by a processor, implements the steps of the interface scheduling method as described in any one of claims 1 to 6.