Method for quickly and crossly sharing data among multiple systemsTechnical Field
The invention relates to the technical field of information, and provides a method for quickly and crossly sharing data among multiple systems.
Background
For a better understanding of the present application, the following basic techniques need to be understood:
mesh topology: the topological structure mainly means that all nodes are connected through transmission line interconnection, and each node is connected with at least two other nodes. The mesh topology has high reliability, but the structure is complex and cannot be managed centrally.
Star topology: a central node and nodes connected to the central node by point-to-point links. The star topology structure has the characteristics of convenience in service, easiness in fault diagnosis and the like, but the dependency on the central node is strong.
Method for realizing data access between traditional information systems
Mesh topology: the information systems are directly connected with each other, the source end system actively acquires required data from the target system, and because the technical framework and the programming language adopted by each information system are different, each system participating in data sharing needs to be adapted to the data interfaces of a plurality of target systems, so that various problems that the number of data participants is increased, the system is more complex, the target system is uncontrollable and the like are caused. For example, if N systems participate in data sharing, then in the limit each participant must adapt to the interface of the data class in N-1.
Star topology: each information system achieves the purpose of data sharing through the central node. The central node is responsible for data interaction among all data sharing participants, the dependence degree of the whole system on the central node is high, and the central node is out of order, so that the whole network is unavailable.
Disclosure of Invention
The invention aims to solve the problems that the traditional mesh topology structure is complex and cannot be managed in a centralized way, the data transmission pressure of a central node of a star topology structure is high, and the stability is poor due to the complexity of the central node.
The invention does not solve the technical problems and adopts the following technical scheme:
a method for quickly cross-sharing data among multiple systems is characterized by comprising the following steps:
step 1: collecting system configuration information of all data sharing participants, and building a central node;
step 2: the target system registers data sharing service to the central node, and a data sharing service pool is formed on the central node;
and step 3: the source end system sends a data request to the central node, the central node matches data sharing services in the data sharing service pool according to data request information, and returns a data sharing service address and a token to the source end system after distributing an access token, and the source end system holds the access token to directly access the data sharing service address to form 'source end system-target system' data direct connection and perform data interaction.
In the above technical solution, step 1 specifically includes the following steps:
step 1.1: collecting system configuration information of all data sharing participants to obtain a data interface configuration information list of all systems, wherein the configuration information comprises: development language, data interface type, available resource quantity;
step 1.2: developing a general SDK on a central node according to a configuration list, wherein any participant in the network can use the SDK to request data from a target end;
step 1.3: the central node develops an interface registration service for the data sharing participants to register data interface information.
In the above technical solution, the method for implementing the general SDK according to step 1.2 includes the following steps:
step 1.2.1, developing a class according to each development language, wherein the class comprises configuration parameters: a central node server IP and an address port for receiving the request;
step 1.2.2, an API use request method is developed in class, an API use request can be sent to a relevant port of a central node, and the API use request contains a data sharing service name registered by a data sharing service provider in the central node;
step 1.2.3, developing a data request method in class, and carrying out data request according to the data sharing service address returned by the central node.
In the above technical solution, step 2 specifically includes the following steps:
step 2.1: the central node starts an interface registration service, and a target system registers a data sharing service to the central node to obtain a list of all data sharing services in the network;
step 2.2: the central node sends a detection instruction to a data sharing service address of a target system periodically, detects whether the data sharing service is normal or not, maintains a data sharing service list, takes the service with the current recording state of valid and the detection result of invalid off-line, takes the service with the current recording state of invalid and the detection result of valid on-line, and summarizes the available data sharing service list to form a data sharing service pool.
In the above technical solution, step 3 specifically includes the following steps:
step 3.1: the source end system integrates the SDK to obtain a universal data request method, and the universal data request method comprises two methods: API use request method, data request method;
step 3.2: the source end system sends an API (application programming interface) use request to the central node through the SDK, and the central node matches data sharing service in the data sharing service pool according to the data request information to obtain a proper and available data sharing service address;
step 3.3: the central node judges the number of available resources registered by the target system and produces an access token;
step 3.4: the central node returns the data sharing service address and the access token to the source end system, and the source end system obtains a data request response result;
step 3.5: the source end system directly requests the target system for data according to the data request response result, and the target system returns corresponding data after receiving the request.
Because the invention adopts the technical scheme, the invention has the following beneficial effects:
firstly, the proposal utilizes the mesh topology to carry out actual data transmission, greatly reduces the data transmission pressure of the central node and the complexity of the central node, thereby providing the stability of the central node.
The global data sharing management configuration centralization is carried out by utilizing the star topology, all data sharing centralized scheduling is carried out, the network complexity is reduced, each data sharing participant only concentrates on providing data sharing service, the data is not required to be concerned about who uses the data, and the service in the whole network is controllable.
Thirdly, the proposal adopts a mode of combining mesh topology and star topology to share data, and integrates the advantages of the two modes. The star-shaped topological structure is responsible for centralized management, and the central node is responsible for overall scheduling, so that the data sharing service can be globally controllable; the mesh topology structure is responsible for actual data transmission, and a point-to-point direct connection mode ensures the data transmission speed, reduces the pressure of a central node and improves the data transmission speed of the whole network.
Fourthly, compared with the mesh topology, the proposal has one more central management node. The mesh topology has no central management node, which means that each participant must locally store data service information of all participants in the mesh, wherein the change of information of one participant requires broadcasting all servers for configuration update, and the more participants, the more complicated the management. The proposal adds a management node, the information of all participants is registered on the management node, and the participants can obtain the configuration information of all the participants in the network only by communicating with the central node.
Compared with the star topology, the function of the central node is weakened, and the traditional star topology central node is not only responsible for the whole network management but also serves as a data center of the whole network. All data exchange in the network needs to pass through the central node, and the pressure on the central node is large. The proposal separates data exchange from a central node by fusing mesh topology, reduces the pressure of the central node and improves the stability of the whole network.
Sixth, the scheme of the present disclosure "star topology and mesh topology combination" achieves the effects of manageability, high stability, and high throughput through a special information interaction manner on the basis of combining the advantages of the two manners, which cannot be achieved by a single star topology or mesh topology.
Drawings
FIG. 1 is a schematic diagram of a mesh topology;
FIG. 2 is a schematic diagram of a mesh topology;
fig. 3 is a schematic view of the topology of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the detailed description and specific examples, while indicating the preferred embodiment of the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
A method for quickly cross-sharing data among multiple systems is characterized by comprising the following steps:
step 1: collecting system configuration information of all data sharing participants, and building a central node;
step 2: the target system registers data sharing service to the central node, and a data sharing service pool is formed on the central node;
and step 3: the source end system sends a data request to the central node, the central node matches data sharing services in the data sharing service pool according to data request information, and returns a data sharing service address and a token to the source end system after distributing an access token, and the source end system holds the access token to directly access the data sharing service address to form 'source end system-target system' data direct connection and perform data interaction.
In the above technical solution, step 1 specifically includes the following steps:
step 1.1: collecting system configuration information of all data sharing participants to obtain a data interface configuration information list of all systems, wherein the configuration information comprises: development language, data interface type, available resource quantity;
step 1.2: developing a general SDK on a central node according to a configuration list, wherein any participant in the network can use the SDK to request data from a target end; the general SDK is an API calling program tool package which is general for the system in the network, and the principle of the SDK is that API use request and data request methods are packaged, a standardized and unified use mode is exposed to an external system, and when the SDK is used, a certain series of API operations can be completed only by calling the SDK according to a fixed method. Each time data is shared, two steps are required:
and the data request party sends an API (application program interface) use request to the central node through the SDK, and the request message contains the requested data sharing service name. After receiving the request, the central node inquires corresponding service in the data sharing service pool according to the name of the data sharing service, verifies whether the service is effective or not, and returns the IP (Internet protocol) and the port address of a server providing the data sharing service to the data requester after the verification is passed;
after receiving the return information of the central node, the data requester sends a data request to the IP and the port of the server providing the data sharing service through the SDK, and the service provider returns data to the requester after receiving the request.
Step 1.3: the central node develops an interface registration service for the data sharing participants to register data interface information.
In the above scheme, the implementation method of the general SDK in step 1.2 includes the following steps:
step 1.2.1, developing a class according to each development language, wherein the class comprises configuration parameters: a central node server IP and an address port for receiving the request;
step 1.2.2, an API use request method is developed in class, an API use request can be sent to a relevant port of a central node, and the API use request contains a data sharing service name registered by a data sharing service provider in the central node;
step 1.2.3, developing a data request method in class, and carrying out data request according to the data sharing service address returned by the central node.
In the above technical solution, step 2 specifically includes the following steps:
step 2.1: the central node starts an interface registration service, and a target system registers a data sharing service to the central node to obtain a list of all data sharing services in the network;
step 2.2: the central node sends a detection instruction to a data sharing service address of a target system periodically, detects whether the data sharing service is normal or not, maintains a data sharing service list, takes the service with the current recording state of valid and the detection result of invalid off-line, takes the service with the current recording state of invalid and the detection result of valid on-line, and summarizes the available data sharing service list to form a data sharing service pool.
In the above technical solution, step 3 specifically includes the following steps:
step 3.1: the source end system integrates the SDK to obtain a universal data request method, and the universal data request method comprises two methods: API use request method, data request method;
step 3.2: the source end system sends an API (application programming interface) use request to the central node through the SDK, and the central node matches data sharing service in the data sharing service pool according to the data request information to obtain a proper and available data sharing service address;
step 3.3: the central node judges the number of available resources registered by the target system and produces an access token;
step 3.4: the central node returns the data sharing service address and the access token to the source end system, and the source end system obtains a data request response result;
step 3.5: the source end system directly requests the target system for data according to the data request response result, and the target system returns corresponding data after receiving the request.