Data transmission method and system based on gRPC bidirectional stream cache pool in hybrid cloud

By building a gRPC bidirectional flow cache pool under the hybrid cloud, isolating and managing bidirectional flows, the problem of low data migration performance in the existing technology is solved, efficient data transmission and resource utilization are achieved, and data storage in the hybrid cloud scenario is significantly improved. Migration speed.

CN116095169BActive Publication Date: 2024-09-03CHINA TELECOM CLOUD TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202211721254.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2024-09-03
Estimated Expiration
2042-12-30

Smart Images

  • Figure CN116095169B
    Figure CN116095169B
Patent Text Reader

Abstract

The present application relates to a data transmission method and system based on a gRPC bidirectional stream cache pool in a hybrid cloud, the method comprising: receiving a first registration request from a second server, and registering the second server to the first server. The second server is created to the first gRPC bidirectional stream, and a first connection request is sent to the second server through the first gRPC bidirectional stream, and a connection channel is established with the second server. Configuration parameters are obtained and the gRPC bidirectional stream cache pool is initialized according to the configuration parameters to obtain a first cache pool. A core number of second gRPC bidirectional streams is established in the first cache pool, and the second gRPC bidirectional stream is used to realize data transmission between the first server and the second server. It is determined whether there is an idle second gRPC bidirectional stream in the second cache pool. If so, the second gRPC bidirectional stream is directly extracted through the second server. If not, it is determined whether the number of second gRPC bidirectional streams reaches the first threshold, and a new second gRPC bidirectional stream is created when the number does not reach the first threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and in particular to a data transmission method and system based on a gRPC bidirectional stream cache pool in a hybrid cloud. Background Art

[0002] As cloud computing technology matures, more and more enterprise users are using hybrid cloud models to build enterprise IT infrastructure. Hybrid cloud is a cloud computing service model that integrates public cloud and private cloud. It allows users to store data in public cloud and private cloud according to business needs. In hybrid cloud, user data is scattered on public cloud and private cloud. In some business scenarios, users need to migrate data between public cloud and private cloud. However, for security reasons, users' public cloud applications cannot directly access private cloud applications. Therefore, cloud service providers need to build dedicated proxy services to achieve data transmission between public cloud and private cloud. The proxy service is composed of Proxy Server (public cloud proxy service) and ProxyAgent (private cloud proxy service). HTTP / 2 based on HTTP protocol is often used between Proxy Server and Proxy Agent to achieve efficient data transmission.

[0003] Currently, the gRPC framework on HTTP / 2, which uses protobuf3 by default for efficient data serialization, is the preferred framework for data transmission. The gRPC bidirectional stream can be created by the Proxy Agent actively connecting to the Proxy Server. After the gRPC bidirectional stream is successfully created, both ends of the gRPC bidirectional stream can send data. The existing proxy services built on the gRPC framework in the hybrid cloud often use a single gRPC bidirectional stream for data transmission. When there are many requests and a small total number, a single gRPC bidirectional stream can work well. However, since the amount of data in an enterprise is often large, ranging from tens of GB to tens of TB of data, if a single gRPC bidirectional stream is used for data migration, it often takes dozens of hours or days, which is difficult for users to accept.

[0004] Therefore, the data transmission performance of the proxy service built based on the gRPC framework in a general hybrid cloud is poor. Summary of the invention

[0005] Based on this, it is necessary to provide a data transmission method and system based on a gRPC bidirectional stream cache pool in a hybrid cloud, which can store different gRPC bidirectional streams by building a gRPC bidirectional stream cache pool between a public cloud proxy service and a private cloud proxy service, and reduce the complexity of data transmission by isolating different requests through different gRPC bidirectional streams, thereby improving the performance of proxy service data transmission.

[0006] In a first aspect, the present application provides a data transmission method based on a gRPC bidirectional stream cache pool in a hybrid cloud, which is applied to a first server, and the first server is used to implement a public cloud proxy service. The method includes:

[0007] receiving a first registration request from a second server, wherein the first registration request is used to register the second server with the first server;

[0008] Create the second server to the first gRPC bidirectional stream, send a first connection request to the second server through the first gRPC bidirectional stream, and establish a connection channel with the second server;

[0009] Obtain configuration parameters and initialize a gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number, and the idle survival time of the second gRPC bidirectional stream;

[0010] Establishing a second gRPC bidirectional flow of the number of cores in the first cache pool to obtain a second cache pool, wherein the second gRPC bidirectional flow is used to implement data transmission between the first server and the second server;

[0011] Determine whether there is an idle second gRPC bidirectional stream in the second cache pool. If so, directly extract the second gRPC bidirectional stream through the second server. If not, determine whether the number of cores of the second gRPC bidirectional stream reaches a first threshold, and create a new second gRPC bidirectional stream in the second cache pool through the second server when the number of cores does not reach the first threshold.

[0012] In one embodiment, the method further comprises:

[0013] Determine whether the first server successfully establishes a connection channel with the second server. If successful, encapsulate a successful connection identifier in the second server. If unsuccessful, resend the first connection request to the second server.

[0014] In one embodiment, the method further comprises:

[0015] The second server periodically scans the second cache pool to determine whether the second gRPC bidirectional stream is transmitting data, and closes the second gRPC bidirectional stream when the second gRPC bidirectional stream is idle and the idle survival time reaches a second threshold to save server resources.

[0016] In a second aspect, the present application provides a data transmission method based on a gRPC bidirectional stream cache pool in a hybrid cloud, which is applied to a second server, and the second server is used to implement a private cloud proxy service. The method includes:

[0017] Sending a first registration request to a first server, where the first registration request is used to register a second server with the first server;

[0018] Creating a first gRPC bidirectional stream to the second server through the first server, receiving a first connection request from the first server through the first gRPC bidirectional stream, and establishing a connection channel with the first server;

[0019] Acquire configuration parameters through the first server and initialize the gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number, and the idle survival time of the second gRPC bidirectional stream;

[0020] Establishing a second gRPC bidirectional flow of the number of cores in the first cache pool by the first server to obtain a second cache pool, wherein the second gRPC bidirectional flow is used to implement data transmission between the first server and the second server;

[0021] Determine whether there is an idle second gRPC bidirectional stream in the second cache pool. If so, directly extract the second gRPC bidirectional stream. If not, determine whether the number of cores of the second gRPC bidirectional stream reaches a first threshold, and create a new second gRPC bidirectional stream in the second cache pool when the number of cores does not reach the first threshold.

[0022] In one embodiment, the method further comprises:

[0023] The first server determines whether the second server has successfully established a connection channel with the first server. If successful, a successful connection identifier is encapsulated. If unsuccessful, the first connection request is resent to the first server.

[0024] In one embodiment, the method further comprises:

[0025] The second cache pool is scanned periodically to determine whether the second gRPC bidirectional stream is transmitting data, and the second gRPC bidirectional stream is closed when the second gRPC bidirectional stream is idle and the idle survival time reaches a second threshold to save server resources.

[0026] In a third aspect, the present application provides a data transmission system based on a gRPC bidirectional stream cache pool in a hybrid cloud, which is applied to a first server, and the first server is used to implement a public cloud proxy service. The system includes:

[0027] A first registration module, configured to receive a first registration request from a second server, wherein the first registration request is used to register the second server with the first server;

[0028] A first connection module, configured to create the second server to a first gRPC bidirectional stream, send a first connection request to the second server through the first gRPC bidirectional stream, and establish a connection channel with the second server;

[0029] A first initialization module is used to obtain configuration parameters and initialize the gRPC bidirectional flow cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number and the idle survival time of the second gRPC bidirectional flow;

[0030] A first establishing module is used to establish a second gRPC bidirectional flow of the number of cores in the first cache pool to obtain a second cache pool, wherein the second gRPC bidirectional flow is used to realize data transmission between the first server and the second server;

[0031] The first judgment module is used to determine whether there is an idle second gRPC bidirectional flow in the second cache pool. If so, the second gRPC bidirectional flow is directly extracted through the second server. If not, it is determined whether the number of cores of the second gRPC bidirectional flow reaches a first threshold, and when the number of cores does not reach the first threshold, a new second gRPC bidirectional flow is created in the second cache pool through the second server.

[0032] In a fourth aspect, the present application provides a data transmission system based on a gRPC bidirectional stream cache pool in a hybrid cloud, which is applied to a second server, and the second server is used to implement a private cloud proxy service. The system includes:

[0033] A second registration module, configured to send a first registration request to the first server, wherein the first registration request is used to register the second server with the first server;

[0034] A second connection module, configured to create a first gRPC bidirectional stream for the second server through the first server, receive a first connection request from the first server through the first gRPC bidirectional stream, and establish a connection channel with the first server;

[0035] A second initialization module is used to obtain configuration parameters through the first server and initialize the gRPC bidirectional flow cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number and the idle survival time of the second gRPC bidirectional flow;

[0036] A second establishing module is used to establish a second gRPC bidirectional flow with a core number in the first cache pool through the first server to obtain a second cache pool, wherein the second gRPC bidirectional flow is used to realize data transmission between the first server and the second server;

[0037] The second judgment module is used to judge whether there is an idle second gRPC bidirectional flow in the second cache pool. If so, the second gRPC bidirectional flow is directly extracted; if not, whether the number of cores of the second gRPC bidirectional flow reaches a first threshold, and create a new second gRPC bidirectional flow in the second cache pool when the number of cores does not reach the first threshold.

[0038] In a fifth aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0039] receiving a first registration request from a second server, wherein the first registration request is used to register the second server with the first server;

[0040] Create the second server to the first gRPC bidirectional stream, send a first connection request to the second server through the first gRPC bidirectional stream, and establish a connection channel with the second server;

[0041] Obtain configuration parameters and initialize a gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number, and the idle survival time of the second gRPC bidirectional stream;

[0042] Establishing a second gRPC bidirectional flow of the number of cores in the first cache pool to obtain a second cache pool, wherein the second gRPC bidirectional flow is used to implement data transmission between the first server and the second server;

[0043] Determine whether there is an idle second gRPC bidirectional flow in the second cache pool; if so, directly extract the second gRPC bidirectional flow through the second server; if not, determine whether the number of cores of the second gRPC bidirectional flow reaches a first threshold, and create a new second gRPC bidirectional flow in the second cache pool through the second server when the number of cores does not reach the first threshold; or

[0044] Sending a first registration request to a first server, where the first registration request is used to register a second server with the first server;

[0045] Creating a first gRPC bidirectional stream to the second server through the first server, receiving a first connection request from the first server through the first gRPC bidirectional stream, and establishing a connection channel with the first server;

[0046] Acquire configuration parameters through the first server and initialize the gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number, and the idle survival time of the second gRPC bidirectional stream;

[0047] Establishing a second gRPC bidirectional flow of the number of cores in the first cache pool by the first server to obtain a second cache pool, wherein the second gRPC bidirectional flow is used to implement data transmission between the first server and the second server;

[0048] Determine whether there is an idle second gRPC bidirectional stream in the second cache pool. If so, directly extract the second gRPC bidirectional stream. If not, determine whether the number of cores of the second gRPC bidirectional stream reaches a first threshold, and create a new second gRPC bidirectional stream in the second cache pool when the number of cores does not reach the first threshold.

[0049] In a sixth aspect, the present application provides a computer storage medium storing a computer program, wherein when the computer program is executed by a processor, the following steps are implemented:

[0050] receiving a first registration request from a second server, wherein the first registration request is used to register the second server with the first server;

[0051] Create the second server to the first gRPC bidirectional stream, send a first connection request to the second server through the first gRPC bidirectional stream, and establish a connection channel with the second server;

[0052] Obtain configuration parameters and initialize a gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number, and the idle survival time of the second gRPC bidirectional stream;

[0053] Establishing a second gRPC bidirectional flow of the number of cores in the first cache pool to obtain a second cache pool, wherein the second gRPC bidirectional flow is used to implement data transmission between the first server and the second server;

[0054] Determine whether there is an idle second gRPC bidirectional flow in the second cache pool; if so, directly extract the second gRPC bidirectional flow through the second server; if not, determine whether the number of cores of the second gRPC bidirectional flow reaches a first threshold, and create a new second gRPC bidirectional flow in the second cache pool through the second server when the number of cores does not reach the first threshold; or

[0055] Sending a first registration request to a first server, where the first registration request is used to register a second server with the first server;

[0056] Creating a first gRPC bidirectional stream to the second server through the first server, receiving a first connection request from the first server through the first gRPC bidirectional stream, and establishing a connection channel with the first server;

[0057] Acquire configuration parameters through the first server and initialize the gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number, and the idle survival time of the second gRPC bidirectional stream;

[0058] Establishing a second gRPC bidirectional flow of the number of cores in the first cache pool by the first server to obtain a second cache pool, wherein the second gRPC bidirectional flow is used to implement data transmission between the first server and the second server;

[0059] Determine whether there is an idle second gRPC bidirectional stream in the second cache pool. If so, directly extract the second gRPC bidirectional stream. If not, determine whether the number of cores of the second gRPC bidirectional stream reaches a first threshold, and create a new second gRPC bidirectional stream in the second cache pool when the number of cores does not reach the first threshold.

[0060] The above-mentioned data transmission method and system based on the gRPC bidirectional stream cache pool in the hybrid cloud, by registering the private cloud proxy service to the public cloud proxy service, and creating a gRPC bidirectional stream in the private cloud proxy service for controlling the connectivity between the private cloud proxy service and the public cloud proxy service, and initializing the gRPC bidirectional stream cache pool according to the configuration parameters, creating a core number of gRPC bidirectional streams for controlling data transmission in the cache pool, thereby isolating connectivity control requests and data transmission requests through different gRPC bidirectional streams, effectively reducing the complexity of data transmission. In addition, the cache pool will determine whether there are idle gRPC bidirectional streams for data transmission. If so, the gRPC bidirectional stream will be directly extracted for data transmission. If not, it will determine whether the number of cores has reached the maximum number, and create a new gRPC bidirectional stream for data transmission if it has not reached the maximum number. The cache pool's method of increasing gRPC bidirectional streams on demand can efficiently utilize server resources and improve data transmission performance in hybrid cloud scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 This is a flow chart of a data transmission method based on a gRPC bidirectional stream cache pool in a hybrid cloud in one embodiment of the present application;

[0062] Figure 2 This is a flow chart of a data transmission method based on a gRPC bidirectional stream cache pool in a hybrid cloud in one embodiment of the present application;

[0063] Figure 3 This is a flow chart of a data transmission method based on a gRPC bidirectional stream cache pool in a hybrid cloud in one embodiment of the present application;

[0064] Figure 4 This is a flow chart of a data transmission method based on a gRPC bidirectional stream cache pool in a hybrid cloud in one embodiment of the present application;

[0065] Figure 5 A data transmission flow chart based on a gRPC bidirectional stream cache pool for a data transmission solution based on a gRPC bidirectional stream cache pool in a hybrid cloud in one embodiment of the present application;

[0066] Figure 6 This is a schematic diagram of the structure of a data transmission system based on a gRPC bidirectional stream cache pool in a hybrid cloud in one embodiment of the present application;

[0067] Figure 7 This is a schematic diagram of the structure of a data transmission system based on a gRPC bidirectional stream cache pool in a hybrid cloud in one embodiment of the present application;

[0068] Figure 8This is a schematic diagram of the structure of a data transmission system based on a gRPC bidirectional stream cache pool in a hybrid cloud in one embodiment of the present application;

[0069] Fig. 9 This is a schematic diagram of the structure of a data transmission system based on a gRPC bidirectional stream cache pool in a hybrid cloud in one embodiment of the present application;

[0070] Fig.10 This is a diagram of the internal structure of a computer device according to one embodiment of the present application. DETAILED DESCRIPTION

[0071] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0072] like Figure 1 As shown, in one embodiment, a data transmission method based on a gRPC bidirectional stream cache pool in a hybrid cloud is applied to a first server, and the first server is used to implement a public cloud proxy service, including the following steps:

[0073] Step S110: receiving a first registration request from a second server, where the first registration request is used to register the second server with the first server.

[0074] Specifically, the public cloud proxy server receives a registration request from the private cloud proxy server, and registers the private cloud proxy server with the public cloud proxy server.

[0075] Step S120: Create a second server to the first gRPC bidirectional stream, send a first connection request to the second server through the first gRPC bidirectional stream, and establish a connection channel with the second server.

[0076] Specifically, based on step S110, the public cloud proxy server creates a transmission control class gRPC bidirectional stream for the private cloud proxy server, and sends a connection request to the private cloud proxy server through the transmission control class gRPC bidirectional stream, thereby establishing a connection channel between the public cloud proxy server and the private cloud proxy server.

[0077] Step S130, obtain configuration parameters and initialize the gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number and the idle survival time of the second gRPC bidirectional stream.

[0078] Specifically, the public cloud proxy server obtains configuration parameters and initializes the gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool. The first cache pool is the gRPC bidirectional stream cache pool after initialization. The configuration parameters include the pre-set number of cores, maximum number, and idle survival time of the gRPC bidirectional stream used for data transmission.

[0079] Step S140: establish a second gRPC bidirectional flow with the same number of cores in the first cache pool to obtain a second cache pool, wherein the second gRPC bidirectional flow is used to implement data transmission between the first server and the second server.

[0080] Specifically, the public cloud proxy server establishes a core number of data transmission class gRPC bidirectional streams in the initialized gRPC bidirectional stream cache pool. The gRPC bidirectional stream cache pool after establishing the core number of data transmission class gRPC bidirectional streams is the second cache pool. The data transmission class gRPC bidirectional stream is used to realize data transmission between the public cloud proxy server and the private cloud proxy server.

[0081] Step S150, determine whether there is an idle second gRPC bidirectional stream in the second cache pool. If so, directly extract the second gRPC bidirectional stream through the second server. If not, determine whether the number of cores of the second gRPC bidirectional stream reaches the first threshold, and create a new second gRPC bidirectional stream in the second cache pool through the second server when the number of cores does not reach the first threshold.

[0082] Specifically, during the data transmission process, the public cloud proxy server will determine through the private cloud proxy server whether there are idle data transmission class gRPC bidirectional streams in the second cache pool. If there are idle data transmission class gRPC bidirectional streams, the data transmission class gRPC bidirectional streams in the second cache pool will be directly extracted through the private cloud proxy server for data transmission. If there are no idle data transmission class gRPC bidirectional streams in the second cache pool, it will be determined whether the number of data transmission class gRPC bidirectional streams has reached a preset upper limit value, and when the number of data transmission class gRPC bidirectional streams has not reached the preset upper limit value, a new data transmission class gRPC bidirectional stream will be established in the second cache pool through the private cloud proxy server for data transmission.

[0083] The above-mentioned data transmission method based on the gRPC bidirectional stream cache pool in the hybrid cloud is achieved by registering the private cloud proxy service to the public cloud proxy service, creating a gRPC bidirectional stream in the private cloud proxy service for controlling the connectivity between the private cloud proxy service and the public cloud proxy service, and initializing the gRPC bidirectional stream cache pool according to the configuration parameters, creating a core number of gRPC bidirectional streams for controlling data transmission in the cache pool, thereby isolating connectivity control requests and data transmission requests through different gRPC bidirectional streams, and effectively reducing the complexity of data transmission. In addition, the cache pool will determine whether there are idle gRPC bidirectional streams for data transmission. If so, the gRPC bidirectional stream will be directly extracted for data transmission. If not, it will check whether the number of cores has reached the maximum number, and create a new gRPC bidirectional stream for data transmission if it has not reached the maximum number. The cache pool can increase the gRPC bidirectional stream on demand, which can efficiently utilize server resources and improve the data transmission performance in the hybrid cloud scenario.

[0084] like Figure 2 As shown, in one embodiment, a data transmission method based on a gRPC bidirectional stream cache pool in a hybrid cloud is applied to a first server, and the first server is used to implement a public cloud proxy service, including the following steps:

[0085] Step S210: receiving a first registration request from a second server, where the first registration request is used to register the second server with the first server.

[0086] Specifically, the public cloud proxy server receives a registration request from the private cloud proxy server, and registers the private cloud proxy server with the public cloud proxy server.

[0087] Step S220: Create a second server to the first gRPC bidirectional stream, send a first connection request to the second server through the first gRPC bidirectional stream, and establish a connection channel with the second server.

[0088] Specifically, based on step S210, the public cloud proxy server creates a transmission control class gRPC bidirectional stream for the private cloud proxy server, and sends a connection request to the private cloud proxy server through the transmission control class gRPC bidirectional stream, thereby establishing a connection channel between the public cloud proxy server and the private cloud proxy server.

[0089] Step S230, determining whether the first server successfully establishes a connection channel with the second server. If successful, encapsulating a successful connection identifier in the second server. If unsuccessful, resending the first connection request to the second server.

[0090] Specifically, the public cloud proxy server will determine whether it has successfully established a connection channel with the private cloud proxy server, and encapsulate a successful connection identifier on the private cloud proxy server when the connection channel is successfully established. If the connection channel cannot be successfully established, the public cloud proxy server will resend a connection request to the private cloud proxy server.

[0091] Step S240, obtain configuration parameters and initialize the gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number and the idle survival time of the second gRPC bidirectional stream.

[0092] Specifically, the public cloud proxy server obtains configuration parameters and initializes the gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool. The first cache pool is the gRPC bidirectional stream cache pool after initialization. The configuration parameters include the pre-set number of cores, maximum number, and idle survival time of the gRPC bidirectional stream used for data transmission.

[0093] Step S250: Establish a second gRPC bidirectional flow with the same number of cores in the first cache pool to obtain a second cache pool. The second gRPC bidirectional flow is used to implement data transmission between the first server and the second server.

[0094] Specifically, the public cloud proxy server establishes a core number of data transmission class gRPC bidirectional streams in the initialized gRPC bidirectional stream cache pool. The gRPC bidirectional stream cache pool after establishing the core number of data transmission class gRPC bidirectional streams is the second cache pool. The data transmission class gRPC bidirectional stream is used to realize data transmission between the public cloud proxy server and the private cloud proxy server.

[0095] Step S260, determine whether there is an idle second gRPC bidirectional stream in the second cache pool. If so, directly extract the second gRPC bidirectional stream through the second server. If not, determine whether the number of cores of the second gRPC bidirectional stream reaches the first threshold, and create a new second gRPC bidirectional stream in the second cache pool through the second server when the number of cores does not reach the first threshold.

[0096] Specifically, during the data transmission process, the public cloud proxy server will determine through the private cloud proxy server whether there are idle data transmission class gRPC bidirectional streams in the second cache pool. If there are idle data transmission class gRPC bidirectional streams, the data transmission class gRPC bidirectional streams in the second cache pool will be directly extracted through the private cloud proxy server for data transmission. If there are no idle data transmission class gRPC bidirectional streams in the second cache pool, it will be determined whether the number of data transmission class gRPC bidirectional streams has reached a preset upper limit value, and when the number of data transmission class gRPC bidirectional streams has not reached the preset upper limit value, a new data transmission class gRPC bidirectional stream will be established in the second cache pool through the private cloud proxy server for data transmission.

[0097] Step S270, the second server periodically scans the second cache pool to determine whether the second gRPC bidirectional stream is transmitting data, and closes the second gRPC bidirectional stream when the second gRPC bidirectional stream is idle and the idle survival time reaches a second threshold to save server resources.

[0098] Specifically, during the data transmission process, the public cloud proxy server periodically scans the second cache pool through the private cloud proxy server to determine whether the data transmission class gRPC bidirectional stream is transmitting data, and closes the data transmission class gRPC bidirectional stream when the data transmission class gRPC bidirectional stream is idle and the idle survival time reaches a preset value to save server resources.

[0099] The above-mentioned data transmission method based on the gRPC bidirectional stream cache pool in the hybrid cloud is achieved by registering the private cloud proxy service to the public cloud proxy service, creating a gRPC bidirectional stream in the private cloud proxy service for controlling the connectivity between the private cloud proxy service and the public cloud proxy service, and initializing the gRPC bidirectional stream cache pool according to the configuration parameters, creating a core number of gRPC bidirectional streams for controlling data transmission in the cache pool, thereby isolating connectivity control requests and data transmission requests through different gRPC bidirectional streams, and effectively reducing the complexity of data transmission. In addition, the cache pool will determine whether there are idle gRPC bidirectional streams for data transmission. If so, the gRPC bidirectional stream will be directly extracted for data transmission. If not, it will check whether the number of cores has reached the maximum number, and create a new gRPC bidirectional stream for data transmission if it has not reached the maximum number. The cache pool can increase the gRPC bidirectional stream on demand, which can efficiently utilize server resources and improve the data transmission performance in the hybrid cloud scenario.

[0100] like Figure 3 As shown, in one embodiment, a data transmission method based on a gRPC bidirectional stream cache pool in a hybrid cloud is applied to a second server, and the second server is used to implement a private cloud proxy service, including the following steps:

[0101] Step S310: Send a first registration request to the first server, where the first registration request is used to register the second server with the first server.

[0102] Specifically, the private cloud proxy server sends a registration request to the public cloud proxy server and actively registers with the public cloud proxy server.

[0103] Step S320: Create a first gRPC bidirectional stream from the second server to the first server through the first server, receive a first connection request from the first server through the first gRPC bidirectional stream, and establish a connection channel with the first server.

[0104] Specifically, based on step S310, the private cloud proxy server creates a transmission control class gRPC bidirectional stream through the public cloud proxy server, and receives a connection request from the public cloud proxy server through the transmission control class gRPC bidirectional stream to establish a connection channel between the private cloud proxy server and the public cloud proxy server.

[0105] Step S330, obtaining configuration parameters through the first server and initializing the gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number and the idle survival time of the second gRPC bidirectional stream.

[0106] Specifically, the private cloud proxy server obtains configuration parameters through the public cloud proxy server and initializes the gRPC bidirectional stream cache pool through the public cloud proxy server according to the configuration parameters obtained to obtain a first cache pool. The first cache pool is the gRPC bidirectional stream cache pool after initialization. The configuration parameters include the number of cores, the maximum number, and the idle survival time of the gRPC bidirectional stream that transmits data.

[0107] Step S340: Establish a second gRPC bidirectional flow with the same number of cores in the first cache pool through the first server to obtain a second cache pool. The second gRPC bidirectional flow is used to realize data transmission between the first server and the second server.

[0108] Specifically, the private cloud proxy server establishes a core number of transmission data class g RPC bidirectional streams in the gRPC bidirectional stream cache pool after initialization through the public cloud proxy server. After the establishment, the second cache pool is obtained. The transmission data class gRPC bidirectional stream established in the second cache pool is used to realize data transmission between the public cloud proxy and the private cloud proxy.

[0109] Step S350, determine whether there is an idle second gRPC bidirectional flow in the second cache pool. If so, directly extract the second gRPC bidirectional flow. If not, determine whether the number of cores of the second gRPC bidirectional flow reaches the first threshold, and create a new second gRPC bidirectional flow in the second cache pool when the number of cores does not reach the first threshold.

[0110] Specifically, during the data transmission process, the private cloud proxy server will determine whether there are idle transmission data class gRPC bidirectional streams in the second cache pool. If there are idle transmission data class gRPC bidirectional streams in the second cache pool, the idle transmission data class gRPC bidirectional streams will be directly extracted for data transmission. If there are no idle transmission data class gRPC bidirectional streams in the second cache pool, the private cloud proxy server will further determine whether the number of transmission data class gRPC bidirectional streams in the second cache pool reaches the preset upper limit value, and create a new transmission data class gRPC bidirectional stream for data transmission when the number of transmission data class gRPC bidirectional streams in the second cache pool does not reach the preset upper limit value.

[0111] The above-mentioned data transmission method based on the gRPC bidirectional stream cache pool in the hybrid cloud is achieved by registering the private cloud proxy service to the public cloud proxy service, creating a gRPC bidirectional stream in the private cloud proxy service for controlling the connectivity between the private cloud proxy service and the public cloud proxy service, and initializing the gRPC bidirectional stream cache pool according to the configuration parameters, creating a core number of gRPC bidirectional streams for controlling data transmission in the cache pool, thereby isolating connectivity control requests and data transmission requests through different gRPC bidirectional streams, and effectively reducing the complexity of data transmission. In addition, the cache pool will determine whether there are idle gRPC bidirectional streams for data transmission. If so, the gRPC bidirectional stream will be directly extracted for data transmission. If not, it will check whether the number of cores has reached the maximum number, and create a new gRPC bidirectional stream for data transmission if it has not reached the maximum number. The cache pool can increase the gRPC bidirectional stream on demand, which can efficiently utilize server resources and improve the data transmission performance in the hybrid cloud scenario.

[0112] like Figure 4 As shown, in one embodiment, a data transmission method based on a gRPC bidirectional stream cache pool in a hybrid cloud is applied to a second server, and the second server is used to implement a private cloud proxy service, including the following steps:

[0113] Step S410: Send a first registration request to the first server, where the first registration request is used to register the second server with the first server.

[0114] Specifically, the private cloud proxy server sends a registration request to the public cloud proxy server and actively registers with the public cloud proxy server.

[0115] Step S420: Create a first gRPC bidirectional stream from the second server to the first server through the first server, receive a first connection request from the first server through the first gRPC bidirectional stream, and establish a connection channel with the first server.

[0116] Specifically, based on step S410, the private cloud proxy server creates a transmission control class gRPC bidirectional stream through the public cloud proxy server, and receives a connection request from the public cloud proxy server through the transmission control class gRPC bidirectional stream to establish a connection channel between the private cloud proxy server and the public cloud proxy server.

[0117] Step S430, determining through the first server whether the second server has successfully established a connection channel with the first server, if successful, a successful connection identifier is encapsulated, if unsuccessful, resending the first connection request to the first server.

[0118] Specifically, the private cloud proxy server determines through the public cloud proxy server whether the private cloud proxy server has successfully established a connection channel with the public cloud proxy server. If a connection channel is successfully established between the private cloud proxy server and the public cloud proxy server, the private cloud proxy server will be encapsulated with a successful connection identifier. If a connection channel is not successfully established between the private cloud proxy server and the public cloud proxy server, the private cloud proxy server will resend a connection request to the public cloud proxy server.

[0119] Step S440, obtaining configuration parameters through the first server and initializing the gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number and the idle survival time of the second gRPC bidirectional stream.

[0120] Specifically, the private cloud proxy server obtains configuration parameters through the public cloud proxy server and initializes the gRPC bidirectional stream cache pool through the public cloud proxy server according to the configuration parameters obtained to obtain a first cache pool. The first cache pool is the gRPC bidirectional stream cache pool after initialization. The configuration parameters include the number of cores, the maximum number, and the idle survival time of the gRPC bidirectional stream that transmits data.

[0121] Step S450: Establish a second gRPC bidirectional flow with the same number of cores in the first cache pool through the first server to obtain a second cache pool. The second gRPC bidirectional flow is used to realize data transmission between the first server and the second server.

[0122] Specifically, the private cloud proxy server establishes a core number of transmission data class g RPC bidirectional streams in the gRPC bidirectional stream cache pool after initialization through the public cloud proxy server. After the establishment, the second cache pool is obtained. The transmission data class gRPC bidirectional stream established in the second cache pool is used to realize data transmission between the public cloud proxy and the private cloud proxy.

[0123] Step S460, determine whether there is an idle second gRPC bidirectional flow in the second cache pool. If so, directly extract the second gRPC bidirectional flow. If not, determine whether the number of cores of the second gRPC bidirectional flow reaches the first threshold, and create a new second gRPC bidirectional flow in the second cache pool when the number of cores does not reach the first threshold.

[0124] Specifically, during the data transmission process, the private cloud proxy server will determine whether there are idle transmission data class gRPC bidirectional streams in the second cache pool. If there are idle transmission data class gRPC bidirectional streams in the second cache pool, the idle transmission data class gRPC bidirectional streams will be directly extracted for data transmission. If there are no idle transmission data class gRPC bidirectional streams in the second cache pool, the private cloud proxy server will further determine whether the number of transmission data class gRPC bidirectional streams in the second cache pool reaches the preset upper limit value, and create a new transmission data class gRPC bidirectional stream for data transmission when the number of transmission data class gRPC bidirectional streams in the second cache pool does not reach the preset upper limit value.

[0125] Step S470, periodically scan the second cache pool and determine whether the second gRPC bidirectional stream is transmitting data, and close the second gRPC bidirectional stream when the second gRPC bidirectional stream is idle and the idle survival time reaches a second threshold to save server resources.

[0126] Specifically, the private cloud proxy server periodically scans the transmission data class gRPC bidirectional flow in the second cache pool and determines whether the transmission data class gRPC bidirectional flow in the second cache pool is transmitting data, and closes the idle transmission data class gRPC bidirectional flow when the transmission data class gRPC bidirectional flow in the second cache pool is idle and its idle survival time reaches a preset value to save server resources.

[0127] The above-mentioned data transmission method based on the gRPC bidirectional stream cache pool in the hybrid cloud is achieved by registering the private cloud proxy service to the public cloud proxy service, creating a gRPC bidirectional stream in the private cloud proxy service for controlling the connectivity between the private cloud proxy service and the public cloud proxy service, and initializing the gRPC bidirectional stream cache pool according to the configuration parameters, creating a core number of gRPC bidirectional streams for controlling data transmission in the cache pool, thereby isolating connectivity control requests and data transmission requests through different gRPC bidirectional streams, and effectively reducing the complexity of data transmission. In addition, the cache pool will determine whether there are idle gRPC bidirectional streams for data transmission. If so, the gRPC bidirectional stream will be directly extracted for data transmission. If not, it will check whether the number of cores has reached the maximum number, and create a new gRPC bidirectional stream for data transmission if it has not reached the maximum number. The cache pool can increase the gRPC bidirectional stream on demand, which can efficiently utilize server resources and improve the data transmission performance in the hybrid cloud scenario.

[0128] like Figure 5 As shown, in one embodiment, a data transmission solution based on a gRPC bidirectional stream cache pool in a hybrid cloud, by caching multiple gRPC bidirectional streams between a Proxy Server (public cloud proxy service) and a Proxy Agent (private cloud proxy service), namely, one gRPC bidirectional stream for transmitting control class requests and multiple gRPC bidirectional streams for transmitting data class requests, fully utilizes server resources and network broadband resources to achieve the goal of efficient data transmission in a hybrid cloud.

[0129] Proxy Server is a public cloud module of proxy service. This solution implements the function of receiving Proxy Agent RPC (remote procedure call) requests and accepting public cloud application connections in the Proxy Server module. On the one hand, as the server end of RPC (remote procedure call) communication, the ProxyServer module receives the registration request of the Proxy Agent. When the ProxyAgent is successfully registered, the Proxy Server can use the gRPC bidirectional flow established during registration to send RPC requests to the Proxy Agent. Among them, the RPC request includes transmission control class requests and transmission data class requests. The transmission control class request is used to control the connectivity of the Proxy Agent and the Proxy Agent to the private cloud application network, and the transmission data class request is used for the public cloud application to connect to the data sent by the Proxy Server. On the other hand, as the target end of the public cloud application, the Proxy Server module receives the public cloud application connection. When the connection is successfully established, the public cloud application can use the proxy service for data transmission.

[0130] Proxy Agent is a private cloud module of the proxy service. This solution implements the function of receiving Proxy Server RPC (remote process call) requests and connecting to private cloud applications in the Proxy Agent module. Users obtain the Proxy Agent installation package from the download center provided by the ProxyServer and install and deploy it in an environment that is interconnected with the private cloud application network. When the Proxy Agent starts, it attempts to connect to the private cloud application. If the connection is successful, the Proxy Agent will actively register with the Proxy Server. After successful registration, the Proxy Agent initializes the gRPC bidirectional stream cache pool and caches the number of gRPC bidirectional streams predetermined by the user for data transmission.

[0131] It should be noted that the gRPC bidirectional flow for transmission control class requests is created when the Proxy Agent registers with the ProxyServer. All subsequent control class request data sent from the Proxy Server is transmitted to the Proxy Agent by the transmission control class gRPC bidirectional flow. The creation of the gRPC bidirectional flow for transmission data class requests is divided into two situations: First, after the ProxyAgent is successfully registered, the core number of gRPC bidirectional flows is created and saved to the cache pool. Second, during the data transmission process, when the gRPC bidirectional flows in the cache pool are not enough, a new gRPC bidirectional flow is created. The specific number is controlled by the core number and maximum number of the gRPC bidirectional flow cache pool.

[0132] It should be further explained that the gRPC framework is a data transmission framework on HTTP / 2, and the gRPC bidirectional stream implements the stream in the HTTP2 protocol. The gRPC bidirectional stream is an independent bidirectional sequence for exchanging data in the HTTP / 2 connection based on the gRPC framework. It has the characteristics of being sustainable and can be shut down by either the client or the server. After the Proxy Agent is registered with the Proxy Server, this solution establishes a gRPC bidirectional stream between the Proxy Agent and the Proxy Server for transmitting control class requests. The Proxy Server uses the transmission control class gRPC bidirectional stream to send control instructions to the Proxy Agent, including but not limited to: pausing the Proxy Agent and resuming the Proxy Agent. The Proxy Agent uses the transmission control class gRPC bidirectional stream to send a response to the Proxy Server control instruction to the Proxy Server. In addition, after the gRPC bidirectional stream cache pool on the ProxyAgent side is successfully initialized, a gRPC bidirectional stream for transmitting data class requests is established between the Proxy Agent and the Proxy Server. The Proxy Agent and the Proxy Server encapsulate the application data to be transmitted as a gRPC request, and use the gRPC bidirectional stream in the cache pool to transmit the data class request to complete the data transmission.

[0133] In this embodiment, the Proxy Server and the Proxy Agent are first started. Since the Proxy Server cannot directly connect to the Proxy Agent, the Proxy Agent will actively register with the Proxy Serve after it is started. At the same time, the Proxy Agent will create the first gRPC bidirectional stream to the Proxy Serve. This bidirectional stream is subsequently used exclusively for transmission control requests, including stopping the Proxy Agent request, creating a new gRPC bidirectional stream request between the Proxy Server and the Proxy Agent, etc. After the Proxy Agent successfully registers with the Proxy Serve, the system will initialize the gRPC bidirectional stream cache pool according to the configured parameters. The configured parameters include the number of cores, the maximum number, and the idle survival time of the gRPC bidirectional stream used for data transmission. At the same time, the system will establish a core number of gRPC bidirectional streams for data transmission and put them into the cache pool. Subsequent data transmission requests between the Proxy Server and the Proxy Agent will be transmitted through the gRPC bidirectional stream of the cache pool.

[0134] The public cloud application connects to the Proxy Server, triggering the Proxy Server to send a connection request to the Proxy Agent using the created gRPC bidirectional stream for transmission control. After receiving the connection request, the Proxy Agent attempts to connect to the private cloud application. If the Proxy Agent successfully connects to the private cloud application, the Proxy Agent will respond to the Proxy Server's connection request and encapsulate a successful connection flag in the response body. Otherwise, the Proxy Agent will re-obtain the connection request and repeat the step.

[0135] After responding to the connection request of the Proxy Server, the Proxy Agent establishes a connection channel with the Proxy Server. Then, the Proxy Agent will try to extract the gRPC bidirectional stream for data transmission from the gRPC bidirectional stream cache pool and determine whether there is an idle gRPC bidirectional stream for data transmission. If there is an idle gRPC bidirectional stream for data transmission, it will directly extract it and perform data transmission. Otherwise, it will further determine whether the number of gRPC bidirectional streams for data transmission in the cache pool has reached the predefined upper limit. If it has not reached the upper limit, the Proxy Agent will create a new gRPC bidirectional stream for data transmission and place it in the cache pool.

[0136] It should be noted that after the public cloud application uses the proxy service to complete data transmission to the private cloud application, the public cloud application will close the connection between it and the Proxy Server through the transmission control class gRPC bidirectional flow, or the private cloud application will close the connection between it and the Proxy Agent through the transmission control class gRPC bidirectional flow.

[0137] The Proxy Agent periodically scans the cache pool through a scheduled task to check whether the data transmission gRPC bidirectional flow in the cache pool is transmitting data. If the scan result shows that a data transmission gRPC bidirectional flow is idle and its idle time reaches a predefined threshold, the data transmission gRPC bidirectional flow will be closed to save server resources.

[0138] In the current data transmission scenario of hybrid cloud architecture, cloud service providers use a single gRPC bidirectional stream for data transmission between public cloud and private cloud. For scenarios with a large number of requests and a small amount of data, a single gRPC bidirectional stream can save server resources while ensuring data transmission performance. However, when the amount of request data to be transmitted is large, a small amount of request data can fill a gRPC bidirectional stream. Therefore, a single gRPC bidirectional stream will become a performance bottleneck for data transmission, seriously restricting the efficiency of data migration under hybrid cloud. In addition, in the hybrid cloud scenario, in the proxy service built based on the gRPC framework, a single gRPC bidirectional stream is usually used directly for data transmission. It is necessary to define an additional protocol to distinguish between control requests and data requests, which increases the complexity of data transmission. In addition, when multiple applications on the public cloud transmit data to applications on the private cloud through the proxy service at the same time, the essentially unrelated parallel data transmission is converted into serial data transmission by the single gRPC bidirectional stream through the proxy service. The data transmission rate drops rapidly through the proxy service, and the network bandwidth between the public cloud and the private cloud cannot be fully utilized.

[0139] The above-mentioned data transmission scheme based on the gRPC bidirectional stream cache pool in the hybrid cloud, in the proxy service based on the gRPC framework, builds a gRPC bidirectional stream cache pool between the Proxy Server (public cloud proxy service) and the Proxy Agent (private cloud proxy service), stores a gRPC bidirectional stream for transmitting control class requests and multiple gRPC bidirectional streams for transmitting data class requests, and isolates control class requests and data class requests through different gRPC bidirectional streams, which can effectively reduce the complexity of data transmission. In addition, the number of gRPC bidirectional streams used for data transmission in the cache pool can be changed dynamically. When there is a data class request with a large amount of data from the Proxy Server (public cloud proxy service) to the Proxy Agent (private cloud proxy service), the cache pool will increase the gRPC bidirectional stream for transmitting the data class request as needed, so as to solve the disadvantage that a single gRPC bidirectional stream restricts data transmission performance. When the number of data transmission requests from Proxy Server (public cloud proxy service) to Proxy Agent (private cloud proxy service) decreases, the cache pool will also reduce the gRPC bidirectional flow of data transmission requests accordingly, which to a certain extent reduces the waste of server resources, efficiently utilizes server resources, and improves data transmission performance in hybrid cloud scenarios.

[0140] like Figure 6As shown, in one embodiment, a data transmission system based on a gRPC bidirectional stream cache pool in a hybrid cloud is applied to a first server, and the first server is used to implement a public cloud proxy service, including a first registration module 610, a first connection module 620, a first initialization module 630, a first establishment module 640 and a first judgment module 650.

[0141] The first registration module 610 is used to receive a first registration request from a second server, where the first registration request is used to register the second server with the first server.

[0142] The first connection module 620 is used to create the second server to the first gRPC bidirectional stream, send a first connection request to the second server through the first gRPC bidirectional stream, and establish a connection channel with the second server.

[0143] The first initialization module 630 is used to obtain configuration parameters and initialize the gRPC bidirectional flow cache pool according to the configuration parameters to obtain a first cache pool. The configuration parameters include the number of cores, the maximum number and the idle survival time of the second gRPC bidirectional flow.

[0144] The first establishing module 640 is used to establish a second gRPC bidirectional flow of the core quantity in the first cache pool to obtain a second cache pool, and the second gRPC bidirectional flow is used to realize data transmission between the first server and the second server.

[0145] The first judgment module 650 is used to determine whether there is an idle second gRPC bidirectional stream in the second cache pool. If so, the second gRPC bidirectional stream is directly extracted through the second server. If not, it is determined whether the number of cores of the second gRPC bidirectional stream reaches the first threshold, and when the number of cores does not reach the first threshold, a new second gRPC bidirectional stream is created in the second cache pool through the second server.

[0146] The above-mentioned data transmission system based on the gRPC bidirectional stream cache pool in the hybrid cloud registers the private cloud proxy service to the public cloud proxy service, creates a gRPC bidirectional stream in the private cloud proxy service for controlling the connectivity between the private cloud proxy service and the public cloud proxy service, and initializes the gRPC bidirectional stream cache pool according to the configuration parameters, and creates a core number of gRPC bidirectional streams for controlling data transmission in the cache pool. In this way, connectivity control requests and data transmission requests are isolated by different gRPC bidirectional streams, which effectively reduces the complexity of data transmission. In addition, the cache pool will determine whether there are idle gRPC bidirectional streams for data transmission. If so, the gRPC bidirectional stream will be directly extracted for data transmission. If not, it will check whether the number of cores has reached the maximum number, and create a new gRPC bidirectional stream for data transmission if it has not reached the maximum number. The cache pool can increase the gRPC bidirectional stream on demand, which can efficiently utilize server resources and improve the data transmission performance in the hybrid cloud scenario.

[0147] like Figure 7 As shown, in one embodiment, a data transmission system based on a gRPC bidirectional stream cache pool in a hybrid cloud is applied to a first server, and the first server is used to implement a public cloud proxy service, including a first registration module 710, a first connection module 720, a first connection judgment module 730, a first initialization module 740, a first establishment module 750, a first judgment module 760 and a transmission judgment module 770.

[0148] The first registration module 710 is used to receive a first registration request from a second server, where the first registration request is used to register the second server with the first server.

[0149] The first connection module 720 is used to create the second server to the first gRPC bidirectional stream, send a first connection request to the second server through the first gRPC bidirectional stream, and establish a connection channel with the second server.

[0150] The first connection determination module 730 is used to determine whether the first server successfully establishes a connection channel with the second server. If successful, a successful connection identifier is encapsulated in the second server. If unsuccessful, the first connection request is resent to the second server.

[0151] The first initialization module 740 is used to obtain configuration parameters and initialize the gRPC bidirectional flow cache pool according to the configuration parameters to obtain a first cache pool. The configuration parameters include the number of cores, the maximum number and the idle survival time of the second gRPC bidirectional flow.

[0152] The first establishing module 750 is used to establish a second gRPC bidirectional flow of the core quantity in the first cache pool to obtain a second cache pool, and the second gRPC bidirectional flow is used to realize data transmission between the first server and the second server.

[0153] The first judgment module 760 is used to determine whether there is an idle second gRPC bidirectional stream in the second cache pool. If so, the second gRPC bidirectional stream is directly extracted through the second server. If not, it is determined whether the number of cores of the second gRPC bidirectional stream reaches the first threshold, and when the number of cores does not reach the first threshold, a new second gRPC bidirectional stream is created in the second cache pool through the second server.

[0154] The transmission determination module 770 is used to determine whether the second gRPC bidirectional stream is transmitting data by periodically scanning the second cache pool through the second server, and to close the second gRPC bidirectional stream when the second gRPC bidirectional stream is idle and the idle survival time reaches a second threshold to save server resources.

[0155] The above-mentioned data transmission system based on the gRPC bidirectional stream cache pool in the hybrid cloud registers the private cloud proxy service to the public cloud proxy service, creates a gRPC bidirectional stream in the private cloud proxy service for controlling the connectivity between the private cloud proxy service and the public cloud proxy service, and initializes the gRPC bidirectional stream cache pool according to the configuration parameters, and creates a core number of gRPC bidirectional streams for controlling data transmission in the cache pool. In this way, connectivity control requests and data transmission requests are isolated by different gRPC bidirectional streams, which effectively reduces the complexity of data transmission. In addition, the cache pool will determine whether there are idle gRPC bidirectional streams for data transmission. If so, the gRPC bidirectional stream will be directly extracted for data transmission. If not, it will check whether the number of cores has reached the maximum number, and create a new gRPC bidirectional stream for data transmission if it has not reached the maximum number. The cache pool can increase the gRPC bidirectional stream on demand, which can efficiently utilize server resources and improve the data transmission performance in the hybrid cloud scenario.

[0156] like Figure 8 As shown, in one embodiment, a data transmission system based on a gRPC bidirectional stream cache pool in a hybrid cloud is applied to a second server, and the second server is used to implement a private cloud proxy service, including a second registration module 810, a second connection module 820, a second initialization module 830, a second establishment module 840 and a second judgment module 850.

[0157] The second registration module 810 is used to send a first registration request to the first server, where the first registration request is used to register the second server with the first server.

[0158] The second connection module 820 is used to create the second server to the first gRPC bidirectional stream through the first server, receive the first connection request from the first server through the first gRPC bidirectional stream, and establish a connection channel with the first server.

[0159] The second initialization module 830 is used to obtain configuration parameters through the first server and initialize the gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool. The configuration parameters include the number of cores, the maximum number and the idle survival time of the second gRPC bidirectional stream.

[0160] The second establishing module 840 is used to establish a second gRPC bidirectional flow of the core quantity in the first cache pool through the first server to obtain a second cache pool, and the second gRPC bidirectional flow is used to realize data transmission between the first server and the second server.

[0161] The second judgment module 850 is used to determine whether there is an idle second gRPC bidirectional stream in the second cache pool. If so, the second gRPC bidirectional stream is directly extracted. If not, it is determined whether the number of cores of the second gRPC bidirectional stream reaches the first threshold, and a new second gRPC bidirectional stream is created in the second cache pool when the number of cores does not reach the first threshold.

[0162] The above-mentioned data transmission system based on the gRPC bidirectional stream cache pool in the hybrid cloud registers the private cloud proxy service to the public cloud proxy service, creates a gRPC bidirectional stream in the private cloud proxy service for controlling the connectivity between the private cloud proxy service and the public cloud proxy service, and initializes the gRPC bidirectional stream cache pool according to the configuration parameters, and creates a core number of gRPC bidirectional streams for controlling data transmission in the cache pool. In this way, connectivity control requests and data transmission requests are isolated by different gRPC bidirectional streams, which effectively reduces the complexity of data transmission. In addition, the cache pool will determine whether there are idle gRPC bidirectional streams for data transmission. If so, the gRPC bidirectional stream will be directly extracted for data transmission. If not, it will check whether the number of cores has reached the maximum number, and create a new gRPC bidirectional stream for data transmission if it has not reached the maximum number. The cache pool can increase the gRPC bidirectional stream on demand, which can efficiently utilize server resources and improve the data transmission performance in the hybrid cloud scenario.

[0163] like Fig. 9 As shown, in one embodiment, a data transmission system based on a gRPC bidirectional stream cache pool in a hybrid cloud is applied to a second server, and the second server is used to implement a private cloud proxy service, including a second registration module 910, a second connection module 920, a second connection judgment module 930, a second initialization module 940, a second establishment module 950, a second judgment module 960 and a scanning judgment module 970.

[0164] The second registration module 910 is used to send a first registration request to the first server, where the first registration request is used to register the second server with the first server.

[0165] The second connection module 920 is used to create the second server to the first gRPC bidirectional stream through the first server, receive the first connection request from the first server through the first gRPC bidirectional stream, and establish a connection channel with the first server.

[0166] The second connection determination module 930 is used to determine whether the second server has successfully established a connection channel with the first server through the first server. If successful, a successful connection identifier is encapsulated. If unsuccessful, the first connection request is resent to the first server.

[0167] The second initialization module 940 is used to obtain configuration parameters through the first server and initialize the gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool. The configuration parameters include the number of cores, the maximum number and the idle survival time of the second gRPC bidirectional stream.

[0168] The second establishing module 950 is used to establish a second gRPC bidirectional flow of the core quantity in the first cache pool through the first server to obtain a second cache pool, and the second gRPC bidirectional flow is used to realize data transmission between the first server and the second server.

[0169] The second judgment module 960 is used to determine whether there is an idle second gRPC bidirectional stream in the second cache pool. If so, the second gRPC bidirectional stream is directly extracted. If not, it is determined whether the number of cores of the second gRPC bidirectional stream reaches the first threshold, and a new second gRPC bidirectional stream is created in the second cache pool when the number of cores does not reach the first threshold.

[0170] The scanning and judging module 970 is used to periodically scan the second cache pool and determine whether the second gRPC bidirectional stream is transmitting data, and to close the second gRPC bidirectional stream when the second gRPC bidirectional stream is idle and the idle survival time reaches a second threshold to save server resources.

[0171] The above-mentioned data transmission system based on the gRPC bidirectional stream cache pool in the hybrid cloud registers the private cloud proxy service to the public cloud proxy service, creates a gRPC bidirectional stream in the private cloud proxy service for controlling the connectivity between the private cloud proxy service and the public cloud proxy service, and initializes the gRPC bidirectional stream cache pool according to the configuration parameters, and creates a core number of gRPC bidirectional streams for controlling data transmission in the cache pool. In this way, connectivity control requests and data transmission requests are isolated by different gRPC bidirectional streams, which effectively reduces the complexity of data transmission. In addition, the cache pool will determine whether there are idle gRPC bidirectional streams for data transmission. If so, the gRPC bidirectional stream will be directly extracted for data transmission. If not, it will check whether the number of cores has reached the maximum number, and create a new gRPC bidirectional stream for data transmission if it has not reached the maximum number. The cache pool can increase the gRPC bidirectional stream on demand, which can efficiently utilize server resources and improve the data transmission performance in the hybrid cloud scenario.

[0172] In one embodiment, a computer device is provided. The computer device may be a smart terminal, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data transmission method based on a gRPC bidirectional stream cache pool in a hybrid cloud is implemented.

[0173] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0174] In one embodiment, a computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0175] In one embodiment, a computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0176] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.

[0177] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0178] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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.

[0179] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A data transmission method based on a gRPC bidirectional stream cache pool in a hybrid cloud, characterized in that: Applied to a first server, the first server being used to implement a public cloud proxy service, the method comprising: receiving a first registration request from a second server, wherein the first registration request is used to register the second server with the first server; Create the second server to the first gRPC bidirectional stream, send a first connection request to the second server through the first gRPC bidirectional stream, and establish a connection channel with the second server; Obtain configuration parameters and initialize a gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number, and the idle survival time of the second gRPC bidirectional stream; Establishing a second gRPC bidirectional flow of the number of cores in the first cache pool to obtain a second cache pool, wherein the second gRPC bidirectional flow is used to implement data transmission between the first server and the second server; Determine whether there is an idle second gRPC bidirectional stream in the second cache pool; if so, directly extract the second gRPC bidirectional stream through the second server; if not, determine whether the number of cores of the second gRPC bidirectional stream reaches a first threshold, and create a new second gRPC bidirectional stream in the second cache pool through the second server when the number of cores does not reach the first threshold.

2. According to claim 1, the data transmission method based on the gRPC bidirectional stream cache pool in the hybrid cloud is characterized in that: The method further comprises: Determine whether the first server successfully establishes a connection channel with the second server. If successful, encapsulate a successful connection identifier in the second server. If unsuccessful, resend the first connection request to the second server.

3. According to claim 1, the data transmission method based on the gRPC bidirectional stream cache pool in the hybrid cloud is characterized in that: The method further comprises: The second server periodically scans the second cache pool to determine whether the second gRPC bidirectional stream is transmitting data, and closes the second gRPC bidirectional stream when the second gRPC bidirectional stream is idle and the idle survival time reaches a second threshold to save server resources.

4. A data transmission method based on a gRPC bidirectional stream cache pool in a hybrid cloud, characterized in that: Applied to a second server, the second server being used to implement a private cloud proxy service, the method comprising: Sending a first registration request to a first server, where the first registration request is used to register a second server with the first server; Creating a first gRPC bidirectional stream to the second server through the first server, receiving a first connection request from the first server through the first gRPC bidirectional stream, and establishing a connection channel with the first server; Acquire configuration parameters through the first server and initialize the gRPC bidirectional stream cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number, and the idle survival time of the second gRPC bidirectional stream; Establishing a second gRPC bidirectional flow of the number of cores in the first cache pool by the first server to obtain a second cache pool, wherein the second gRPC bidirectional flow is used to implement data transmission between the first server and the second server; Determine whether there is an idle second gRPC bidirectional stream in the second cache pool. If so, directly extract the second gRPC bidirectional stream. If not, determine whether the number of cores of the second gRPC bidirectional stream reaches a first threshold, and create a new second gRPC bidirectional stream in the second cache pool when the number of cores does not reach the first threshold.

5. The data transmission method based on gRPC bidirectional stream cache pool in hybrid cloud according to claim 4 is characterized in that: The method further comprises: The first server determines whether the second server has successfully established a connection channel with the first server. If successful, a successful connection identifier is encapsulated. If unsuccessful, the first connection request is resent to the first server.

6. The data transmission method based on the gRPC bidirectional stream cache pool in a hybrid cloud according to claim 4 is characterized in that: The method further comprises: The second cache pool is scanned periodically to determine whether the second gRPC bidirectional stream is transmitting data, and the second gRPC bidirectional stream is closed when the second gRPC bidirectional stream is idle and the idle survival time reaches a second threshold to save server resources.

7. A data transmission system based on gRPC bidirectional stream cache pool in hybrid cloud, characterized in that: Applied to a first server, the first server is used to implement a public cloud proxy service, the system includes: A first registration module, configured to receive a first registration request from a second server, wherein the first registration request is used to register the second server with the first server; A first connection module, configured to create the second server to a first gRPC bidirectional stream, send a first connection request to the second server through the first gRPC bidirectional stream, and establish a connection channel with the second server; A first initialization module is used to obtain configuration parameters and initialize the gRPC bidirectional flow cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number and the idle survival time of the second gRPC bidirectional flow; A first establishing module is used to establish a second gRPC bidirectional flow of the number of cores in the first cache pool to obtain a second cache pool, wherein the second gRPC bidirectional flow is used to realize data transmission between the first server and the second server; The first judgment module is used to judge whether there is an idle second gRPC bidirectional flow in the second cache pool. If so, directly extract the second gRPC bidirectional flow through the second server; if not, judge whether the number of cores of the second gRPC bidirectional flow reaches a first threshold, and create a new second gRPC bidirectional flow in the second cache pool through the second server when the number of cores does not reach the first threshold.

8. A data transmission system based on a gRPC bidirectional stream cache pool in a hybrid cloud, characterized in that: Applied to a second server, the second server is used to implement a private cloud proxy service, the system includes: A second registration module, configured to send a first registration request to the first server, wherein the first registration request is used to register the second server with the first server; A second connection module, configured to create a first gRPC bidirectional stream for the second server through the first server, receive a first connection request from the first server through the first gRPC bidirectional stream, and establish a connection channel with the first server; A second initialization module is used to obtain configuration parameters through the first server and initialize the gRPC bidirectional flow cache pool according to the configuration parameters to obtain a first cache pool, wherein the configuration parameters include the number of cores, the maximum number and the idle survival time of the second gRPC bidirectional flow; A second establishing module is used to establish a second gRPC bidirectional flow with a core number in the first cache pool through the first server to obtain a second cache pool, wherein the second gRPC bidirectional flow is used to realize data transmission between the first server and the second server; The second judgment module is used to judge whether there is an idle second gRPC bidirectional flow in the second cache pool. If so, the second gRPC bidirectional flow is directly extracted; if not, whether the number of cores of the second gRPC bidirectional flow reaches a first threshold, and create a new second gRPC bidirectional flow in the second cache pool when the number of cores does not reach the first threshold.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 3 or 4 to 6 are implemented.

10. A computer storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 or 4 to 6 are implemented.

Citation Information

Patent Citations

  • Distributed data task cross-cloud scheduling system and method

    CN113220480A

  • RPC calling method and device, equipment and storage medium

    CN113515392A

  • Reinforcement learning pipeline method, system and equipment based on cloud native and storage medium

    CN114429210A

  • Methods and systems for migrating virtual private cloud (VPC) resources across public cloud environments

    US11218421B1

  • In-service data plane encryption verification

    US20200280566A1