Method for processing interface calling request, electronic equipment and storage medium
Through graphical orchestration and function processing of interface call requests, the high cost and insufficient security caused by the serverless cloud framework are solved, and the data security and cost reduction are achieved. It is suitable for application service data query in e-commerce, education, medical care and other fields.
Patent Information
- Application Number
- CN202410037887.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2025-07-11
AI Technical Summary
In the prior art, the operation and maintenance difficulties caused by the use of serverless cloud framework as the middle layer and the high R&D and operation and maintenance costs, especially in the BFF architecture, the front-end and back-end collaboration costs are too high and the security is insufficient.
The interface call request is processed using graphical orchestration, and the target encapsulation function is visually orchestrated, GraphQL is restricted from directly operating the database, and the server interface is accessed using function methods to reduce R&D and operation and maintenance costs, and provide unified security and monitoring capabilities through the BFF service layer.
On the premise of ensuring data security, the R&D and operation and maintenance costs are reduced, the system maintainability and security is improved, the high cost problems caused by the serverless cloud framework are solved, and the front-end and back-end coordination is achieved efficient coordination.
Smart Images

Figure CN120295805A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a method, an electronic device, and a storage medium for processing interface call requests. Background Art
[0002] Generally, enterprises have their own data management systems, which can manage products such as development and operation and maintenance. Users can also perform operations such as data development, task scheduling, and monitoring through programming. However, since the applications managed by the data management system mostly develop in a vertically divided manner, with the continuous increase in the number of applications, dependencies have emerged between different applications, resulting in many problems in front-end and back-end collaboration.
[0003] Currently, the architecture mode of using the Backend for Frontend (BFF) is adopted to solve the collaboration problem between the front end and the back end through the middle layer. A method of using the Serverless Cloud Framework as the BFF is proposed, but there are problems such as difficulties in research and development and operation and maintenance, and relatively high research and development costs and operation and maintenance costs in the design architecture.
[0004] In response to the above problems, no effective solution has been proposed yet. Summary of the Invention
[0005] Embodiments of this application provide a method, an electronic device, and a storage medium for processing interface call requests, so as to at least solve the technical problem in the related art that using the Serverless Cloud Framework as the middle layer results in difficulties in operation and maintenance, and relatively high research and development costs and operation and maintenance costs.
[0006] According to one aspect of the embodiments of this application, a method for processing interface call requests is provided, including: receiving an interface call request from a client, where the interface call request is used to request to call multiple application service interfaces of a server to obtain application service data corresponding to application service requirements; graphically arranging a target encapsulation function corresponding to the interface call request according to a preset interface arrangement method, where the preset interface arrangement method is used to graphically arrange the target encapsulation function and the connection relationship between the target encapsulation functions to obtain application service data from multiple application service interfaces, the target encapsulation function is used to define the interface information of multiple application service interfaces, and the arrangement result is used to describe the processing process of obtaining application service data through the graphical arrangement of the target encapsulation function and the connection relationship between the target encapsulation functions; obtaining application service data from multiple application service interfaces based on the arrangement result; and feeding back the application service data to the client.
[0007] According to another aspect of the embodiments of the present application, there is also provided a method for processing an interface call request, including: sending an interface call request to a server, where the interface call request is used to request to call a plurality of application service interfaces of the server to obtain application service data corresponding to an application service requirement; receiving the application service data fed back by the server, where the application service data is obtained by the server from a plurality of application service interfaces based on an orchestration result, and the orchestration result is obtained by graphically orchestrating a target encapsulation function corresponding to the interface call request according to a preset interface orchestration method, and the preset interface orchestration method is used to graphically orchestrate the target encapsulation function and the connection relationship between the target encapsulation functions to obtain application service data from a plurality of application service interfaces, the target encapsulation function is used to define the interface information of a plurality of application service interfaces, and the orchestration result is used to describe the processing process of obtaining application service data by graphically orchestrating the target encapsulation function and the connection relationship between the target encapsulation functions.
[0008] According to another aspect of the embodiments of the present application, there is also provided a system for processing an interface call request, including: a front-end and back-end collaborative server, configured to receive an interface call request from a front-end and back-end collaborative client, graphically orchestrate a target encapsulation function corresponding to the interface call request according to a preset interface orchestration method to obtain an orchestration result, obtain application service data from a plurality of application service interfaces based on the orchestration result, and feed back the application service data to the front-end and back-end collaborative client; a front-end and back-end collaborative client, configured to send an interface call request to the front-end and back-end collaborative server, and receive the application service data fed back by the server; where the interface call request is used to request to call a plurality of application service interfaces of the server to obtain application service data corresponding to an application service requirement, the preset interface orchestration method is used to graphically orchestrate the target encapsulation function and the connection relationship between the target encapsulation functions to obtain application service data from a plurality of application service interfaces, the target encapsulation function is used to define the interface information of a plurality of application service interfaces, and the orchestration result is used to describe the processing process of obtaining application service data by graphically orchestrating the target encapsulation function and the connection relationship between the target encapsulation functions.
[0009] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including: a memory storing an executable program; a processor configured to run the program, where when the program runs, it executes the method for processing an interface call request as described in any one of the above.
[0010] According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored executable program, and when the executable program runs, it controls the device where the computer-readable storage medium is located to execute the method for processing an interface call request as described in any one of the above.
[0011] In the embodiments of the present application, by receiving an interface call request from a client, and then graphically arranging the target encapsulation function corresponding to the interface call request according to a preset interface arrangement method to obtain an arrangement result, that is, graphically arranging the target encapsulation function and the connection relationship between the target encapsulation functions, to obtain an arrangement result for describing the processing process of obtaining application service data through the graphical arrangement of the target encapsulation function and the connection relationship between the target encapsulation functions, so that based on the obtained arrangement result, by calling the target encapsulation function corresponding to the interface call request, application service data corresponding to the application service requirements can be obtained from multiple application service interfaces of the server, and finally the obtained application service data is fed back to the client. It can be seen that the present application takes into account the data security risk of users directly operating the database using GraphQL. Therefore, by restricting the capabilities of GraphQL, users are not allowed to write GraphQL to directly access the database, but GraphQL is used as an intermediate layer, achieving the purpose of performing interface arrangement in a visual arrangement manner and accessing the server interface in a function way, thereby realizing the technical effect of ensuring data security while not increasing the R & D cost due to the introduction of new technologies, reducing the R & D cost and operation and maintenance cost, and further solving the technical problems in the related art that using a serverless cloud framework as an intermediate layer leads to difficult operation and maintenance and high R & D cost and operation and maintenance cost.
[0012] It is easy to note that the above general description and the following detailed description are only for exemplifying and explaining the present application, and do not constitute a limitation to the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation to the present application. In the drawings:
[0014] Figure 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for processing an interface call request according to Embodiment 1 of the present application;
[0015] Figure 2 is a flowchart of a method for processing an interface call request according to Embodiment 1 of the present application;
[0016] Figure 3 is a design schematic diagram of a function management module according to Embodiment 1 of the present application;
[0017] Figure 4 is a design schematic diagram of an interface arrangement module according to Embodiment 1 of the present application;
[0018] Figure 5Schematic diagram of a new interface according to Embodiment 1 of the present application;
[0019] Figure 6 Schematic diagram of a visual orchestration mode according to Embodiment 1 of the present application;
[0020] Figure 7 Schematic diagram of the design of a publishing module according to Embodiment 1 of the present application;
[0021] Figure 8 Flowchart of an interface call failure according to Embodiment 1 of the present application;
[0022] Figure 9 Schematic diagram of the display of error information according to Embodiment 1 of the present application;
[0023] Figure 10 Flowchart of a method for processing an interface call request according to Embodiment 2 of the present application;
[0024] Figure 11 Schematic diagram of the design concept of a toolkit according to Embodiment 2 of the present application;
[0025] Figure 12 Flowchart of the first-screen rendering according to Embodiment 2 of the present application;
[0026] Figure 13 Schematic diagram of the first-screen rendering page according to Embodiment 2 of the present application;
[0027] Figure 14 Schematic diagram of a system for processing an interface call request according to Embodiment 3 of the present application;
[0028] Figure 15 BFF system architecture diagram according to Embodiment 3 of the present application;
[0029] Figure 16 Schematic diagram of BFF capabilities according to Embodiment 3 of the present application;
[0030] Figure 17 Schematic diagram of an API documentation page according to Embodiment 3 of the present application;
[0031] Figure 18 Schematic diagram of a static resource management page according to Embodiment 3 of the present application;
[0032] Figure 19 Schematic diagram of a new and edit file page according to Embodiment 3 of the present application;
[0033] Figure 20 Schematic diagram of a monitoring dashboard page according to Embodiment 3 of the present application;
[0034] Figure 21 It is a schematic structural diagram of a device for processing an interface call request according to Embodiment 4 of the present application;
[0035] Figure 22 It is a schematic structural diagram of another device for processing an interface call request according to Embodiment 4 of the present application;
[0036] Figure 23 It is a block diagram of the structure of a computer terminal according to an embodiment of the present application. Detailed implementation manners
[0037] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0038] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0039] First, some nouns or terms that appear during the description of the embodiments of the present application are applicable to the following explanations:
[0040] Backend for Frontend (BFF): An architectural pattern mainly used to solve the problem of front-end and back-end collaboration, providing dedicated back-end services for front-end application programs to meet the specific needs and functions of front-end application programs.
[0041] Graph Query Language (GraphQL): A query language and running environment for Application Programming Interface (API), which provides a flexible and efficient way to define and use API, enabling the client to more precisely control the acquisition and operation of data.
[0042] Hypertext Transfer Protocol (HTTP): It is a protocol used to transmit and receive hypertext data on the Internet. HTTP is a client-server protocol where the client sends requests and receives responses from the server, commonly used for accessing web pages, transferring files, sending data, etc.
[0043] Hypertext Transfer Protocol Secure (HTTPS): A communication protocol used to securely transmit data on a computer network, which is an encrypted version of HTTP.
[0044] GET: A request method in the HTTP protocol, which is a way to request data from the server, usually used to obtain resources from the server, such as web pages, images, etc.
[0045] POST: A request method in the HTTP protocol, which is a way to submit data to the server, usually used to create, update, or delete resources on the server.
[0046] REST (Representational State Transfer) call: A way to send requests and receive responses through the HTTP protocol, used to access web services and APIs. REST is an architecture style based on resources, and its design principles include using a unified interface, stateless communication, unique identification of resources, and self-descriptive messages. Through REST calls, the client can use HTTP methods (such as GET, POST, etc.) to operate on resources on a remote server to achieve data reading, creation, update, and deletion.
[0047] JSON (JavaScript Object Notation): A lightweight data interchange format that is easy to read and write.
[0048] form-data: A format used to transmit data in an HTTP request, usually used to transmit form data when submitting a form. The data in form-data format consists of a series of key-value pairs (field names and field values), separated by line breaks between each key-value pair. The format of each key-value pair is "field name: field value", and the field value can be data of types such as text, files, etc.
[0049] Virtual operator: A virtual carrier that deeply processes services based on its own main business field advantages and finally provides services to consumers under its own brand and with its own built customer service system.
[0050] Data Management System Tenant: A tenant is the basis for user management in the data management system. One main account corresponds to one data management system tenant, and the tenant can manage the permissions of its subordinate members.
[0051] Data Management System Roles: The data management system of this application can provide several roles such as project owner, space administrator, data analyst, developer, operation and maintenance, deployment, visitor, security administrator, and model designer. Different roles have different operation permissions.
[0052] JSON Schema: A specification for describing JSON data structures that allows defining the structure, data types, and constraints of JSON data and can be used to validate the validity of JSON data.
[0053] TypeScript: An open-source programming language that is a superset of JavaScript, containing all the features of JavaScript and adding a static type system and other extended functions on this basis.
[0054] Content Delivery Network (CDN): A distributed content delivery network built on the data network, which uses streaming media server cluster technology to overcome the disadvantages of insufficient output bandwidth and concurrency ability of a single machine system. It can greatly increase the number of concurrent streams supported by the system and reduce or avoid the adverse effects caused by single-point failure.
[0055] Node Package Manager (npm): A software suite management system preset in Node.js and written in JavaScript.
[0056] Incremental Static Regeneration (ISR): ISR is a technology for generating static web pages and is widely used in modern static website generators and frameworks, aiming to improve the efficiency and performance of website generation.
[0057] Postinstall: In npm, postinstall is a specific lifecycle script used to execute specific commands or operations after the package installation is completed.
[0058] JSONP (JSON with Padding): A "usage pattern" of JSON that allows a web page to obtain data from other domains (websites), that is, to read data across domains.
[0059] Webpack: A static module bundling tool that can bundle multiple modules into one or more files, as well as compress, transform, and optimize resources.
[0060] Vite: A new generation of front-end build tool that utilizes the native module system (ES Module) of modern browsers to achieve fast development and hot updates, aiming to provide a faster development experience and higher performance. Vite is faster than Webpack in some scenarios.
[0061] With the continuous increase in the number of applications and the emergence of dependencies between different applications, there have been many coordination problems between the front-end and back-end in the data management system. For example:
[0062] (1) It is difficult to use code across product lines. The gateway functions are implemented separately, and it is difficult to jump between applications. It is necessary to maintain a list of application domain names, resulting in high development costs.
[0063] (2) There are several domain names in the user usage link, which are difficult to remember. In addition, the waiting time for users to access interfaces and files in cross-border regions is long, resulting in a poor user experience.
[0064] (3) The invocation of interfaces that depend on other product lines requires upper-layer encapsulation by the back-end, resulting in poor flexibility.
[0065] (4) The interface security capabilities are maintained by each product line separately, and there may be problems such as untimely updates. In addition, the products all have independent domain names, and cross-domain access poses risks and security hazards.
[0066] (5) Some products do not allow embedding of inline frames (iframes), while some products have no restrictions, resulting in inconsistent configurations.
[0067] (6) It is not strictly implemented in accordance with the specifications, resulting in uneven implementation of interface specifications.
[0068] (7) The cost of security quality assurance is high, resulting in a lack of unified monitoring and alerting.
[0069] Currently, a method of using the Serverless Cloud Framework as the BFF has been proposed. However, since the Serverless Cloud Framework provides a Node or Python environment to run code based on containerized services, and the front end usually has relatively weak capabilities in underlying operations and maintenance, the operation and maintenance costs are relatively high. As a result, it is difficult to implement the BFF solution in enterprises. In addition, the Serverless Cloud Framework belongs to a container service and only provides basic capabilities for the application process in the container, such as gateways and storage buckets. For other capabilities required in the production process, such as service orchestration, Mock, and network acceleration, developers need to develop and add them in the container by themselves, resulting in relatively high labor costs and poor coverage of production link functions.
[0070] A BFF framework that combines the two modes of API Gateway and BFF with the concept of a package manager has also been proposed. However, since this framework adopts a back-end orchestration mode in its design architecture, the orchestration process is executed by back-end code, and the front end provides a lightweight remote procedure call protocol for invocation. Although it solves the problem of front-end code complexity, it increases the complexity of back-end code, resulting in relatively high orchestration costs. In addition, this framework is interventionist in the front-end compilation environment, resulting in migration costs for existing applications, especially for old version applications, leading to relatively high front-end migration costs.
[0071] The BFF proposed based on the Serverless Cloud Framework and the BFF proposed by combining the two modes of API Gateway and BFF with the concept of a package manager in related technologies have the following defects.
[0072] Defect 1: The BFF proposed based on the Serverless Cloud Framework only provides basic capabilities such as gateways and cloud object storage. For capabilities such as monitoring and alerting and network acceleration, developers need to build them by themselves, and the collaborative capabilities between the front and back ends also need to be built by themselves. The BFF proposed by combining the two modes of API Gateway and BFF with the concept of a package manager also requires developers to develop by themselves for relatively in-depth usage links, such as Mock data, network acceleration, and resource hosting. Therefore, the production link coverage ability is limited.
[0073] Defect 2: The BFF proposed based on the Serverless Cloud Framework is relatively front-end biased in its design architecture, and the operation and maintenance costs are high.
[0074] Defect 3: The BFF proposed by combining the two modes of API Gateway and BFF with the concept of a package manager adopts a back-end orchestration mode, which increases the complexity of back-end code, resulting in relatively high orchestration costs, and the front-end migration costs are also relatively high.
[0075] In response to the above defects, no effective solution has been proposed before this application.
[0076] Example 1
[0077] According to an embodiment of the present application, a method for processing an interface call request is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0078] The method embodiment provided by the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for processing an interface call request is shown. As Figure 1 shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (shown as 102a, 102b,..., 102n in the figure) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may further include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the BUS bus), a network interface, a power supply, and / or a camera. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 may further include more or fewer components than Figure 1 shown, or have a different configuration from Figure 1 shown.
[0079] It should be noted that the above one or more processors 102 and / or other data processing circuits are generally referred to as "data processing circuits" in this article. The data processing circuit may be embodied in whole or in part as software, hardware, firmware, or any combination thereof. In addition, the data processing circuit may be a single independent processing module, or be incorporated in whole or in part into any one of the other elements in the computer terminal 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit is used for processor control (such as the selection of a variable resistance terminal path connected to an interface).
[0080] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method of processing interface call requests in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the above-mentioned method of processing interface call requests. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the computer terminal 10 through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, enterprise intranets, local area networks, mobile communication networks, and combinations thereof.
[0081] The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include the wireless network provided by the communication provider of the computer terminal 10. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0082] The display can be, for example, a touch-screen liquid crystal display (LCD), which enables the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0083] Under the above operating environment, the present application provides a method for processing interface call requests as Figure 2 shown. Figure 2 It is a flowchart of a method for processing interface call requests according to Embodiment 1 of the present application. As Figure 2 shown, the method may include the following steps:
[0084] Step S21, receiving an interface call request from a client, where the interface call request is used to request to call multiple application service interfaces of a server to obtain application service data corresponding to application service requirements;
[0085] Step S22: Graphically orchestrate the target encapsulation function corresponding to the interface call request according to a preset interface orchestration method to obtain an orchestration result. The preset interface orchestration method is used to graphically orchestrate the target encapsulation function and the connection relationships between the target encapsulation functions, so as to obtain application service data from multiple application service interfaces. The target encapsulation function is used to define the interface information of multiple application service interfaces. The orchestration result is used to describe the processing process of obtaining application service data through the graphical orchestration of the target encapsulation function and the connection relationships between the target encapsulation functions.
[0086] Step S23: Obtain application service data from multiple application service interfaces based on the orchestration result.
[0087] Step S24: Feed back the application service data to the client.
[0088] The client can be understood as the client (BFFClient) corresponding to the Backend for Frontend (BFF), that is, the front-end application corresponding to the BFF. The server can be understood as the server (BFF Server) corresponding to the BFF, that is, the server used to provide various application services to the client corresponding to the BFF. It can be understood that the BFF is used to coordinate between the front-end application and the server and provide dedicated back-end services for the front-end application. In the embodiments of the present application, a BFF service layer is added to the server, so that it can better interact with the client based on the BFF service layer and realize the coordination between the front-end application and the server.
[0089] The interface call request can be understood as the call request of the client, that is, the call request of the front-end application. The interface call request is used to request to call multiple application service interfaces of the server to obtain the application service data corresponding to the application service requirements. Exemplarily, the interface call request can be an Application Programming Interface Call (API Call) or a BFF interface request, which is used to obtain data, execute operations or obtain specific functions, and is not limited here.
[0090] The application service requirements can be understood as the operation requirements or function requirements that need to be executed by the user during the process of project development, management and use. Exemplarily, they can be service requirements related to data development or operation and maintenance management, etc., and can also be information requirements that need to be queried from the server, such as the basic information or operation information of the user that needs to be queried from the server. It can be understood that the application service requirements are determined according to the actual needs of the user and are not limited here.
[0091] The application service data is data, operations, or functions corresponding to the application service requirements. Exemplarily, if the application service requirement is a requirement to query user information, the application service data is the user information (User Information). If the application service requirement is a requirement to call a certain function, the application service data is the corresponding function, which is not limited here.
[0092] The target encapsulation function is a function that performs the functions required by the interface call request. It can be a well - encapsulated function, so that this function can be called multiple times and used independently, improving the code reusability and maintainability. The target encapsulation function is used to define the interface information of multiple application service interfaces to ensure that it meets the requirements of the interface definition. Exemplarily, the interface information may include content such as interface name, interface function description, parameter list, return result, error code list, etc., which is not limited here.
[0093] It can be understood that the interfaces called by the interface call request usually include one or more. Therefore, it is necessary to reasonably arrange and plan among the interfaces to ensure correct data exchange, message passing, call relationship, etc. among the interfaces, and ensure that all parts of the system can work together effectively.
[0094] The BFF service layer proposed in the embodiments of this application has made an improved design on the Graph Query Language (GraphQL) and restricted some functions of GraphQL. Considering that there are data security risks when users directly operate the database using GraphQL in the related art, this application does not allow users to write GraphQL to directly operate the database. This application accesses the server - side interface through functions, ensuring data security while not increasing the R & D cost due to the introduction of new technologies.
[0095] The preset interface arrangement method can be understood as a method of graphically arranging the target encapsulation function and the connection relationship between the target encapsulation functions, that is, a method of arranging the target encapsulation function and the connection relationship between the target encapsulation functions through a visual arrangement mode. Exemplarily, the arrangement can be performed on the interface arrangement page. The user can add call interfaces through the directory tree on the interface arrangement page, add new queries or change operations to the API to expand the functions of the API to meet the requirements of the client. In addition, each interface can be graphically represented. The user can drag functions, Compose, Rename and other elements on the canvas to expand the functions of the API to meet the requirements of the client. In the embodiments of this application, information such as the application name, function name, function input parameters, and function output parameters of the function can be displayed in the graphical function element, which is not limited here.
[0096] The orchestration result obtained by graphically orchestrating the target encapsulation function corresponding to the interface call request according to the preset interface orchestration method can achieve the effect of obtaining the required application service data from multiple application service interfaces by calling the target encapsulation function corresponding to the interface call request. That is, it can call multiple application service interfaces on the server side by using the encapsulated function corresponding to the interface call request to obtain the application service data.
[0097] In the embodiments of the present application, the above steps S21 - S24 can be applied to the BFF service layer, that is, the server side. By receiving the interface call request from the client, and then graphically orchestrating the target encapsulation function corresponding to the interface call request according to the preset interface orchestration method, an orchestration result is obtained. That is, the target encapsulation function and the connection relationship between the target encapsulation functions are graphically orchestrated to obtain an orchestration result for describing the processing process of obtaining application service data through the graphical orchestration of the connection relationship between the target encapsulation function and the target encapsulation functions, so that based on the obtained orchestration result, the application service data corresponding to the application service requirements can be obtained from multiple application service interfaces on the server side by calling the target encapsulation function corresponding to the interface call request, and finally the obtained application service data is fed back to the client. It can be seen that the present application takes into account the data security risk of directly operating the database by users using GraphQL. Therefore, by restricting the capabilities of GraphQL, GraphQL is not allowed to directly access the database, but GraphQL is used as an intermediate layer, and a visual orchestration method is adopted for interface orchestration, and the server-side interface is accessed through functions. While ensuring data security, the R & D cost will not increase due to the introduction of new technologies, reducing the R & D cost and operation and maintenance cost.
[0098] The method for processing the interface call request provided in the embodiments of the present application can be but is not limited to being applied to application scenarios involving application service data query in fields such as e-commerce services, education services, legal services, medical services, conference services, social network services, financial product services, logistics services, and navigation services. For example: application service data query scenarios for e-commerce services, application service data query scenarios for academic interpretations, application service data query scenarios for medical means, etc., which are not restricted here.
[0099] By adopting the embodiment of the present application, an interface call request from a client is received, and then the target encapsulation function corresponding to the interface call request is graphically orchestrated according to a preset interface orchestration method to obtain an orchestration result, so that based on the obtained orchestration result, that is, the target encapsulation function and the connection relationship between the target encapsulation functions are graphically orchestrated, an orchestration result is obtained for describing the processing process of obtaining application service data through the graphical orchestration of the target encapsulation function and the connection relationship between the target encapsulation functions. By calling the target encapsulation function corresponding to the interface call request, application service data corresponding to application service requirements is obtained from multiple application service interfaces of the server, and finally the obtained application service data is fed back to the client. Thus, the purpose of using GraphQL as an intermediate layer, adopting a visual orchestration method for interface orchestration, and accessing the server interface in a functional manner is achieved, thereby realizing the technical effect of ensuring data security while not increasing the R & D cost due to the introduction of new technologies, reducing the R & D cost and operation and maintenance cost, and further solving the technical problem in the related art that using a serverless cloud framework as an intermediate layer leads to difficult operation and maintenance and high R & D cost and operation and maintenance cost.
[0100] In an alternative embodiment, the method for processing the interface call request further includes the following method steps:
[0101] Step S251, create initial program code blocks for multiple application service interfaces;
[0102] Step S252, configure function information for the initial program code blocks to obtain target program code blocks, where the function information is used to define at least some or all of the following information: function name, call method, server access points corresponding to multiple application service interfaces, function description, parameter configuration;
[0103] Step S253, encapsulate the target program code blocks to obtain target encapsulation functions.
[0104] A function is used to define the interface information to be connected to the server and is an important module in the BFF design. The BFF service layer proposed in the embodiment of the present application also makes an improved design for the function management module. Figure 3 It is a design schematic diagram of a function management module according to Embodiment 1 of the present application. Figure 3 In the BFF service layer, files are managed in a directory manner, taking the application name as an example for file differentiation. In the API management of the BFF service layer, functions such as interface orchestration, function management, and error code management are designed. Among them, the function management function is included in the interface orchestration function, which is not limited here.
[0105] As Figure 3 shown, according to Figure 3The search function on the function management page can quickly find the required files by setting different search conditions. For example, files can be quickly found by file name, and there is no limit here.
[0106] The detailed information of the function is displayed on the right side of the function management page, including but not limited to the function's access point (endpoint), function name, call method, description text, Uniform Resource Locator (URL), input parameter definition, output parameter definition, and other configurations. Users can modify the function by modifying the detailed information.
[0107] The directory tree is displayed on the left side of the function management page. Through the directory tree, a function can be created. It can be understood that when creating a function, the function name, call method, server access point, description, input parameters, output parameters, and other configurations need to be defined. Regarding the server access point, a variable service is provided at the bottom layer. Users can complete the domain name filling of the endpoint by filling in variables and then concatenate the interface name at the back. Regarding the input parameter configuration, there are mainly two ways. One is to automatically parse the input parameters by pasting the server-side code, and the other is to input the input parameters manually. For the output parameters, users can create a domain model to establish and select the type of the output parameters. Considering the implementation of the actual system product, generic types such as object can be provided for selection. Regarding other configurations, users can be allowed to input additional configuration content, such as verification logic, Procedural Oriented Programming (POP) version, etc.
[0108] The release and rollback modes of function management are similar to the interface orchestration method, and will not be elaborated here. A configuration tab can also be designed in the function management, which includes the timeout control and traffic limiting strategy of the interface to perform access control.
[0109] In addition, Figure 3 The page of also has a function of usage documentation to help users quickly get started with the system. The usage documentation includes functions such as getting started quickly, practice, and API specifications, and there is no limit here.
[0110] Reference Figure 3 According to the functional design of the function management module shown in , when this application encapsulates a function and obtains the target encapsulated function, multiple initial program code blocks of application service interfaces can be created, and then function information can be configured for the initial program code blocks. Among them, the function information can be understood as Figure 3On the right side of the function management page, the detailed information of the function is displayed. That is, the function information is used to define at least some or all of the following information: function name, call method, server access points corresponding to multiple application service interfaces, function description, and parameter configuration. By configuring the function information for the initial program code block, the target program code block is obtained, and finally the target program code block is encapsulated to obtain the target encapsulated function.
[0111] In an alternative embodiment, in step S22, the target encapsulated function corresponding to the interface call request is graphically orchestrated according to a preset interface orchestration method to obtain an orchestration result, including the following method steps:
[0112] Step S221, according to the preset interface orchestration method, select the target encapsulated function corresponding to the interface call request from the candidate encapsulated functions, and determine the connection relationship between the target encapsulated functions through the interface relationships of multiple application service interfaces;
[0113] Step S222, graphically orchestrate the target encapsulated function and the connection relationship to obtain the orchestration result.
[0114] The BFF service layer proposed in the embodiments of the present application also makes an improved design for the interface orchestration module. Considering that there are data security risks when users directly operate the database using GraphQL in related technologies, encapsulated functions are used to call the server interface to obtain data.
[0115] Figure 4 It is a schematic diagram of the design of an interface orchestration module according to Embodiment 1 of the present application. As Figure 4 shown, in the interface orchestration function in the API management of the BFF service layer, a search function is set, and the required file can be quickly found by inputting the file name. The detailed information of the GraphQL interface is displayed on the right side of the interface orchestration page, which may include the status, contact person, version, and description corresponding to the GraphQL interface. In addition, functions such as analysis, operation history, and settings may also be included. Users can modify the GraphQL interface through the editing function. In addition, functions such as publishing and rolling back are also included, which are not limited here. It can be seen that the main function of the interface orchestration module is to call functions and perform assembly and trimming. Users can add GraphQL call interfaces through the directory tree on the interface orchestration page.
[0116] Figure 5 It is a schematic diagram of creating a new interface according to Embodiment 1 of the present application. As Figure 5As shown, when creating a new GraphQL, the user needs to fill in the interface name, call method (such as GET, POST, etc.), content type (such as JSON, form-data, etc.), contact person, call description, GraphQL statement, and call example parameters. Optionally, the user can be required to complete the call test before submitting for release. At the same time, the user can also fill in Mock data in the edit box and decide whether to enable Mock data.
[0117] In addition to the above-mentioned writing and orchestration using GraphQL syntax, the embodiments of the present application also propose another visual orchestration mode to orchestrate the target encapsulation function, as Figure 6 shown, Figure 6 is a schematic diagram of a visual orchestration mode according to Embodiment 1 of the present application. The user can drag and drop elements such as functions, Compose, and Rename in the canvas. The function elements display the application name, function name, function input parameters, and function output parameters of the function.
[0118] In the embodiments of the present application, when graphically orchestrating the target encapsulation function corresponding to the interface call request according to the preset interface orchestration method, the target encapsulation function corresponding to the interface call request can be selected from the candidate encapsulation functions in the interface orchestration function according to the preset interface orchestration method, and the connection relationship between the target encapsulation functions can be determined through the interface relationship of multiple application service interfaces, that is, the connection relationship between multiple function elements in the canvas can be determined by whether there is a dependency relationship between multiple application service interfaces. Then, according to the determined connection relationship, the target encapsulation function is graphically orchestrated in the canvas to obtain the orchestration result.
[0119] In an optional embodiment, in step S221, determining the connection relationship between the target encapsulation functions through the interface relationship of multiple application service interfaces includes the following method steps:
[0120] Step S2211, in response to the interface relationship being that there is a dependency relationship between multiple application service interfaces, determining the connection relationship as a serial connection relationship between the target encapsulation functions;
[0121] Step S2212, in response to the interface relationship being that there is no dependency relationship between multiple application service interfaces, determining the connection relationship as a parallel connection relationship between the target encapsulation functions.
[0122] In the embodiments of the present application, the connection relationship can include a serial connection relationship and a parallel connection relationship, which can be determined through the interface relationship between multiple application service interfaces, and can be understood as being determined through the dependency relationship between multiple application service interfaces.
[0123] The situation of serial connection of multiple interfaces generally occurs in scenarios where there are dependencies between interfaces. Exemplarily, when querying the node instance list of a user, it is necessary to know the tenant identifier (ID) of the user. At this time, it is necessary to first query the tenant interface with the user ID to obtain the tenant ID, and then use the tenant ID to query the node instance list. This process can be understood as a serial process.
[0124] The situation of parallel connection of multiple interfaces generally occurs in scenarios where there are no dependencies between interfaces. Exemplarily, when querying the node instance list of a user, the basic attributes of the node and the engine information are required. The above two pieces of information are provided by two independent interfaces, and the query conditions are independent of each other. At this time, the two interfaces can be requested in parallel at the same time to obtain this data. This process can be understood as a parallel process.
[0125] In the embodiments of the present application, when determining the connection relationship between target encapsulation functions through the interface relationship of multiple application service interfaces, it is possible to determine whether there is a dependency relationship between the multiple application service interfaces, so as to determine whether the connection relationship between the target encapsulation functions is a serial connection relationship or a parallel connection relationship. If there is a dependency relationship between the multiple application service interfaces, it is determined that the connection relationship between the target encapsulation functions is a serial connection relationship. If there is no dependency relationship between the multiple application service interfaces, it is determined that the connection relationship between the target encapsulation functions is a parallel connection relationship.
[0126] Optionally, when it is determined that the connection relationship between the target encapsulation functions is a serial connection relationship, multiple application service interfaces can be connected by arrows, that is, the output parameter of the function with a dependency relationship can be connected to the input parameter. As Figure 6 shown, Figure 6 the input parameter of getPermission on the workbench depends on the output parameter of the base ID of getUsetInfo. Therefore, the output parameter of the base ID is connected to the input parameter of getPermission with an arrow to represent the dependency relationship between getPermission and getUsetInfo. In the embodiments of the present application, the arranged image will be automatically converted into GraphQL syntax for underlying execution.
[0127] In an optional embodiment, in step S222, graphical arrangement is performed on the target encapsulation function and the connection relationship to obtain an arrangement result, including the following method steps:
[0128] Step S2221, in response to obtaining application service data from multiple data sources of the server through multiple application service interfaces, aggregate the input parameters and output parameters of the target encapsulation function based on the connection relationship to obtain a first arrangement result;
[0129] Step S2222: In response to the current data content obtained from the server via multiple application service interfaces being more than the data content of the application service data, crop the input parameters and output parameters of the target encapsulation function based on the connection relationship to obtain a second orchestration result.
[0130] Considering that when the data required by the client involves two or more data sources, it is necessary to aggregate the data obtained through two or more interfaces and then provide it to the client. Therefore, in the embodiments of the present application, when graphically orchestrating the target encapsulation function and the connection relationship, if it is necessary to obtain application service data from multiple data sources of the server through multiple application service interfaces, it is necessary to aggregate the input parameters and output parameters of the target encapsulation function according to the connection relationship to obtain a first orchestration result, that is, the aggregated orchestration result.
[0131] In addition, considering that there is a situation where the data required by the client is less than the data given by the interface, at this time, it is necessary to crop the data in the BFF service layer to remove unnecessary fields and only leave the fields that the client will consume. For example, when obtaining tenant information, the data returned by the tenant includes information such as user name, company name, and department name, but only the user name is actually consumed during consumption. Therefore, information such as company name and department name can be cropped in the BFF service layer. Therefore, in the embodiments of the present application, when graphically orchestrating the target encapsulation function and the connection relationship, if the current data content obtained from the server through multiple application service interfaces is more than the data content of the application service data when obtaining application service data, it is necessary to crop the input parameters and output parameters of the target encapsulation function according to the connection relationship to obtain a second orchestration result, that is, the cropped orchestration result.
[0132] It can be understood that the combination elements in the embodiments of the present application can be used to aggregate or crop out-parameters. As Figure 6 shown, the combination element can automatically aggregate the out-parameters of the getUsetInfo and getPermission functions. Optionally, the company name (companyName) can be deleted by clicking the trash can button in the combination element to crop the parameters, and the deleted field can also be restored by clicking the restore button again.
[0133] In addition, in the rename element, the field can be renamed by clicking the rename button, and there is no limitation here.
[0134] It can be understood that after obtaining the orchestration result through interface orchestration, the corresponding GraphQL interface of the orchestration result can also be published. The BFF service layer proposed in the embodiments of the present application has also improved the design of the publishing module. Figure 7 It is a design schematic diagram of a publishing module according to Embodiment 1 of the present application. AsFigure 7 As shown, it is released in the Region mode. Users can select the Region to be released currently and then click Confirm to release. After the release, the current release progress will be displayed at the top of the pop-up window. Optionally, users can also select the pre-release environment and the group within the pop-up window. In addition, other services can be selected according to the region, such as financial cloud services, which are not limited here.
[0135] Optionally, an online environment preview is designed in the release module, which shows the time and the regional deployment situation. A note function is also designed to facilitate users to make notes.
[0136] When rolling back the code, users can select the version number to be rolled back. Exemplarily, the modification date in the system can be used as the version number, which helps users to recall. After selecting the version number, the code content to be rolled back will be displayed. After confirming the version number to be rolled back, then select the Region to be rolled back. Exemplarily, it can be set to default to highlight the currently latest released Region to help users quickly perform the rollback operation.
[0137] In an optional embodiment, the method for processing the interface call request further includes the following method steps:
[0138] Step S261, using a preset access control method to perform access control on the interface call request, where the preset access control method includes at least one of the following: performing access authentication on the interface call request; performing traffic control on the interface call request; pre-assigning the access volume corresponding to the application service data.
[0139] The BFF service layer proposed in the embodiment of the present application also makes an improved design on the access control module. The present application divides access control into two categories: authentication and traffic control. Among them, authentication can be understood as passive control. Exemplarily, when the client accesses the service, the product login status information of the user will be verified. If the login status has expired, the user will be redirected to the product login page. After the login status verification passes, it will be checked whether the user has joined the tenant of the data management system. If the user has not joined the tenant, the tenant joining work will be automatically performed.
[0140] Traffic control can be understood as active control. Exemplarily, when the interface access traffic exceeds the limit, user access will be restricted and a retry will be initiated on the client side. The BFF service layer also has a timeout limit for the rear interface. If waiting for the return exceeds the timeout limit, the connection will be interrupted and an access timeout message will be returned.
[0141] In addition to the above mechanisms, considering the characteristics of the data management system, since the traffic and customer access volume of different applications may vary, the present application designs an application isolation mechanism for the access control module of the BFF service layer, isolates the applications, and allocates the total accessible volume of the BFF service layer for the applications, so as to avoid the situation where large applications occupy too many resources and small applications have no resources to use.
[0142] In the embodiments of the present application, when performing access control on an interface call request, a preset access control method can be used to perform access control on the interface call request. The preset access control method includes at least one of the following: performing access authentication on the interface call request, performing traffic control on the interface call request, and pre-allocating the accessible volume corresponding to the application service data, that is, performing access control on the interface call request from three aspects: authentication, traffic control, and application isolation.
[0143] In an alternative embodiment, the method for processing the interface call request further includes the following method steps:
[0144] Step S271, in response to the failure of the calls to multiple application service interfaces, obtain the preset error code corresponding to the call failure event;
[0145] Step S272, based on the preset error code, search for the pre-entered error information.
[0146] Step S273, feedback the preset error code and the error information to the client.
[0147] The BFF service layer proposed in the embodiments of the present application also improves the design of the error code and the prompt module, displays the error code and the error prompt information to the client together, and realizes the unified collection of the error code and the error prompt information through the BFF service layer.
[0148] Figure 8 It is a flowchart of an interface call failure according to Embodiment 1 of the present application. As Figure 8 shown, the client sends an interface call request to the BFF service layer to request an interface call. After receiving the interface call request, the BFF service layer aggregates the GraphQL calls and sends an interface call request to the server to obtain application service data. After receiving the request, the server will execute the processing logic. When an error occurs in the interface layer, a specific error code will be returned to the BFF service layer. After receiving the error code, the BFF service layer will search for the pre-entered error information according to the error code, and then feedback the error code and the error information to the client together.
[0149] In the embodiments of the present application, after the error information is sent to the client, error reporting titles, error reporting objects, error causes, solution guides, service supplementary information, error codes, request IDs, etc. will be displayed on the client. In addition, a supplementary main button and a supplementary secondary button can be displayed to implement the function of service supplementary operations, and a button with a one-key copy function can also be set, which is not limited here.
[0150] Figure 9 is a schematic diagram of error information display according to Embodiment 1 of the present application. As Figure 9 shown, the "Failed to call the data source service" displayed on the error information display page is the error reporting title. The "Failed to call the data source service because the scheduling resource group cannot be obtained. Please check the RDS purchaser id and the RDS instance name to ensure their availability" displayed on the page is the error reporting object, error cause, and solution guide. The "If you need to use the exclusive scheduling resource group, please go to purchase" displayed on the page is the service supplementary information. The error code details displayed on the page include the error code, i.e., DE1001S10001, and the request ID, i.e., 0BC059CC16543099412338947E062B. In addition, a supplementary main button, a supplementary secondary button, and a one-key copy button are also displayed on the page.
[0151] In the embodiments of the present application, when the client sends an interface call request to the BFF service layer, if multiple application service interface call failures occur on the server side, that is, when an error occurs in the interface layer, the preset error code corresponding to the call failure event is obtained, and then the preset error code and the error information are searched for in the BFF service layer based on the preset error code and fed back to the client in a unified way. Among them, the error code can be understood as a code used to represent the reason for the error occurring in the interface layer, and the error information can be understood as information used to further explain the reason for the error occurring in the interface layer and provide a solution guide.
[0152] In an alternative embodiment, a graphical user interface is provided by a cloud device, and the content displayed by the graphical user interface at least partially includes an application service data query scenario. The method for processing the interface call request further includes the following method steps:
[0153] Step S281, in response to a first control operation performed on the graphical user interface, select a target encapsulation function corresponding to the interface call request from the candidate encapsulation functions, where the function elements of the target encapsulation function include: function application name, function name, function input parameters, and function output parameters;
[0154] Step S282, in response to a second control operation performed on the graphical user interface, determine the connection relationship between the target encapsulation functions through the interface relationships of multiple application service interfaces;
[0155] Step S283: In response to a third control operation performed on the graphical user interface, aggregate and / or crop the input and output parameters of the target encapsulation function based on the connection relationship to obtain an orchestration result.
[0156] Step S284: Display the orchestration result within the graphical user interface.
[0157] In the graphical user interface in the embodiments of the present application, at least an application service data query scenario is displayed, and the user can perform control operations in the application service data query scenario displayed in the graphical user interface. It can be understood that the above application service data query scenario can be, but is not limited to, scenarios involving application service data query in fields such as e-commerce, education, medical care, conferences, social networks, financial products, logistics, and navigation.
[0158] The above graphical user interface further includes a first control (or a first touch area). When a first touch operation acting on the first control (or the first touch area) is detected, the target encapsulation function corresponding to the interface call request can be selected from the candidate encapsulation functions. It can be understood that the function elements of the target encapsulation function include: function application name, function name, function input parameter, and function output parameter. The above first touch operation can be operations such as clicking, box selecting, ticking, conditional filtering, etc., which are not limited herein.
[0159] The above graphical user interface further includes a second control (or a second touch area). When a second touch operation acting on the second control (or the second touch area) is detected, the connection relationship between the target encapsulation functions can be determined through the interface relationships of multiple application service interfaces. The above second touch operation can be operations such as clicking, box selecting, ticking, conditional filtering, etc., which are not limited herein.
[0160] The above graphical user interface further includes a third control (or a third touch area). When a third touch operation acting on the third control (or the third touch area) is detected, the input and output parameters of the target encapsulation function can be aggregated and / or cropped based on the connection relationship to obtain an orchestration result. The above third touch operation can be operations such as clicking, box selecting, ticking, conditional filtering, etc., which are not limited herein.
[0161] After obtaining the orchestration result, the orchestration result can be displayed within the graphical user interface.
[0162] It should be noted that the above first touch operation, second touch operation, and third touch operation can all be operations where the user touches the display screen of the above terminal device with a finger and touches the terminal device. The touch operation can include single-point touch and multi-point touch. Among them, the touch operation of each touch point can include click, long press, hard press, swipe, etc. The above first touch operation, second touch operation, and third touch operation can also be touch operations implemented through input devices such as a mouse and a keyboard, which are not restricted here.
[0163] It is worth noting that the BFF service layer proposed in the embodiments of the present application is mainly composed of capabilities such as a gateway, access control, interface orchestration, monitoring and alerting, resource hosting, access acceleration, error codes, access modes, disaster tolerance, automated detection, and interface Mock.
[0164] Among them, the gateway part provides security prevention and control capabilities such as standard access protocols (HTTP, HTTPS), access port control, access whitelist control, sensitive information verification, and header detection.
[0165] The access control part is divided into two categories: authentication and traffic control. Authentication can be understood as passive control. Exemplarily, when a client accesses a service, the product login status information of the user will be verified. If the login status has expired, the user will be redirected to the product login page. After the login status verification passes, it will be checked whether the user has joined the tenant of the data management system. If the user has not joined the tenant, the tenant joining work will be automatically carried out. Traffic control can be understood as active control. Exemplarily, when the interface access traffic exceeds the limit, the user access will be restricted and the client will be retried. The BFF service layer also has a timeout limit for the rear interfaces. If the waiting for the return exceeds the timeout limit, the connection will be interrupted and an access timeout message will be returned. In addition to the above mechanisms, considering the characteristics of the data management system, since the traffic and customer access volume of different applications may be different, the present application designs an application isolation mechanism for the access control module of the BFF service layer, isolates the applications, and allocates the total accessible volume of the BFF service layer for the applications, so as to avoid the situation that large applications occupy too many resources and small applications have no resources to use.
[0166] In the interface orchestration part, the BFF service layer provides the aggregation and trimming orchestration capabilities of the server-side interfaces, and the orchestration process is a visual orchestration to reduce the user's usage threshold.
[0167] In terms of monitoring and alarm, the BFF service layer provides unified monitoring and alarm capabilities. Considering that the BFF service layer is the middle layer of the entire call link, the BFF service layer can only obtain the input, output, time consumption, user information, etc. of the call, and the intermediate operation process of the service cannot be perceived, resulting in the inability to monitor this part of the information. In other words, the content that the BFF service layer can monitor is mainly the traffic, success rate, error statistics and output logs of the interface call, and users can configure relevant alarm rules based on this information.
[0168] In the resource hosting part, the BFF service layer is responsible for hosting the static resources required by the client to achieve the collaborative optimization goal of complete decoupling of the front-end and back-end. For example, it can include file types such as Hyper Text Markup Language (HTML), JavaScript scripting language, JSON, text, and Cascading Style Sheets (CSS).
[0169] In the access acceleration part, the BFF service layer supports capabilities such as static resource acceleration, interface acceleration, and first-screen rendering acceleration.
[0170] In the error code part, the BFF service layer mainly provides the ability to host error information and automatically map information. When the interface returns an error code, the BFF service layer can map the error information according to the error code and then return it to the client.
[0171] In terms of access mode, the BFF service layer provides HTTP, HTTPS, Server-Sent Events (SSE), and WebSocket modes for service scenarios in the current data management system.
[0172] In terms of disaster recovery, considering the cost and actual service situation, the BFF service layer can use the two-site three-center approach to avoid emergencies, without the need to use the more expensive same-city dual-center approach. There is also a data backup mechanism for the data stored in the BFF service layer.
[0173] In the automated detection part, the BFF service layer can detect the input server interface. The detection may not be real-time, but will trigger the detection when the interface changes, and the detection may be triggered at a fixed time. For example, the detection content may include horizontal overreach, vertical overreach, heartbeat detection, and specification detection.
[0174] For the interface Mock part, the BFF service layer provides the ability to switch between real and virtual data. Before the server-side interface is actually implemented, it can be switched to virtual Mock data for client R & D users to debug. After the server-side development is completed, it can be switched to real service calls. At the same time, the Mock data is persistent on the BFF service layer and can be used for subsequent debugging again.
[0175] It can be seen that the front-end and back-end collaborative BFF architecture provided by the embodiments of the present application can solve problems such as high collaboration cost and poor user experience caused by the vertical and independent division of multiple products in the related art. The BFF architecture of the data management system of the present application can integrate multiple product lines and has the following characteristics:
[0176] Unified gateway, all interfaces are grouped under one domain name, and a standardized and strict security prevention and control is established under this domain name.
[0177] Unified domain name, the domain names of all product lines are grouped under a few domain names (for example, under the three domain names of public cloud, in-cloud and virtual operator), and the Region and products are distinguished using the first-level and second-level paths.
[0178] Unified authentication, the BFF service layer processes the authentication work related to the tenants and account systems of the data management system and passes the user-related information to each application service.
[0179] Unified monitoring and alarming, unified traffic and exception monitoring of interfaces are carried out at the BFF service layer, and exceptions are alarmed to the specific person in charge.
[0180] Unified file and configuration hosting, all static resource files and configurations are hosted in the BFF service layer, and these configurations and files can be shared across applications.
[0181] In addition to the above-mentioned ability integration, the BFF architecture of the data management system of the present application also provides many additional value-added collaboration capabilities, such as:
[0182] Interface and file acceleration, the BFF platform uses the Carrier Ethernet Network (CEN) enterprise private network to accelerate the channel for cross-regional access and solve the problem of slow cross-regional access.
[0183] Interface orchestration, the BFF architecture of the data management system of the present application uses GraphQL technology to aggregate or cut the interfaces, making the interfaces more flexible and elastic.
[0184] Automatic generation of front-end definition files, the input and output parameters of the interfaces are generated in a standard format in JSON Schema and converted into TypeScript definition files and synchronized to the front end.
[0185] Interface specification degree scoring is used to verify the interface, identify fields that do not conform to the naming specification or do not use the recommended thesaurus, or fields that may have security risks, invalid redundancy, etc., and score them.
[0186] Interface Mock. When a new interface is accessed, the backend can first enter the interface definition and Mock data in the BFF service layer without implementing the interface, and the front end can develop based on the Mock data first.
[0187] It can be seen that through the orchestratable design of the BFF middle layer, this application solves the problem of difficult implementation for enterprises in the traditional BFF mode. At the same time, this application covers capabilities such as Mock, automatic generation of TypeScript definitions, and file / interface acceleration required in the production link, solving the problem of incomplete coverage of the production link in industry solutions.
[0188] It is easy to understand that the beneficial effects of the method for processing interface call requests provided by this application include the following points.
[0189] Beneficial effect (1). The BFF architecture solution of the data management system of this application covers the entire production link, providing capabilities such as Mock, resource hosting, and interface visual orchestration during the local development process, and providing complete monitoring and warning, automated detection, access acceleration, access control, unified gateway, unified domain name, disaster tolerance, etc. capabilities during the production stage. It is a relatively complete BFF full-link solution.
[0190] Beneficial effect (2). This application uses GraphQL as the middle layer and replaces writing GraphQL with a visual orchestration method, so that the R & D cost will not increase due to the introduction of new technologies. It solves the problem that in the BFF solution proposed based on the serverless cloud framework in related technologies, the cost is shifted to the front end, or in the solution that combines the API Gateway and BFF two modes with the concept of the package manager, the cost is shifted to the backend, resulting in high R & D costs and operation and maintenance costs. At the same time, this application limits the capabilities of GraphQL and does not allow direct access to the database, but accesses the backend interface through the function mode, solving the security problem caused by GraphQL directly connecting to the database.
[0191] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. And the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0192] In addition, it should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0193] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the technical solution of this application, in essence, or the part that makes a contribution 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), and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.
[0194] Embodiment 2
[0195] In the operating environment as in Embodiment 1, this application provides a method for processing an interface call request as shown in Figure 10 Figure 13 is a flowchart of a method for processing an interface call request according to Embodiment 2 of this application. As shown in Figure 10 Figure 14, the method includes: Figure 10 Figure 15, the method includes:
[0196] Step S1001, sending an interface call request to the server, where the interface call request is used to request to call multiple application service interfaces of the server to obtain application service data corresponding to the application service requirements;
[0197] Step S1002, receiving the application service data fed back by the server, where the application service data is obtained by the server from multiple application service interfaces based on the orchestration result. The orchestration result is obtained by graphically orchestrating the target encapsulation function corresponding to the interface call request according to a preset interface orchestration method. The preset interface orchestration method is used to graphically orchestrate the target encapsulation function and the connection relationship between the target encapsulation functions to obtain application service data from multiple application service interfaces. The target encapsulation function is used to define the interface information of multiple application service interfaces, and the orchestration result is used to describe the processing process of obtaining application service data through the graphical orchestration of the target encapsulation function and the connection relationship between the target encapsulation functions.
[0198] The server can be understood as the server corresponding to the BFF (BFF Server), that is, the server used to provide various application services to the client corresponding to the BFF. The client corresponding to the BFF (BFF Client) can be the front-end application corresponding to the BFF. It can be understood that the BFF is used to coordinate between the front-end application and the server, and provide dedicated back-end services for the front-end application. In the embodiments of the present application, a BFF service layer is added to the server, so as to better interact with the client based on the BFF service layer, and realize the coordination between the front-end application and the server.
[0199] The interface call request can be a call request from the client, that is, a call request from the front-end application. The interface call request is used to request to call multiple application service interfaces of the server, so as to obtain the application service data corresponding to the application service requirements. Exemplarily, the interface call request can be an application programming interface call (API Call) or a BFF interface request, used to obtain data, perform operations, or obtain specific functions, which is not limited here.
[0200] The application service requirements can be understood as the operation requirements or function requirements that need to be executed by the user during the process of project development, management, and use. Exemplarily, it can be service requirements related to data development or operation and maintenance management, etc., and can also be information requirements that need to be queried from the server, such as the basic information or operation information of the user that needs to be queried from the server. It can be understood that the application service requirements are determined according to the actual needs of the user, which is not limited here.
[0201] The application service data is the data, operation, or function corresponding to the application service requirements. Exemplarily, if the application service requirement is the requirement to query user information, the application service data is the user information (User Information). If the application service requirement is the requirement to call a certain function, the application service data is the corresponding function, which is not limited here. In the embodiments of the present application, the application service data is obtained by the server from multiple application service interfaces based on the orchestration result.
[0202] It can be understood that the interfaces called by the interface call request usually include one or more. Therefore, it is necessary to reasonably orchestrate and plan between the interfaces to ensure that the data exchange, message passing, call relationship, etc. between the interfaces are correct, and ensure that all parts of the system can work effectively in coordination. The orchestration result is obtained by orchestrating the interface call request. In the embodiments of the present application, the orchestration result is obtained by graphically orchestrating the interface call request according to the preset interface orchestration method.
[0203] Considering that there are data security risks when users directly operate the database using GraphQL in the related art, the present application does not allow users to write GraphQL to directly operate the database. The present application accesses the server-side interface through functions, which not only ensures data security but also prevents the R & D cost from increasing due to the introduction of new technologies.
[0204] The preset interface orchestration method can be understood as a way to graphically orchestrate the target encapsulation functions and the connection relationships between the target encapsulation functions, that is, a way to orchestrate the target encapsulation functions and the connection relationships between the target encapsulation functions through a visual orchestration mode. Exemplarily, the orchestration can be performed on an interface orchestration page. Users can add call interfaces through a directory tree on the interface orchestration page, add new queries or change operations to the API to expand the functions of the API to meet the requirements of the client. In addition, each interface can also be graphically represented. Users can drag and drop functions, Compose, Rename, and other elements on the canvas to expand the functions of the API to meet the requirements of the client. In the embodiments of the present application, the graphical function elements can display information such as the application name of the function, the function name, function inputs, and function outputs, which is not limited herein.
[0205] The preset interface orchestration method can achieve the effect of obtaining the required application service data from multiple application service interfaces by calling the target encapsulation function corresponding to the interface call request, that is, it can call multiple application service interfaces on the server side by using the encapsulated function corresponding to the interface call request to obtain the application service data.
[0206] The target encapsulation function is a function that executes the functions required by the interface call request and can be an encapsulated function, so that the function can be called multiple times and used independently, improving the reusability and maintainability of the code. The target encapsulation function is used to define the interface information of multiple application service interfaces to ensure that it meets the requirements of the interface definition. Exemplarily, the interface information can include the interface name, interface function description, parameter list, return result, error code list, and other contents, which is not limited herein.
[0207] It can be seen that in the embodiments of the present application, graphically orchestrating the interface call request according to the preset interface orchestration method can obtain an orchestration result, and thus the application service data can be obtained from multiple application service interfaces based on the orchestration result, that is, the target encapsulation function corresponding to the interface call request can be called based on the orchestration result to obtain the application service data from multiple application service interfaces.
[0208] In the embodiments of the present application, the above steps S1001 and S1002 can be applied to the client corresponding to the BFF. By sending an interface call request to the server, and then receiving the application service data corresponding to the interface call request feedback by the server. Among them, the application service data is obtained by the server from multiple application service interfaces based on the orchestration result, and the orchestration result is obtained by graphically orchestrating the target encapsulation function corresponding to the interface call request according to a preset interface orchestration method. The preset interface orchestration method is used to graphically orchestrate the target encapsulation function and the connection relationship between the target encapsulation functions, so as to obtain application service data from multiple application service interfaces. It can be seen that in the embodiments of the present application, by using GraphQL as the middle layer and adopting a visual orchestration method for interface orchestration, and accessing the server interface in the form of a function, while ensuring data security, the R & D cost will not increase due to the introduction of new technologies, reducing the R & D cost and operation and maintenance cost.
[0209] The method for processing the interface call request provided by the embodiments of the present application can be but is not limited to being applied to application scenarios involving application service data query in fields such as e-commerce services, education services, legal services, medical services, conference services, social network services, financial product services, logistics services, and navigation services. For example: application service data query scenarios for e-commerce services, application service data query scenarios for academic interpretations, application service data query scenarios for medical means, etc., which are not limited here.
[0210] By adopting the embodiments of the present application, an interface call request is sent to the server, and then the application service data corresponding to the interface call request feedback by the server is received. Among them, the application service data is obtained by the server from multiple application service interfaces based on the orchestration result, and the orchestration result is obtained by graphically orchestrating the target encapsulation function corresponding to the interface call request according to a preset interface orchestration method. The preset interface orchestration method is used to graphically orchestrate the target encapsulation function and the connection relationship between the target encapsulation functions, so as to obtain application service data from multiple application service interfaces. Thus, the purpose of using GraphQL as the middle layer, adopting a visual orchestration method for interface orchestration, and accessing the server interface in the form of a function to obtain the application service data corresponding to the interface call request is achieved. Therefore, the technical effect of ensuring data security while not increasing the R & D cost due to the introduction of new technologies, reducing the R & D cost and operation and maintenance cost is realized, and further solves the technical problem in the related art that using a serverless cloud framework as the middle layer leads to difficult operation and maintenance, and high R & D cost and operation and maintenance cost.
[0211] In an optional embodiment, in step S1001, sending an interface call request to the server includes the following method steps:
[0212] Step S10011: Send an interface call request to the server using a preset access domain name, where the preset access domain name is a pre-set unified public cloud domain name.
[0213] Considering that there are security risks in directly accessing the server using the old domain name of the application, in the embodiments of this application, when the client sends an interface call request to the server, an interface call request is sent to the server using a preset access domain name, that is, a unified domain name is used to communicate with the BFF service layer, so as to meet the requirements of security and improved user experience through the unified domain name.
[0214] The preset access domain name can be understood as a pre-set unified public cloud domain name, and all applications in the data management system can be incorporated under a single domain name.
[0215] Exemplarily, in the data management system of this application, a unified public domain name, a virtual operator domain name of the unified public cloud, and a domain name within the unified group can be set, which is not limited here. After unification, the domain names perceived by users in the entire data management system will only be the above three.
[0216] Optionally, since the data management system is a Region-based product, different from control products, the concept of Region is required to distinguish file acquisition in different Regions. To distinguish Regions, it can be designed that Region information is revealed in the secondary path of the access domain name.
[0217] Exemplarily, taking the unified public domain name (i.e., the primary path of the access domain name) as "https: / / xxxx.data.kkk.com" as an example, the secondary path of the access domain name can be "https: / / xxxx.data.kkk.com / {Region}", that is, Region information is displayed in the secondary path of the access domain name.
[0218] Optionally, after specifying the primary and secondary paths, an identifier can also be used to distinguish which product the user wants to access. Therefore, this application designs a tertiary path to specify the product to be accessed. Exemplarily, taking the primary path of the access domain name as "https: / / xxxx.data.kkk.com" and the secondary path of the access domain name as "https: / / xxxx.data.kkk.com / {Region}" as an example, the tertiary path of the access domain name can be "https: / / xxxx.data.kkk.com / {Region} / {product name}".
[0219] Thus, through the tertiary path, the intention of the user to access a certain product page under a certain Region can be fully expressed.
[0220] In an alternative embodiment, the domain name resolution result of the preset access domain name is used to map the interface call request to the server closest to the geographical location of the client that sends the interface call request.
[0221] In the embodiments of the present application, after the user accesses the domain name, the domain name accessed by the user is resolved to obtain the domain name resolution result. The BFF service layer of the present application is designed to have the ability of a Content Delivery Network (CDN). When the user accesses the unified public domain name, the domain name resolution will be mapped to the server closest to the user, thereby realizing static resource acceleration.
[0222] Exemplarily, Xiaomei who lives in Hangzhou accesses Service A in the western region of the United States purchased by the company, and the domain name is "https: / / xxxx.data.kkk.com / us-west-1". After domain name resolution, in fact, Xiaomei's access will be mapped to the BFF server in Hangzhou, and this server will provide static resources to Xiaomei.
[0223] It can be seen that the domain name resolution result of the preset access domain name of the present application is used to map the interface call request to the server closest to the geographical location of the client that sends the interface call request, thereby realizing static resource acceleration.
[0224] Optionally, there is usually a problem of slow access when the user accesses across regions. To solve this problem, the present application is designed to accelerate the interface through BFF. When the client accesses the interface, similar to the CDN principle, it will first access the BFF server closest to the client nearby, and then the BFF server closest to the client will access the BFF server in the specified region through dedicated line acceleration, and finally the BFF server in the specified region will forward the request to the actual interface service in the specified region. Exemplarily, the deployment location of the BFF server can be the same as the application deployment location, so that there will not be too much delay when connecting to the actual interface service after passing through the acceleration channel.
[0225] In an alternative embodiment, the method for processing the interface call request further includes the following method steps:
[0226] Step S10031, obtaining the data packet to be synchronized from the server in command line mode, where the data packet to be synchronized includes: the source code file to be synchronized and the code type file to be synchronized, and the source code file to be synchronized and the code type file to be synchronized are used to describe the interface call logic;
[0227] Step S10032, updating the local historical source code file based on the source code file to be synchronized, and updating the local historical code type file based on the code type file to be synchronized.
[0228] In the embodiments of the present application, the command-line mode can be a Command Line Interface (CLI), that is, the CLI command line. The data packet to be synchronized can be a Node Package Manager (npm) package. The npm package can include the source code files to be synchronized, that is, JavaScript files, and the code type files to be synchronized, that is, TypeScript files.
[0229] It can be understood that the JavaScript file includes the call logic for the interface to implement the interface call logic, such as operations like constructing requests, sending requests, and processing responses. The JavaScript file can also process the data returned by the interface, such as parsing, converting the data, and presenting it to the user or passing it to other parts of the application.
[0230] The TypeScript file defines the data types and structures of the interface to provide type safety and syntax checking: to ensure that the parameters and return values of the interface call meet the expectations. The TypeScript file can also be converted into a JavaScript file by the compiler for execution in the browser.
[0231] In the embodiments of the present application, the npm package can be updated through CLI commands. Exemplarily, the CLI command line can be used to obtain the npm package from the server, and then based on the JavaScript file in the npm package, the local JavaScript file can be updated. At the same time, based on the TypeScript file in the npm package, the local TypeScript file can be updated, thereby avoiding the problem that the npm package must be frequently released due to the frequent release of the BFF, resulting in a high cost. In addition, this update method can also take effect during Continuous Integration (CI) cloud building.
[0232] It should be noted that the client corresponding to the BFF in the embodiments of the present application can be composed of a Remote Procedure Call (RPC), an API call, an Incremental Static Regeneration (ISR) builder for generating static web pages, and auxiliary tools.
[0233] Among them, RPC can be understood as a mode that automatically encapsulates the BFF interface and then provides the encapsulated interface for direct invocation by client users. Based on the RPC method, this application well isolates the interface invocation process, enabling client users to be unaware of information unrelated to the service, such as how the client establishes a connection with the BFF service layer and the meaning of request parameters. This application separates JavaScript files from TypeScript files at the underlying layer. When client users download the npm package, they can use the Postinstall method to request the latest JavaScript files and TypeScript files from the remote BFF. Subsequently, if client users need to obtain the latest npm package, they can execute the update through the CLI command line, thereby avoiding the problem that the frequent release of the BFF service layer leads to the necessary frequent release of the npm package. At the same time, this update method can also take effect during CI cloud construction.
[0234] This application encapsulates an API call library at the underlying layer of RPC to solve related problems during the invocation of the BFF service layer. The underlying library provides security-related processing methods, including Cross-Site Request Forgery Token (CSRF Token) and Cross-Site Scripting Attack (XSS) attacks. At the same time, it also solves the problem of how to maintain the same CSRF Token cache under multiple applications. The underlying library also provides basic REST call methods, such as POST, GET, etc., and also provides Server-Sent Events (SSE) and cross-domain JSONP call methods. In addition, the underlying library provides rich hook capabilities, such as hooks before and after requests, data verification hooks, and data processing hooks, and these hook capabilities can help access control better handle the request process and data.
[0235] In terms of error display, since the data management system of this application has a unified error reporting logic and display interface, an error display component is also encapsulated in the client, enabling client users not to handle the error logic by themselves. In the BFF processing, it mainly includes the conversion mapping from the application domain name to the BFF domain name, the judgment of the pre-release and online environments, and the conversion of request parameters (the BFF server has requirements for request parameters). Finally, the API call library also provides some auxiliary tools, such as the abort method for aborting requests and the retry logic during rate limiting.
[0236] In terms of the builder of the ISR, since most engineering systems in the data management system of this application have switched from webpack to vite, a vite-based builder is mainly provided here. Build hooks are provided in the vite builder, and we use these hooks to generate static resource files and upload them to the remote BFF server.
[0237] In terms of auxiliary tools, this application has developed a set of toolkits for page jumps to solve the transformation cost problem of jumps between applications under the same domain name. Figure 11 It is a schematic diagram of the design idea of a toolkit according to Embodiment 2 of this application, as Figure 11 shown. When the client user (producer) registers the code for the jump logic in the specified directory in the code, the code will be released through the CI tool. Then the builder will automatically generate the jump configuration, automatically create the usage document, and synchronize it to the remote end. When other users (consumers) want to jump to the producer's application, they can refer to the usage document, directly obtain the registered instructions from the usage document and write them directly into the code to perform page jumps or instruction calls within the service code, thereby reducing the communication cost between producers and consumers and improving the migration efficiency of the unified domain name.
[0238] In an optional embodiment, the method for invoking the request of the processing interface further includes the following method steps:
[0239] Step S10041, receiving a preset error code and error message from the server side, where the preset error code is obtained by the server side based on the call failure events of multiple application service interfaces, and the error message is searched based on the preset error code;
[0240] Step S10042, displaying a page indicating the failure of calling the data source service, where the display content in the page indicating the failure of calling the data source service at least includes: the preset error code and the error message.
[0241] The preset error code can be understood as the code preset for indicating the reason for the error occurring in the interface layer, and the error message can be understood as the information for further explaining the reason for the error occurring in the interface layer and providing a solution guide.
[0242] It can be understood that when the server receives an interface call request from the client and executes the processing logic, if an error occurs in the interface layer, that is, a call failure event occurs, the server can feedback a preset error code and error message to the client. Among them, the preset error code is obtained by the server based on the call failure events of multiple application service interfaces, and the error message is searched based on the preset error code. Exemplarily, the error message can be searched by the BFF service layer based on the preset error code fed back by the server. After receiving the error code, the BFF service layer will search for the pre-recorded error message according to the error code, and then feedback the error code and the error message to the client together.
[0243] In the embodiment of the present application, the client can receive the preset error code and error message from the server and display a page for failed call of the data source service. Among them, the display content in the page for failed call of the data source service at least includes: the preset error code and error message. Exemplarily, the page for failed call of the data source service can refer to Figure 9 as shown, which will not be elaborated here.
[0244] In an alternative embodiment, the method for processing the interface call request further includes the following method steps:
[0245] Step S10051, generate a first static page by using a preset static page generation method, where the first static page includes: page initial composition information, and the page initial composition information includes a page header and a menu bar;
[0246] Step S10052, synchronize the first static page to the server so that when accessing the target static page through an interface call request, the page initial composition information is first rendered;
[0247] Step S10053, after the page initial composition information is rendered, generate a second static page, where the second static page includes the remaining composition parts of the target static page except the first static page;
[0248] Step S10054, synchronize the second static page to the server so that the target static page is rendered on the first static page.
[0249] In the embodiment of the present application, in order to improve the user experience of the data management system, functions such as unified domain name, static resource acceleration, interface acceleration, client first-screen rendering acceleration, and unified error code / prompt are designed.
[0250] Among them, in terms of accelerating the first-screen rendering of the client, this application supports Incremental Static Regeneration (ISR) at the BFF service layer. Since there are many means of client first-screen rendering, such as Server Site Rendering (SSR), Static Site Generation (SSG), etc. Considering the current situation of the data management system, that is, there are too many old service codes and unique build systems in the data management system, resulting in too high costs for using SSR. In addition, considering the service characteristics of the data management system itself, that is, the vast majority of applications are dynamic pages and there are few static pages. Under this characteristic, the SSG solution is also not suitable. Therefore, the ISR method is relatively suitable for the data management system.
[0251] This application can adopt the ISR method. When the code is submitted to the continuous integration service (CI), first compile the static HTML available for first-screen rendering. This static HTML contains some initial components of the page, such as the common header, menu bar, etc., and then synchronize the HTML code to the BFF server. Thus, when the user accesses the page, the header and menu bar can be directly rendered on the first screen, and the remaining content is then dynamically loaded by JavaScript.
[0252] Figure 12 It is a first-screen rendering flow chart according to Embodiment 2 of this application. As Figure 12 shown, when rendering the first screen of the client, first build the static HTML available for first-screen rendering from the source code. The built static HTML includes the initial component information of the page, such as the common header, menu bar, etc. Then synchronize the static HTML code to the static server (BFF server) so that when the user accesses the page, the first screen in the web browser can be directly rendered.
[0253] Figure 13 It is a page schematic diagram of first-screen rendering according to Embodiment 2 of this application. As Figure 13 shown, before the user accesses the page (that is, during the process of building the static HTML available for first-screen rendering from the source code and synchronizing the static HTML code to the static server), the initial component information such as the common header and menu bar of the page can be built in advance. When the user accesses the page, the first screen in the web browser is directly rendered.
[0254] In the embodiments of the present application, the preset static page generation method may be the ISR method, and the target static page may be static HTML, where the static HTML includes page initial composition information. When the present application performs the first-screen rendering based on the interface call request, the ISR method may be adopted. First, a first static page including the page initial composition information is generated, that is, static HTML including the page initial composition information is generated, and the static HTML is synchronized to the server, so that a first static page including information such as the page header and menu bar can be rendered. Then, the remaining content of the target static page is dynamically loaded by JavaScript, that is, the remaining components of the target static page except the first static page are generated to obtain a second static page, and it is synchronized to the server, and then a complete target static page is rendered on the basis of the first static page, that is, the client first-screen page is rendered, and the access effect can be improved and the user experience can be enhanced.
[0255] It should be noted that the BFF client in the embodiments of the present application is mainly composed of an application and a BFF component. Among them, the application part may include applications such as data development, operation and maintenance center, data analysis, data quality, data governance, data modeling, data integration, and data services. The present application does not adjust the application part, but makes adjustments from the BFF component layer to reduce a large amount of manpower input.
[0256] The BFF component part includes functions such as BFF interface request, hunting prompt and error code, external link jump, CSRF verification, unified domain name jump, TypeScript automatic generation tool, and ISR builder.
[0257] First of all, the BFF component is responsible for making an interface request with the BFF, handling the access domain name, interface format, input and output parameters, error handling, etc. of the BFF to meet the requirements of the service for calling the BFF interface.
[0258] For the error prompt and error code part, it is necessary to display the returned content of the BFF interface request component on the page and uniformly handle the display logic of error reporting.
[0259] For the external link jump part, it is mainly used to handle the logic between the jumps of each application after the unified domain name. Because when the domain name is unified, the previous application jump logics may all need to be adjusted. Through the unified external link jump in the present application, the coupling of the jumps between applications can be decoupled, and developers only need to know the application name and parameters of the jump target.
[0260] For the CSRF verification part, the BFF component is responsible for obtaining and passing the CSRF Token during the interface request, so that the client R & D users can focus only on writing service logic.
[0261] The unified domain name redirection logic part is mainly for the situation where old customers continue to access the old domain name after the domain name migration of the old application. At this time, the BFF component needs to handle the work of redirecting the old domain name to the new domain name.
[0262] The TypeScript automatic generation tool part can help client R & D users quickly master the usage method of interfaces by using the code hint function of the editor during the development process. In this application, by providing a command-line tool, R & D users can synchronize the remote BFF information through the command-line tool and immediately update the local definition file.
[0263] The ISR builder part is to build static resources through the ISR building tool during the front-end compilation stage and synchronize the static resources to the remote BFF service layer for use when customers access.
[0264] It is easy to understand that the beneficial effects of the method for processing interface call requests provided in this application also include the following points.
[0265] Beneficial effect (3): This application uses the command-line mode to update the npm package and restart the code verification ability of the editor, thus solving the framework binding problem and introduction cost problem caused by the need to bind the scaffolding to generate the front-end TypeScript definition in the related technology.
[0266] It should be noted that the preferred implementation manner of this embodiment can refer to the relevant description in Embodiment 1 and will not be elaborated here.
[0267] Embodiment 3
[0268] In the operating environment as in Embodiment 1, this application provides a Figure 14 system for processing interface call requests as shown. Figure 14 It is a schematic diagram of a system for processing interface call requests according to Embodiment 3 of this application. As Figure 14 shown, the system includes:
[0269] The front-end and back-end collaborative server 1401 is used to receive the interface call requests from the front-end and back-end collaborative client, graphically arrange the target encapsulation function corresponding to the interface call request according to the preset interface arrangement method to obtain the arrangement result, obtain the application service data from multiple application service interfaces based on the arrangement result, and feedback the application service data to the front-end and back-end collaborative client;
[0270] The front-end and back-end collaborative client 1402 is used to send interface call requests to the front-end and back-end collaborative server and receive the application service data fed back by the server;
[0271] Among them, the interface call request is used to request to call multiple application service interfaces of the server to obtain application service data corresponding to the application service requirements. The preset interface orchestration method is used to graphically orchestrate the target encapsulation functions and the connection relationships between the target encapsulation functions, so as to obtain application service data from multiple application service interfaces. The target encapsulation function is used to define the interface information of multiple application service interfaces, and the orchestration result is used to describe the processing process of obtaining application service data through the graphical orchestration of the target encapsulation functions and the connection relationships between the target encapsulation functions.
[0272] The system for processing the interface call request in the embodiments of the present application includes a Backend For Frontends Server (BFFServer) 1401 and a Backend For Frontends Client (BFF Client) 1402. Among them, the BFF Client can be understood as the front-end application corresponding to the BFF, and the BFF Server is the server for providing various application services to the BFF Client. It can be understood that the BFF is used to coordinate between the front-end application and the server, and provide a dedicated back-end service for the front-end application. In the embodiments of the present application, a BFF service layer is added to the server, so that it is possible to better interact with the client based on the BFF service layer, and achieve coordination between the front-end application and the server.
[0273] The interface call request can be understood as the call request of the BFF client, that is, the call request of the front-end application. The interface call request is used to request to call multiple application service interfaces of the BFF server, so as to obtain application service data corresponding to the application service requirements. Exemplarily, the interface call request can be an Application Programming Interface Call (API Call) or a BFF interface request, which is used to obtain data, execute operations, or obtain specific functions, and is not limited here.
[0274] The application service requirements can be understood as the operation requirements or function requirements that need to be executed by the user during the process of project development, management, and use. Exemplarily, they can be service requirements related to data development or operation and maintenance management, etc., and can also be information requirements that need to be queried from the server, such as the basic information or operation information of the user that needs to be queried from the server. It can be understood that the application service requirements are determined according to the actual needs of the user, and are not limited here.
[0275] The application service data is data, operation, or function corresponding to the application service requirements. Exemplarily, if the application service requirement is a requirement to query user information, the application service data is the user information (User Information). If the application service requirement is a requirement to call a certain function, the application service data is the corresponding function, and is not limited here.
[0276] The target encapsulation function is a function that performs the functions required for an interface call request. It can be a well - encapsulated function, enabling this function to be called multiple times and used independently, thereby improving the code's reusability and maintainability. The target encapsulation function is used to define the interface information of multiple application service interfaces to ensure that it meets the requirements of the interface definition. Exemplarily, the interface information may include content such as the interface name, interface function description, parameter list, return result, error code list, etc., which is not limited here.
[0277] It can be understood that the interfaces called by the interface call request usually include one or more. Therefore, reasonable arrangement and planning are required among the interfaces to ensure correct data exchange, message passing, call relationships, etc. among the interfaces, and to ensure that all parts of the system can work effectively in coordination.
[0278] The BFF service layer proposed in the embodiments of this application has made an improved design for the Graph Query Language (GraphQL) and restricted some functions of GraphQL. Considering that there are data security risks when users directly operate the database using GraphQL in the related art, this application does not allow users to write GraphQL to directly operate the database. This application accesses the server - side interface through functions, ensuring data security while also preventing the R & D cost from increasing due to the introduction of new technologies.
[0279] The preset interface arrangement method can be understood as a method of graphically arranging the target encapsulation function and the connection relationships between the target encapsulation functions, that is, a method of arranging the target encapsulation function and the connection relationships between the target encapsulation functions through a visual arrangement mode. Exemplarily, the arrangement can be performed on the interface arrangement page. Users can add call interfaces through the directory tree on the interface arrangement page, add new queries or change operations to the API to expand the functions of the API to meet the needs of the client. In addition, each interface can also be graphically represented. Users can drag functions, Compose, Rename and other elements on the canvas to expand the functions of the API to meet the needs of the client. In the embodiments of this application, information such as the application name, function name, function input parameters, and function output parameters of the function can be displayed in the graphical function elements, which is not limited here.
[0280] The arrangement result obtained by graphically arranging the target encapsulation function corresponding to the interface call request according to the preset interface arrangement method can achieve the effect of obtaining the required application service data from multiple application service interfaces by calling the target encapsulation function corresponding to the interface call request, that is, it can call multiple application service interfaces on the server - side by using the well - encapsulated function corresponding to the interface call request to obtain the application service data.
[0281] Figure 15 It is an architecture diagram of a BFF system according to Embodiment 3 of the present application. As Figure 15 shown, the system architecture includes a client, a BFF service layer, and a server. Among them, the client accesses the BFF service layer based on the BFF unified access domain name, and the BFF service layer accesses the server based on the intranet.
[0282] The client is mainly composed of an application and a BFF component. Among them, the application part can include applications such as data development, operation and maintenance center, data analysis, data quality, data governance, data modeling, data integration, and data services. The BFF component part includes functions such as BFF interface requests, hunting tip and error codes, external link jumps, CSRF verification, unified domain name jumps, TypeScript (TS) automatic generation tools, and ISR builders. For specific details, please refer to the description in Embodiment 2, and will not be elaborated here.
[0283] The BFF service layer is mainly composed of capabilities such as gateways, access control, interface orchestration, monitoring and alerting, resource hosting, access acceleration, error codes, access modes, disaster tolerance, automated detection, and interface mocking. Among them, the gateway provides capabilities such as access protocols, access ports, access whitelists, sensitive information verification, and header detection. Access control provides two categories: authentication and traffic control. Authentication includes functions such as platform authentication, tenant authentication, role authentication, and automatic redirection for unlogged-in users. Traffic control includes functions such as flow limiting, client retry, and timeout control. In addition, it also includes an application isolation function. Interface orchestration provides functions such as interface aggregation, interface trimming, and visual orchestration. Monitoring and alerting provides monitoring functions such as traffic, success rate, error statistics, logs, and rule alerts. Resource hosting provides file types such as HTML, JavaScript (JS), JSON, Text, and Cascading Style Sheets (CSS). Access acceleration provides functions such as interface acceleration, static resource acceleration, and client first-screen acceleration. Error codes provide functions such as error information hosting and automatic information mapping. Access modes provide functions such as HTTP, HTTPS, Server-Sent Events (SSE), and network communication protocols. Disaster tolerance provides functions such as two-site three-center and data backup. Automated detection provides functions such as horizontal privilege escalation, vertical privilege escalation, interface specification, and heartbeat detection. Interface mocking provides functions such as virtual-real switching and mock data persistence. For specific details, please refer to the description in Embodiment 1, and will not be elaborated here.
[0284] The system for processing interface call requests provided by the embodiments of the present application can be but is not limited to being applied to application scenarios involving application service data query in fields such as e-commerce services, education services, legal services, medical services, conference services, social network services, financial product services, logistics services, and navigation services. For example: application service data query scenarios in e-commerce services, application service data query scenarios in academic explanations, application service data query scenarios in medical means, etc., which are not limited here.
[0285] Adopting the embodiments of the present application, through the system for processing interface call requests provided by the present application, the system for processing interface call requests includes a front-end and back-end collaborative server and a front-end and back-end collaborative client. Among them, the front-end and back-end collaborative server is used to receive an interface call request from the front-end and back-end collaborative client, perform graphical orchestration on the interface call request according to a preset interface orchestration method to obtain an orchestration result, obtain application service data from multiple application service interfaces based on the orchestration result, and feedback the application service data to the front-end and back-end collaborative client. The front-end and back-end collaborative client is used to send an interface call request to the front-end and back-end collaborative server and receive the application service data fed back by the server. Among them, the interface call request is used to request to call multiple application service interfaces of the server to obtain application service data corresponding to application service requirements. The preset interface orchestration method is used to perform graphical orchestration on target encapsulation functions and the connection relationships between the target encapsulation functions to obtain application service data from multiple application service interfaces. The target encapsulation function is used to define the interface information of multiple application service interfaces. The orchestration result is used to describe the processing process of obtaining application service data through graphical orchestration of the target encapsulation functions and the connection relationships between the target encapsulation functions. Thus, the purpose of using GraphQL as the middle layer, performing interface orchestration in a visual orchestration manner, and accessing the server interface in a function way to obtain application service data corresponding to the interface call request is achieved, thereby realizing the technical effect of ensuring data security while not increasing the R & D cost due to the introduction of new technologies, reducing the R & D cost and operation and maintenance cost, and further solving the technical problem in the related art of using a serverless cloud framework as the middle layer, resulting in difficult operation and maintenance and high R & D cost and operation and maintenance cost.
[0286] It should be noted that the BFF service layer of the embodiments of the present application is optimized and developed from five aspects: service security, service high availability, user experience improvement, collaborative optimization, and additional value-added capabilities. Figure 16 It is a schematic diagram of BFF capabilities according to Embodiment 3 of the present application, as Figure 16As shown in the figure, service security includes three major parts: unified gateway, unified authentication, and unified domain name. In terms of the unified gateway, it is expected to achieve the capabilities of preventing attacks and validating sensitive information through BFF. In terms of preventing attacks, it is expected that BFF, as the unified gateway of the data management system, can defend against all external attacks, and the application server can focus on the development of service code. Currently, the means of BFF to prevent attacks include CSRF Token validation, access whitelist control, access port restriction, login status validation, etc. In terms of sensitive information validation, some sensitive information outputs can be scanned at the BFF service layer, and fields with potential security risks can also be scanned, such as interface fields or server-side logics that may contain horizontal privilege escalation. Unified authentication can include product authentication and tenant authentication.
[0287] The service high availability part mainly includes four parts: traffic control, monitoring, alerting, and disaster recovery. In terms of traffic control, it can be further divided into flow limiting, client retry, and timeout control. Users can configure flow limiting rules based on the historical data of the interface. When the access quantity exceeds the limit, a specific error code is returned and the client is retried. Timeout settings can also be made for interface access to ensure the availability of the interface. In terms of monitoring, it focuses on the traffic, success rate, and error statistics of the interface. In addition, it is expected that the monitoring of BFF can perform custom log error statistics based on the output information. However, BFF does not monitor interface calls not triggered by users, such as calls triggered by internal timers. In terms of alerting, it is expected that users can configure alerting rules by themselves, such as sending alert messages when the traffic is higher than a certain percentage. The alerting methods can include two methods: application alerting and phone alerting. In terms of disaster recovery, BFF has basic off-site disaster recovery capabilities, and the service-side interface itself also has off-site disaster recovery capabilities.
[0288] In terms of improving the user experience, there are mainly unified domain name, static resource acceleration, interface acceleration, client first-screen rendering acceleration, and unified error code and prompt, etc. For specific details, please refer to the descriptions in Embodiment 1 and Embodiment 2, and will not be elaborated here.
[0289] In terms of collaborative optimization, there are mainly automatic generation of TypeScript (TS) definitions, interface simulation, service orchestration, BFF static resource hosting, configuration shared caching, and interface standardization. First, regarding the service orchestration capability, it is expected that in the BFF of the data management system, the serial and parallel calls of multiple interfaces can be supported, and data can be aggregated or trimmed, so that the interfaces of the client can be more flexible. If the client needs to add fields due to service requirements, it can also be implemented through the BFF service layer without the need for the server to make further modifications. In addition, it is expected that the BFF of the data management system can provide the ability to automatically generate TypeScript definitions. Through this ability, client users no longer need to write TypeScript definitions themselves, and the code is more maintainable. Server users can also avoid the trouble of writing documents by hand. In terms of interface simulation (Mock), it is expected that Mock data can be set on the BFF before the server-side interface is implemented. Thus, client development users can quickly start development without waiting for the server-side users to complete the interface development. When the server-side users complete the development work, the Mock function can be turned off on the BFF, and at this time, the client will access the real interface data. In terms of static resource hosting, it is expected that some static resource files required by the front end, such as HTML and some necessary JS and CSS files, can be hosted on the BFF service layer (it is recommended to be placed on the CDN, and in special cases, it can be placed on the BFF). Combined with the unified gateway call, true front-end and back-end decoupling can be achieved, and thus the collaborative efficiency can be improved. At the same time, it is also expected that in the platform service of the BFF, cloud-based editing capabilities can be provided to help client R & D users quickly develop and publish. In terms of interface standardization, the data management system of this application has made some adjustments by referring to the interface specifications of the point-of-presence (POP), mainly changing from camelCase to snake_case, adjusting the Resource-Oriented Architecture (ROA) style to the RPC style, and deleting some vocabulary specifications, while retaining the commonly used general words in the actual usage scenarios. In addition, it is expected to detect whether the interfaces conform to the specifications on the BFF service layer. This check does not have a restrictive ability and will not block the development and release of the interfaces. It can also score the health of each interface, and developers can understand whether the current interface needs to be optimized based on the score. For specific details, refer to the descriptions in Embodiment 1 and Embodiment 2, and will not be elaborated here.
[0290] In terms of value-added capabilities, it mainly includes opening third-party access, uploading / downloading, release notes, SSE, and network communication protocols. Currently, there are some scenarios where the BFF capability can be used to better meet service requirements. First is the third-party access scenario. With BFF, it is possible to quickly connect to the demands of third parties. For example, recently a certain customer hoped to open intranet access, which can be quickly transformed and adapted through BFF. In addition, BFF can also be used as a hub to quickly connect to the Object Storage Service (OSS) to achieve the ability to upload / download. In addition, the application's ability to have release notes can also be implemented through BFF. BFF records the release-related information and stores it in JSON format, eliminating the need for server-side development and directly meeting service requirements.
[0291] The API documentation page design of the BBF system provided by the embodiments of this application can be as Figure 17 shown Figure 17 This is a schematic diagram of an API documentation page according to Embodiment 3 of this application. The API documentation page is mainly provided for client R & D users. Here, all the entered BFF APIs can be quickly browsed.
[0292] The left-side directory structure converges according to the application name, such as data analysis, data integration, data development, etc. Search can be performed in the upper left corner, and the search conditions can be switched according to file name, folder name, remarks, code content, etc.
[0293] On the right side is the detailed content of a certain API, including the description, example, request parameters, return parameters, and maintainer of the API. In the example part, users can directly run the example code, and the return value will be displayed in the output box. The example code is read-only and can be modified during the creation or editing phase.
[0294] In the request parameter part, there are name, type, whether it is required, example value, and description. These information are generated after automatically parsing the GraphQL content of the BFF API.
[0295] In the return data part, it includes name, type, example value, and description. Due to the long development history of the data management system, most services do not have a domain model established, and it is relatively difficult to establish a domain model in the short term. Considering the feasibility of the solution, users are not forced to fill in the domain model at present. Instead, it can be replaced with the generic type of object. Because of this, the situation where the return data cannot be predicted may occur. In related technologies, the BFF service predicts and parses by obtaining the return value through a single call, and there may be a situation of missed parsing. Therefore, this application provides a manual editing method that allows users to add and write comments by themselves.
[0296] The design of the static resource management page of the BBF system provided by the embodiments of this application can be as follows Figure 18 shown Figure 18 It is a schematic diagram of a static resource management page according to Embodiment 3 of this application. The static resource management page provides the creation and management of file types such as JSON, HTML, JavaScript, and CSS. Users can create them by adding files in the left directory tree. The right panel shows the description of the file, mapping route, whether login is required, contact person, jump address when not logged in, and text content
[0297] Figure 19 It is a schematic diagram of a new and edit file page according to Embodiment 3 of this application, as follows Figure 19 shown. When creating and editing a file, the user needs to specify the file name, file type (JSON, HTML, JavaScript, or CSS), contact person, mapping route, file description, whether login is required, jump address when not logged in, and text content. Among them, the mapping route is default generated according to the file directory structure and can be modified by the user
[0298] Figure 20 It is a schematic diagram of a monitoring dashboard page according to Embodiment 3 of this application, as follows Figure 20 shown. Users can obtain the interface health status of the team in the monitoring dashboard. Exemplarily, the dashboard includes information such as application overview, key concerns, call success rate, call times, yesterday's call duration, error ranking in the past month, interface distribution, and file distribution. The application overview mainly shows the health score, number of alarms in the past seven days, number of errors in the past seven days, compliance score, number of slow interfaces, and total flow limit in the past seven days of each application, which can help users evaluate the health of application interfaces. Key concerns mainly show information such as the number of interface errors today, the number of triggered flow limit rules today, today's call success rate, today's compliance score, new interfaces today, new files today, releases today, and deletions today, which can help users with operation and maintenance and discover changes. The call success rate part will arrange the success rate from small to large according to dimensions such as interfaces, applications, and responsible persons, so as to identify interfaces that need to be improved. In terms of call times, it can be arranged from large to small according to the dimensions of interfaces, applications, and responsible persons to discover interfaces with high call volumes and conduct key protection. For yesterday's call duration, the top 30 call durations of interfaces will be arranged from large to small to discover interfaces with long call durations. In the error ranking part in the past month, the total number of interface errors in the past month will be counted and the top 30 will be shown from large to small to help users identify interfaces that need to be improved. The interface distribution part will divide the proportion of the number of interfaces by application and responsible person dimensions. The file distribution is similar to the interface distribution, and the file quantity distribution under the responsible person or application dimension will be shown
[0299] In summary, it can be seen that the present application proposes a full-link BFF solution covering gateway, access control, interface orchestration, monitoring and alerting, resource hosting, access acceleration, error codes, rich access modes, disaster tolerance, automated detection, and interface Mock. The coverage of this solution is better than other solutions. Moreover, the present application uses GraphQL as the middle layer and uses a visual orchestration method to orchestrate interfaces. At the same time, usage restrictions are imposed on GraphQL to access the backend interfaces in a function mode, which can prevent the risk of directly connecting to the database. In addition, the present application uses the command-line mode to update npm packages and restart the code verification ability of the editor, solving the framework binding problem and the introduction cost problem.
[0300] It should be noted that the preferred implementation manner of this embodiment can refer to the relevant description in Embodiment 1 and will not be elaborated here.
[0301] Embodiment 4
[0302] According to an embodiment of the present application, there is also provided an apparatus embodiment for implementing the method for processing an interface call request described above. Figure 21 is a schematic structural diagram of an apparatus for processing an interface call request according to Embodiment 4 of the present application, as Figure 21 shown. The apparatus includes:
[0303] A receiving module 2101, configured to receive an interface call request from a client, where the interface call request is used to request to call a plurality of application service interfaces of a server to obtain application service data corresponding to application service requirements;
[0304] An orchestration module 2102, configured to perform graphical orchestration on a target encapsulation function corresponding to the interface call request according to a preset interface orchestration method to obtain an orchestration result, where the preset interface orchestration method is used to perform graphical orchestration on the target encapsulation function and the connection relationship between the target encapsulation functions to obtain application service data from a plurality of application service interfaces, the target encapsulation function is used to define the interface information of a plurality of application service interfaces, and the orchestration result is used to describe the processing process of obtaining application service data through graphical orchestration of the target encapsulation function and the connection relationship between the target encapsulation functions;
[0305] A first obtaining module 2103, configured to obtain application service data from a plurality of application service interfaces based on the orchestration result;
[0306] A feedback module 2104, configured to feedback the application service data to the client.
[0307] Optionally, the apparatus further includes: a creation module, configured to create an initial program code block for multiple application service interfaces; configure function information for the initial program code block to obtain a target program code block, where the function information is used to define at least some or all of the following information: function name, call method, server access points corresponding to multiple application service interfaces, function description, parameter configuration; encapsulate the target program code block to obtain a target encapsulation function.
[0308] Optionally, the orchestration module 2102 is further configured to: select a target encapsulation function corresponding to an interface call request from candidate encapsulation functions according to a preset interface orchestration method, and determine a connection relationship between target encapsulation functions through the interface relationships of multiple application service interfaces; perform graphical orchestration on the target encapsulation functions and the connection relationship to obtain an orchestration result.
[0309] Optionally, the orchestration module 2102 is further configured to: in response to a dependency relationship existing between multiple application service interfaces in the interface relationship, determine that the connection relationship is a serial connection relationship between target encapsulation functions; in response to no dependency relationship existing between multiple application service interfaces in the interface relationship, determine that the connection relationship is a parallel connection relationship between target encapsulation functions.
[0310] Optionally, the orchestration module 2102 is further configured to: in response to obtaining application service data from multiple data sources of the server via multiple application service interfaces, aggregate the input parameters and output parameters of the target encapsulation functions based on the connection relationship to obtain a first orchestration result; in response to the current data content obtained from the server via multiple application service interfaces being more than the data content of the application service data, crop the input parameters and output parameters of the target encapsulation functions based on the connection relationship to obtain a second orchestration result.
[0311] Optionally, the apparatus further includes: a control module, configured to perform access control on the interface call request by using a preset access control method, where the preset access control method includes at least one of the following: performing access authentication on the interface call request; performing traffic control on the interface call request; pre-assigning the access amount corresponding to the application service data.
[0312] Optionally, the apparatus further includes: a second acquisition module, configured to, in response to a call failure of multiple application service interfaces, acquire a preset error code corresponding to the call failure event; search for pre-recorded error information based on the preset error code; and feedback the preset error code and the error information to the client.
[0313] Optionally, a graphical user interface is provided by a cloud device, and the content displayed on the graphical user interface at least partially includes an application service data query scenario. The apparatus further includes: an interaction module, configured to select a target encapsulation function corresponding to an interface call request from candidate encapsulation functions in response to a first control operation performed on the graphical user interface, where the function elements of the target encapsulation function include: function application name, function name, function input parameters, and function output parameters; determine a connection relationship between target encapsulation functions through the interface relationships of multiple application service interfaces in response to a second control operation performed on the graphical user interface; perform aggregation and / or cropping on the input parameters and output parameters of the target encapsulation function based on the connection relationship in response to a third control operation performed on the graphical user interface to obtain an orchestration result; and display the orchestration result within the graphical user interface.
[0314] By adopting the embodiment of the present application, an interface call request from a client is received, and then a graphical orchestration is performed on the target encapsulation function corresponding to the interface call request according to a preset interface orchestration method to obtain an orchestration result, so that based on the obtained orchestration result, that is, a graphical orchestration of the target encapsulation function and the connection relationship between the target encapsulation functions is performed to obtain an orchestration result for describing the processing process of obtaining application service data through the graphical orchestration of the target encapsulation function and the connection relationship between the target encapsulation functions. By calling the target encapsulation function corresponding to the interface call request, application service data corresponding to the application service requirements is obtained from multiple application service interfaces of the server, and finally the obtained application service data is fed back to the client. Thus, the purpose of using GraphQL as an intermediate layer, performing interface orchestration in a visual orchestration manner, and accessing the server interface in a function manner is achieved, so that while ensuring data security, the R & D cost is not increased due to the introduction of new technologies, and the technical effects of reducing the R & D cost and operation and maintenance cost are achieved, thereby solving the technical problem in the related art that using a serverless cloud framework as an intermediate layer leads to difficult operation and maintenance and high R & D cost and operation and maintenance cost.
[0315] It should be noted here that the above receiving module 2101, orchestration module 2102, first obtaining module 2103, and feedback module 2104 correspond to steps S21 to S24 in Embodiment 1. The instances and application scenarios implemented by the four modules and the corresponding steps are the same, but are not limited to the content disclosed in the above Embodiment 1. It should be noted that the above modules or units may be hardware components or software components stored in a memory (for example, memory 104) and processed by one or more processors (for example, processors 102a, 102b,..., 102n), and the above modules may also be part of the apparatus and may run in the computer terminal 10 provided in Embodiment 1.
[0316] According to an embodiment of the present application, there is also provided another apparatus embodiment for implementing the method for processing an interface call request described above. Figure 22 is a schematic structural diagram of another apparatus for processing an interface call request according to Embodiment 4 of the present application, as Figure 22 shown, the apparatus includes:
[0317] A sending module 2201, configured to send an interface call request to a server, where the interface call request is used to request to call a plurality of application service interfaces of the server to obtain application service data corresponding to application service requirements;
[0318] A receiving module 2202, configured to receive the application service data fed back by the server, where the application service data is obtained by the server from a plurality of application service interfaces based on an orchestration result, and the orchestration result is obtained by graphically orchestrating a target encapsulation function corresponding to the interface call request according to a preset interface orchestration method. The preset interface orchestration method is used to graphically orchestrate the target encapsulation function and the connection relationship between the target encapsulation functions to obtain application service data from a plurality of application service interfaces. The target encapsulation function is used to define the interface information of a plurality of application service interfaces, and the orchestration result is used to describe the processing process of obtaining application service data by graphically orchestrating the target encapsulation function and the connection relationship between the target encapsulation functions.
[0319] Optionally, the sending module 2201 is further configured to: send an interface call request to the server using a preset access domain name, where the preset access domain name is a preset unified public cloud domain name.
[0320] Optionally, the domain name resolution result of the preset access domain name is used to map the interface call request to the server closest to the geographical location of the client that sends the interface call request.
[0321] Optionally, the apparatus further includes: an obtaining module, configured to obtain a data packet to be synchronized from the server in a command line mode, where the data packet to be synchronized includes: a source code file to be synchronized and a code type file to be synchronized, where the source code file to be synchronized is used to describe the call logic of the interface, and the code type file to be synchronized is used to describe the data type and structure of the interface; update the local historical source code file based on the source code file to be synchronized, and update the local historical code type file based on the code type file to be synchronized.
[0322] Optionally, the apparatus further includes: a display module, configured to receive a preset error code and error information from the server, where the preset error code is obtained by the server based on a call failure event of a plurality of application service interfaces, and the error information is searched based on the preset error code; display a page for indicating failure of calling a data source service, where the display content in the page for indicating failure of calling a data source service at least includes: the preset error code and the error information.
[0323] Optionally, the device further includes: a rendering module, configured to generate a first static page by using a preset static page generation method, where the first static page includes page initial composition information, and the page initial composition information includes a page header and a menu bar; synchronize the first static page to a server, so that when accessing a target static page through an interface call request, the page initial composition information is first rendered; after the rendering of the page initial composition information is completed, generate a second static page, where the second static page includes the remaining composition parts of the target static page except the first static page; synchronize the second static page to the server, so as to render the target static page on the first static page.
[0324] By adopting the embodiments of the present application, an interface call request is sent to a server, and then application service data corresponding to the interface call request fed back by the server is received, where the application service data is obtained by the server from multiple application service interfaces based on an orchestration result, and the orchestration result is graphically orchestrated for a target encapsulation function corresponding to the interface call request according to a preset interface orchestration method, and the preset interface orchestration method is used to graphically orchestrate the target encapsulation function and the connection relationship between the target encapsulation functions, so as to obtain application service data from multiple application service interfaces. Thus, the purpose of using GraphQL as an intermediate layer, performing interface orchestration in a visual orchestration manner, and accessing the server interface in a function manner to obtain application service data corresponding to the interface call request is achieved. Therefore, the technical effects of ensuring data security while not increasing the R & D cost due to the introduction of new technologies, reducing the R & D cost and the operation and maintenance cost are achieved, and further the technical problem in the related art that using a serverless cloud framework as an intermediate layer leads to difficult operation and maintenance and high R & D cost and operation and maintenance cost is solved.
[0325] It should be noted here that the above sending module 2201 and receiving module 2202 correspond to steps S1001 to S1002 in Embodiment 2. The instances and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the content disclosed in the above Embodiment 1. It should be noted that the above modules or units may be hardware components or software components stored in a memory (for example, memory 104) and processed by one or more processors (for example, processors 102a, 102b,..., 102n), and the above modules may also be part of the device and can run in the computer terminal 10 provided in Embodiment 1.
[0326] It should be noted that the preferred implementation schemes involved in the above embodiments of the present application are the same as the schemes, application scenarios, and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0327] Embodiment 5
[0328] Embodiments of the present application may provide a computer terminal, which may be any computer terminal device in a group of computer terminals. Optionally, in this embodiment, the above computer terminal may also be replaced with a terminal device such as a mobile terminal.
[0329] Optionally, in this embodiment, the above computer terminal may be located in at least one of multiple network devices in a computer network.
[0330] In this embodiment, the above computer terminal may execute program code for the following steps in a method of processing an interface call request: receiving an interface call request from a client, where the interface call request is used to request to call multiple application service interfaces of a server to obtain application service data corresponding to application service requirements; graphically arranging a target encapsulation function corresponding to the interface call request according to a preset interface arrangement method to obtain an arrangement result, where the preset interface arrangement method is used to graphically arrange the target encapsulation function and the connection relationship between the target encapsulation functions to obtain application service data from multiple application service interfaces, the target encapsulation function is used to define the interface information of multiple application service interfaces, and the arrangement result is used to describe the processing process of obtaining application service data by graphically arranging the target encapsulation function and the connection relationship between the target encapsulation functions; obtaining application service data from multiple application service interfaces based on the arrangement result; and feeding back the application service data to the client.
[0331] Optionally, Figure 23 is a structural block diagram of a computer terminal according to an embodiment of the present application. As Figure 23 shown, the computer terminal A may include: one or more (only one is shown in the figure) processors 2302, a memory 2304, a storage controller, and a peripheral interface, where the peripheral interface is connected to a radio frequency module, an audio module, and a display.
[0332] Among them, the memory may be used to store software programs and modules, such as program instructions / modules corresponding to the method and device for processing an interface call request in the embodiments of the present application. The processor runs the software programs and modules stored therein to perform various functional applications and data processing, that is, to implement the above method for processing an interface call request. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, a flash memory, or other non-volatile solid-state memories. In some instances, the memory may further include a memory remotely set relative to the processor, and these remote memories may be connected to the computer terminal A through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise internal network, a local area network, a mobile communication network, and combinations thereof.
[0333] The processor can call the information and application programs stored in the memory through a transmission device to execute the following steps: receiving an interface call request from a client, where the interface call request is used to request to call multiple application service interfaces of a server to obtain application service data corresponding to application service requirements; graphically arranging the interface call request according to a preset interface arrangement method to obtain an arrangement result, where the preset interface arrangement method is used to obtain application service data from multiple application service interfaces by calling a target encapsulation function corresponding to the interface call request, and the target encapsulation function is used to define the interface information of multiple application service interfaces; obtaining application service data from multiple application service interfaces based on the arrangement result; and feeding back the application service data to the client.
[0334] Optionally, the above-mentioned processor can also execute the program code of the following steps: creating an initial program code block for multiple application service interfaces; configuring function information for the initial program code block to obtain a target program code block, where the function information is used to define at least some or all of the following information: function name, call method, server access points corresponding to multiple application service interfaces, function description, parameter configuration; and encapsulating the target program code block to obtain a target encapsulation function.
[0335] Optionally, the above-mentioned processor can also execute the program code of the following steps: selecting a target encapsulation function corresponding to the interface call request from candidate encapsulation functions according to a preset interface arrangement method, and determining the connection relationship between target encapsulation functions through the interface relationship of multiple application service interfaces; and graphically arranging the target encapsulation function and the connection relationship to obtain an arrangement result.
[0336] Optionally, the above-mentioned processor can also execute the program code of the following steps: in response to the interface relationship that there is a dependency relationship between multiple application service interfaces, determining the connection relationship as a serial connection relationship between target encapsulation functions; and in response to the interface relationship that there is no dependency relationship between multiple application service interfaces, determining the connection relationship as a parallel connection relationship between target encapsulation functions.
[0337] Optionally, the above-mentioned processor can also execute the program code of the following steps: in response to obtaining application service data from multiple data sources of the server through multiple application service interfaces, aggregating the input parameters and output parameters of the target encapsulation function based on the connection relationship to obtain a first arrangement result; and in response to the current data content obtained from the server through multiple application service interfaces being more than the data content of the application service data, trimming the input parameters and output parameters of the target encapsulation function based on the connection relationship to obtain a second arrangement result.
[0338] Optionally, the above-mentioned processor may also execute the program code of the following steps: perform access control on the interface call request by using a preset access control method, where the preset access control method includes at least one of the following: perform access authentication on the interface call request; perform traffic control on the interface call request; pre-allocate the access amount corresponding to the application service data.
[0339] Optionally, the above-mentioned processor may also execute the program code of the following steps: in response to the call failure of multiple application service interfaces, obtain the preset error code corresponding to the call failure event; search for the pre-entered error information based on the preset error code; feedback the preset error code and the error information to the client.
[0340] Optionally, a graphical user interface is provided by a cloud device, and the content displayed by the graphical user interface at least partially includes an application service data query scenario. The above-mentioned processor may also execute the program code of the following steps: in response to a first control operation performed on the graphical user interface, select a target encapsulation function corresponding to the interface call request from the candidate encapsulation functions, where the function elements of the target encapsulation function include: function application name, function name, function input parameters, and function output parameters; in response to a second control operation performed on the graphical user interface, determine the connection relationship between the target encapsulation functions through the interface relationships of multiple application service interfaces; in response to a third control operation performed on the graphical user interface, aggregate and / or crop the input parameters and output parameters of the target encapsulation function based on the connection relationship to obtain an orchestration result; display the orchestration result within the graphical user interface.
[0341] By adopting the embodiment of the present application, an interface call request from a client is received, and then graphical orchestration is performed on the target encapsulation function corresponding to the interface call request according to a preset interface orchestration method to obtain an orchestration result, so that based on the obtained orchestration result, that is, graphical orchestration is performed on the target encapsulation function and the connection relationship between the target encapsulation functions, an orchestration result for describing the processing process of obtaining application service data through graphical orchestration of the target encapsulation function and the connection relationship between the target encapsulation functions is obtained. By calling the target encapsulation function corresponding to the interface call request, application service data corresponding to the application service requirements is obtained from multiple application service interfaces of the server, and finally the obtained application service data is fed back to the client. Thus, the purpose of using GraphQL as an intermediate layer, performing interface orchestration in a visual orchestration manner, and accessing the server interface in a function manner is achieved, thereby realizing the technical effect of ensuring data security while not increasing the R & D cost due to the introduction of new technologies, reducing the R & D cost and operation and maintenance cost, and further solving the technical problem in the related art that using a serverless cloud framework as an intermediate layer leads to difficult operation and maintenance and high R & D cost and operation and maintenance cost.
[0342] Those of ordinary skill in the art can understand that Figure 23 the structure shown is only illustrative, and computer terminal A can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a personal digital assistant, and terminal devices such as Mobile Internet Devices (MID), PAD, etc. Figure 23 It does not limit the structure of the above-mentioned electronic device. For example, computer terminal A may also include more or fewer components (such as a network interface, a display device, etc.) than those shown Figure 23 in, or have a different configuration from that shown. Figure 23
[0343] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium. The storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc.
[0344] Embodiment 6
[0345] An embodiment of the present application also provides a computer-readable storage medium. Optionally, in this embodiment, the above computer-readable storage medium can be used to store the program code executed by the method for processing an interface call request provided in the first embodiment above.
[0346] Optionally, in this embodiment, the above computer-readable storage medium can be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group.
[0347] Optionally, in this embodiment, the computer-readable storage medium is set to store program code for performing the following steps: receiving an interface call request from a client, where the interface call request is used to request to call a plurality of application service interfaces of a server to obtain application service data corresponding to an application service requirement; graphically arranging a target encapsulation function corresponding to the interface call request according to a preset interface orchestration method to obtain an orchestration result, where the preset interface orchestration method is used to graphically arrange the target encapsulation function and the connection relationship between the target encapsulation functions to obtain application service data from a plurality of application service interfaces, the target encapsulation function is used to define the interface information of the plurality of application service interfaces, and the orchestration result is used to describe the processing process of obtaining application service data by graphically arranging the target encapsulation function and the connection relationship between the target encapsulation functions; obtaining application service data from a plurality of application service interfaces based on the orchestration result; and feeding back the application service data to the client.
[0348] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: creating an initial program code block for multiple application service interfaces; configuring function information for the initial program code block to obtain a target program code block, where the function information is used to define at least some or all of the following information: function name, call method, server access points corresponding to multiple application service interfaces, function description, parameter configuration; encapsulating the target program code block to obtain a target encapsulation function.
[0349] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: selecting, according to a preset interface choreography method, a target encapsulation function corresponding to an interface call request from candidate encapsulation functions, and determining a connection relationship between the target encapsulation functions through the interface relationship of multiple application service interfaces; graphically choreographing the target encapsulation functions and the connection relationship to obtain a choreography result.
[0350] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: in response to a dependency relationship existing between multiple application service interfaces in the interface relationship, determining that the connection relationship is a serial connection relationship between the target encapsulation functions; in response to no dependency relationship existing between multiple application service interfaces in the interface relationship, determining that the connection relationship is a parallel connection relationship between the target encapsulation functions.
[0351] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: in response to obtaining application service data from multiple data sources of the server via multiple application service interfaces, aggregating the input parameters and output parameters of the target encapsulation functions based on the connection relationship to obtain a first choreography result; in response to the current data content obtained from the server via multiple application service interfaces being more than the data content of the application service data, trimming the input parameters and output parameters of the target encapsulation functions based on the connection relationship to obtain a second choreography result.
[0352] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: performing access control on the interface call request by using a preset access control method, where the preset access control method includes at least one of the following: performing access authentication on the interface call request; performing traffic control on the interface call request; pre-assigning the access volume corresponding to the application service data.
[0353] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: in response to the failure of calling multiple application service interfaces, obtain a preset error code corresponding to the call failure event; based on the preset error code, search for pre-entered error information; and feedback the preset error code and the error information to the client.
[0354] Optionally, a graphical user interface is provided by a cloud device, and the content displayed by the graphical user interface at least partially includes an application service data query scenario. In this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: in response to a first control operation performed on the graphical user interface, select a target encapsulation function corresponding to an interface call request from candidate encapsulation functions, where the function elements of the target encapsulation function include: function application name, function name, function input parameters, and function output parameters; in response to a second control operation performed on the graphical user interface, determine the connection relationship between the target encapsulation functions through the interface relationships of multiple application service interfaces; in response to a third control operation performed on the graphical user interface, aggregate and / or crop the input parameters and output parameters of the target encapsulation functions based on the connection relationship to obtain an orchestration result; and display the orchestration result within the graphical user interface.
[0355] The serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.
[0356] In the above embodiments of the present application, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0357] In the several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces, and the indirect coupling or communication connection of units or modules can be in an electrical or other form.
[0358] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0359] In addition, in each embodiment of the present application, each functional unit may be integrated into one processing unit, may exist separately physically for each unit, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software functional unit.
[0360] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: various media such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs that can store program codes.
[0361] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A method for processing an interface call request, characterized in that, Including: Receiving an interface call request from a client, where the interface call request is used to request to call multiple application service interfaces of a server to obtain application service data corresponding to an application service requirement; Graphically arranging a target encapsulation function corresponding to the interface call request according to a preset interface arrangement method to obtain an arrangement result, where the preset interface arrangement method is used to graphically arrange the target encapsulation function and the connection relationship between the target encapsulation functions to obtain the application service data from the multiple application service interfaces, the target encapsulation function is used to define the interface information of the multiple application service interfaces, and the arrangement result is used to describe the processing process of obtaining the application service data by graphically arranging the target encapsulation function and the connection relationship between the target encapsulation functions; Obtaining the application service data from the multiple application service interfaces based on the arrangement result; Feeding back the application service data to the client.
2. The method according to claim 1, wherein The method further includes: Creating initial program code blocks for the multiple application service interfaces; Configuring function information for the initial program code blocks to obtain target program code blocks, where the function information is used to define at least some or all of the following information: function name, call method, server access points corresponding to the multiple application service interfaces, function description, parameter configuration; Encapsulating the target program code blocks to obtain the target encapsulation functions.
3. The method according to claim 1, wherein Graphically arranging the target encapsulation function corresponding to the interface call request according to the preset interface arrangement method to obtain the arrangement result, including: Selecting the target encapsulation function corresponding to the interface call request from candidate encapsulation functions according to the preset interface arrangement method, and determining the connection relationship between the target encapsulation functions through the interface relationship of the multiple application service interfaces; Graphically arranging the target encapsulation function and the connection relationship to obtain the arrangement result.
4. The method according to claim 3, wherein Determining the connection relationship between the target encapsulation functions through the interface relationship of the multiple application service interfaces includes: In response to the interface relationship being that there is a dependency relationship between the multiple application service interfaces, determining the connection relationship as a serial connection relationship between the target encapsulation functions; In response to the interface relationship being that there is no dependency relationship between the multiple application service interfaces, determining the connection relationship as a parallel connection relationship between the target encapsulation functions.
5. The method according to claim 3, wherein Graphically arranging the target encapsulation function and the connection relationship to obtain the arrangement result, including: In response to obtaining the application service data from multiple data sources of the server via the multiple application service interfaces, aggregating the input parameters and output parameters of the target encapsulation function based on the connection relationship to obtain a first arrangement result; In response to the current data content obtained from the server via the multiple application service interfaces being more than the data content of the application service data, cropping the input parameters and output parameters of the target encapsulation function based on the connection relationship to obtain a second arrangement result.
6. The method according to claim 1, characterized in that The method further includes: Adopt a preset access control method to perform access control on the interface call request, where the preset access control method includes at least one of the following: Perform access authentication on the interface call request; Perform traffic control on the interface call request; Pre-allocate the access volume corresponding to the application service data.
7. The method according to claim 1, characterized in that, The method further includes: In response to the failure of the calls to the multiple application service interfaces, obtain the preset error code corresponding to the call failure event; Based on the preset error code, search for the pre-entered error information; Feedback the preset error code and the error information to the client.
8. The method according to claim 1, wherein Provide a graphical user interface through a cloud device, and the content displayed by the graphical user interface at least partially includes an application service data query scenario. The method includes: In response to a first control operation performed on the graphical user interface, select the target encapsulation function corresponding to the interface call request from the candidate encapsulation functions, where the function elements of the target encapsulation function include: function application name, function name, function input parameters, and function output parameters; In response to a second control operation performed on the graphical user interface, determine the connection relationship between the target encapsulation functions through the interface relationships of the multiple application service interfaces; In response to a third control operation performed on the graphical user interface, aggregate and / or crop the input parameters and output parameters of the target encapsulation functions based on the connection relationship to obtain the orchestration result; Display the orchestration result within the graphical user interface.
9. A method for processing an interface call request, characterized in that, Include: Send an interface call request to the server, where the interface call request is used to request to call multiple application service interfaces of the server to obtain application service data corresponding to the application service requirements; Receive the application service data fed back by the server, where the application service data is obtained by the server from the multiple application service interfaces based on the orchestration result. The orchestration result is obtained by graphically orchestrating the target encapsulation functions corresponding to the interface call request according to a preset interface orchestration method. The preset interface orchestration method is used to graphically orchestrate the target encapsulation functions and the connection relationship between the target encapsulation functions to obtain the application service data from the multiple application service interfaces. The target encapsulation function is used to define the interface information of the multiple application service interfaces, and the orchestration result is used to describe the processing process of obtaining the application service data through the graphical orchestration of the target encapsulation functions and the connection relationship between the target encapsulation functions.
10. The method according to claim 9, wherein Sending the interface call request to the server includes: Send the interface call request to the server using a preset access domain name, where the preset access domain name is a pre-set unified public cloud domain name.
11. The method according to claim 10, wherein The domain name resolution result of the preset access domain name is used to map the interface call request to the server closest to the geographical location of the client that sends the interface call request.
12. The method according to claim 9, wherein The method further includes: Obtain the data packet to be synchronized from the server in the command line mode, where the data packet to be synchronized includes: the source code file to be synchronized and the code type file to be synchronized. The source code file to be synchronized is used to describe the call logic of the interface, and the code type file to be synchronized is used to describe the data type and structure of the interface; Update the local historical source code file based on the source code file to be synchronized, and update the local historical code type file based on the code type file to be synchronized.
13. The method according to claim 9, wherein The method further includes: Receive a preset error code and error message from the server, where the preset error code is obtained by the server based on the call failure events of the multiple application service interfaces, and the error message is searched based on the preset error code; Display a page indicating the failure of calling the data source service, where the display content in the page indicating the failure of calling the data source service at least includes: the preset error code and the error message.
14. The method according to claim 9, characterized in that, The method further includes: Generate a first static page in a preset static page generation manner, where the first static page includes: initial page composition information, and the initial page composition information includes a page header and a menu bar; Synchronize the first static page to the server so that when accessing the target static page through the interface call request, the initial page composition information is first rendered; After the rendering of the initial page composition information is completed, generate a second static page, where the second static page includes the remaining composition parts of the target static page except the first static page; Synchronize the second static page to the server so that the target static page is rendered on the first static page.
15. A system for processing interface call requests, characterized in that, It includes: A front-end and back-end collaborative server, which is used to receive an interface call request from a front-end and back-end collaborative client, graphically arrange the target encapsulation function corresponding to the interface call request according to a preset interface arrangement method to obtain an arrangement result, obtain application service data from multiple application service interfaces based on the arrangement result, and feed back the application service data to the front-end and back-end collaborative client; The front-end and back-end collaborative client is used to send an interface call request to the front-end and back-end collaborative server and receive the application service data fed back by the server; Among them, the interface call request is used to request to call multiple application service interfaces of the server to obtain application service data corresponding to application service requirements. The preset interface arrangement method is used to graphically arrange the target encapsulation function and the connection relationship between the target encapsulation functions to obtain the application service data from the multiple application service interfaces. The target encapsulation function is used to define the interface information of the multiple application service interfaces, and the arrangement result is used to describe the processing process of obtaining the application service data by graphically arranging the target encapsulation function and the connection relationship between the target encapsulation functions.
16. An electronic device, characterized in that, It includes: A memory storing an executable program; A processor for running the program, wherein when the program runs, it executes the method for processing an interface call request according to any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein when the executable program runs, it controls the device where the computer-readable storage medium is located to execute the method for processing an interface call request according to any one of claims 1 to 14.