Service integration method and device of low-code platform system, equipment and medium
Through the service integration method of the low-code platform system, the authentication module, entry processing and logging are used to solve the security risks, interaction inconvenience and unavailability of service integration in the prior art, and high availability and flexibility are achieved.
Patent Information
- Application Number
- CN202411142069.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2025-01-14
AI Technical Summary
The existing service integration technology lacks authentication mechanism, flexibility, reference resource monitoring and log tracking, resulting in security risks, inconvenience in interaction and unavailability of requests.
The service integration method of the low-code platform system is adopted, and the authentication is carried out through the pre-configured authentication module, the incoming and outgoing parameters are processed, the logs are recorded, and retry is made when the interface is temporarily unavailable to ensure the high availability of the request.
Improves the security, flexibility and detectability of service integration, ensuring high availability of service requests and traceability of problems.
Smart Images

Figure CN119311246A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of service integration technology, and in particular to a service integration method, device, equipment and medium for a low-code platform system. Background Art
[0002] Service integration is a service-oriented architecture design method that integrates various independent services to provide unified and efficient services. The current service integration solution has the following disadvantages:
[0003] 1. Lack of authentication mechanism: The current service integration has no authentication mechanism, and cannot directly adapt to the integrated system that requires authentication, while the directly open interface has security risks.
[0004] 2. Lack of flexibility: When interacting with various modules, the input and output parameter formats of different modules may be different. Opening a single interface cannot meet the common needs of various modules.
[0005] 3. Lack of reference resource monitoring: Service integration editors cannot identify the business that is referencing the service integration, and editing will cause business unavailability.
[0006] 4. Lack of log tracking: Currently, there is no log recording and the problem cannot be traced.
[0007] 5. Lack of retry mechanism: When the open interface is temporarily unavailable, high availability of service requests cannot be guaranteed. Summary of the invention
[0008] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide a service integration method, device, equipment and medium for a low-code platform system.
[0009] The purpose of the present invention can be achieved by the following technical solutions:
[0010] According to a first aspect of the present invention, a service integration method for a low-code platform system is provided, the method comprising the following steps:
[0011] Get the execution actions of different service requesters;
[0012] Authenticate the requester through a pre-configured authentication module;
[0013] If the authentication is successful, the input parameters are processed based on the first code block and integrated into the actual input parameters for executing the action;
[0014] The service request is executed according to the actual input parameters and authentication information, and the output parameters after the execution of the request are processed based on the second code block to generate the parameter format required by the service requester.
[0015] As a preferred technical solution, the authentication scheme configured by the authentication module includes ApiKey authentication, Token authentication, and BasicAuth authentication.
[0016] As a preferred technical solution, the authentication module stores the authorization key in a thread variable and calls the corresponding authentication module according to the thread variable.
[0017] As a preferred technical solution, the thread variable is provided with a variable validity period. During the validity period, the authorization key stored therein is directly called to execute the service request without calling the authentication module again. When the validity period is exceeded, the thread variable is reset.
[0018] As a preferred technical solution, if the execution of the service request fails, a retry is performed according to a preset retry strategy and a log record is generated.
[0019] As a preferred technical solution, the first code block and the second code block correspond to the execution actions one by one, and the integration of different execution actions is achieved by configuring multiple code blocks for one interface.
[0020] As a preferred technical solution, the method described records the service request URL, request protocol, and input and output parameter data of the request at each request.
[0021] According to a second aspect of the present invention, a service integration device of a low-code platform system is provided, comprising:
[0022] The request acquisition module is used to obtain the execution actions of different service requesters;
[0023] An authentication module is used to authenticate the requester through a pre-configured authentication module;
[0024] The input parameter processing module processes the input parameters based on the first code block and integrates them into the actual input parameters for executing the action if the authentication module passes the authentication;
[0025] The output parameter processing module is used to execute the service request according to the actual input parameters and authentication information, and process the output parameters after executing the request based on the second code block to generate the parameter format required by the service requester.
[0026] According to a third aspect of the present invention, there is provided an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the method described above is implemented when the processor executes the program.
[0027] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the program implements the method described when executed by a processor.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] 1. Security: In the present invention, the service open interface that needs to be integrated can configure the authentication module according to the corresponding authentication mode, and requests that do not meet the authentication conditions cannot pass the verification, so as to improve security.
[0030] 2. Flexibility: In the present invention, the same function does not need to open multiple interfaces for different modules. Only one interface needs to be opened, and the actual input parameters are adapted to different modules through code blocks; at the same time, the output parameters are set through the code blocks to adapt to different business needs through one interface.
[0031] 3. Detectability: By recording request information and log records, the impact of the service integration editing can be controlled, and the source of the problem can be traced with specific data support.
[0032] 4. High availability: A corresponding retry strategy can be formulated based on the stability of the target system to ensure high availability of service requests when the interface is temporarily unavailable. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 The present invention is a flow chart of the method. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0035] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0036] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent.
[0037] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0038] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0039] This embodiment provides a service integration method for a low-code platform system, such as Figure 1 As shown, the method comprises the following steps:
[0040] S401, obtaining execution actions of different service requesters;
[0041] S402, authenticating the requester through a pre-configured authentication module;
[0042] If the authentication is successful in step S403, then step S404 is executed. If the authentication fails, then the process ends directly.
[0043] S404, processing the input parameters based on the first code block and integrating them into actual input parameters for executing the action;
[0044] S405, executing the service request according to the actual input parameters and authentication information;
[0045] S406, if the service request fails to be executed, a retry is performed according to a preset retry strategy, and a log record is generated;
[0046] S407: Process the output parameters after executing the request based on the second code block to generate the parameter format required by the service requester.
[0047] In this embodiment, the authentication module can be used to configure an overall authorization scheme for an entire service integration. The configurable authentication schemes include but are not limited to ApiKey authentication, Token authentication, and BasicAuth authentication. One of the authentication schemes is selected for configuration according to the user's actual usage scenario.
[0048] In a preferred embodiment, the authentication module stores the authorization key in a thread variable, and calls the corresponding authentication module for authentication according to the thread variable. The thread variable is provided with a variable validity period, and the authorization key stored therein is directly called to execute the service request within the validity period without calling the authentication module again. When the validity period is exceeded, the thread variable is reset.
[0049] The first code block and the second code block correspond to the execution action one by one, and the integration of different execution actions is realized by configuring multiple code blocks for one interface. In one embodiment, the first code block uses Python3 code to output a JSON format data to enter step S405 to execute the service request.
[0050] In step S406, the retry policy is set to retry every 5 minutes, and the maximum number of retries is set to 5 times. In the most extreme case, a request is initiated every five minutes. If the request still fails after five requests, the request is discarded and the process ends.
[0051] In step S407, the service request URL, request protocol, and input and output parameter data of the request are recorded each time a request is made for subsequent reference.
[0052] The above is an introduction to a method embodiment. The following is a further explanation of the solution of the present invention through an apparatus embodiment.
[0053] A service integration device of a low-code platform system, comprising:
[0054] The request acquisition module is used to obtain the execution actions of different service requesters;
[0055] An authentication module is used to authenticate the requester through a pre-configured authentication module;
[0056] The input parameter processing module processes the input parameters based on the first code block and integrates them into the actual input parameters for executing the action if the authentication module passes the authentication;
[0057] The output parameter processing module is used to execute the service request according to the actual input parameters and authentication information, and process the output parameters after executing the request based on the second code block to generate the parameter format required by the service requester.
[0058] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0059] The electronic device of the present invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The CPU, ROM and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0060] Multiple components in the device are connected to the I / O interface, including: input units, such as keyboards, mice, etc.; output units, such as various types of displays, speakers, etc.; storage units, such as disks, optical disks, etc.; and communication units, such as network cards, modems, wireless communication transceivers, etc. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunication networks.
[0061] The processing unit performs the various methods and processes described above, such as methods S401 to S407. For example, in some embodiments, methods S401 to S407 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via a ROM and / or a communication unit. When the computer program is loaded into the RAM and executed by the CPU, one or more steps of methods S401 to S407 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S401 to S407 in any other appropriate manner (e.g., by means of firmware).
[0062] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0063] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0064] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0065] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A service integration method for a low-code platform system, characterized in that: The method comprises the following steps: Get the execution actions of different service requesters; Authenticate the requester through a pre-configured authentication module; If the authentication is successful, the input parameters are processed based on the first code block and integrated into the actual input parameters for executing the action; The service request is executed according to the actual input parameters and authentication information, and the output parameters after the execution of the request are processed based on the second code block to generate the parameter format required by the service requester.
2. A service integration method for a low-code platform system according to claim 1, characterized in that: The authentication schemes configured by the authentication module include ApiKey authentication, Token authentication, and BasicAuth authentication.
3. A service integration method for a low-code platform system according to claim 1, characterized in that: The authentication module stores the authorization key in a thread variable and calls the corresponding authentication module according to the thread variable.
4. A service integration method for a low-code platform system according to claim 3, characterized in that: The thread variable is provided with a variable validity period. During the validity period, the authorization key stored therein is directly called to execute the service request without calling the authentication module again. When the validity period is exceeded, the thread variable is reset.
5. The service integration method of a low-code platform system according to claim 1, characterized in that: If the service request fails to execute, it will be retried according to the preset retry strategy and a log record will be generated.
6. A service integration method for a low-code platform system according to claim 1, characterized in that: The first code block and the second code block correspond to the execution actions one by one, and the integration of different execution actions is achieved by configuring multiple code blocks for one interface.
7. A service integration method for a low-code platform system according to claim 1, characterized in that: The method described records the service request URL, request protocol, and input and output parameter data of the request at each request.
8. A service integration device for a low-code platform system, characterized in that: include: The request acquisition module is used to obtain the execution actions of different service requesters; An authentication module is used to authenticate the requester through a pre-configured authentication module; The input parameter processing module processes the input parameters based on the first code block and integrates them into the actual input parameters for executing the action if the authentication module passes the authentication. The output parameter processing module is used to execute the service request according to the actual input parameters and authentication information, and process the output parameters after executing the request based on the second code block to generate the parameter format required by the service requester.
9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.