Method for converting heterogeneous protocol into MCP protocol based on TCP, large model calling method and related device
By generating standardized interface documents and configuring dedicated proxy service clusters in the financial field, the compatibility issues of the MCP protocol under the TCP private protocol are resolved, enabling efficient and secure invocation of heterogeneous financial back-end systems, and reducing technical barriers and costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUOSEN SECURITIES
- Filing Date
- 2026-01-19
- Publication Date
- 2026-04-17
AI Technical Summary
When applying the MCP protocol to TCP-based private protocols in the financial field, existing technologies suffer from insufficient compatibility and blind spots in the ability of existing gateway tools to handle non-HTTP protocols. This leads to high-cost reconstruction and compatibility risks, making it difficult to efficiently and securely call various heterogeneous financial back-end systems in complex enterprise-level application scenarios.
By identifying heterogeneous financial protocol interfaces, generating standardized interface documents according to the MCP specification, configuring a dedicated proxy service cluster, and connecting to an enterprise-level general gateway, protocol conversion and interface calls are achieved using hash load balancing and connection caching mechanisms.
Without needing to reconstruct the core financial system, it enables efficient and secure unified access to multiple heterogeneous financial back-end systems, reducing the technical barriers and costs of accessing the MCP ecosystem and ensuring session consistency and efficient protocol conversion.
Smart Images

Figure CN121887889A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of Internet technology, specifically to a method for converting a heterogeneous protocol based on TCP to the MCP protocol and a method for calling a large model, a method for calling a TCP-based financial heterogeneous protocol interface by a large model, an apparatus for calling a TCP-based financial heterogeneous protocol interface by a large model, a computer device, and a computer-readable storage medium. Background Technology
[0002] Currently, MCP, as an emerging open protocol connecting large language models with external data and tools, offers significant potential for AI application integration due to its standardized and open-source characteristics, aiming to solve the fragmented integration problem of "M×N" models and data sources. However, when applying this universal protocol to specific fields such as finance, which have a large number of legacy systems and complex proprietary protocols, existing technical solutions reveal obvious limitations and shortcomings.
[0003] First, existing MCP ecosystem support solutions lack compatibility with proprietary TCP protocols in the financial sector. Frameworks such as Spring AI typically require service providers to redevelop the interface server (MCP Server) according to the MCP specification. For core financial systems (such as trading, risk control, and clearing) that have been running stably for many years and typically communicate using non-standard proprietary TCP protocols, this means a complete code refactoring and protocol adaptation. Such a transformation not only requires extremely high human resource costs but also introduces significant compatibility risks and stability challenges, resulting in very low economic benefits and making it difficult to scale up within enterprises.
[0004] Secondly, existing gateway tools have blind spots in handling non-HTTP protocols. While next-generation AI gateways like Higress can efficiently convert standard HTTP RESTful APIs to the MCP protocol, providing a smooth access path for most web services, their design is primarily centered around the HTTP protocol ecosystem. Private TCP protocols widely used in the financial sector often employ custom binary message structures, unique authentication mechanisms, and session persistence schemes. These are fundamentally different from the text-based, stateless HTTP protocol, making it impossible for existing gateway tools like Higress to directly parse and process such non-standard protocols, creating a technological "last mile" barrier. Summary of the Invention
[0005] In view of the above problems, embodiments of the present invention provide a method for converting heterogeneous protocols to MCP protocols based on TCP, a method for calling large models, a method for calling TCP-based heterogeneous financial protocol interfaces by large models, an apparatus for calling TCP-based heterogeneous financial protocol interfaces by large models, a computer device, and a computer-readable storage medium, to solve the problem in the prior art that large language models are difficult to call multiple heterogeneous financial back-end systems in a unified, efficient, and secure manner in complex enterprise-level application scenarios.
[0006] According to one aspect of the present invention, a method for converting a TCP-based heterogeneous protocol to an MCP protocol is provided, the method comprising: Identify the various TCP-based heterogeneous financial protocol interfaces used by the large model; Based on the MCP object specification, standardized interface documents are generated for each TCP-based financial heterogeneous protocol interface. The standardized interface document is sent to the MCP service layer for the MCP service layer to call; Based on the standardized interface documentation, configure a dedicated proxy service cluster for each TCP-based heterogeneous financial protocol interface; The dedicated proxy service cluster is connected to the enterprise-level general gateway; the dedicated proxy service cluster is used to determine the corresponding TCP financial heterogeneous interface based on the HTTP request sent by the enterprise-level general gateway, and establish a service connection.
[0007] In one optional approach, the process involves standardizing the definition of each heterogeneous TCP-based financial heterogeneous protocol according to a preset MCP protocol specification, establishing a mapping relationship between protocol fields and standard data structure descriptions, and generating standardized interface documents corresponding to the interfaces of each TCP-based financial heterogeneous protocol, including: For each heterogeneous TCP-based financial heterogeneous protocol, a standardized definition is made according to the MCP protocol specification, and a mapping relationship is established between protocol fields and standard data structure descriptions. Based on the mapping relationship between protocol fields and standard data structure descriptions, the private interface document of the TCP-based financial heterogeneous protocol interface is converted into a standardized interface document.
[0008] In one alternative approach, the enterprise-grade general gateway service layer uses a hash load balancing strategy, where the hash key uses a large-scale session identifier to ensure that requests for the same session are routed to the same dedicated proxy service.
[0009] According to another aspect of the present invention, a method for large-scale model calling a TCP-based heterogeneous financial protocol interface is provided, and a method for converting the TCP-based heterogeneous protocol to the MCP protocol is provided. The methods for the large model to call TCP-based heterogeneous financial protocol interfaces include: Obtain the invocation request for the large model; the invocation request is an HTTP request, including a request identifier and toolkit documentation information; The MCP service layer determines the information of the TCP financial heterogeneous interface to be invoked and the corresponding target dedicated proxy service based on the invocation request and the standardized interface document. The information of the TCP financial heterogeneous interface to be invoked includes JSON structure request parameters corresponding to each TCP-based financial heterogeneous protocol target interface. The call request and the TCP financial heterogeneous interface information are sent to the corresponding target dedicated proxy service in the dedicated proxy service cluster; The target dedicated proxy service converts the call request into a corresponding binary byte stream based on the call request and the TCP financial heterogeneous interface information; The business service layer receives the binary byte stream and calls the corresponding TCP-based financial heterogeneous protocol target interface.
[0010] In one optional approach, the invocation request includes a session identifier; the target dedicated proxy service converts the invocation request into a corresponding binary byte stream based on the invocation request and the TCP financial heterogeneous interface information, including: Obtain the session identifier from the call request; Based on the session identifier, query whether a connection exists in the connection buffer pool; When a connection exists, extract the JSON structure request parameters corresponding to each TCP-based financial heterogeneous protocol target interface from the request body of the HTTP request; When no connection exists in the call request, the JSON structure request parameters corresponding to each TCP-based financial heterogeneous protocol target interface are extracted from the request body of the HTTP request, and a new connection is established to the business service layer. Iterate through each of the JSON structure request parameters and write the data into a binary byte stream.
[0011] In one optional approach, the IP address in the call request is verified; Verify that the application programming interface key is correct; When the IP address is verified correctly and the application programming interface key is verified successfully, the call request is determined to be a legitimate request.
[0012] In one optional approach, the step of determining the financial heterogeneous interface information of the TCP to be invoked by the call request and the corresponding target dedicated proxy service through the MCP service layer based on the call request and the standardized interface document includes: Based on the call request and the standardized interface documentation, a hash calculation is performed using a hash load balancing strategy to obtain a hash key value; The hash key uses a large-scale session identifier to ensure that requests for the same session are routed to the same dedicated proxy service.
[0013] According to another aspect of the present invention, an apparatus for large-scale model invocation of TCP-based heterogeneous financial protocol interfaces is provided, the apparatus comprising: The request acquisition module is used to acquire the call request of the large model; the call request is an HTTP request, including the request identifier and toolkit documentation information; The MCP service layer is used to determine the TCP financial heterogeneous interface information to be invoked by the invocation request and the corresponding target dedicated proxy service based on the invocation request and the standardized interface document; the TCP financial heterogeneous interface information to be invoked includes JSON structure request parameters corresponding to each TCP-based financial heterogeneous protocol target interface. An enterprise-level general gateway service layer is used to send the call request and the TCP financial heterogeneous interface information to the corresponding target dedicated proxy service in the dedicated proxy service cluster; A dedicated proxy service cluster is used to convert the call request into a corresponding binary byte stream based on the call request and the financial heterogeneous interface information of the TCP. The business service layer is used to receive the binary byte stream and call the corresponding TCP-based financial heterogeneous protocol target interface.
[0014] According to another aspect of the present invention, a computer device is provided, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction that causes the processor to perform the operation of the TCP-based heterogeneous protocol to MCP protocol conversion method or the large model calling the TCP-based financial heterogeneous protocol interface method.
[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein at least one executable instruction is stored therein, which, when executed on a computer device, causes the computer device to perform the operation of the method for converting a TCP-based heterogeneous protocol to an MCP protocol or the method for calling a TCP-based financial heterogeneous protocol interface in a large model.
[0016] This invention, through its embodiments, identifies various TCP-based heterogeneous financial protocol interfaces used by a large-scale model; generates standardized interface documents corresponding to each TCP-based heterogeneous financial protocol interface according to the MCP object specification; sends the standardized interface documents to the MCP service layer for invocation; configures a dedicated proxy service cluster for each TCP-based heterogeneous financial protocol interface based on the standardized interface documents; and connects the dedicated proxy service cluster to an enterprise-level general gateway. The dedicated proxy service cluster is used to determine the corresponding TCP heterogeneous financial interface based on the HTTP request sent by the enterprise-level general gateway and establish a service connection, achieving the effect of unified, efficient, and secure invocation of multiple heterogeneous financial back-end systems.
[0017] This invention eliminates the need to reconstruct core financial systems, efficiently converting TCP-based heterogeneous financial protocols into the MCP protocol, thus reducing the technical barriers and costs of accessing the MCP ecosystem. Through a dedicated proxy service cluster and an enterprise-grade general gateway, it achieves secure access and unified management of TCP-based heterogeneous financial protocols. Hash load balancing and connection caching mechanisms ensure consistency of large-scale sessions and high efficiency in protocol conversion. A complete request verification, protocol conversion, and API call process is established to ensure the security and reliability of data transmission and API calls in financial scenarios.
[0018] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0019] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating the method for converting heterogeneous protocols to MCP protocols based on TCP, as provided in an embodiment of the present invention, is shown. Figure 2 The diagram illustrates a flowchart of a method for a large model to call a TCP-based heterogeneous financial protocol interface, as provided in an embodiment of the present invention. Figure 3 This diagram illustrates the structure of a device for calling a TCP-based heterogeneous financial protocol interface for large-scale model calls, as provided in an embodiment of the present invention. Figure 4 This invention provides a schematic diagram of the structure of a device for calling a TCP-based heterogeneous financial protocol interface for large-scale model calls, according to another embodiment of the present invention. Figure 5 This diagram illustrates the workflow of a dedicated proxy service layer in a device for calling TCP-based heterogeneous financial protocol interfaces, according to another embodiment of the present invention. Figure 6 This diagram illustrates the structure of an enterprise-level general gateway service in a device for calling TCP-based heterogeneous financial protocol interfaces, according to another embodiment of the present invention. Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation
[0020] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0021] First, the technical terms involved in the embodiments of this invention will be explained: MCP (Model Context Protocol) is an open-source protocol designed to establish a standardized interface for interaction between large language models and external data sources, tools, and services. It is often metaphorically described as the "USB-C interface" of the AI world or a "standardized language" for AI applications, aiming to solve the common problems of complex integration and fragmented ecosystems in AI application development.
[0022] TCP-based proprietary protocols in the financial field include heterogeneous protocols such as KCXP, ATP, and UFX. KCXP is a communication middleware primarily used in trading systems within the financial securities sector. ATP is a general term for protocols used in a distributed, low-latency core trading platform. UFX addresses the complexity of access caused by the coexistence of multiple trading systems within financial institutions (such as ordinary trading desks, high-speed trading systems, and asset management systems). LDP is a general term for protocols used in certain low-latency distributed technology platforms. There are also proprietary TCP-based protocols defined internally by securities firms.
[0023] JSON-RPC 2.0 is a stateless, lightweight remote procedure call protocol. It strictly defines the format of JSON-based request and response messages: a valid request must include jsonrpc (version identifier, fixed at "2.0"), method (method name), and id (request identifier), and optionally include params (parameters); the server must return a response containing the same id, returning a result field on success and an error object containing code, message, and optional data on failure.
[0024] As a cloud-native API gateway, Higress Cluster provides strong support for the implementation and application of the Model Context Protocol (MCP). Its core value lies in helping enterprises efficiently transform existing API assets into tools that AI assistants can directly understand and use, while providing enterprise-level management and control capabilities in the process.
[0025] Figure 1 A flowchart illustrating an automatic 3D printing tree support generation method based on SLA photopolymerization technology, provided in an embodiment of the present invention, is shown. This method is executed by a computer device. The computer device can be a desktop computer, laptop computer, smart terminal, distributed device, etc., and the embodiments of the present invention do not impose specific limitations. Figure 1 As shown, the method includes the following steps: Step 110: Determine the various TCP-based heterogeneous financial protocol interfaces to be used by the large model.
[0026] First, based on all TCP-based heterogeneous financial protocol interfaces that the large model needs to call in financial business scenarios (such as transaction inquiries, risk control audits, data statistics, etc.), the functional scope, calling scenarios, and interaction data formats of each interface are clarified to form a target interface list. These heterogeneous financial protocols include, but are not limited to, KCXP, ATP, UFX, LDP, and custom TCP heterogeneous protocols defined internally by securities firms.
[0027] Step 120: Based on the MCP object specification, generate standardized interface documents corresponding to each TCP-based financial heterogeneous protocol interface.
[0028] Among them, for each heterogeneous TCP-based financial heterogeneous protocol, a standardized definition is made according to the MCP protocol specification, and a mapping relationship between protocol fields and standard data structure descriptions is established. Based on the mapping relationship between protocol fields and standard data structure descriptions, the heterogeneous interface document of the TCP-based financial heterogeneous protocol interface is converted into a standardized interface document.
[0029] Specifically, for each protocol's field type (such as int, bigint, char(n), TIMESTAMP, etc.), a mapping relationship is established with the standard data structure description, clarifying the field's type constraints, length limits, format requirements, etc. Based on the above mapping relationship, the original proprietary interface documents of each financial heterogeneous protocol interface (such as the protocol manuals and internal interface description documents provided by the vendors) are converted into standardized interface documents that conform to the MCP protocol specification. This document contains core information such as the interface's request parameter format, response data structure, and error code definition, serving as a unified basis for subsequent protocol conversion and interface calls.
[0030] In one approach, each protocol is specifically standardized as follows: 1. Unified and standardized definition: For OpenAPI objects, the settings are as follows: field name type Is it mandatory? describe OpenAPI string yes This string must be a version number that conforms to the semantic versioning specification as mentioned in the open API specification, and must end with a private protocol identifier, such as: 3.0.0-KCXP info Info object yes This field provides API-related metadata. Related tools may require this field. servers [Server object] no This is an array of Server objects, providing connection information to the server. functions functions object yes A valid service for the provided API. tags [Tag object] no A set of tags that provide more metadata, the order of which can be used by conversion tools to determine the order of APIs. Info object: Contact Person: License object: Server object: Functions object: Function Item object: Schema Object Restriction: The structure of a schema object can be determined according to its official specification document, and it is limited to only three basic types: string, number, and integer, and contains only one layer. Create a TCP-based table mapping fields of heterogeneous financial protocols to schemas (the following only shows some typical fields). Tag objects: Through the above settings, we can obtain standardized definitions for each type of heterogeneous TCP-based financial heterogeneous protocol according to the MCP protocol specification, and establish a mapping relationship between protocol fields and standard data structure descriptions.
[0031] Subsequently, based on the aforementioned unified standardized definition, a standardized private protocol interface document is generated using a preset conversion tool or an existing conversion tool according to preset rules. Specifically, the standardized private protocol interface document is an interface document conforming to the OpenAPI 3.0 standard for customized proxy services.
[0032] The generation rules are as follows: Step 130: Send the standardized interface document to the MCP service layer for the MCP service layer to call.
[0033] After obtaining the standardized interface documentation, the openapi-to-mcpserver tool can be used to convert the standardized interface documentation into a configuration file for the MCP service layer, namely the mcp-server.yaml configuration file. This mcp-server.yaml configuration file is supplemented with fixed request header information including X-GS-API-PROJECT (business identifier field), X-GS-API-ROUTER (routing authorization field), and X-GS-API-KEY (authentication key field), forming a toolkit document. It is understood that each business corresponds to at least one financial heterogeneous protocol interface. Each toolkit document includes information about the financial heterogeneous interface corresponding to the toolkit's function. Specifically, the request body parameters in the request header are set to only contain three basic types: string, number, and integer, limiting the parameters to a single layer so that the subsequent dedicated proxy service cluster can directly send binary byte streams according to the dynamic library of the dedicated proxy service protocol. In this embodiment of the invention, the MCP service layer is pre-created through the Higress cluster, and the mcp-server.yaml configuration file is stored in the MCP service layer. The MCP service layer stores protocol configuration files in JSON format, providing unified invocation capabilities to the outside world. The MCP service layer is responsible for parsing requests and determining the target's private interface.
[0034] Step 140: Based on the standardized interface document, configure a dedicated proxy service cluster for each TCP-based financial heterogeneous protocol interface.
[0035] The dedicated proxy service converts HTTP requests (carrying JSON structure parameters) forwarded by the enterprise-level general gateway into binary byte streams supported by corresponding TCP financial private heterogeneous protocols (such as KCXP and ATP); simultaneously, it converts the private protocol binary responses returned by the business service layer into HTTP / JSON format and feeds them back to the gateway. The dedicated proxy service embeds a connection buffer pool that stores historical cached large-scale session identifiers. Upon receiving an HTTP request, this buffer pool compares the session identifier in the request with the historical session identifiers in the connection buffer pool to reuse the connection with the financial heterogeneous protocol service layer.
[0036] In this embodiment of the invention, the dedicated proxy service can be implemented using Java. It can limit access subjects through IP whitelisting and use API keys (Application Programming Interface keys) for authentication. By reusing the connection with the financial heterogeneous protocol service layer through connection caching pool, it converts the received HTTP request parameters into the binary byte stream of the corresponding financial heterogeneous protocol and completes data interaction. Based on the standardized interface document, a dedicated proxy service cluster is configured for each financial heterogeneous protocol. The dedicated proxy service is implemented using Java. It limits access to only enterprise-level general gateways through IP whitelisting, uses API keys for interface authentication, and reuses the connection with the financial heterogeneous protocol server through connection caching pool.
[0037] Step 150: Connect the dedicated proxy service cluster to the enterprise-level general gateway; the dedicated proxy service cluster is used to determine the corresponding TCP financial heterogeneous interface based on the HTTP request sent by the enterprise-level general gateway, and establish a service connection.
[0038] In this embodiment of the invention, all the dedicated proxy services are clustered and connected to an enterprise-level general gateway service layer implemented based on APISIX. For example... Figure 6 As shown, the enterprise-level general gateway service layer provides load balancing, authentication, and rate limiting service governance capabilities through plugins. Specifically, the enterprise-level general gateway service layer is pre-configured and uses a hash load balancing strategy. The hash key of the hash load balancing strategy uses the session identifier of the large model to ensure that requests from the same session are routed to the same dedicated proxy service. The hash load balancing strategy calculates a hash value based on the fixed characteristics (hash key) of the request and routes requests with the same characteristics to the same backend node. This configuration ensures session consistency in financial scenarios. In this embodiment, the hash key is the session identifier of the large model (specifically, the X-GS-SESSION field), and the enterprise-level general gateway executes this strategy to achieve long-term connection / state maintenance for heterogeneous TCP protocols in the financial sector.
[0039] In this embodiment of the invention, the enterprise-level general-purpose gateway is implemented based on APISIX, utilizing APISX such as... Figure 6The plugin implements the common service governance capabilities necessary for financial-grade applications, such as load balancing, authentication, and rate limiting. RocketMQ+Doris is used for request logging, and VictoriaMetrics is used for metric monitoring. Since the customized proxy service uses the HTTP protocol, it can be directly connected to enterprise-grade general gateways. The only customized configuration required is the upstream using hash load balancing, with the hash key using X-GS-SESSION. This ensures that requests within the same SESSION are forwarded to the same customized proxy service, achieving statefulness in the HTTP protocol and reducing the performance overhead of converting proprietary TCP protocols in the financial sector to HTTP. This invention, through its embodiments, identifies various TCP-based heterogeneous financial protocol interfaces used by a large-scale model; generates standardized interface documents corresponding to each TCP-based heterogeneous financial protocol interface according to the MCP object specification; sends the standardized interface documents to the MCP service layer for invocation; configures a dedicated proxy service cluster for each TCP-based heterogeneous financial protocol interface based on the standardized interface documents; and connects the dedicated proxy service cluster to an enterprise-level general gateway. The dedicated proxy service cluster is used to determine the corresponding TCP heterogeneous financial interface based on the HTTP request sent by the enterprise-level general gateway and establish a service connection, achieving the effect of unified, efficient, and secure invocation of multiple heterogeneous financial back-end systems.
[0040] This invention eliminates the need to reconstruct core financial systems, efficiently converting TCP-based heterogeneous financial protocols into the MCP protocol, thus reducing the technical barriers and costs of accessing the MCP ecosystem. Through a dedicated proxy service cluster and an enterprise-grade general gateway, it achieves secure access and unified management of TCP-based heterogeneous financial protocols. Hash load balancing and connection caching mechanisms ensure consistency of large-scale sessions and high efficiency in protocol conversion. A complete request verification, protocol conversion, and API call process is established to ensure the security and reliability of data transmission and API calls in financial scenarios.
[0041] Figure 2 A flowchart illustrating a method for a large model to invoke a TCP-based heterogeneous financial protocol interface, according to another embodiment of the present invention, is shown. This method is executed by a computer device. The computer device can be a desktop computer, laptop computer, smart terminal, distributed device, etc., and the embodiments of the present invention do not impose specific limitations. Figure 2 As shown, this method is based on the aforementioned method of converting heterogeneous protocols to MCP protocols based on TCP. The method for the large model to call the TCP-based financial heterogeneous protocol interface includes: Step 210: Obtain the call request for the large model.
[0042] The core financial business relies entirely on proprietary TCP protocols, therefore the large model must invoke these protocols to interface with the real business systems. Consequently, during business processing, the large model will issue corresponding invocation requests based on the current business task. These requests are HTTP requests, including a request identifier and toolkit documentation information. The request identifier can be a session identifier.
[0043] Step 220: The MCP service layer determines the financial heterogeneous interface information of the TCP to be invoked by the call request based on the call request and the standardized interface document.
[0044] The toolkit documentation includes X-GS-API-PROJECT (service identifier field), X-GS-API-ROUTER (routing authorization field), and X-GS-API-KEY (authentication key field).
[0045] The request header of this call also includes the relevant information, as follows: Request header name illustrate X-GS-API-PROJECT Unique identifier for accessed items (services) X-GS-API-ROUTER A gateway authorization uniquely identifies the access point. A gateway authorization combines multiple interfaces and provides them to a single caller. X-GS-API-KEY Authentication key. Consistent with the authentication key provided by Higress for the MCP service. The MCP service layer determines the required TCP financial heterogeneous interface information based on the business identifier field in the toolkit documentation and the business identifier field in the call request.
[0046] After determining the required TCP heterogeneous financial interface to be invoked, the information of the required TCP heterogeneous financial interface to be invoked is determined according to the standardized interface documentation. This information includes JSON structured request parameters corresponding to the target interface of each TCP-based heterogeneous financial protocol. These request parameters include the input and output parameters of the TCP heterogeneous financial interface. The MCP service layer sends the invocation request containing these request parameters and session identifier to the enterprise-level general gateway service layer.
[0047] The MCP service layer receives large model call requests through the unified MCP service entry point, F5.
[0048] Step 230: The enterprise-level general gateway service layer sends the call request and the TCP financial heterogeneous interface information to the corresponding target dedicated proxy service in the dedicated proxy service cluster.
[0049] The enterprise-level general gateway service layer receives the validated call request and the parsed TCP financial private protocol interface information. Based on the call request and the standardized interface document, the enterprise-level general gateway service layer performs hash calculation using a hash load balancing strategy to obtain a hash key value. The hash key uses the session identifier of the large model as the hash key for hash calculation. Specifically, the corresponding target dedicated proxy service is matched according to the hash key value to ensure that the same session request is routed to the same dedicated proxy service, thus facilitating the invocation of that dedicated proxy service. The enterprise-level general gateway service layer receives call requests sent by the MCP service layer through the unified entry point of the enterprise-level general gateway.
[0050] Once the corresponding target dedicated proxy service is identified, the call request is forwarded to the matched target dedicated proxy service node.
[0051] Step 240: The target dedicated proxy service converts the call request into a corresponding binary byte stream based on the call request and the TCP financial heterogeneous interface information.
[0052] In this embodiment of the invention, the target dedicated proxy service verifies the IP address in the call request. It also verifies the correctness of the application programming interface (API) key. If both the IP address and API key are verified correctly, the call request is determined to be a legitimate request.
[0053] The target-specific proxy service also determines whether a previous connection exists for the call request, in order to maintain a persistent connection for the session. Specifically, this includes: Obtain the session identifier from the call request; Based on the session identifier, query whether a connection exists in the connection buffer pool; When a connection exists, extract the JSON structure request parameters corresponding to each TCP-based financial heterogeneous protocol target interface from the request body of the HTTP request; When no connection exists in the call request, the JSON structure request parameters corresponding to each TCP-based financial heterogeneous protocol target interface are extracted from the request body of the HTTP request, and a new connection is established to the business service layer. Iterate through each of the JSON structure request parameters and write the data into a binary byte stream.
[0054] In this embodiment of the invention, KCXP proxy service can be used as a target-specific proxy service. For example... Figure 5As shown, the KCXP proxy service obtains the IP address information from the call request and verifies the correctness of its API key (Application Programming Interface key). If verification passes, it retrieves the session identifier (session ld) from the request header (an HTTP request header named X-GS-SESSION). If a session identifier exists, it uses this identifier to query the target proxy service's session buffer pool to see if a previous connection exists. If a connection exists, it extracts the JSON structured request parameters corresponding to each TCP-based heterogeneous financial protocol target interface from the request body of the call request (HTTP request), and uses KCXP's protocol dynamic library methods to write these JSON structured request parameters into a binary byte stream.
[0055] Step 250: The business service layer receives the binary byte stream and calls the corresponding TCP-based financial heterogeneous protocol target interface.
[0056] The MCP format call request is converted into a binary byte stream through the processing of the target proxy service, which makes it convenient for the business service layer to call the corresponding TCP-based financial heterogeneous protocol target interface.
[0057] The business service layer determines the corresponding TCP-based financial heterogeneous protocol target interface based on the input and output parameters of the corresponding interface in the binary byte stream, and then responds by calling it. The call response is then fed back to the target proxy service, which in turn feeds it back to the MCP service layer through the enterprise-level general gateway service layer, and finally to the large model through the MCP service layer.
[0058] This invention, through obtaining a large model's call request, uses the MCP service layer to determine the required TCP financial heterogeneous interface information for the call request based on the call request and the standardized interface document. The enterprise-level general gateway service layer sends the call request and the TCP financial heterogeneous interface information to the corresponding target dedicated proxy service in the dedicated proxy service cluster. The target dedicated proxy service converts the call request into a corresponding binary byte stream based on the call request and the TCP financial heterogeneous interface information. The business service layer receives the binary byte stream and calls the corresponding TCP-based financial heterogeneous protocol target interface, achieving the effect of enabling large models to uniformly, efficiently, and securely call various heterogeneous financial back-end systems.
[0059] This invention eliminates the need to reconstruct core financial systems, efficiently converting TCP-based heterogeneous financial protocols into the MCP protocol, thus reducing the technical barriers and costs of accessing the MCP ecosystem. Through a dedicated proxy service cluster and an enterprise-grade general gateway, it achieves secure access and unified management of heterogeneous TCP financial protocols. By leveraging hash load balancing and connection caching mechanisms, it ensures consistency of large-scale sessions and high efficiency in protocol conversion. A complete request verification, protocol conversion, and interface call process is established to ensure the security and reliability of data transmission and interface calls in financial scenarios.
[0060] Figure 3 This diagram illustrates the structure of a device for calling a TCP-based heterogeneous financial protocol interface using a large model, as provided in an embodiment of the present invention. Figure 3 As shown, the device 300 includes: The request acquisition module 310 is used to acquire the call request of the large model; the call request is an HTTP request, including a request identifier and toolkit documentation information; MCP service layer 320 is used to determine the TCP financial heterogeneous interface information to be invoked by the invocation request based on the invocation request and the standardized interface document; the TCP financial heterogeneous interface information to be invoked includes JSON structure request parameters corresponding to each TCP-based financial heterogeneous protocol target interface.
[0061] The enterprise-level general gateway service layer 330 is used to send the call request and the TCP financial heterogeneous interface information to the corresponding target dedicated proxy service in the dedicated proxy service cluster. A dedicated proxy service cluster 340 is used to convert the call request into a corresponding binary byte stream based on the call request and the financial heterogeneous interface information of the TCP. The business service layer 350 is used to receive the binary byte stream and call the corresponding TCP-based financial heterogeneous protocol target interface.
[0062] like Figure 4 As shown, in one embodiment of the present invention, the MCP service unified entry point receives the call request from the large model and sends the call request to the MCP service layer 320. The MCP service layer 320 sends the call request and the TCP financial heterogeneous interface information to the enterprise-level general gateway service layer 330. After receiving the information through the enterprise-level general gateway unified entry point, the enterprise service layer gateway 330 verifies and forwards it to the corresponding target dedicated proxy service (KCXP proxy service) of the dedicated proxy service cluster 340. The target dedicated proxy service converts the interface information in the HTTP request into a binary byte stream and sends it to the business service layer 350. The business service layer 350 performs the corresponding interface call.
[0063] This invention, through its embodiments, identifies various TCP-based heterogeneous financial protocol interfaces used by a large-scale model; generates standardized interface documents corresponding to each TCP-based heterogeneous financial protocol interface according to the MCP object specification; sends the standardized interface documents to the MCP service layer for invocation; configures a dedicated proxy service cluster for each TCP-based heterogeneous financial protocol interface based on the standardized interface documents; and connects the dedicated proxy service cluster to an enterprise-level general gateway. The dedicated proxy service cluster is used to determine the corresponding TCP heterogeneous financial interface based on the HTTP request sent by the enterprise-level general gateway and establish a service connection, achieving the effect of unified, efficient, and secure invocation of multiple heterogeneous financial back-end systems.
[0064] This invention eliminates the need to reconstruct core financial systems, efficiently converting TCP-based heterogeneous financial protocols into the MCP protocol, thus reducing the technical barriers and costs of accessing the MCP ecosystem. Through a dedicated proxy service cluster and an enterprise-grade general gateway, it achieves secure access and unified management of TCP-based heterogeneous financial protocols. Hash load balancing and connection caching mechanisms ensure consistency of large-scale sessions and high efficiency in protocol conversion. A complete request verification, protocol conversion, and API call process is established to ensure the security and reliability of data transmission and API calls in financial scenarios.
[0065] Figure 7 The diagram shows a structural schematic of a computer device provided in an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the computer device.
[0066] like Figure 7 As shown, the computer device may include: a processor 402, a communications interface 404, a memory 406, and a communications bus 408.
[0067] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. Communication interface 404 is used to communicate with other network elements such as clients or other servers. Processor 402 executes program 410, specifically performing the relevant steps in the above-described method for converting TCP-based heterogeneous protocols to MCP protocols or the method embodiment for calling TCP-based financial heterogeneous protocol interfaces in large-scale models.
[0068] Specifically, program 410 may include program code, which includes computer-executable instructions.
[0069] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The computer device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0070] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0071] Specifically, program 410 can be called by processor 402 to cause the computer device to perform the following operations: Identify the various TCP-based heterogeneous financial protocol interfaces used by the large model; Based on the MCP object specification, standardized interface documents are generated for each TCP-based financial heterogeneous protocol interface. The standardized interface document is sent to the MCP service layer for the MCP service layer to call; Based on the standardized interface documentation, configure a dedicated proxy service cluster for each TCP-based heterogeneous financial protocol interface; The dedicated proxy service cluster is connected to an enterprise-level general gateway; the dedicated proxy service cluster is used to determine the corresponding TCP financial heterogeneous interface based on the HTTP request sent by the enterprise-level general gateway, and establish a service connection; and / or, The methods for the large model to call TCP-based heterogeneous financial protocol interfaces include: Obtain the invocation request for the large model; the invocation request is an HTTP request, including a request identifier and toolkit documentation information; The MCP service layer determines the information of the TCP financial heterogeneous interface to be invoked by the invocation request based on the invocation request and the standardized interface document; the information of the TCP financial heterogeneous interface to be invoked includes the JSON structure request parameters corresponding to each TCP-based financial heterogeneous protocol target interface. The enterprise-level general gateway service layer sends the call request and the TCP financial heterogeneous interface information to the corresponding target dedicated proxy service in the dedicated proxy service cluster; The target dedicated proxy service converts the call request into a corresponding binary byte stream based on the call request and the TCP financial heterogeneous interface information; The business service layer receives the binary byte stream and calls the corresponding TCP-based financial heterogeneous protocol target interface.
[0072] This invention, through its embodiments, identifies various TCP-based heterogeneous financial protocol interfaces used by a large-scale model; generates standardized interface documents corresponding to each TCP-based heterogeneous financial protocol interface according to the MCP object specification; sends the standardized interface documents to the MCP service layer for invocation; configures a dedicated proxy service cluster for each TCP-based heterogeneous financial protocol interface based on the standardized interface documents; and connects the dedicated proxy service cluster to an enterprise-level general gateway. The dedicated proxy service cluster is used to determine the corresponding TCP heterogeneous financial interface based on the HTTP request sent by the enterprise-level general gateway and establish a service connection, achieving the effect of unified, efficient, and secure invocation of multiple heterogeneous financial back-end systems.
[0073] This invention eliminates the need to reconstruct core financial systems, efficiently converting TCP-based heterogeneous financial protocols into the MCP protocol, thus reducing the technical barriers and costs of accessing the MCP ecosystem. Through a dedicated proxy service cluster and an enterprise-grade general gateway, it achieves secure access and unified management of TCP-based heterogeneous financial protocols. Hash load balancing and connection caching mechanisms ensure consistency of large-scale sessions and high efficiency in protocol conversion. A complete request verification, protocol conversion, and API call process is established to ensure the security and reliability of data transmission and API calls in financial scenarios.
[0074] This invention provides a computer-readable storage medium storing at least one executable instruction that, when executed on a computer device, causes the computer device to perform the remote sensing small target detection method in any of the above method embodiments.
[0075] Executable instructions can be used to cause computer devices to perform the following operations: Identify the various TCP-based heterogeneous financial protocol interfaces used by the large model; Based on the MCP object specification, standardized interface documents are generated for each TCP-based financial heterogeneous protocol interface. The standardized interface document is sent to the MCP service layer for the MCP service layer to call; Based on the standardized interface documentation, configure a dedicated proxy service cluster for each TCP-based heterogeneous financial protocol interface; The dedicated proxy service cluster is connected to an enterprise-level general gateway; the dedicated proxy service cluster is used to determine the corresponding TCP financial heterogeneous interface based on the HTTP request sent by the enterprise-level general gateway, and establish a service connection; and / or, The methods for the large model to call TCP-based heterogeneous financial protocol interfaces include: Obtain the invocation request for the large model; the invocation request is an HTTP request, including a request identifier and toolkit documentation information; The MCP service layer determines the information of the TCP financial heterogeneous interface to be invoked by the invocation request based on the invocation request and the standardized interface document; the information of the TCP financial heterogeneous interface to be invoked includes the JSON structure request parameters corresponding to each TCP-based financial heterogeneous protocol target interface. The enterprise-level general gateway service layer sends the call request and the TCP financial heterogeneous interface information to the corresponding target dedicated proxy service in the dedicated proxy service cluster; The target dedicated proxy service converts the call request into a corresponding binary byte stream based on the call request and the TCP financial heterogeneous interface information; The business service layer receives the binary byte stream and calls the corresponding TCP-based financial heterogeneous protocol target interface.
[0076] This invention, through its embodiments, identifies various TCP-based heterogeneous financial protocol interfaces used by a large-scale model; generates standardized interface documents corresponding to each TCP-based heterogeneous financial protocol interface according to the MCP object specification; sends the standardized interface documents to the MCP service layer for invocation; configures a dedicated proxy service cluster for each TCP-based heterogeneous financial protocol interface based on the standardized interface documents; and connects the dedicated proxy service cluster to an enterprise-level general gateway. The dedicated proxy service cluster is used to determine the corresponding TCP heterogeneous financial interface based on the HTTP request sent by the enterprise-level general gateway and establish a service connection, achieving the effect of unified, efficient, and secure invocation of multiple heterogeneous financial back-end systems.
[0077] This invention eliminates the need to reconstruct the core financial system, efficiently converting TCP-based heterogeneous financial protocols into the MCP protocol, thus reducing the technical barriers and costs of accessing the MCP ecosystem. Through a dedicated proxy service cluster and an enterprise-grade general gateway, it achieves secure access and unified management of TCP-based private financial protocols. By leveraging hash load balancing and connection caching mechanisms, it ensures the consistency of large-scale model sessions and the efficiency of protocol conversion. Furthermore, it establishes a complete request verification, protocol conversion, and interface call process to ensure the security and reliability of data transmission and interface calls in financial scenarios.
[0078] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0079] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0080] Similarly, it should be understood that, in order to streamline the invention and aid in understanding one or more of the various aspects of the invention, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.
[0081] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0082] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A method for converting heterogeneous protocols to MCP based on TCP, characterized in that, include: Identify the various TCP-based heterogeneous financial protocol interfaces used by the large model; Based on the MCP object specification, standardized interface documents are generated for each TCP-based financial heterogeneous protocol interface. The standardized interface document is sent to the MCP service layer for the MCP service layer to call; Based on the standardized interface documentation, configure a dedicated proxy service cluster for each TCP-based heterogeneous financial protocol interface; The dedicated proxy service cluster is connected to the enterprise-level general gateway; the dedicated proxy service cluster is used to determine the corresponding TCP financial heterogeneous interface based on the HTTP request sent by the enterprise-level general gateway, and establish a service connection.
2. The method for converting heterogeneous protocols to MCP based on TCP according to claim 1, characterized in that, The process involves standardizing the definition of each heterogeneous TCP-based financial heterogeneous protocol according to the preset MCP protocol specification, establishing a mapping relationship between protocol fields and standard data structure descriptions, and generating standardized interface documents corresponding to the interfaces of each TCP-based financial heterogeneous protocol, including: For each heterogeneous TCP-based financial heterogeneous protocol, a standardized definition is made according to the MCP protocol specification, and a mapping relationship is established between protocol fields and standard data structure descriptions. Based on the mapping relationship between protocol fields and standard data structure descriptions, the heterogeneous interface document of the TCP-based financial heterogeneous protocol interface is converted into a standardized interface document.
3. The method for converting heterogeneous protocols to MCP based on TCP according to claim 1, characterized in that, Also includes: The enterprise-grade general gateway service layer uses a hash load balancing strategy, where the hash key uses a large-scale session identifier to ensure that requests for the same session are routed to the same dedicated proxy service.
4. A method for a large model to call a TCP-based heterogeneous financial protocol interface, characterized in that, Based on the method for converting heterogeneous protocols to MCP protocols based on TCP as described in any one of claims 1-3; The methods for the large model to call TCP-based heterogeneous financial protocol interfaces include: Obtain the invocation request for the large model; the invocation request is an HTTP request, including a request identifier and toolkit documentation information; The MCP service layer determines the information of the TCP financial heterogeneous interface to be invoked by the invocation request based on the invocation request and the standardized interface document; the information of the TCP financial heterogeneous interface to be invoked includes the JSON structure request parameters corresponding to each TCP-based financial heterogeneous protocol target interface. The enterprise-level general gateway service layer sends the call request and the TCP financial heterogeneous interface information to the corresponding target dedicated proxy service in the dedicated proxy service cluster; The target dedicated proxy service converts the call request into a corresponding binary byte stream based on the call request and the TCP financial heterogeneous interface information; The business service layer receives the binary byte stream and calls the corresponding TCP-based financial heterogeneous protocol target interface.
5. The method for calling a TCP-based heterogeneous financial protocol interface in a large model according to claim 4, characterized in that, The invocation request includes a session identifier; the target dedicated proxy service converts the invocation request into a corresponding binary byte stream based on the invocation request and the TCP financial heterogeneous interface information, including: Obtain the session identifier from the call request; Based on the session identifier, query whether a connection exists in the connection buffer pool; When a connection exists, extract the JSON structure request parameters corresponding to each TCP-based financial heterogeneous protocol target interface from the request body of the HTTP request; When no connection exists in the call request, the JSON structure request parameters corresponding to each TCP-based financial heterogeneous protocol target interface are extracted from the request body of the HTTP request, and a new connection is established to the business service layer. Iterate through each of the JSON structure request parameters and write the data into a binary byte stream.
6. The method for calling a TCP-based heterogeneous financial protocol interface in a large model according to claim 4, characterized in that, Before determining whether a session identifier exists in the call request, the method further includes: Verify the IP address in the call request; Verify that the application programming interface key is correct; When the IP address is verified correctly and the application programming interface key is verified successfully, the call request is determined to be a legitimate request.
7. The method for calling TCP-based heterogeneous financial protocol interfaces in a large model according to claim 4, characterized in that, The process of determining the financial heterogeneous TCP interface information and corresponding target dedicated proxy service to be invoked by the MCP service layer based on the invocation request and the standardized interface document includes: Based on the call request and the standardized interface documentation, a hash calculation is performed using a hash load balancing strategy to obtain a hash key value; The hash key uses a large-scale session identifier to ensure that requests for the same session are routed to the same dedicated proxy service.
8. A device for large-scale model invoking TCP-based heterogeneous financial protocol interfaces, characterized in that, The device includes: The request acquisition module is used to acquire the call request of the large model; the call request is an HTTP request, including the request identifier and toolkit documentation information; The MCP service layer is used to determine the TCP financial heterogeneous interface information to be invoked by the invocation request based on the invocation request and the standardized interface document; the TCP financial heterogeneous interface information to be invoked includes JSON structure request parameters corresponding to each TCP-based financial heterogeneous protocol target interface. An enterprise-level general gateway service layer is used to send the call request and the TCP financial heterogeneous interface information to the corresponding target dedicated proxy service in the dedicated proxy service cluster; A dedicated proxy service cluster is used to convert the call request into a corresponding binary byte stream based on the call request and the financial heterogeneous interface information of the TCP. The business service layer is used to receive the binary byte stream and call the corresponding TCP-based financial heterogeneous protocol target interface.
9. A computer device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation of the TCP-based heterogeneous protocol to MCP protocol method as described in any one of claims 1-3 or the large model calling the TCP-based financial heterogeneous protocol interface method as described in any one of claims 4-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores at least one executable instruction, which, when executed on a computer device, causes the computer device to perform the operation of the TCP-based heterogeneous protocol to MCP protocol method as described in any one of claims 1-3 or the large model calling the TCP-based financial heterogeneous protocol interface method as described in any one of claims 4-7.