Functional interface chain calling framework, construction method, debugging method and device

Through the functional interface chain calling framework, the original software architecture style interface is split into sub-functions and combined, solving the problem of redundant code and low development efficiency in interface chain calling, and achieving efficient interface chain calling and development efficiency improvement.

CN119065662APending Publication Date: 2024-12-03CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410950758.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The existing REST software architecture-style interface calling scheme generates redundant code and repeated processing methods when implementing the interface chain, resulting in inefficient development.

Method used

A functional interface chain calling framework is proposed, which splits the original software architecture style interface into subfunctions with basic logic, and builds an interface chain through the combination of subfunctions, functions and interfaces, providing log processing, permission determination, and certificate verification and interface document generation capabilities.

Benefits of technology

Reduces repeated code writing and debugging time, improves development efficiency, and allows developers to concentrate on business development and achieve efficient call support for interface chains.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065662A_ABST
    Figure CN119065662A_ABST
Patent Text Reader

Abstract

The invention provides a function type interface chain calling framework, a construction method and a debugging method and device, and the framework comprises a plurality of interface chains which are used for realizing a specified function of a target project; each interface chain is composed of a plurality of interfaces and calling relations among the interfaces; the interface is composed of a plurality of functions with basic functions and calling relations among the functions; the function with the basic function is composed of a plurality of sub-functions with basic logic and calling relations among the sub-functions. Developers using the framework can assemble and use the interfaces, the functions and the sub-functions at will according to needs, so that attention is focused on business development, and development efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of software interface technology, and specifically relates to a functional interface chain calling framework, construction method, debugging method and device. Background Art

[0002] When implementing the REST software architecture style interface, the existing interface calling scheme usually uses object-oriented programming. However, the object-oriented programming method needs to merge data and operation logic together when used, which will cause redundancy due to various combinations between operation logic and data. Currently, the design of interface calls mostly focuses on the call request of a single service or a single interface. Therefore, if the interface is implemented completely based on the existing REST software architecture style, the call of the interface chain will generate a lot of redundant code, and it will take a lot of time to write the code. When calling the interface chain, there will be repeated processing methods. Summary of the invention

[0003] Based on the above technical problems, the present application proposes a functional interface chain calling framework, method and device.

[0004] In a first aspect, the present application proposes a functional interface chain calling framework, including:

[0005] Multiple interface chains to achieve the specified functions of the target project;

[0006] Each interface chain consists of multiple interfaces and the calling relationships between interfaces;

[0007] The interface is composed of a plurality of functions with basic functions and calling relationships between the functions; the function with basic functions is composed of a plurality of sub-functions with basic logic and calling relationships between the sub-functions.

[0008] The function has input parameters and output parameters corresponding to the basic functions, and the relationship between the input parameters and output parameters of each function is the calling relationship between interfaces. The sub-function has input parameters and output parameters corresponding to the basic logic, and the relationship between the input parameters and output parameters of each sub-function is the calling relationship between sub-functions.

[0009] The functions include: a log processing function, a permission processing function, a certificate verification function and an interface document generation function.

[0010] The log processing function includes: a sub-function for recording interface call information, a sub-function for determining persistent logs, a sub-function for outputting file logs, a sub-function for outputting console logs, and a first calling relationship between the sub-functions;

[0011] The first calling relationship includes: the output parameters of the recording interface call information sub-function are input into the input parameters of the persistence log judgment sub-function, the output parameters of the persistence log judgment sub-function are input into the input parameters of the file log output sub-function, the output parameters of the persistence log judgment sub-function are input into the input parameters of the console log sub-function, the input parameters of the recording interface call information sub-function are the input parameters of the log processing function, and the output parameters of the file log output sub-function are the output parameters of the log processing function.

[0012] The permission processing function includes: parsing interface caller sub-function, obtaining permission engine rule sub-function, permission engine cache sub-function, permission judgment sub-function and second calling relationship between sub-functions;

[0013] The second calling relationship includes: the output parameter of the parsing interface caller sub-function is input into the first input parameter of the permission engine rule sub-function, the output parameter of the permission engine cache sub-function is input into the second input parameter of the permission engine rule sub-function, the output parameter of the permission engine rule sub-function is input into the permission judgment sub-function, the input parameter of the parsing interface caller sub-function is the input parameter of the permission processing function, and the output parameter of the permission judgment sub-function is the output parameter of the permission processing function.

[0014] The certificate verification function includes: a certificate verification sub-function, a certificate legality judgment sub-function and a third calling relationship between the sub-functions;

[0015] The third calling relationship includes: the output parameters of the certificate verification sub-function are input parameters of the certificate legality judgment sub-function, the input parameters of the certificate verification sub-function are the input parameters of the certificate verification function, and the output parameters of the certificate legality judgment sub-function are the output parameters of the certificate verification function.

[0016] The interface document generation function includes: generating document sub-functions and a fourth calling relationship between sub-functions;

[0017] The fourth calling relationship includes: the input parameter of the document generation sub-function is the input parameter of the interface document generation function, and the output parameter of the document generation sub-function is the output parameter of the interface document generation function.

[0018] In a second aspect, a method for constructing a functional interface chain calling framework includes:

[0019] Split the original software architecture style interface into sub-functions with basic logic;

[0020] Combine multiple sub-functions with basic logic and the calling relationships between sub-functions to form a function with basic functions;

[0021] An interface is constructed by using multiple functions with basic functions and the calling relationships between functions;

[0022] An interface chain is formed by using multiple interfaces and the calling relationships between interfaces;

[0023] Use multiple interface chains to implement the specified functions of the target project.

[0024] In a third aspect, a debugging method for a functional interface chain calling framework includes:

[0025] Debug the calling relationships between sub-functions, between functions, and between interfaces.

[0026] In a fourth aspect, a construction device for a functional interface chain calling framework includes: an original interface splitting module, a sub-function construction module, a function construction module, an interface construction module, and an interface chain construction module;

[0027] The original interface splitting module is used to split the original software architecture style interface into sub-functions with basic logic;

[0028] The sub-function construction module is used to construct a function with basic functions by combining multiple sub-functions with basic logic and the calling relationships between the sub-functions;

[0029] The function building module is used to form an interface using multiple functions with basic functions and calling relationships between functions;

[0030] The interface building module is used to form an interface chain using multiple interfaces and calling relationships between interfaces;

[0031] The interface chain building module is used to use multiple interface chains to implement the specified functions of the target project.

[0032] In a fifth aspect, the present application proposes an electronic device, comprising: one or more processors, and a memory, wherein the memory stores instructions, and when the instructions are executed by the one or more processors, the one or more processors execute the functional interface chain call framework.

[0033] In a sixth aspect, the present application proposes a computer-readable storage medium storing executable instructions, which, when executed, cause a processor to execute the functional interface chain call framework.

[0034] Beneficial effects:

[0035] This application proposes a functional interface chain calling framework, construction method, debugging method and device, through which the calling support for the interface chain can be realized while providing log processing, authority determination, certificate verification, and interface document generation capabilities. Developers using the framework can assemble and use these interfaces, functions, and sub-functions as needed, so as to focus on business development and improve development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A schematic diagram of a functional interface chain calling framework principle of an embodiment of the present application;

[0037] Figure 2 A schematic diagram of a functional interface chain calling framework structure of an embodiment of the present application;

[0038] Figure 3 This is a schematic diagram of the log processing function structure of an embodiment of the present application;

[0039] Figure 4 This is a schematic diagram of the permission processing function structure of an embodiment of the present application;

[0040] Figure 5 This is a schematic diagram of the certificate verification function structure of an embodiment of the present application;

[0041] Figure 6 A schematic diagram of the interface document generation function structure of an embodiment of the present application;

[0042] Figure 7 This is a schematic diagram of an example of a functional interface chain calling framework according to an embodiment of the present application;

[0043] Figure 8 A flow chart of a method for constructing a functional interface chain calling framework according to an embodiment of the present application;

[0044] Fig. 9 This is a principle block diagram of a device for constructing a functional interface chain calling framework according to an embodiment of the present application. DETAILED DESCRIPTION

[0045] The present disclosure is further described below in conjunction with the embodiments shown in the accompanying drawings.

[0046] When implementing REST (Representational State Transfer, a software architecture style) style interfaces, most existing interface calling solutions use object-oriented programming. Data and operation logic need to be merged together, and redundancy will be generated due to various combinations of operation logic and data. For example, if you want to calculate (1+2)×(3+4), the object-oriented input data is: 1, 2, 3, 4, and the processing logic is implemented by writing statements according to the logic of the processing object itself: (1+2)×(3+4)=21.

[0047] The present application proposes a functional interface chain calling framework, construction method, debugging method and device, which splits the original software architecture style interface into sub-functions with basic logic, and uses multiple sub-functions with basic logic and the calling relationship between sub-functions to form a function with basic functions; uses multiple functions with basic functions and the calling relationship between functions to form an interface; uses multiple interfaces and the calling relationship between interfaces to form an interface chain; uses multiple interface chains to realize the specified functions of the target project. For example, if you want to calculate (1+2)×(3+4), you need to write two sub-functions, the addition sub-function and the multiplication sub-function, after using the functional interface chain calling framework. Then, perform three steps. The first step is to call the addition sub-function to implement 1+2=3; the second step is to call the addition sub-function to implement 3+4=7; the third step is to call the multiplication sub-function to implement 3×7=21. In a super large project, if you want to implement (1+2)×(3+4) in one interface, (3+5)×(7+8) in another interface, and (7+7)×(5+6) in another interface, you need to write three different programs, and the debugging time is very fast. When these three different programs need to be debugged, if the method of this application is used, it is only necessary to repeatedly call the addition sub-function and the multiplication sub-function in three different interfaces, and there is no need to rewrite the entire program. Therefore, the idea of ​​functional programming can avoid repeated writing of object-oriented statements, and different processes can be directly used in various combinations of sub-functions, functions, and interfaces to complete the writing of specified projects. During later debugging, it is only necessary to debug the calling relationship between sub-functions, the calling relationship between functions, and the calling relationship between interfaces. There is no need to re-debug the logic inside sub-functions, functions, and interfaces, which saves debugging time. Developers using this framework can focus on business development and improve development efficiency.

[0048] Embodiment 1

[0049] This embodiment proposes a functional interface chain calling framework, such as Figure 1 , Figure 2 As shown, including:

[0050] Multiple interface chains to achieve the specified functions of the target project;

[0051] Each interface chain consists of multiple interfaces and the calling relationships between interfaces;

[0052] The interface is composed of a plurality of functions with basic functions and calling relationships between the functions; the function with basic functions is composed of a plurality of sub-functions with basic logic and calling relationships between the sub-functions.

[0053] The function has input parameters and output parameters corresponding to the basic functions, and the relationship between the input parameters and output parameters of each function is the calling relationship between interfaces. The sub-function has input parameters and output parameters corresponding to the basic logic, and the relationship between the input parameters and output parameters of each sub-function is the calling relationship between sub-functions.

[0054] In this embodiment, the call framework is a semi-finished product that realizes a certain function. It provides some commonly used tool classes and some basic general components, which can be used by developers to meet their respective business needs more efficiently on this basis. The interface chain refers to a method of obtaining the results of a specified project by calling multiple interfaces like a chain. The interface refers to a set of basic methods designed by the back end for use by third parties. Functional, that is, functional programming, refers to a programming method that stores functions in variables, uses them in parameters, and uses them in return values. Compared with the traditional object-oriented programming method, this embodiment can achieve better management status and simpler reuse. This embodiment is to split the original software architecture style interface (REST software architecture style interface) into sub-functions with basic logic, based on these sub-functions of basic logic, logically combine these sub-functions of basic logic, repeatedly call, obtain functions with basic functions, and then logically combine these functions with basic functions, repeatedly call, and obtain interfaces that can be provided to third parties that can realize certain functions, and then logically combine these interfaces, repeatedly call, and finally obtain an interface chain to complete the specified functions required by the user.

[0055] This embodiment divides the functions into: log processing function, permission processing function, certificate verification function and interface document generation function. When using, the user uses these functions as dependencies in the project. It can provide capabilities such as log processing, permission determination, certificate verification, and interface document generation. In specific applications, after long-term exploration, log processing functions, permission processing functions, certificate verification functions, and interface document generation functions are formed. These basic functions are used to perform different permutations and combinations of the above functions to obtain interfaces with different functions, making the acquisition of interfaces more flexible and more functional.

[0056] The log processing function, such as Figure 3 As shown, it includes: a sub-function for recording interface call information, a sub-function for persistent log judgment, a sub-function for file log output, a sub-function for console log, and a first calling relationship between the sub-functions;

[0057] The first calling relationship includes: the output parameters of the recording interface call information sub-function are input into the input parameters of the persistence log judgment sub-function, the output parameters of the persistence log judgment sub-function are input into the input parameters of the file log output sub-function, the output parameters of the persistence log judgment sub-function are input into the input parameters of the console log sub-function, the input parameters of the recording interface call information sub-function are the input parameters of the log processing function, and the output parameters of the file log output sub-function are the output parameters of the log processing function.

[0058] In the specific implementation, the log processing function is composed of a sub-function for recording interface call information, a persistent log judgment sub-function, a file log output sub-function, a console log sub-function, and the relationship between the parameter input and output. In the application of a project, various sub-functions can be called directly, or various functions can be directly used to build interfaces. The input parameters of the log processing function are input into the input parameters of the sub-function for recording interface call information, and the persistent log judgment sub-function makes a judgment. The result of the judgment can be input into the input parameters of the file log output sub-function, or into the input parameters of the console log sub-function. The log processing function provides a complete log recording process, which will record the caller of the interface, the call time, the input parameters and the return. According to user settings, console logs (i.e. non-persistent logs) and file logs (persistent logs) can be output.

[0059] The permission processing function, such as Figure 4 As shown, it includes: parsing interface caller sub-function, obtaining permission engine rule sub-function, permission engine cache sub-function, permission judgment sub-function and the second calling relationship between sub-functions;

[0060] The second calling relationship includes: the output parameter of the parsing interface caller sub-function is input into the first input parameter of the permission engine rule sub-function, the output parameter of the permission engine cache sub-function is input into the second input parameter of the permission engine rule sub-function, the output parameter of the permission engine rule sub-function is input into the permission judgment sub-function, the input parameter of the parsing interface caller sub-function is the input parameter of the permission processing function, and the output parameter of the permission judgment sub-function is the output parameter of the permission processing function.

[0061] In this embodiment, the permission processing function is composed of a sub-function for parsing the interface caller, a sub-function for obtaining the permission engine rules, a sub-function for the permission engine cache, a sub-function for judging the permission, and the relationship between the parameter input and output. The permission processing function provides the ability to determine the permission on the entire link of the interface call chain, which can effectively prevent unauthorized users from bypassing the permission verification method. The security of the application is greatly improved. In the process, if the developer requires the framework to make a permission determination, the framework will obtain the permission information of the current calling user from the permission engine specified by the developer. Thereby determining whether the user is allowed to call the interface. If the permission is normal, it will continue to the next step of the interface chain. If the verification is unauthorized, an error message will be returned. For performance reasons, developers can set the permission information obtained by the permission engine to cache.

[0062] The certificate verification function, such as Figure 5 As shown, it includes: a certificate verification sub-function, a certificate legality judgment sub-function and a third calling relationship between the sub-functions;

[0063] The third calling relationship includes: the output parameters of the certificate verification sub-function are input parameters of the certificate legality judgment sub-function, the input parameters of the certificate verification sub-function are the input parameters of the certificate verification function, and the output parameters of the certificate legality judgment sub-function are the output parameters of the certificate verification function.

[0064] In this embodiment, the certificate verification function is composed of a certificate verification sub-function, a certificate legality judgment sub-function, and the relationship between parameter input and output; the certificate verification function provides the certificate judgment capability on the entire link of the interface call chain, which can effectively ensure data security and improve the security of the interface. In the process, the caller's request will be intercepted and verified whether the caller has a legal certificate. If so, it will be released, otherwise a certificate error exception will be returned.

[0065] The interface document generation function, such as Figure 6 As shown, it includes: generating document sub-functions and a fourth calling relationship between sub-functions;

[0066] The fourth calling relationship includes: the input parameter of the document generation sub-function is the input parameter of the interface document generation function, and the output parameter of the document generation sub-function is the output parameter of the interface document generation function.

[0067] In this embodiment, the interface document generation function provides an automated generation capability. For each interface that accesses a framework method, an interface document can be automatically generated for joint debugging with other systems, which greatly saves the development cost of developers. The framework method is a plurality of functions with basic functions.

[0068] The above functions can provide specific capabilities, which are carried by functions. In actual use, they can be selected and combined organically according to the needs of developers. Figure 7 A combination scenario is provided, which is only used as an example: in this scenario, interface (1) uses a permission processing function and a log processing function, interface (2) does not use any function, and interface (3) uses a certificate verification function, an interface document generation function, and a log processing function. Through this framework, while implementing call support for the interface chain, log processing, permission determination, certificate verification, and interface document generation capabilities can be provided. In the current industry, microservice development has become one of the important choices for software development. It is the trend of the industry. The essence of microservices is to decompose complex functions into multiple simple functions, and implement complex functions through interface calls between simple functions. Therefore, the importance of interface chains is increasing. At the same time, as the interface data increases, the complexity of interface management also increases. This embodiment focuses on this aspect, focusing on improving the call support for the interface chain and some underlying capabilities of the interface.

[0069] This embodiment proposes a functional interface chain calling framework, with multiple interface chains to realize the specified functions of the target project; each interface chain is composed of multiple interfaces and calling relationships between interfaces; the interface is composed of multiple functions with basic functions and calling relationships between functions; the function with basic functions is composed of multiple sub-functions with basic logic and calling relationships between sub-functions. It can avoid repeatedly writing object-oriented statements and save debugging time. Developers using this framework can focus on business development and improve development efficiency.

[0070] Embodiment 2

[0071] This embodiment proposes a method for constructing a functional interface chain calling framework, such as Figure 8 As shown, including:

[0072] Step S1: split the original software architecture style interface into sub-functions with basic logic;

[0073] Step S2: multiple sub-functions with basic logic and the calling relationships between the sub-functions constitute a function with basic functions;

[0074] Step S3: using multiple functions with basic functions and calling relationships between functions to form an interface;

[0075] Step S4: using multiple interfaces and calling relationships between interfaces to form an interface chain;

[0076] Step S5: Use multiple interface chains to implement the specified functions of the target project.

[0077] In this embodiment, the original REST software architecture style interface is first split into sub-functions with basic logic, such as: recording interface call information sub-function, persistent log judgment sub-function, file log output sub-function, console log sub-function; parsing interface caller sub-function, obtaining permission engine rule sub-function, permission engine cache sub-function, permission judgment sub-function; verifying certificate sub-function, certificate legality judgment sub-function; generating document sub-function. The above sub-functions and the calling relationship between sub-functions are used to form functions with basic functions;

[0078] The first calling relationship includes: the output parameters of the recording interface call information sub-function are input into the input parameters of the persistence log judgment sub-function, the output parameters of the persistence log judgment sub-function are input into the input parameters of the file log output sub-function, the output parameters of the persistence log judgment sub-function are input into the input parameters of the console log sub-function, the input parameters of the recording interface call information sub-function are the input parameters of the log processing function, and the output parameters of the file log output sub-function are the output parameters of the log processing function.

[0079] The second calling relationship includes: the output parameter of the parsing interface caller sub-function is input into the first input parameter of the permission engine rule sub-function, the output parameter of the permission engine cache sub-function is input into the second input parameter of the permission engine rule sub-function, the output parameter of the permission engine rule sub-function is input into the permission judgment sub-function, the input parameter of the parsing interface caller sub-function is the input parameter of the permission processing function, and the output parameter of the permission judgment sub-function is the output parameter of the permission processing function.

[0080] The third calling relationship includes: the output parameters of the certificate verification sub-function are input parameters of the certificate legality judgment sub-function, the input parameters of the certificate verification sub-function are the input parameters of the certificate verification function, and the output parameters of the certificate legality judgment sub-function are the output parameters of the certificate verification function.

[0081] The fourth calling relationship includes: the input parameters of the document generation sub-function are the input parameters of the interface document generation function, and the output parameters of the document generation sub-function are the output parameters of the interface document generation function.

[0082] The log processing function is composed according to the first calling relationship between the recording interface call information sub-function, the persistent log judgment sub-function, the file log output sub-function, the console log sub-function and the sub-functions; the permission processing function is composed according to the parsing interface caller sub-function, the obtaining permission engine rule sub-function, the permission engine cache sub-function, the permission judgment sub-function and the second calling relationship between the sub-functions; the certificate verification function is composed according to the third calling relationship between the certificate verification sub-function, the certificate legality judgment sub-function and the sub-functions; the interface document generation function is composed according to the fourth calling relationship between the document generation sub-function and the sub-functions;

[0083] Finally, an interface is formed based on multiple functions with basic functions and the calling relationships between functions; an interface chain is formed based on multiple interfaces and the calling relationships between interfaces; and finally, multiple interface chains are used to realize the specified functions of the target project.

[0084] The present embodiment proposes a method for constructing a functional interface chain calling framework, including: splitting the original software architecture style interface into sub-functions with basic logic; forming a function with basic functions from multiple sub-functions with basic logic and the calling relationship between sub-functions; forming an interface using multiple functions with basic functions and the calling relationship between functions; forming an interface chain using multiple interfaces and the calling relationship between interfaces; and using multiple interface chains to realize the specified functions of the target project. Assemble and use these interfaces, functions and sub-functions at will, so as to focus on business development and improve development efficiency.

[0085] Embodiment 3

[0086] This embodiment provides a debugging method for a functional interface chain calling framework, including:

[0087] Debug the calling relationships between sub-functions, between functions, and between interfaces.

[0088] In this embodiment, it can be understood that when various sub-functions have been established, the debugging of the corresponding sub-functions has been completed. Similarly, when various functions are established, the debugging of the corresponding functions has been completed. Then, when facing a new project, various sub-functions are used to form new functions. After various functions are used to form interfaces, it is only necessary to debug the calling relationship between sub-functions, the calling relationship between functions, and the calling relationship between interfaces. When the calling relationship between sub-functions, the calling relationship between functions, and the calling relationship between interfaces have correct input and output, the entire interface and the interface chain have correct input and output functions. This embodiment reduces the workload of debugging and improves the efficiency of creating new projects.

[0089] Embodiment 4:

[0090] This embodiment proposes a device for constructing a functional interface chain calling framework, such as Fig. 9 As shown, it includes: original interface splitting module, sub-function building module, function building module, interface building module, interface chain building module;

[0091] The original interface splitting module is used to split the original software architecture style interface into sub-functions with basic logic;

[0092] The sub-function construction module is used to construct a function with basic functions by combining multiple sub-functions with basic logic and the calling relationships between the sub-functions;

[0093] The function building module is used to form an interface using multiple functions with basic functions and calling relationships between functions;

[0094] The interface building module is used to form an interface chain using multiple interfaces and calling relationships between interfaces;

[0095] The interface chain building module is used to use multiple interface chains to implement the specified functions of the target project.

[0096] The present embodiment proposes a device for constructing a functional interface chain calling framework, which can arbitrarily assemble and use these interfaces, functions, and sub-functions, thereby focusing attention on business development and improving development efficiency.

[0097] Embodiment 5

[0098] This embodiment proposes an electronic device, including: one or more processors, and a memory, wherein the memory stores instructions, and when the instructions are executed by the one or more processors, the one or more processors execute the functional interface chain call framework.

[0099] The electronic device may be a mobile phone, a computer or a tablet computer, etc., including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the functional interface chain call framework described in the embodiment is implemented. It is understood that the electronic device may also include an input / output (I / O) interface and a communication component.

[0100] The processor is used to execute the functional interface chain calling framework described in the above embodiment. The memory is used to store various types of data, which may include instructions of any application or method in the electronic device, and data related to the application.

[0101] The processor can be an application specific integrated circuit (ASIC), a digital signal processor (DSP), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components, and is used to execute the functional interface chain call framework described in the above embodiments.

[0102] Embodiment 6

[0103] This embodiment provides a computer-readable storage medium storing executable instructions, which, when executed, enable a processor to execute the functional interface chain calling framework.

[0104] If implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0105] Based on this understanding, the technical solution of the present application can essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the functional interface chain call framework described in each embodiment of the present application.

[0106] The aforementioned storage media include: flash memory, hard disk, multimedia card, card-type memory (for example, SD (Secure Digital Memory Card) or DX (Memory Data Register, MDR abbreviation, memory data register) memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, CD, server, APP (Application, abbreviation of application software) application store and other media that can store program verification codes, on which computer programs are stored, and when the computer program is executed by the processor, the above-mentioned functional interface chain call framework can be implemented.

[0107] The various embodiments in the present disclosure are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0108] The protection scope of the present disclosure is not limited to the above-mentioned embodiments. Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the scope and spirit of the present disclosure. If these changes and modifications fall within the scope of the claims of the present disclosure and their equivalents, the intention of the present disclosure also includes these changes and modifications.

Claims

1. A functional interface chain calling framework, characterized in that: include: Multiple interface chains to achieve the specified functions of the target project; Each interface chain consists of multiple interfaces and the calling relationships between interfaces; The interface is composed of a plurality of functions with basic functions and calling relationships between the functions; the function with basic functions is composed of a plurality of sub-functions with basic logic and calling relationships between the sub-functions.

2. The functional interface chain calling framework according to claim 1, characterized in that: The function has input parameters and output parameters corresponding to the basic functions, and the relationship between the input parameters and output parameters of each function is the calling relationship between interfaces. The sub-function has input parameters and output parameters corresponding to the basic logic, and the relationship between the input parameters and output parameters of each sub-function is the calling relationship between sub-functions.

3. The functional interface chain calling framework according to claim 2, characterized in that: The functions include: a log processing function, a permission processing function, a certificate verification function and an interface document generation function.

4. The functional interface chain calling framework according to claim 3, characterized in that: The log processing function includes: a sub-function for recording interface call information, a sub-function for determining persistent logs, a sub-function for outputting file logs, a sub-function for outputting console logs, and a first calling relationship between the sub-functions; The first calling relationship includes: the output parameters of the recording interface call information sub-function are input into the input parameters of the persistence log judgment sub-function, the output parameters of the persistence log judgment sub-function are input into the input parameters of the file log output sub-function, the output parameters of the persistence log judgment sub-function are input into the input parameters of the console log sub-function, the input parameters of the recording interface call information sub-function are the input parameters of the log processing function, and the output parameters of the file log output sub-function are the output parameters of the log processing function.

5. The functional interface chain calling framework according to claim 3, characterized in that: The permission processing function includes: parsing interface caller sub-function, obtaining permission engine rule sub-function, permission engine cache sub-function, permission judgment sub-function and second calling relationship between sub-functions; The second calling relationship includes: the output parameter of the parsing interface caller sub-function is input into the first input parameter of the permission engine rule sub-function, the output parameter of the permission engine cache sub-function is input into the second input parameter of the permission engine rule sub-function, the output parameter of the permission engine rule sub-function is input into the permission judgment sub-function, the input parameter of the parsing interface caller sub-function is the input parameter of the permission processing function, and the output parameter of the permission judgment sub-function is the output parameter of the permission processing function.

6. The functional interface chain calling framework according to claim 3, characterized in that: The certificate verification function includes: a certificate verification sub-function, a certificate legality judgment sub-function and a third calling relationship between the sub-functions; The third calling relationship includes: the output parameters of the certificate verification sub-function are input parameters of the certificate legality judgment sub-function, the input parameters of the certificate verification sub-function are the input parameters of the certificate verification function, and the output parameters of the certificate legality judgment sub-function are the output parameters of the certificate verification function.

7. The functional interface chain calling framework according to claim 3, characterized in that: The interface document generation function includes: generating document sub-functions and a fourth calling relationship between sub-functions; The fourth calling relationship includes: the input parameter of the document generation sub-function is the input parameter of the interface document generation function, and the output parameter of the document generation sub-function is the output parameter of the interface document generation function.

8. A method for constructing a functional interface chain calling framework, characterized in that: include: Split the original software architecture style interface into sub-functions with basic logic; Combine multiple sub-functions with basic logic and the calling relationships between sub-functions to form a function with basic functions; An interface is constructed by using multiple functions with basic functions and the calling relationships between functions; An interface chain is formed by using multiple interfaces and the calling relationships between interfaces; Use multiple interface chains to implement the specified functions of the target project.

9. A debugging method for a functional interface chain calling framework, characterized in that: include: Debug the calling relationships between sub-functions, between functions, and between interfaces.

10. A device for constructing a functional interface chain calling framework, characterized in that: include: Original interface splitting module, sub-function building module, function building module, interface building module, interface chain building module; The original interface splitting module is used to split the original software architecture style interface into sub-functions with basic logic; The sub-function construction module is used to construct a function with basic functions by combining multiple sub-functions with basic logic and the calling relationships between the sub-functions; The function building module is used to form an interface using multiple functions with basic functions and calling relationships between functions; The interface building module is used to form an interface chain using multiple interfaces and calling relationships between interfaces; The interface chain building module is used to use multiple interface chains to implement the specified functions of the target project.

11. An electronic device, characterized in that: include: One or more processors, and a memory, wherein the memory stores instructions, and when the instructions are executed by the one or more processors, the one or more processors execute the functional interface chain call framework described in any one of claims 1 to 7.

12. A computer-readable storage medium, characterized in that: It stores executable instructions, which, when executed, enable a processor to execute the functional interface chain calling framework described in any one of claims 1 to 7.