Method for quickly cross sharing data among multiple systemsTechnical Field
The invention relates to the technical field of information, and provides a method for quickly cross sharing data among multiple systems.
Background
For a better understanding of the present application, the following basic techniques are needed:
mesh topology: this topology mainly means that the nodes are interconnected by transmission lines and each node is connected to at least two other nodes. The mesh topology has high reliability, but is complex in structure 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 has the characteristics of convenience in service, easiness in fault diagnosis and the like, but has strong dependence on central nodes.
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 each system participating in data sharing needs to adapt to the data interfaces of a plurality of target systems due to the difference of technical frameworks and programming languages adopted by each information system, so that the more data participants, the more complex the system, the uncontrollable target system and other problems are caused. For example, N systems participate in data sharing, and in a limited case, each participant has to adapt to the data type interface in N-1.
Star topology: the information systems achieve the purpose of data sharing through the central node. The central node is responsible for data interaction among all data sharing participants, the whole system has high dependency on the central node, and the central node has a problem, so that the whole network is not available.
Disclosure of Invention
The invention aims to solve the problems that the traditional mesh topological structure is complex in structure and cannot be managed in a centralized way, the data transmission pressure of a central node of a star topological 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 proposal:
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 constructing 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;
step 3: the source system sends a data request to the central node, the central node matches data sharing service in the data sharing service pool according to the data request information, and after distributing the access token, the data sharing service address and the token are returned to the source system, the source system directly accesses the data sharing service address by holding the access token, and data direct connection of the source system and the target system is formed, so that data interaction is performed.
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: developing language, data interface type and available resource quantity;
step 1.2: developing a general SDK on a central node according to the 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 general SDK implementation method 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: the central node server IP and the address port for receiving the request;
step 1.2.2, developing an API use request method in class, wherein the API use request can be sent to a relevant port of a central node, and comprises a data sharing service name registered by a data sharing service provider in the central node;
and 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 the target system registers a data sharing service to the central node to obtain all data sharing service lists in the network;
step 2.2: the central node periodically sends a detection instruction to the data sharing service address of the target system, detects whether the data sharing service is normal or not, maintains a data sharing service list, puts the service with the current record state being valid and the detection result being invalid off line, puts the service with the current record state being invalid and the detection result being valid on line, and gathers 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 system integrates the SDK to obtain a general data request method, and the general data request method comprises two methods: an API use request method and a data request method;
step 3.2: the source terminal system sends an API 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 generates an access token;
step 3.4: the central node returns the data sharing service address and the access token to the source system, and the source system obtains a data request response result;
step 3.5: and the source system directly requests data to the target system 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:
1. 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.
2. The proposal uses star topology to centralize global data sharing management configuration, all data sharing is centralized and scheduled, thus reducing network complexity, ensuring that each data sharing participant only focuses on providing data sharing service, does not need to care about who uses the data, and the service in the whole network is controllable.
3. The data sharing method adopts a mode of combining mesh topology and star topology, and integrates the advantages of the two modes. The star topology structure is responsible for centralized management, and the central node is responsible for overall scheduling, so that the global controllability of the data sharing service can be realized; the mesh topology structure is responsible for actual data transmission, the point-to-point direct connection mode ensures the data transmission speed, reduces the pressure of the central node and improves the data transmission speed of the whole network.
4. The proposal has one more central management node than the mesh topology. The mesh topology, without a central management node, means that each participant must locally store the data service information of all the participants in the network, where one participant information changes, and needs to broadcast all the servers to perform configuration update, and the more participants, the more complex is the management. The proposal adds a management node, all the information of the participants are 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.
5. Compared with star topology, the function of the central node is weakened, and the traditional star topology central node is not only responsible for whole network management but also serves as a data center of the whole network. All data exchanges within the network need to pass through the central node, which is under great stress. It is proposed to strip out data exchange from a central node by fusing mesh topology, reducing the pressure of the central node, so that the stability of the whole network is improved.
6. The scheme of the invention combines star topology and mesh topology, and achieves the effects of manageability, high stability and high throughput on the basis of combining the advantages of the two modes through a special information interaction mode, which cannot be achieved by the 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 diagram of the topology of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the particular embodiments described herein are illustrative only and are not intended to limit the invention, i.e., the embodiments described are merely some, but not all, of the embodiments of the invention. The components of the 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 invention, as 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 made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present invention.
It is noted that relational terms such as "first" and "second", and the like, are 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. Moreover, 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 one … …" does not exclude the presence of other like 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 constructing 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;
step 3: the source system sends a data request to the central node, the central node matches data sharing service in the data sharing service pool according to the data request information, and after distributing the access token, the data sharing service address and the token are returned to the source system, the source system directly accesses the data sharing service address by holding the access token, and data direct connection of the source system and the target system is formed, so that data interaction is performed.
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: developing language, data interface type and available resource quantity;
step 1.2: developing a general SDK on a central node according to the 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 general for the system in the network, and the principle of the general SDK is that API using request and data request methods are packaged, a standardized and unified using mode is exposed to an external system, and when the general SDK is used, a plurality of columns of API operations can be completed only by calling the SDK according to a fixed method. Each time data sharing, two steps are required:
and the data requesting party sends an API use request to the central node through the SDK, and the request message comprises the requested data sharing service name. After receiving the request, the central node inquires the corresponding service in the data sharing service pool according to the name of the data sharing service, verifies whether the service is effective, and returns the IP and port address of the server providing the data sharing service to the data requesting party after the verification is passed;
after receiving the return information of the central node, the data request is sent to the server IP and the port providing the data sharing service through the SDK, and the service provider returns the 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 general SDK implementation method 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: the central node server IP and the address port for receiving the request;
step 1.2.2, developing an API use request method in class, wherein the API use request can be sent to a relevant port of a central node, and comprises a data sharing service name registered by a data sharing service provider in the central node;
and 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 the target system registers a data sharing service to the central node to obtain all data sharing service lists in the network;
step 2.2: the central node periodically sends a detection instruction to the data sharing service address of the target system, detects whether the data sharing service is normal or not, maintains a data sharing service list, puts the service with the current record state being valid and the detection result being invalid off line, puts the service with the current record state being invalid and the detection result being valid on line, and gathers 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 system integrates the SDK to obtain a general data request method, and the general data request method comprises two methods: an API use request method and a data request method;
step 3.2: the source terminal system sends an API 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 generates an access token;
step 3.4: the central node returns the data sharing service address and the access token to the source system, and the source system obtains a data request response result;
step 3.5: and the source system directly requests data to the target system according to the data request response result, and the target system returns corresponding data after receiving the request.