A method, apparatus, and computer device for abstracting a service integration process.

By configuring and caching API service data in enterprise systems, and using the unified ESB facade entry and the unique identifier of the target service for data mapping and routing, the management challenges of traditional ESB and API gateways in legacy and heterogeneous systems are solved, improving the efficiency of service integration and simplifying the API call process.

CN114153626BActive Publication Date: 2025-12-02SHENZHEN KINGDEE MIDDLEWARE
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111277479.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2025-12-02
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

In enterprise systems, legacy systems, and heterogeneous systems, traditional ESB and API gateways struggle to effectively manage service integration, leading to complex business logic and low implementation efficiency.

Method used

By acquiring target API service data for configuration and caching, using the ESB unified facade entry and the target service's unique identifier for routing, finding the target protocol and mapping relationship, completing data mapping, and sending requests through the protocol client to realize API calls.

Benefits of technology

It reduces business logic in the designer, improves the reusability and implementation efficiency of the service integration process, and simplifies the API interface call process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114153626B_ABST
    Figure CN114153626B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, computer device, and storage medium for abstracting a service integration process. The method includes: acquiring target API service data; configuring and caching the target API service data; receiving a client API call request; parsing the call request to obtain a unique identifier for the target service; when the call request passes through an ESB unified facade entry point, it is routed to the target API using the unique identifier for the target service; finding the target protocol, target protocol information, and mapping relationship in the cached target data using the unique identifier for the target service; completing data mapping using the mapping relationship; storing the mapped data in the target protocol; creating a corresponding protocol client using the target service protocol information; and sending a request through the protocol client to complete the API call. This method can reduce business logic in the designer, thereby improving implementation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication technology, and in particular to a method, apparatus, computer device, and storage medium for abstracting a service integration process. Background Technology

[0002] With the development of network communication technology, the exchange of business data between enterprises has become increasingly important. Typically, enterprises expose their core business to third-party applications and partners via APIs (Application Programming Interfaces) to jointly fulfill diverse service needs. As enterprises expand their business and the number of service providers and consumers increases, effective management of these services becomes crucial when using these APIs, rather than simply a one-time, customized interface between two systems. To address these needs, enterprises generally employ ESB (Enterprise Service Bus) or API gateways to achieve data integration, service integration, service management, and service monitoring.

[0003] With the development and standardization of the internet, the API interfaces provided by enterprise systems are becoming increasingly standardized. For example, the currently popular REST (Representational State Transfer) style APIs, because they share the same protocol and specifications during integration, do not require mapping, protocol conversion, service routing, or business logic modification. This allows them to focus on API management aspects such as API authorization, traffic control, circuit breaking, and load balancing, abandoning the original SOA (Service-Oriented Architecture) specifications and leading to the development of API gateway products.

[0004] However, many enterprise scenarios, such as legacy systems and heterogeneous systems, are not suitable for API gateways and require ESBs to handle enterprise service integration. Traditional ESBs and API gateways both use adapter or proxy patterns to mediate and manage service integration. Summary of the Invention

[0005] Therefore, it is necessary to provide a method, apparatus, computer equipment, and storage medium for abstracting the service integration process to address the aforementioned technical problems, thereby reducing business logic in the designer and improving implementation efficiency.

[0006] A method for abstracting a service integration process, the method comprising:

[0007] Obtain the target API service data, and configure and cache the target API service data.

[0008] Upon receiving a client API call request, the call request is parsed to obtain the unique identifier of the target service. When the call request passes through the ESB unified facade entry point, it is routed to the target API through the unique identifier of the target service.

[0009] The target protocol, target protocol information, and mapping relationship are found in the cached target data using the unique identifier of the target service, and the data mapping is completed using the mapping relationship.

[0010] The mapped data is stored in the target protocol, and a corresponding protocol client is created using the target service protocol information. Requests are sent through the protocol client to complete the API call.

[0011] In one embodiment, after obtaining the target API service data and configuring and caching the target API service data, the method further includes:

[0012] Differentiate between protocol types and publish a unified API entry point for each type of protocol. The unified API entry point is the unified facade entry point of the ESB.

[0013] By identifying different business APIs through service call relationships, the unified ESB facade entry point is connected to each API.

[0014] APIs are interconnected to form a network.

[0015] In one embodiment, the process of receiving a client API call request, parsing the call request to obtain a unique identifier for the target service, and routing the call request to the target API via the unique identifier for the target service after passing through the ESB unified facade entry point, further includes:

[0016] The target protocol is found in the cached target data using the target service unique identifier, which corresponds to a specific protocol type.

[0017] According to the type of the protocol, locate the position where the parameters are stored in the protocol memory and extract the parameters.

[0018] According to the preset business requirements, the parameters are stored in the new protocol parameter storage location to complete the protocol conversion.

[0019] In one embodiment, obtaining the target API service data and configuring and caching the target API service data includes:

[0020] The target API service data is service encoded.

[0021] Determine the service address and target protocol type of the target API service data.

[0022] Cache the target API service data.

[0023] In one embodiment, finding the target protocol, target protocol information, and mapping relationship in the cached target data using the unique identifier of the target service, and completing the data mapping using the mapping relationship includes:

[0024] Read the unique identifier of the target service.

[0025] The target protocol, target protocol information, and mapping relationship information in the cache are compared with the unique identifier of the target service.

[0026] Extract the target protocol, target protocol information, and mapping relationship after comparison and matching, and map the target API service data to preset business requirement data according to the mapping relationship.

[0027] In one embodiment, storing the mapped data in the target protocol, creating a corresponding protocol client using the target service protocol information, and sending a request through the protocol client to complete the API call includes:

[0028] The mapped data is stored in the parameters of the target protocol.

[0029] Extract the address from the target protocol information, create a corresponding protocol client using the address, and send a request through the protocol client to complete the API call.

[0030] In one embodiment, after obtaining the mapping relationship between the target service data and the corresponding cached data through the service unique identifier and the corresponding API, and completing the data mapping, the method further includes:

[0031] The logs for each step of completing the API call are extracted separately and formed into a unified log record;

[0032] Store the log records.

[0033] An apparatus for abstracting a service integration process, the apparatus comprising:

[0034] The acquisition module is used to acquire target API service data, and to configure and cache the target API service data.

[0035] The receiving module is used to receive client API call requests, parse the call requests to obtain the unique identifier of the target service, and when the call request passes through the ESB unified facade entry point, it is routed to the target API through the unique identifier of the target service.

[0036] The mapping module is used to find the target protocol, target protocol information and mapping relationship in the cached target data through the unique identifier of the target service, and to complete the data mapping using the mapping relationship.

[0037] The sending module is used to store the mapped data in the target protocol, create a corresponding protocol client using the target service protocol information, and send requests through the protocol client to complete the API call.

[0038] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:

[0039] Obtain the target API service data, and configure and cache the target API service data.

[0040] Upon receiving a client API call request, the call request is parsed to obtain the unique identifier of the target service. When the call request passes through the ESB unified facade entry point, it is routed to the target API through the unique identifier of the target service.

[0041] The target protocol, target protocol information, and mapping relationship are found in the cached target data using the unique identifier of the target service, and the data mapping is completed using the mapping relationship.

[0042] The mapped data is stored in the target protocol, and a corresponding protocol client is created using the target service protocol information. Requests are sent through the protocol client to complete the API call.

[0043] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0044] Obtain the target API service data, and configure and cache the target API service data.

[0045] Upon receiving a client API call request, the call request is parsed to obtain the unique identifier of the target service. When the call request passes through the ESB unified facade entry point, it is routed to the target API through the unique identifier of the target service.

[0046] The target protocol, target protocol information, and mapping relationship are found in the cached target data using the unique identifier of the target service, and the data mapping is completed using the mapping relationship.

[0047] The mapped data is stored in the target protocol, and a corresponding protocol client is created using the target service protocol information. Requests are sent through the protocol client to complete the API call.

[0048] The aforementioned method, apparatus, computer equipment, and storage medium for abstracting the service integration process first acquire target API service data and configure and cache it. Then, upon receiving a client API call request, the request is parsed to obtain a unique identifier for the target service. When the call request passes through the ESB unified facade entry point, it is routed to the target API using the unique identifier. Next, the target protocol, target protocol information, and mapping relationship are found in the cached target data using the unique identifier, and the mapping relationship is used to complete the data mapping. Finally, the mapped data is stored in the target protocol, and a corresponding protocol client is created using the target service protocol information. The request is sent through the protocol client to complete the API call. This method transforms API services of different business types within the same protocol category from independent one-to-one encapsulation proxies into a unified facade entry point, improving the reusability of the integration process. Furthermore, it replaces the static API interface call process in the ESB designer, which requires branching and judgment logic, with dynamic routing calls through a unified entry point, reducing business logic in the designer and thus improving implementation efficiency. Attached Figure Description

[0049] Figure 1 An application environment diagram for an abstract method of a service integration process in one embodiment;

[0050] Figure 2 This is a flowchart illustrating a method for abstracting a service integration process in one embodiment.

[0051] Figure 3 This is a flowchart illustrating the steps following the acquisition of target API service data, configuration, and caching of the target API service data in one embodiment.

[0052] Figure 4 This is a flowchart illustrating the steps following routing to the target API using the unique identifier of the target service in one embodiment.

[0053] Figure 5 This is a flowchart illustrating the steps of obtaining target API service data, configuring and caching the target API service data in one embodiment.

[0054] Figure 6 This is a flowchart illustrating the steps involved in completing data mapping using mapping relationships in one embodiment.

[0055] Figure 7 This is a flowchart illustrating the steps involved in completing an API call in one embodiment.

[0056] Figure 8 This is a flowchart illustrating the steps following data mapping in one embodiment;

[0057] Figure 9 A structural block diagram of an apparatus for abstracting a service integration process in one embodiment;

[0058] Figure 10 This is a schematic diagram of a specific embodiment;

[0059] Figure 11 This is a schematic diagram of another specific embodiment;

[0060] Figure 12 This is a schematic diagram of another specific embodiment;

[0061] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0063] This application provides a method for abstracting the service integration process, which can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. Server 104 obtains target API service data, configures and caches the target API service data, receives client API call requests, parses the call requests to obtain a unique identifier for the target service, and routes the call request to the target API through the unique identifier of the target service when it passes through the ESB unified facade entry point. Using the unique identifier of the target service, server 104 finds the target protocol, target protocol information, and mapping relationship in the cached target data, and completes the data mapping using the mapping relationship. The mapped data is stored in the target protocol, and a corresponding protocol client is created using the target service protocol information. The request is sent through the protocol client to complete the API call. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0064] In one embodiment, such as Figure 2 As shown, a method for abstracting the service integration process is provided, which can be applied to... Figure 1 Taking the server in the example, the following steps are included:

[0065] Step 202: Obtain the target API service data, and configure and cache the target API service data.

[0066] Among them, target API service data refers to data such as the field mapping relationship between the messages sent by the integrated system, API service, and client, API service input parameter messages, client messages and server messages.

[0067] Specifically, the server obtains the target API service data, configures the target API service data, and then caches the target API service data.

[0068] Step 204: Receive the client API call request, parse the call request to obtain the unique identifier of the target service, and when the call request passes through the ESB unified facade entry point, it is routed to the target API through the unique identifier of the target service.

[0069] Among them, the ESB unified facade entry point refers to publishing a unified API entry point for each protocol through the facade pattern.

[0070] Specifically, when the server receives a client API call request, it parses the request to obtain the unique identifier of the target service. When the call request passes through the ESB unified facade entry point, it can be routed to the target API and retrieve cached data using the unique identifier of the target service.

[0071] Step 206: Find the target protocol, target protocol information and mapping relationship in the cached target data through the unique identifier of the target service, and complete the data mapping using the mapping relationship.

[0072] The target protocol can be HTTP, WEBSERVICE, EJB, MQ, etc.

[0073] Specifically, the server finds the target protocol, target protocol information, and mapping relationship in the cached target data through the unique identifier of the target service, and then uses the mapping relationship to complete the data mapping.

[0074] Step 208: Store the mapped data in the target protocol, create a corresponding protocol client using the target service protocol information, and send a request through the protocol client to complete the API call.

[0075] The corresponding protocol client refers to the protocol client created using the address information in the target service protocol.

[0076] Specifically, the server stores the mapped data in the target protocol, creates a corresponding protocol client using the target service protocol information, and sends a request through the protocol client to complete the API call.

[0077] The above-described method, apparatus, computer equipment, and storage medium for abstracting the service integration process involve: acquiring target API service data; configuring and caching the target API service data; receiving a client API call request; parsing the call request to obtain a unique identifier for the target service; routing the call request to the target API through the unique identifier of the target service when it passes through the ESB unified facade entry point; finding the target protocol, target protocol information, and mapping relationship in the cached target data using the unique identifier of the target service; completing the data mapping using the mapping relationship; storing the mapped data in the target protocol; creating a corresponding protocol client using the target service protocol information; and sending the request through the protocol client to complete the API call. This method can reduce the business logic in the designer, thereby improving implementation efficiency.

[0078] In one embodiment, such as Figure 3 As shown, after obtaining the target API service data and configuring and caching the target API service data, the process further includes:

[0079] Step 302: Differentiate between protocol types and publish a unified API entry point for each type of protocol. The unified API entry point is the unified facade entry point of the ESB.

[0080] Specifically, the server distinguishes between protocol types and publishes a unified API entry point for each type of protocol. This unified API entry point is the ESB unified facade entry point. For example, the server publishes a unified API entry point for each of the protocols such as HTTP, WEBSERVICE, EJB, and MQ through the facade pattern to adapt to different protocol access. These interfaces are the entry point for all client requests.

[0081] Step 304: Locate different business APIs through service call relationships, and connect the ESB unified facade entry to each API.

[0082] Here, "business API" refers to the API corresponding to a specific business function. "Call relationship" refers to the relationship between the server and the terminal involved in calling the API.

[0083] Specifically, the server finds different business APIs through service call relationships and connects the unified ESB facade entry point to each API.

[0084] Step 306: The APIs are interconnected to form a network.

[0085] Specifically, the server connects each API to the others, forming a mesh structure.

[0086] In this embodiment, by differentiating protocol types, issuing a unified API entry point for each protocol, and interconnecting the APIs, the goal of reducing the number of designers can be achieved.

[0087] In one embodiment, such as Figure 4 As shown, the process of receiving a client API call request, parsing the call request to obtain the unique identifier of the target service, and routing the call request to the target API through the unique identifier of the target service after passing through the ESB unified facade entry point, further includes:

[0088] Step 402: Find the target protocol in the cached target data using the target service unique identifier, where the target service unique identifier corresponds to a specific protocol type.

[0089] In this context, "target service unique identifier corresponds to a specific protocol type" means that the target service unique identifier can only correspond to one protocol type at any given time, and cannot correspond to multiple protocol types simultaneously. For example, if the target service unique identifier currently corresponds to the HTTP protocol, then it cannot correspond to other types of protocols.

[0090] Specifically, the server uses the unique identifier of the target service to find the target protocol in the cached target data. The target protocol contains information that matches the unique identifier of the target service. When the unique identifier of the target service and the matching information match, the target protocol can be found and confirmed.

[0091] Step 404: According to the type of the protocol, locate the position where the parameters are stored in the protocol memory and extract the parameters.

[0092] The location of parameters in different protocols is not fixed; they can be anywhere within the protocol. Parameters refer to specific data or data relationships, etc.

[0093] Specifically, the server identifies the location of parameters based on the protocol type. Once the parameter is identified, it extracts the parameter from that location. Extracting parameters means retrieving the data or data relationships from the server.

[0094] Step 406: According to the preset business requirements, store the parameters in the new protocol parameter storage location to complete the protocol conversion.

[0095] Among them, the preset business requirements refer to the business requirements corresponding to the API, which in this case refers to the business requirements corresponding to the new protocol.

[0096] Specifically, the preset business requirements correspond to the API's business requirements. The server retrieves the content of these preset business requirements, and then the extracted parameters are placed in the new protocol parameter storage location. This step is the reverse of the previous step; the purpose of extracting the parameters in the previous step is to place them in the new protocol in this step, thus completing the protocol conversion.

[0097] In this embodiment, the target protocol is found in the cached target data by using the unique identifier of the target service. Then, according to the type of the protocol, the location where the parameters are stored in the protocol memory is found and the parameters are extracted. Finally, according to the preset business requirements, the parameters are stored in the new protocol parameter storage location to complete the protocol conversion, which can improve the efficiency of protocol conversion.

[0098] In one embodiment, such as Figure 5 As shown, the steps of obtaining target API service data and configuring and caching the target API service data include:

[0099] Step 502: Perform service encoding on the target API service data.

[0100] Here, the service code refers to the unique identifier of the target API service data. For example, the identifier can be encoded as fwbm03, which is used to distinguish different API service data in subsequent steps.

[0101] Specifically, the server distinguishes service codes based on protocol type and uses them as the header of the encoding, then uses numbers to indicate the frequency, which is intuitive and not confusing. For example, the target API service data is service-coded as fwbm03, where fwbm represents a protocol type and 03 represents the frequency.

[0102] Step 504: Determine the service address and target protocol type of the target API service data.

[0103] The service address refers to the API address. For example, under the HTTP protocol, the API address could be http: / / ip / save or http: / / ip / del, etc. The target protocol type can be any type of protocol, such as HTTP, WEBSERVICE, EJB, MQ, etc.

[0104] Specifically, the server obtains the encoded target API service data, finds the service address and target protocol type of the target API service data, and then determines the found results for subsequent caching and other purposes.

[0105] Step 506: Cache the target API service data.

[0106] Cache refers to temporary storage, which is different from saving.

[0107] Specifically, after the server obtains the service address and service type of the target API service data, it caches the target API service data for subsequent data mapping and other operations.

[0108] In this embodiment, by obtaining the target API service data and then configuring and caching the target API service data, the service address and type of the target service data can be determined.

[0109] In one embodiment, such as Figure 6 As shown, the step of finding the target protocol, target protocol information, and mapping relationship in the cached target data using the unique identifier of the target service, and completing the data mapping using the mapping relationship, includes:

[0110] Step 602: Read the unique identifier of the target service.

[0111] Specifically, the unique identifier of the target service is a tag. The server first needs to read the tag to confirm its correctness.

[0112] Step 604: Compare the target protocol, target protocol information, and mapping relationship information in the cache with the unique identifier of the target service.

[0113] Among them, comparison refers to comparing information. When the information is consistent or can be matched, the comparison process is completed.

[0114] Specifically, since the target protocol, target protocol information, and mapping relationship information are in the cache, the server needs to retrieve this information from the cache and then compare it with the unique identifier of the target service.

[0115] Step 606: Extract the target protocol, target protocol information and mapping relationship after comparison and matching, and map the target API service data to preset business requirement data according to the mapping relationship.

[0116] In this context, mapping relationships refer to the inherent logical connections that transform data from one form to another. For example, object-relational mapping is used to convert data between different types of systems in object-oriented programming languages. Another example is database data mapping, where data is mapped to another form through logical relationships between data.

[0117] Specifically, when the comparison result shows that the information is consistent or matches, the server begins to extract the target protocol, target protocol information, and mapping relationship after the comparison. Then, based on the mapping relationship, the target API service data is mapped to preset business requirement data.

[0118] In this embodiment, the target protocol, target protocol information, and mapping relationship are found in the cached target data by using the unique identifier of the target service. The data mapping is then completed using the mapping relationship, which can improve the efficiency of data mapping.

[0119] In one embodiment, such as Figure 7 As shown, the steps of storing the mapped data in the target protocol, creating a corresponding protocol client using the target service protocol information, and sending requests through the protocol client to complete the API call include:

[0120] Step 702: Store the mapped data into the parameters of the target protocol;

[0121] Specifically, the mapped data represents pre-defined business requirements, which need to be placed within a protocol related to those requirements. Therefore, the server stores the mapped data in the parameters of the target protocol, where the parameters refer to the data and data relationships within the target protocol.

[0122] Step 704: Extract the address from the target protocol information, create a corresponding protocol client using the address, and send a request through the protocol client to complete the API call.

[0123] Specifically, creating a protocol client is primarily accomplished through an address. Therefore, the server needs to first extract the address from the target protocol information and then use that address to create the corresponding protocol client. A successful API call is indicated by sending a request through the protocol client; therefore, the server needs to send a request through the protocol client to complete the API call.

[0124] In this embodiment, by storing the mapped data in the target protocol, creating a corresponding protocol client using the target service protocol information, and sending requests through the protocol client to complete API calls, the business logic in the designer can be reduced.

[0125] In one embodiment, such as Figure 8 As shown, after obtaining the mapping relationship between the target service data and the corresponding cached data through the service unique identifier and the corresponding API, and completing the data mapping, the method further includes:

[0126] Step 802: Extract the logs for each step of the API call and form a unified log record.

[0127] Log recording refers to the running records generated by programs and applications after each running step. These records contain information such as running status and parameter changes.

[0128] Specifically, the server extracts the logs for each step of the API call and forms a unified log record. Each step of the API call, including all links and steps, will have its generated log records presented here in a unified manner.

[0129] Step 804: Store the log records.

[0130] Specifically, the server stores the log records for easy access at any time.

[0131] In this embodiment, the method of generating log records makes it easy to find log records.

[0132] It should be understood that, although Figure 1-8 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1-8 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.

[0133] In one embodiment, such as Figure 9 As shown, an apparatus for abstracting the service integration process is provided, including: an acquisition module, a receiving module, a mapping module, and a sending module, wherein:

[0134] The acquisition module is used to acquire target API service data, and to configure and cache the target API service data;

[0135] The receiving module is used to receive client API call requests, parse the call requests to obtain the unique identifier of the target service, and when the call request passes through the ESB unified facade entry, it is routed to the target API through the unique identifier of the target service.

[0136] The mapping module is used to find the target protocol, target protocol information and mapping relationship in the cached target data through the unique identifier of the target service, and to complete the data mapping using the mapping relationship;

[0137] The sending module is used to store the mapped data in the target protocol, create a corresponding protocol client using the target service protocol information, and send requests through the protocol client to complete the API call.

[0138] In one embodiment, such as Figure 9As shown, the apparatus that provides an abstraction of the service integration process also includes:

[0139] The publishing module is used to distinguish protocol types and publish a unified API entry for each type of protocol. The unified API entry is the unified facade entry of the ESB.

[0140] The connection module is used to find different business APIs through service call relationships and connect the unified facade entry of the ESB to each API.

[0141] The interconnect module is used to interconnect APIs to form a network.

[0142] In one embodiment, such as Figure 9 As shown, the apparatus that provides an abstraction of the service integration process also includes:

[0143] The first lookup module is used to find the target protocol in the cached target data through the target service unique identifier, wherein the target service unique identifier corresponds to a specific protocol type;

[0144] The second search module is used to locate the position of the parameters stored in the protocol memory according to the type of the protocol and extract the parameters.

[0145] The conversion module is used to store the parameters to the new protocol parameter storage location according to preset business requirements, thereby completing the protocol conversion.

[0146] In one embodiment, such as Figure 9 As shown, the apparatus that provides an abstraction of the service integration process also includes:

[0147] The encoding module is used to perform service encoding on the target API service data;

[0148] The confirmation module is used to determine the service address and target protocol type of the target API service data;

[0149] The caching module is used to cache the target API service data.

[0150] In one embodiment, such as Figure 9 As shown, the apparatus that provides an abstraction of the service integration process also includes:

[0151] The reading module is used to read the unique identifier of the target service;

[0152] The comparison module is used to compare the target protocol, target protocol information, and mapping relationship information in the cache with the unique identifier of the target service;

[0153] The extraction module is used to extract the target protocol, target protocol information and mapping relationship after comparison and matching, and to map the target API service data to preset business requirement data according to the mapping relationship.

[0154] In one embodiment, such as Figure 9 As shown, the apparatus that provides an abstraction of the service integration process also includes:

[0155] The first storage module is used to store the mapped data into the parameters of the target protocol;

[0156] A module is created to extract the address from the target protocol information, create a corresponding protocol client using the address, and send a request through the protocol client to complete the API call.

[0157] In one embodiment, such as Figure 9 As shown, the apparatus that provides an abstraction of the service integration process also includes:

[0158] The logging module is used to extract the logs for each step of completing the API call and form a unified log record.

[0159] The second storage module is used to store the log records.

[0160] In one specific embodiment, such as Figure 10 As shown, the ESB / API system acquires target API service data, configures and caches the target API service data; then, upon receiving a client API call request, it parses the call request to obtain the unique identifier of the target service. When the call request passes through the ESB unified facade entry point, it is routed to the target API through the unique identifier of the target service; then, using the unique identifier of the target service, it finds the target protocol, target protocol information, and mapping relationship in the cached target data, and completes the data mapping using the mapping relationship; finally, it stores the mapped data in the target protocol, creates a corresponding protocol client using the target service protocol information, and sends a request through the protocol client to complete the API call. Specifically, the client initiates a request call to the HTTP unified interface provided by the ESB, passing in the unique identifier of the API call as a parameter. For example, the HTTP protocol can add request parameters to `params` or `headers`. The client accesses the ESB / API system unified entry point using the format `http:ip:port?API_identifier=OA.getUser`.

[0161] In one specific embodiment, such as Figure 11As shown, the ESB / API system distinguishes between protocol types and publishes a unified API entry point for each type of protocol. This unified API entry point is the ESB unified facade entry point. Then, through service call relationships, different business APIs are found, and the ESB unified facade entry point is connected to each API. Finally, the APIs are interconnected to form a network. For example, terminal 1, terminal 2, and terminal 3 can find their corresponding APIs through the unified facade entry point. APIs 1, 2, 3, and 4 are not only connected to the unified facade entry point but are also interconnected with each other.

[0162] In one specific embodiment, such as Figure 12 As shown, the ESB / API system reads the unique identifier of the target service; then it compares the target protocol, target protocol information, and mapping relationship information in the cache with the unique identifier of the target service; finally, it extracts the matched target protocol, target protocol information, and mapping relationship, and maps the target API service data to preset business requirement data according to the mapping relationship. For example, when a client sends a message "name: Zhang San, age: 20" to the ESB / API system, the ESB / API system obtains the data mapping relationship between the client and the target service based on the API and system unique identifiers and completes the mapping. Specifically, "name" is mapped to "name", "age" is mapped to "age", and "default value 1" is mapped to "status 1". The message after mapping by the ESB / API system is "name: Zhang San, age: 20, status: 1" and is sent to the API server.

[0163] For specific limitations regarding the apparatus for abstracting a service integration process, please refer to the limitations regarding the method for abstracting a service integration process described above, and will not be repeated here. Each module in the aforementioned apparatus for abstracting a service integration process can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can invoke and execute the operations corresponding to each module.

[0164] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 13As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data for a service integration process abstraction. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for a service integration process abstraction.

[0165] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0166] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0167] Obtain the target API service data, and configure and cache the target API service data.

[0168] Upon receiving a client API call request, the call request is parsed to obtain the unique identifier of the target service. When the call request passes through the ESB unified facade entry point, it is routed to the target API through the unique identifier of the target service.

[0169] The target protocol, target protocol information, and mapping relationship are found in the cached target data using the unique identifier of the target service, and the data mapping is completed using the mapping relationship.

[0170] The mapped data is stored in the target protocol, and a corresponding protocol client is created using the target service protocol information. Requests are sent through the protocol client to complete the API call.

[0171] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0172] Differentiate between protocol types and publish a unified API entry point for each type of protocol. The unified API entry point is the unified facade entry point of the ESB.

[0173] By identifying different business APIs through service call relationships, the unified ESB facade entry point is connected to each API.

[0174] APIs are interconnected to form a network.

[0175] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0176] The target protocol is found in the cached target data using the target service unique identifier, which corresponds to a specific protocol type.

[0177] According to the type of the protocol, locate the position where the parameters are stored in the protocol memory and extract the parameters.

[0178] According to the preset business requirements, the parameters are stored in the new protocol parameter storage location to complete the protocol conversion.

[0179] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0180] The target API service data is service encoded.

[0181] Determine the service address and target protocol type of the target API service data.

[0182] Cache the target API service data.

[0183] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0184] Read the unique identifier of the target service.

[0185] The target protocol, target protocol information, and mapping relationship information in the cache are compared with the unique identifier of the target service.

[0186] Extract the target protocol, target protocol information, and mapping relationship after comparison and matching, and map the target API service data to preset business requirement data according to the mapping relationship.

[0187] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0188] The mapped data is stored in the parameters of the target protocol.

[0189] Extract the address from the target protocol information, create a corresponding protocol client using the address, and send a request through the protocol client to complete the API call.

[0190] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0191] The logs for each step of the API call are extracted separately and then compiled into a unified log record.

[0192] Store the log records.

[0193] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0194] Obtain the target API service data, and configure and cache the target API service data.

[0195] Upon receiving a client API call request, the call request is parsed to obtain the unique identifier of the target service. When the call request passes through the ESB unified facade entry point, it is routed to the target API through the unique identifier of the target service.

[0196] The target protocol, target protocol information, and mapping relationship are found in the cached target data using the unique identifier of the target service, and the data mapping is completed using the mapping relationship.

[0197] The mapped data is stored in the target protocol, and a corresponding protocol client is created using the target service protocol information. Requests are sent through the protocol client to complete the API call.

[0198] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0199] Differentiate between protocol types and publish a unified API entry point for each type of protocol. The unified API entry point is the unified facade entry point of the ESB.

[0200] By identifying different business APIs through service call relationships, the unified ESB facade entry point is connected to each API.

[0201] APIs are interconnected to form a network.

[0202] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0203] The target protocol is found in the cached target data using the target service unique identifier, which corresponds to a specific protocol type.

[0204] According to the type of the protocol, locate the position where the parameters are stored in the protocol memory and extract the parameters.

[0205] According to the preset business requirements, the parameters are stored in the new protocol parameter storage location to complete the protocol conversion.

[0206] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0207] The target API service data is service encoded.

[0208] Determine the service address and target protocol type of the target API service data.

[0209] Cache the target API service data.

[0210] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0211] Read the unique identifier of the target service.

[0212] The target protocol, target protocol information, and mapping relationship information in the cache are compared with the unique identifier of the target service.

[0213] Extract the target protocol, target protocol information, and mapping relationship after comparison and matching, and map the target API service data to preset business requirement data according to the mapping relationship.

[0214] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0215] The mapped data is stored in the parameters of the target protocol.

[0216] Extract the address from the target protocol information, create a corresponding protocol client using the address, and send a request through the protocol client to complete the API call.

[0217] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0218] The logs for each step of the API call are extracted separately and then compiled into a unified log record.

[0219] Store the log records.

[0220] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0221] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0222] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for abstracting a service integration process, characterized in that, Applied to a server, the method includes: Obtain target API service data, and configure and cache the target API service data; The protocol types are distinguished, and a unified API entry point is published for each type of protocol. The unified API entry point is the ESB unified facade entry point. The server publishes a unified API entry point for each of the different types of protocols through the facade pattern to adapt to different protocol access. The different types of protocols include: HTTP, WEBSERVICE, EJB and MQ. By identifying different business APIs through service call relationships, the unified ESB facade entry point is connected to each API. The APIs are interconnected to form a mesh structure. The call relationship refers to the relationship between the server and the terminal involved in calling the API. Upon receiving a client API call request, the call request is parsed to obtain the unique identifier of the target service. When the call request passes through the ESB unified facade entry point, it is routed to the target API through the unique identifier of the target service. The unique identifier of the target service corresponds to a specific protocol type. At present, the unique identifier of the target service can only correspond to one protocol type and cannot correspond to multiple protocol types at the same time. The target protocol, target protocol information, and mapping relationship are found in the cached target data using the unique identifier of the target service. The data mapping is then completed based on the target API service data using the mapping relationship. According to the type of the protocol, locate the position where the parameters are stored in the protocol memory and extract the parameters; According to the preset business requirements, the parameters are stored in the new protocol parameter storage location to complete the protocol conversion. The preset business requirements refer to the business requirements corresponding to the API and the business requirements corresponding to the new protocol. The mapped data is stored in the target protocol, and a corresponding protocol client is created using the information of the target protocol. Requests are sent through the protocol client to complete the API call. The corresponding protocol client refers to the protocol client created using the address information in the target protocol.

2. The method according to claim 1, characterized in that, The target protocols include HTTP and WEBSERVICE.

3. The method according to claim 1, characterized in that, The target API service data includes the field mapping relationships between the integrated system, API service, client-sent messages, API service input parameter messages, client messages, and server-side messages.

4. The method according to claim 1, characterized in that, The steps of obtaining target API service data and configuring and caching the target API service data include: The target API service data is service-encoded. Determine the service address and target protocol type of the target API service data; Cache the target API service data.

5. The method according to claim 1, characterized in that, The step of finding the target protocol, target protocol information, and mapping relationship in the cached target data using the unique identifier of the target service, and then using the mapping relationship to complete the data mapping based on the target API service data includes: Read the unique identifier of the target service; Compare the target protocol, target protocol information, and mapping relationship information in the cache with the unique identifier of the target service; Extract the target protocol, target protocol information, and mapping relationship after comparison and matching, and map the target API service data to preset business requirement data according to the mapping relationship.

6. The method according to claim 1, characterized in that, The steps of storing the mapped data in the target protocol, creating a corresponding protocol client using the information of the target protocol, and sending requests through the protocol client to complete the API call include: The mapped data is stored in the parameters of the target protocol; Extract the address from the target protocol information, create a corresponding protocol client using the address, and send a request through the protocol client to complete the API call.

7. The method according to claim 1, characterized in that, After obtaining the mapping relationship between the target service data and the corresponding cached data through the unique identifier of the target service and the corresponding API, and completing the data mapping, the process also includes: The logs for each step of completing the API call are extracted separately and formed into a unified log record; Store the log records.

8. An apparatus for abstracting a service integration process, characterized in that, Applied to a server, the device includes: The acquisition module is used to acquire target API service data, and to configure and cache the target API service data; The publishing module is used to distinguish protocol types and publish a unified API entry for each type of protocol. The unified API entry is the ESB unified facade entry. The server publishes a unified API entry for each of the different types of protocols through the facade pattern to adapt to different protocol access. The different types of protocols include: HTTP, WEBSERVICE, EJB and MQ. The connection module is used to find different business APIs through service call relationships and connect the unified facade entry of the ESB to each API; The interconnection module is used to interconnect APIs to form a mesh structure. The call relationship refers to the relationship between the server and the terminal involved in calling the API. The receiving module is used to receive client API call requests, parse the call requests to obtain the unique identifier of the target service, and when the call request passes through the ESB unified facade entry, it is routed to the target API through the unique identifier of the target service. The unique identifier of the target service corresponds to a specific protocol type. The unique identifier of the target service can only correspond to one protocol type at the moment and cannot correspond to multiple protocol types at the same time. The mapping module is used to find the target protocol, target protocol information and mapping relationship in the cached target data through the unique identifier of the target service, and to complete the data mapping based on the target API service data using the mapping relationship; The second search module is used to locate the position of the parameters stored in the protocol memory according to the type of the protocol and extract the parameters. The conversion module is used to store the parameters to the new protocol parameter storage location according to the preset business requirements, thereby completing the protocol conversion. The preset business requirements refer to the business requirements corresponding to the API and the business requirements corresponding to the new protocol. The sending module is used to store the mapped data in the target protocol, create a corresponding protocol client using the information of the target protocol, and send requests through the protocol client to complete the API call. The corresponding protocol client refers to the protocol client created using the address information in the target protocol.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for data transmission, ESB platform and client

    CN108683722A

  • Gateway equipment, application method and service system

    CN110620721A

  • Method and device for processing service calling request, storage medium and computer equipment

    CN112866177A