Distributed System Data Pass-Through Method, Device, Storage Medium and System
By applying the transmissive protocol layer module to handle client requests in a distributed system, flexible and scalable transmissive data transmission is achieved, solving the problem of inconvenient transmissive data transmission in the prior art, and improving the applicability and R&D efficiency of the system.
Patent Information
- Application Number
- CN202210287687.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-22
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-03-22
AI Technical Summary
In the prior art, flexible and scalable data transmission cannot be achieved in distributed systems, resulting in inconvenient integration and use of middleware and basic frameworks.
By obtaining the first transmission protocol request sent by the client, the preset transmission protocol layer module is applied to determine the transmission data to be transmitted, and add it to the transmission data container. Then, based on the second transmission protocol, the transmissible data is taken out from the transmissible data container, identified and added to the second transmission protocol request sent by the gateway to send to the destination address.
It realizes the transmissible transmission of interactive data by calling a variety of remote programs, which is highly scalable, is suitable for heterogeneous distributed systems, provides low-cost transmissible access, supports transmissible transmission of middleware and basic frameworks, saving the R&D cost of transmissible transmission modules and improving R&D efficiency.
Smart Images

Figure CN114500674B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and particularly to a method, device, storage medium and system for data pass-through in a distributed system. Background Art
[0002] In the scenario of a distributed system with a microservices architecture, data transmission for remote procedure calls between a service consumer and a service provider is carried out through defined API interfaces. These data include API interface identifiers and API parameters, where the API parameters are used to meet the data requirements of specific business services. In a complex microservices system, in addition to API parameters, some data also needs to be pass-through transmitted during remote procedure call interactions as a dynamic supplement to the API parameters and for use by middleware and basic frameworks running in the system. These pass-through data will not affect the API interfaces during transmission.
[0003] In the prior art, the pass-through methods for distributed systems mainly involve each middleware independently implementing its own functional modules to meet its own data pass-through scenarios. The data parameters in this processing method are basically fixed, which is inconvenient for setting dynamic parameters and is not conducive to the integrated use of other middleware or basic frameworks.
[0004] Therefore, how to perform flexible and extensible data pass-through in a distributed system is an urgent problem to be solved. Summary of the Invention
[0005] In view of the above-mentioned disadvantages of the prior art, the purpose of the present invention is to provide a method, device, storage medium and system for data pass-through in a distributed system, which is used to solve the problem that flexible and extensible data pass-through cannot be performed in the prior art in a distributed system.
[0006] To achieve the above purpose and other related purposes, the present invention provides a method for data pass-through in a distributed system, including the following steps: obtaining a first transmission protocol request sent by a client; based on the first transmission protocol request, applying a preset pass-through protocol layer module to determine pass-through data to be transmitted; adding the pass-through data to a pass-through data container; taking out the pass-through data from the pass-through data container based on a second transmission protocol; identifying the pass-through data, and adding the identified pass-through data to a second transmission protocol request sent by a gateway to be sent to a destination address.
[0007] In an embodiment of the present invention, applying a preset passthrough protocol layer module based on the first transmission protocol request to determine the passthrough data to be transmitted includes: obtaining a passthrough identifier based on the first transmission protocol request header; when the passthrough identifier is obtained, determining the passthrough data corresponding to the passthrough identifier; when the passthrough identifier is not obtained, obtaining the field corresponding to the passthrough data defined by the logical assembly module in the first transmission protocol request header; determining the passthrough data corresponding to the field based on the field; when the passthrough data is not obtained based on the field, parsing the predefined resolvable fields to obtain the passthrough data corresponding to the parsed field.
[0008] In an embodiment of the present invention, adding the identified passthrough data to a second transmission protocol request sent by a gateway for sending to a destination address includes: a server of the second transmission protocol receiving the second transmission protocol request; applying the passthrough protocol layer module based on the second transmission protocol request to determine the passthrough data; adding the passthrough data to a passthrough data container corresponding to the server; based on the second transmission protocol, the server taking out the passthrough data from the passthrough data container corresponding to the server; identifying the passthrough data and adding the identified passthrough data to a second transmission protocol request sent by the server for sending to the destination address.
[0009] In an embodiment of the present invention, the first transmission protocol is different from the second transmission protocol.
[0010] In an embodiment of the present invention, after adding the passthrough data to the passthrough data container, it further includes: taking out the passthrough data from the passthrough data container; identifying the passthrough data and adding the identified passthrough data to a second request of the first transmission protocol sent by the gateway, and directly sending the second request to the destination address.
[0011] In an embodiment of the present invention, the passthrough data container is configured in the memory of the gateway.
[0012] Correspondingly, the present invention provides a distributed system data passthrough device, including: an obtaining module for obtaining a first transmission protocol request sent by a client; a determining module for applying a preset passthrough protocol layer module based on the first transmission protocol request to determine the passthrough data to be transmitted and adding the passthrough data to a passthrough data container; a first processing module for taking out the passthrough data from the passthrough data container based on a second transmission protocol; a second processing module for identifying the passthrough data and adding the identified passthrough data to a second transmission protocol request sent by the gateway for sending to a destination address.
[0013] Among them, the pass-through protocol layer module includes: a protocol management module, a protocol docking module, a logic assembly module, and a logic processing module; the protocol management module is used for the definition management of the protocol registration and processing logic for docking; the protocol docking module is used for defining the pass-through entry of the pass-through protocol in different interaction protocols and the execution of the pass-through processing flow; the logic assembly module is used for creating logic processing objects based on the definition of the processing logic in the protocol management module, including a pass-through data reception processor, an interaction protocol parameter pass-through data capture processor, an interaction protocol header pass-through data capture processor, and an interaction protocol header field parsing pass-through processor; the logic processing module is used for implementing the logic processing of the interaction protocol docking the pass-through protocol, including a pass-through data reception processor and a pass-through data transmission processor.
[0014] The determining module is specifically used for: obtaining a pass-through identifier based on the first transmission protocol request header; when obtaining the pass-through identifier, determining the pass-through data corresponding to the pass-through identifier; when not obtaining the pass-through identifier, obtaining the field corresponding to the pass-through data defined by the logic assembly module in the first transmission protocol request header; determining the pass-through data corresponding to the field based on the field; when not obtaining the pass-through data based on the field, parsing the token field to obtain the pass-through data.
[0015] The present invention provides a storage medium, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned distributed system data pass-through method is implemented.
[0016] The present invention provides a distributed system data pass-through system, including a memory for storing a computer program; a processor for running the computer program to implement the above-mentioned distributed system data pass-through method.
[0017] As described above, the distributed system data pass-through method and device of the present invention have the following beneficial effects:
[0018] (1) It can provide the pass-through of various remote procedure call interaction data and has high scalability.
[0019] (2) It can be applicable to the data pass-through scenarios of heterogeneous distributed systems and provide low-cost access and use for the data pass-through of different development languages.
[0020] (3) It can provide the support ability of data pass-through for middleware and basic frameworks, saving the R & D cost of the data pass-through module therein and improving the R & D efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It shows a flowchart of the distributed system data pass-through method of the present invention in an embodiment.
[0022] Figure 2 It shows the data pass-through transmission flow chart in an embodiment of the data pass-through method for the distributed system of the present invention.
[0023] Figure 3 It shows the schematic diagram of an example in an embodiment of the data pass-through method for the distributed system of the present invention.
[0024] Figure 4 It shows the structural schematic diagram of the data pass-through device for the distributed system of the present invention in an embodiment.
[0025] Figure 5 It shows the module diagram of the pass-through protocol layer in an embodiment of the data pass-through method for the distributed system of the present invention.
[0026] Figure 6 It shows the data pass-through system diagram of the distributed system in an embodiment of the data pass-through device for the distributed system of the present invention.
[0027] Description of component labels
[0028] 41 Acquisition module
[0029] 42 Determination module
[0030] 43 First processing module
[0031] 44 Second processing module
[0032] 51 Protocol management module
[0033] 52 Protocol docking module
[0034] 53 Logic assembly module
[0035] 54 Logic processing module
[0036] 61 Processor
[0037] 62 Memory Detailed implementation manners
[0038] The following uses specific specific examples to illustrate the implementation manners of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0039] It should be noted that the illustrations provided in the following embodiments only schematically illustrate the basic concept of the present invention. Therefore, only the components related to the present invention are shown in the drawings, rather than being drawn according to the number, shape, and size of the components in actual implementation. The types, quantities, and proportions of the components in actual implementation can be arbitrarily changed, and the component layout type may also be more complex.
[0040] The data transparent transmission method and device of the distributed system of the present invention can provide transparent transmission of various remote procedure call interaction data, with high scalability; and can be applied to the data transparent transmission scenario of heterogeneous distributed systems, providing low-cost access and use for the data transparent transmission of different development languages; in addition, it can provide the support ability for data transparent transmission to middleware and basic frameworks, saving the R & D cost of the data transparent transmission module therein and improving the R & D efficiency.
[0041] As Figure 1 shown, in this embodiment, the data transparent transmission method of the distributed system of the present invention includes the following steps:
[0042] Step S1: Obtain the first transmission protocol request sent by the client.
[0043] Specifically, in the distributed system, when there is a data transparent transmission requirement, the transmission protocol from the client to the gateway is the first transmission protocol. Before the client sends the first transmission protocol request, the transparent transmission data is added to the first transmission protocol request header of the first transmission protocol request and sent to the gateway together with the transmission data.
[0044] Step S2: Based on the first transmission protocol request, apply the preset transparent transmission protocol layer module to determine the transparent transmission data to be transmitted; and add the transparent transmission data to the transparent transmission data container.
[0045] Specifically, the transparent transmission protocol layer module includes: a protocol management module, a protocol docking module, a logic assembly module, and a logic processing module; the protocol management module is used for the definition management of protocol registration and processing logic for docking; the protocol docking module is used for defining the transparent transmission entry for executing the transparent transmission protocol in different interaction protocols and the execution of the transparent transmission processing flow; the logic assembly module is used for creating logic processing objects based on the definition of the processing logic in the protocol management module, including a transparent transmission data reception processor, an interaction protocol parameter transparent transmission data capture processor, an interaction protocol header transparent transmission data capture processor, and an interaction protocol header field parsing transparent transmission processor; the logic processing module is used for implementing the logic processing of the interaction protocol docking the transparent transmission protocol, including a transparent transmission data reception processor and a transparent transmission data sending processor.
[0046] More specifically, as Figure 2As shown, in this embodiment, there is a flow chart of pass-through data transmission according to the present invention. After the modules in the pass-through protocol layer are set up, based on the docking of the pass-through protocol and the interaction protocol and the data transmission network process, the transmission process of the pass-through data is determined, including: the logical processing layer 21 pre-processes the pass-through data, sends a transmission protocol request containing the pass-through data through the pass-through protocol layer 22, and passes the transmission protocol request with the pass-through data added to the communication interaction layer 23, and sends it to the receiving end through the network transmission 24. The receiving end receives the transmission protocol request containing the pass-through data through the communication interaction layer 23, obtains the pass-through data from the transmission protocol request through the pass-through protocol layer 22, and then operates and processes the pass-through data through the logical processing layer 21, so as to complete the full-link pass-through of the pass-through data.
[0047] Further specifically, based on the first transmission protocol request header, obtain the pass-through identifier; when the pass-through identifier is obtained, determine the pass-through data corresponding to the pass-through identifier; when the pass-through identifier is not obtained, obtain the field corresponding to the pass-through data defined by the logical assembly module in the first transmission protocol request header; based on the field, determine the pass-through data corresponding to the field; when the corresponding pass-through data is not obtained based on the field, parse the pre-defined resolvable fields to obtain the pass-through data corresponding to the parsed field.
[0048] For example, the pass-through identifier for the pre-set pass-through data is _tt_m_. Now the client has a need for pass-through data and needs to transfer the pass-through data from the communication network of the Hyper Text Transfer Protocol (Http) to the communication network of the Dubbo protocol of the distributed service framework protocol. First, the client adds the pass-through data to the first transport protocol request and sends the first transport protocol request containing the pass-through data and the transmitted data to the gateway. Here, the first transport protocol between the client and the gateway is the Http protocol; the gateway then communicates with the server of the Dubbo protocol, and the server of the Dubbo protocol connects to the destination address of the request through the second transport protocol, the Dubbo protocol. Based on the modules of the Http protocol and the pass-through protocol layer in advance, there are 4 logical definitions for pass-through processing in the logical assembly module of the pass-through protocol layer, corresponding to 4 pass-through input processors respectively, including the pass-through data receiving processor of the Http protocol; the pass-through data grabbing processor for Http protocol parameters; the pass-through data grabbing processor for the Http protocol header; and the parsing pass-through processor for parsing the fields in the Http protocol header. The data submitted through the Http protocol includes the service data of the interface, public data, etc. Among them, the fields corresponding to the public data include the token field, etc.; and based on the modules of the Dubbo protocol and the pass-through protocol layer in advance, there are 4 logical definitions for pass-through processing in the logical assembly module of the pass-through protocol layer, corresponding to 4 pass-through input processors respectively, including the pass-through data receiving processor of the Dubbo protocol; the pass-through data grabbing processor for Dubbo protocol parameters; the pass-through data grabbing processor for the Dubbo protocol header; and the parsing pass-through processor for parsing the fields in the Dubbo protocol header. The gateway is a network server that creates a group of pass-through receiving processors related to the Http protocol and a group of pass-through sending processors related to the Dubbo protocol in advance through the abstract object of protocol pass-through docking and the logical definition of pass-through processing. In the actual pass-through data transmission scenario, first, the pass-through data is obtained from the Http protocol request header according to whether the request header name contains the pass-through identifier. When the pass-through identifier is obtained, the pass-through data corresponding to the pass-through identifier is determined and added to the pass-through data container; when the pass-through identifier cannot be detected from the Http protocol request header, the fields corresponding to the pass-through data of the logical definition of pass-through processing are obtained from the Http protocol request, and based on the fields, the pass-through data corresponding to the fields is determined; when the pass-through data cannot be obtained through the fields, the predefined parsable fields are parsed to obtain the pass-through data corresponding to the parsed fields.
[0049] More specifically, a pass-through data container is pre-configured in the memory. When pass-through data is recognized, the pass-through data is stored in the pass-through data container. Here, a higher-level abstraction implementation of the pass-through data container is made, which can be compatible with the implementation of various interaction protocols and the pass-through between asynchronous threads.
[0050] Step S3: Based on the second transmission protocol, retrieve the pass-through data from the pass-through data container.
[0051] Specifically, retrieve the pass-through data from the pass-through data container to mark the pass-through data.
[0052] More specifically, when the pass-through data cannot be retrieved from the pass-through data container, a new pass-through data container is newly created in the memory, and the pass-through data is added to the pass-through data container by means of code addition. Then, the newly added pass-through data is retrieved from the pass-through data container to mark the pass-through data.
[0053] Step S4: Mark the pass-through data and add the marked pass-through data to the second transmission protocol request sent by the gateway to send to the destination address.
[0054] Specifically, the server of the second transmission protocol receives the second transmission protocol request; based on the second transmission protocol request, apply the pass-through protocol layer module to determine the pass-through data; and add the pass-through data to the pass-through data container corresponding to the server; based on the second transmission protocol, the server retrieves the pass-through data from the pass-through data container corresponding to the server; mark the pass-through data and add the marked pass-through data to the second transmission protocol request sent by the server to send to the destination address.
[0055] For example, in the above example, after the gateway sends the Dubbo protocol request with the pass-through data added to the Dubbo protocol server, the Dubbo protocol server determines the pass-through data based on the Dubbo protocol request and applies the pass-through protocol layer module. Specifically, first, the pass-through data is obtained from the Dubbo protocol request header according to whether the request header name contains the pass-through identifier; when the pass-through identifier is obtained, the pass-through data corresponding to the pass-through identifier is determined and added to the pass-through data container; when the pass-through identifier cannot be detected from the Dubbo protocol request header, the field corresponding to the pass-through data defined by the pass-through processing logic is obtained from the Dubbo protocol request, and based on the field, the pass-through data corresponding to the field is determined; when the pass-through data cannot be obtained through the field, the predefined parsable field is parsed to obtain the pass-through data corresponding to the parsed field. The pass-through data is added to the pass-through data container. Based on the Dubbo protocol, the Dubbo protocol server retrieves the pass-through data from the pass-through data container, marks the pass-through data, adds the marked pass-through data to the Dubbo protocol request, and sends it to the destination address.
[0056] More specifically, the first transport protocol is different from the second transport protocol. There is more than one interaction protocol in the above example. Among them, the first transport protocol is the Http protocol, and the second transport protocol is the Dubbo protocol; the pass-through data processing is performed in the full link associated with multiple interaction protocols; in some other example scenarios, the interaction protocols for pass-through data processing can be extended to more protocols according to the actual network transmission scenario; or, the pass-through data processing can also be performed in the same interaction protocol.
[0057] The pass-through data processing process for the same interaction protocol is as follows.
[0058] Obtain the first transport protocol request sent by the client; based on the first transport protocol request, apply the preset pass-through protocol layer module to determine the pass-through data to be transmitted; add the pass-through data to the pass-through data container; retrieve the pass-through data from the pass-through data container; mark the pass-through data, and add the marked pass-through data to the second request of the first transport protocol sent by the gateway, and directly send the second request to the destination address.
[0059] For example, the passthrough identifier for the preset passthrough data is _tt_m_. The client now has a need for passthrough data and needs to transmit the passthrough data to the destination address in the communication network of the Http protocol. First, the client adds the passthrough data to the Http protocol request and sends the Http protocol request containing the passthrough data and the transmitted data to the gateway. Based on the modules of the Http protocol and the passthrough protocol layer in advance, there are 4 logical definitions for passthrough processing in the logical assembly module of the passthrough protocol layer, corresponding to 4 passthrough input processors respectively, including the passthrough data receiving processor of the Http protocol; the passthrough data scraping processor for Http protocol parameters; the passthrough data scraping processor for the Http protocol header; and the parsing passthrough processor for parsing the fields in the Http protocol header. The data submitted through the Http protocol includes service data of the interface, common data, etc. Among them, the fields corresponding to the common data include the token field, etc.; a set of passthrough receiving processors related to the Http protocol is created for the abstract object and the logical definition of passthrough processing pre-connected by the gateway through protocol passthrough. In the actual passthrough data transmission scenario, first, the passthrough data is obtained from the Http protocol request header according to whether the request header name contains the passthrough identifier. When the passthrough identifier is obtained, the passthrough data corresponding to the passthrough identifier is determined and added to the passthrough data container; when the passthrough identifier cannot be detected from the Http protocol request header, the fields corresponding to the passthrough data of the logical definition of passthrough processing are obtained from the Http protocol request, and the passthrough data corresponding to the fields is determined based on the fields; when the passthrough data cannot be obtained through the fields, the predefined parsable fields are parsed to obtain the passthrough data corresponding to the parsed fields. Then the passthrough data is added to the passthrough data container; when the gateway needs to transmit the passthrough data to the destination address, the gateway retrieves the passthrough data from the passthrough data container; identifies the passthrough data, and adds the identified passthrough data to the second request of the Http protocol sent by the gateway. The gateway directly sends the second request to the destination address. Such as Figure 3As shown, in this embodiment, a schematic diagram of an example of the present invention is provided. When there is a request to receive pass-through data, based on a first transmission protocol request, a preset pass-through protocol layer module is applied to determine the pass-through data 31 to be transmitted. Specifically, first, the pass-through data is obtained from the first transmission protocol request header according to whether the request header name contains a pass-through identifier. When the pass-through identifier is obtained, the pass-through data corresponding to the pass-through identifier is determined and added to the pass-through data container; when the pass-through identifier cannot be detected from the first transmission protocol request header, the field corresponding to the pass-through data defined by the pass-through processing logic is obtained from the first transmission protocol request, and based on the field, the pass-through data corresponding to the field is determined; when the pass-through data cannot be obtained through the field, the predefined parsable fields are parsed to obtain the pass-through data corresponding to the parsed field; after obtaining the pass-through data 32, the pass-through data is added to the pass-through data container 33. When there is a request to send pass-through data, for example, when the gateway needs to transmit the pass-through data to a certain destination address 34, the gateway retrieves the pass-through data from the pass-through data container 35; identifies the pass-through data and adds the identified pass-through data to the second request of the second transmission protocol sent by the gateway 36, and the gateway sends the second request to the corresponding destination address.
[0060] As Figure 4 shown, in this embodiment, the distributed system data pass-through device of the present invention includes:
[0061] An acquisition module 41, configured to acquire a first transmission protocol request sent by a client;
[0062] A determination module 42, configured to, based on the first transmission protocol request, apply a preset pass-through protocol layer module to determine the pass-through data to be transmitted; and add the pass-through data to a pass-through data container;
[0063] A first processing module 43, configured to retrieve the pass-through data from the pass-through data container based on a second transmission protocol;
[0064] A second processing module 44, configured to identify the pass-through data and add the identified pass-through data to a second transmission protocol request sent by the gateway for sending to a destination address.
[0065] Among them, the passthrough protocol layer module includes: a protocol management module, a protocol docking module, a logic assembly module, and a logic processing module; the protocol management module is used for the definition management of protocol registration and processing logic for docking; the protocol docking module is used for defining the passthrough entry of the passthrough protocol in different interaction protocols and the execution of the passthrough processing flow; the logic assembly module is used for creating logic processing objects based on the definition of the processing logic in the protocol management module, including a passthrough data reception processor, an interaction protocol parameter passthrough data capture processor, an interaction protocol header passthrough data capture processor, and an interaction protocol header field parsing passthrough processor; the logic processing module is used for the implementation of the logic processing of the interaction protocol docking the passthrough protocol, including a passthrough data reception processor and a passthrough data transmission processor. The determination module 42 is specifically used for: obtaining a passthrough identifier based on the first transmission protocol request header; when obtaining the passthrough identifier, determining the passthrough data corresponding to the passthrough identifier; when not obtaining the passthrough identifier, obtaining the field corresponding to the passthrough data defined by the logic assembly module in the first transmission protocol request header; determining the passthrough data corresponding to the field based on the field; when not obtaining the passthrough data based on the field, parsing the token field to obtain the passthrough data.
[0066] Further specifically, as Figure 5 shown, in this embodiment, the passthrough protocol layer module diagram of the present invention; the passthrough protocol layer module includes: a protocol management module 51, a protocol docking module 52, a logic assembly module 53, and a logic processing module 54. Among them, the protocol management module 51 is used for creating passthrough docking protocol implementations of different protocols when the modules in the passthrough protocol layer defined by the application are working, and effectively improving the acquisition performance of protocol docking implementations using a caching strategy; the definition of the processing logic can be updated through an interface.
[0067] The protocol docking module 52 is used for the docking of the interaction protocol and the passthrough protocol. When the definition of the processing logic of the protocol management module changes, the processing logic in the logic assembly module is newly assembled through the protocol docking module. Among them, it includes an abstract object for protocol passthrough docking, and the interaction protocol realizes the docking of the passthrough protocol according to this abstract object.
[0068] The logic assembly module 53 is used to create logic processing objects through the definition of the processing logic in the protocol management module and wrap them into a list. This module uses an iterator to reasonably arrange the logic processing, thereby reducing the judgment in the intermediate process and improving the execution speed. Among them, it includes: the logic definition of pass-through processing, the receiver of pass-through data, and the sender of pass-through data; the receiver and sender of pass-through data are maintained by the abstract object in the protocol docking module; the receiver of pass-through data is used to maintain a set of pass-through data input processors in the logic processing modules specified by the logic definition of pass-through processing; the sender of pass-through data is used to maintain a set of pass-through data output processors in the logic processing modules specified by the logic definition of pass-through processing; the logic definition of pass-through processing creates multiple pass-through logic processors according to this definition, including: pass-through data receiving processor, interactive protocol parameter pass-through data grabbing processor, interactive protocol header pass-through data grabbing processor, and interactive protocol header field parsing pass-through processor.
[0069] The logic processing module 54, that is, the specific pass-through logic is completed by this module. This module wraps each individual data pass-through logic into a pass-through inputter and a pass-through outputter. Each individual data pass-through logic is used to receive a request containing pass-through data and send a request containing pass-through data. Among them, it includes: a pass-through data receiving processor and a pass-through data sending processor.
[0070] The technical features specifically implemented by the distributed system data pass-through device in this embodiment are basically the same as the principles of the steps in the distributed system data pass-through method in Embodiment 1. The technical content that can be shared between the method and the device will not be repeated here.
[0071] A computer program is stored on the storage medium of the present invention. When the program is executed by a processor, it implements the above-mentioned distributed system data pass-through method.
[0072] As Figure 6 shown, in this embodiment, the distributed system data pass-through system of the present invention includes: a processor 61 and a memory 62.
[0073] The memory 62 is used to store a computer program.
[0074] The memory 62 includes: various media such as ROM, RAM, magnetic disk, USB flash drive, memory card, or optical disc that can store program codes.
[0075] The processor 61 is connected to the memory 62 and is used to execute the computer program stored in the memory 62, so that the distributed system data pass-through system executes the above-mentioned distributed system data pass-through method.
[0076] Preferably, the above-mentioned processor 61 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), etc. Among them, in practical applications, the mainly used general-purpose processor is the graphics processing unit. It may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0077] In summary, the distributed system data pass-through method and device of the present invention can provide pass-through of various remote procedure call interaction data, and has high scalability. Moreover, it can be applied to the data pass-through scenario of heterogeneous distributed systems, providing low-cost access and use for data pass-through of different programming languages. In addition, it can provide the support ability for data pass-through of middleware and basic frameworks, saving the R & D cost of the data pass-through module therein and improving the R & D efficiency. Therefore, the present invention effectively overcomes various disadvantages in the prior art and has high industrial utilization value.
[0078] The above embodiments are only illustrative of the principles and effects of the present invention, and are not used to limit the present invention. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes completed by those with ordinary knowledge in the technical field without departing from the spirit and technical idea disclosed by the present invention should still be covered by the claims of the present invention.
Claims
1. A method for data transparent transmission in a distributed system, characterized in that Applied to a gateway, including: Obtain a first transport protocol request sent by a client; Based on the first transport protocol request, apply a preset pass-through protocol layer module to determine pass-through data to be transmitted; and add the pass-through data to a pass-through data container; Based on a second transport protocol, retrieve the pass-through data from the pass-through data container; Identify the pass-through data and add the identified pass-through data to a second transport protocol request sent by the gateway for transmission to a destination address; The determining the pass-through data to be transmitted by applying a preset pass-through protocol layer module based on the first transport protocol request includes: Obtain a pass-through identifier based on a first transport protocol request header; When the pass-through identifier is obtained, determine the pass-through data corresponding to the pass-through identifier; When the pass-through identifier is not obtained, obtain a field corresponding to the pass-through data defined by a logical assembly module in the first transport protocol request header; Based on the field, determine the pass-through data corresponding to the field; When the corresponding pass-through data is not obtained based on the field, parse predefined parsable fields to obtain the pass-through data corresponding to the parsed field; The pass-through data container is compatible with the implementation of various interaction protocols and the pass-through between asynchronous threads; The pass-through protocol layer module includes: a protocol management module, a protocol docking module, a logical assembly module, and a logical processing module; the protocol management module is used for the registration of the docking protocol and the definition management of the processing logic; the protocol docking module is used for defining the pass-through entry of the pass-through protocol in different interaction protocols and the execution of the pass-through processing flow; the logical assembly module is used for creating logical processing objects based on the definition of the processing logic in the protocol management module, including a pass-through data reception processor, an interaction protocol parameter pass-through data capture processor, an interaction protocol header pass-through data capture processor, and an interaction protocol header field parsing pass-through processor; the logical processing module is used for the implementation of the logical processing of the interaction protocol docking the pass-through protocol, including a pass-through data reception processor and a pass-through data transmission processor.
2. The method according to claim 1, wherein The adding the identified pass-through data to a second transport protocol request sent by the gateway for transmission to a destination address includes: A server of the second transport protocol receives the second transport protocol request; Based on the second transport protocol request, apply the pass-through protocol layer module to determine the pass-through data; and add the pass-through data to a pass-through data container corresponding to the server; Based on the second transport protocol, the server retrieves the pass-through data from the pass-through data container corresponding to the server; Identify the pass-through data and add the identified pass-through data to a second transport protocol request sent by the server for transmission to the destination address.
3. The method according to claim 1, characterized in that The first transport protocol is different from the second transport protocol.
4. The method according to claim 1, characterized in that, After adding the pass-through data to the pass-through data container, it further includes: Retrieve the pass-through data from the pass-through data container; Identify the pass-through data, add the identified pass-through data to the second request of the first transport protocol sent by the gateway, and directly send the second request to the destination address.
5. The method according to claim 1, characterized in that, The pass-through data container is configured in the memory of the gateway.
6. A data transparent transmission device for a distributed system, characterized in that, It includes: An acquisition module for acquiring a first transport protocol request sent by a client; A determination module for determining the pass-through data to be transmitted based on the first transport protocol request by applying a preset pass-through protocol layer module; And add the pass-through data to the pass-through data container; A first processing module for retrieving the pass-through data from the pass-through data container based on a second transport protocol; A second processing module for identifying the pass-through data and adding the identified pass-through data to a second transport protocol request sent by the gateway for sending to the destination address; The determining the pass-through data to be transmitted based on the first transport protocol request by applying a preset pass-through protocol layer module includes: Obtaining a pass-through identifier based on the first transport protocol request header; When the pass-through identifier is obtained, determining the pass-through data corresponding to the pass-through identifier; When the pass-through identifier is not obtained, obtaining the field corresponding to the pass-through data defined by the logical assembly module in the first transport protocol request header; Based on the field, determining the pass-through data corresponding to the field; When the corresponding pass-through data cannot be obtained based on the field, parsing the predefined resolvable field to obtain the pass-through data corresponding to the parsed field; The pass-through data container is compatible with the implementation of various interaction protocols and the pass-through between asynchronous threads. The pass-through protocol layer module includes: a protocol management module, a protocol docking module, a logical assembly module, and a logical processing module; the protocol management module is used for the definition management of protocol registration and processing logic for docking; the protocol docking module is used for defining the pass-through entry for executing the pass-through protocol in different interaction protocols and the execution of the pass-through processing flow; the logical assembly module is used for creating logical processing objects based on the definition of the processing logic in the protocol management module, including a pass-through data reception processor, an interaction protocol parameter pass-through data capture processor, an interaction protocol header pass-through data capture processor, and an interaction protocol header field parsing pass-through processor; the logical processing module is used for the implementation of the logical processing of the interaction protocol docking pass-through protocol, including a pass-through data reception processor and a pass-through data transmission processor.
7. A storage medium stores program instructions, wherein, When the program instructions are executed, the steps of the distributed system data pass-through method according to any one of claims 1 to 5 are implemented.
8. A data pass-through system for a distributed system, characterized in that: It includes a memory for storing a computer program; a processor for running the computer program to implement the steps of the distributed system data pass-through method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Intelligent-station communication gateway machine data transparent-transmission methods and systems
CN109413083A