Data exchange method, system and device based on heterogeneous data of network system
Through the combination of storage modules and mapping modules, flexible exchange of heterogeneous data is achieved, and the flexibility and scalability problems caused by structural code changes in the prior art are solved, ensuring the stability and rapid development of data exchange, and reducing costs.
Patent Information
- Application Number
- CN202311213912.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2043-09-19
AI Technical Summary
The definition of structures in the existing data exchange method is fixedly written in the application code, resulting in the lack of flexibility and scalability of interface applications and cannot meet the rapid development requirements under the expansion of information system requirements. Changing the structure code may affect the system functionality and correctness, extend the development cycle and increase costs.
Using a combination of storage module, mapping module and control module, a variety of mapping relationships are constructed by storing communication protocols and data as tables to realize data exchange without changing the code structure, and the mapping module uses the mapping module to retrieve the corresponding data table for data conversion.
It improves the flexibility and scalability of data exchange, avoids the impact of code changes on system functions, ensures the stability and rapid development of data exchange, and reduces development cycle and costs.
Smart Images

Figure CN117170908B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information exchange technology, and in particular to a data exchange method, system and device based on heterogeneous data in a network system. The device includes a computer-readable storage medium and an electronic device. Background Art
[0002] Computer information systems connect multiple computer devices through the network to realize the functions of information collection, transmission, storage, processing and management. Information systems can establish information exchange mechanisms between different systems through a storage and forwarding mechanism based on MQ, shared database or data link cache. Figure 1 As shown in Figure 2.2, due to the differences in data formats between different systems, a data exchange method is needed to implement the format conversion function, thereby ensuring seamless data connection and smooth collaborative work between information systems.
[0003] Existing data exchange methods such as Figure 2 As shown, different information systems exchange heterogeneous data through interface applications. Data links transmit information in the form of binary byte streams during socket communication, enabling data exchange between different information systems. Interface applications use shared data table structures and business data table structures to read and write to shared data tables and business data tables, respectively. By reading and filling in the corresponding byte data structures of the information system, communication modules are then used to exchange data with the information system data link.
[0004] When executing data exchange, the interface application first converts the exchange information in the structure into database entries or byte streams for storage or forwarding according to the Socket communication protocol or database table structure followed by the data sender, and then executes data exchange according to the Socket communication protocol or database table structure followed by the data receiver, converting the exchange information into a data format that can be correctly processed by the data receiver, and storing it in the corresponding structures of the shared data table structure, the business data table structure, the target system byte data structure and the byte data structure of this system.
[0005] During the data exchange process, metadata is used to store business data in the data link byte stream. It contains the business data content and its attribute information, and has a one-to-one correspondence with the business data. The metadata table is the database storage form corresponding to metadata. It is used to record and explain the specific content of each business data, as well as attribute information such as the Socket communication protocol tag and the Socket communication protocol sequence number. The table structure of the metadata table is shown in Table 1. The communication module can store the read content of the data link in the metadata table, or fill the data link with the metadata in the metadata table. Due to the differences in the data transmission methods used in different information systems, the communication module needs to use different Socket communication protocols to convert the data link byte stream into metadata in the format of Table 1:
[0006] Table 1
[0007] Column Name illustrate Packet ID Assign a unique number to each packet Data item number Specifies a unique number for each item in the data package Protocol Tags Socket communication protocol tag corresponding to metadata Protocol number Socket communication protocol serial number corresponding to the metadata content Specific content of the data item
[0008] In the above technical solution, because the structure definitions in existing data exchange methods are fixedly written into the application code, the interface application lacks sufficient flexibility and scalability, and cannot meet the requirements of rapid development under the conditions of expanding information system needs. When replacing and upgrading the Socket communication protocol or database table structure using existing technologies, the interface application needs to make extensive changes to the structure assignment code and its conversion method to change the data interaction method. Excessive changes to the structure code may affect the functionality and correctness of other parts of the system and introduce new software defects, causing the application to fail to operate normally or become unstable, thereby extending the development cycle, increasing project costs, and affecting software usability and user satisfaction. Summary of the Invention
[0009] The present invention provides a data exchange method and system based on heterogeneous data of a network system, a computer-readable storage medium and an electronic device, the main purpose of which is to overcome the technical problems caused by the above-mentioned large-scale modification of structure assignment codes and their conversion methods.
[0010] To achieve the above-mentioned objectives, the present invention provides an exchange system based on heterogeneous data of a network system, the exchange system being arranged in the system and being used for data exchange between the system and an external system, the exchange system comprising a storage module, a mapping module and a control module, the storage module being arranged to store the communication protocol between the system and the external system as a communication protocol table, the data of the system as a business data table or a metadata table, the data of the external system as a shared data table or a metadata table, and the templates of the data of the system and the external system as pre-filled data tables, wherein each template has a unique template group ID; the mapping module being arranged to construct a first mapping between the communication protocol of the system and the communication protocol of the external system, a second mapping between the first mapping and the template group ID, and a third mapping between the business data table and the shared data table; the control module being arranged to retrieve the corresponding data table from the storage module according to the business type and to perform data exchange through the corresponding mapping of the mapping module, the business type comprising data query, data filling, data deletion and data modification, the data table comprising multiple of the communication protocol table, the business data table, the metadata table, the pre-filled data table and the shared data table, and the mapping comprising one or more of the first mapping, the second mapping and the third mapping.
[0011] According to one aspect of the present invention, the storage module includes a business database and a shared database, the business database is used to store a communication protocol table, a metadata table, a business data table and a pre-filled data table, and the shared database is used to store a shared data table.
[0012] According to one aspect of the present invention, the control module includes a collection unit, a retrieval unit, and a conversion unit. The collection unit is configured to collect a business data table loaded into the storage module by the system or a shared data table loaded into the storage module by an external system; the retrieval unit is configured to retrieve a third mapping of the business data table and the shared data table from the mapping module to form a third mapping group; and the conversion unit is configured to implement conversion between the business data table and the shared data table based on the third mapping group formed by the retrieval unit.
[0013] Preferably, the collection unit is configured to collect the business data table loaded into the storage module of the system; the retrieval unit is configured to retrieve a third mapping group of a third mapping between the business data table and the shared data table from the mapping module; the conversion unit is configured to convert the business data table into the shared data table according to the third mapping group constructed by the retrieval unit;
[0014] Preferably, the acquisition unit is configured to acquire the shared data table loaded into the storage module by the external system; the calling unit is configured to call the third mapping of the business data table and the shared data table from the mapping module to form a third mapping group; the conversion unit is configured to convert the shared data table into a business data table according to the third mapping group formed by the calling unit.
[0015] According to one aspect of the present invention, the conversion unit performs a relational database write operation on the business data table and the shared data table according to the third mapping group to achieve data conversion;
[0016] Preferably, the shared data table and the business data table include table identifiers, column identifiers and column ordinal numbers. The conversion unit loads the table identifiers and column identifiers of the business data table and the shared data table one by one according to the column ordinal numbers according to the third mapping group and generates SQL statements. The INSERT INTO write keyword and the SELECT query keyword are used to execute the write operation of the relational database to realize data conversion.
[0017] According to one aspect of the present invention, a data link is set between the present system and the external system; the exchange system also includes a communication module, the communication module is configured to communicate between the data link and the storage module, the control module includes a calling unit, a first filling unit, a conversion information matching table generation unit, a pre-filled protocol information table generation unit and a second filling unit, the calling unit is configured to call the communication protocol of the present system and the external system corresponding to the business type from the communication protocol table of the storage module, respectively forming the protocol group of the present system and the external system, call the first mapping corresponding to the protocol group of the present system and the protocol group of the external system from the first mapping of the mapping module to form a first mapping group, and call the template group ID corresponding to the first mapping group from the second mapping of the mapping module; the first filling unit is configured to convert the data of the data link transmitted by the communication module into metadata according to the protocol group of the data source system and fill in to the metadata table, the data source system is the present system or an external system; the conversion information matching table generating unit is configured to merge and extract information from the metadata filled in by the first filling unit and the first mapping group formed by the retrieval unit to generate a conversion information matching table; the pre-filled protocol information table generating unit is configured to merge information from the template in the pre-filled data table corresponding to the template group ID and the protocol group of the data destination system to generate a pre-filled protocol information table, the data destination system is opposite to the data source system, and the data destination system is an external system or the present system; the second filling unit is configured to convert the pre-filled protocol information table into metadata and fill it into the metadata table according to a filling method, the filling method including using default data, using conversion entries and automatically generating data, the default data comes from the template of the pre-filled data table, and the conversion entries come from the entries that match the conversion information matching table and the pre-filled protocol information table;
[0018] Preferably, the data link is used to read or fill in the data of this system; the calling unit is configured to call the communication protocols of this system and the external system corresponding to the business type from the communication protocol table of the storage module, respectively constituting the protocol group of this system and the protocol group of the external system, calling the first mapping corresponding to the protocol group of this system and the protocol group of the external system from the first mapping of the mapping module to form a first mapping group, and calling the template group ID corresponding to the first mapping group from the second mapping of the mapping module; the first filling unit is configured to convert the data of this system transmitted by the communication module and filled in the data link into metadata according to the protocol group of this system and fill it into the metadata table; the conversion information matching table generates The unit is configured to merge and extract information from the metadata filled in by the first filling unit and the first mapping group formed by the retrieval unit to generate a conversion information matching table; the pre-filled protocol information table generating unit is configured to merge information from the template in the pre-filled data table corresponding to the template group ID and the protocol group of the external system to generate a pre-filled protocol information table; the second filling unit is configured to convert the pre-filled protocol information table into metadata according to a filling method and fill it into the metadata table, the filling method including using default data, using conversion entries and automatically generating data, the default data comes from the template of the pre-filled data table, and the conversion entries come from the entries that match the conversion information matching table and the pre-filled protocol information table;
[0019] Preferably, the data link is used to read data from an external system or fill in data of the present system; the calling unit is configured to call the communication protocols of the present system and the external system corresponding to the business type from the communication protocol table of the storage module, respectively constituting the protocol group of the present system and the protocol group of the external system, calling the first mapping corresponding to the protocol group of the present system and the protocol group of the external system from the first mapping of the mapping module to form a first mapping group, and calling the template group ID corresponding to the first mapping group from the second mapping of the mapping module; the first filling unit is configured to convert the data read from the external system by the data link transmitted by the communication module into metadata according to the protocol group of the external system and fill in the metadata table; the conversion The information matching table generating unit is configured to merge and extract information from the metadata filled in by the first filling unit and the first mapping group formed by the retrieval unit to generate a conversion information matching table; the pre-filled protocol information table generating unit is configured to merge information from the template in the pre-filled data table corresponding to the template group ID and the protocol group of this system to generate a pre-filled protocol information table; the second filling unit is configured to convert the pre-filled protocol information table into metadata according to a filling method and fill it into the metadata table, the filling method including using default data, using conversion entries and automatically generating data, the default data comes from the template of the pre-filled data table, and the conversion entries come from the entries that match the conversion information matching table and the pre-filled protocol information table;
[0020] Preferably, the second filling unit converts the pre-filled entries in the pre-filled protocol information table into metadata one by one in a template stack manner.
[0021] According to one aspect of the present invention, the storage module includes a cascading unit, the cascading unit being configured to divide the communication protocols into different communication protocol groups according to protocol tags, the protocol tags at least including a root protocol tag, the protocol tags also including one or more sub-protocol tags arranged after the root protocol tag, the cascading unit dividing the communication protocols having the same root protocol tag into one communication protocol group;
[0022] Preferably, the cascade unit further stores the templates of the data of the present system and the external system as a template group in a pre-filled data table according to the protocol tags.
[0023] According to one aspect of the present invention, the mapping module includes a first mapping unit, a second mapping unit, and a third mapping unit. The first mapping unit is configured to construct a first mapping between a communication protocol of the system and a communication protocol of an external system; the second mapping unit is configured to construct a second mapping between the first mapping and a template group ID; and the third mapping unit is configured to construct a third mapping between a business data table and a shared data table.
[0024] Preferably, the first mapping unit constructs a first mapping between the communication protocol group of the system and the communication protocol group of the external system.
[0025] The present invention also provides a data exchange method based on heterogeneous data of a network system, which is used for data exchange between the system and an external system, comprising:
[0026] Storing the communication protocols between the system and the external system as a communication protocol table;
[0027] Store the system's data in business data tables or metadata tables;
[0028] Store data from external systems in shared data tables or metadata tables;
[0029] Store templates of data from this system and external systems as pre-filled data tables, with each template having a unique template group ID;
[0030] Constructing a first mapping between the communication protocol of the system and the communication protocol of the external system, a second mapping between the first mapping and the template group ID, and a third mapping between the business data table and the shared data table;
[0031] According to the business type, the mapping corresponding to the corresponding data table is called to perform data exchange. The business type includes data query, data filling, data deletion and data modification. The data table includes multiple communication protocol tables, business data tables, metadata tables, pre-filled data tables and shared data tables. The mapping includes one or more of the first mapping, the second mapping and the third mapping.
[0032] According to the second aspect of the present invention, the step of retrieving a mapping corresponding to a corresponding data table according to a business type to perform data exchange includes:
[0033] Collect business data tables loaded into this system or shared data tables loaded into external systems;
[0034] Retrieving the third mapping of the business data table and the shared data table to form a third mapping group;
[0035] Implementing conversion between the business data table and the shared data table according to the third mapping group;
[0036] Preferably, the step of retrieving a mapping corresponding to a corresponding data table according to a business type to perform data exchange includes:
[0037] Collect business data tables loaded into this system;
[0038] Retrieving the third mapping of the business data table and the shared data table to form a third mapping group;
[0039] Converting the business data table into a shared data table according to the third mapping group;
[0040] Preferably, the step of retrieving a mapping corresponding to a corresponding data table according to a business type to perform data exchange includes:
[0041] Collect shared data tables loaded from external systems;
[0042] Retrieving the third mapping of the business data table and the shared data table to form a third mapping group;
[0043] The shared data table is converted into a business data table according to the third mapping group.
[0044] According to the second aspect of the present invention, the step of implementing conversion between the business data table and the shared data table according to the third mapping group includes:
[0045] Performing a write operation of a relational database on the business data table and the shared data table according to the third mapping group to achieve data conversion;
[0046] Preferably, the shared data table and the business data table include a table identifier, a column identifier, and a column sequence number, and the step of performing a relational database write operation on the business data table and the shared data table to implement data conversion according to the third mapping group includes:
[0047] According to the third mapping group, the table identifiers and column identifiers of the business data table and the shared data table are loaded one by one according to the column sequence number and an SQL statement is generated;
[0048] By using the INSERT INTO keyword and the SELECT query keyword, write operations on the relational database are performed to achieve data conversion.
[0049] According to the second aspect of the present invention, the step of retrieving a mapping corresponding to a corresponding data table according to a business type to perform data exchange includes:
[0050] Fill in the data of this system or read the data of the external system through the data link;
[0051] Retrieve the communication protocols of the current system and the external system corresponding to the business type from the communication protocol table, and form the protocol groups of the current system and the external system respectively;
[0052] Retrieving from the first mapping the first mappings corresponding to the protocol group of the local system and the protocol group of the external system to form a first mapping group;
[0053] Retrieve the template group ID corresponding to the first mapping group from the second mapping;
[0054] Convert the data of the data link into metadata according to the protocol group of the data source system and fill it into the metadata table, wherein the data source system is the current system or an external system;
[0055] Merging and extracting information from the metadata and the first mapping group to generate a conversion information matching table;
[0056] Merging information of the template in the pre-filled data table corresponding to the template group ID and the protocol group of the data destination system to generate a pre-filled protocol information table, wherein the data destination system corresponds to the data source system and the data destination system is an external system or the current system;
[0057] Converting the pre-filled protocol information table into metadata according to a filling method and filling it into the metadata table, the filling method including using default data, using conversion entries, and automatically generating data, the default data being from a template of the pre-filled data table, the conversion entries being from entries in a conversion information matching table that match the pre-filled protocol information table, and preferably, further comprising: filling the metadata converted from the pre-filled protocol information table into a data link;
[0058] Preferably, the step of retrieving a mapping corresponding to a corresponding data table according to a business type to perform data exchange includes:
[0059] Fill the data of this system into the data link;
[0060] Retrieve the communication protocols of the current system and the external system corresponding to the business type from the communication protocol table, and form the protocol groups of the current system and the external system respectively;
[0061] Retrieving from the first mapping the first mappings corresponding to the protocol group of the local system and the protocol group of the external system to form a first mapping group;
[0062] Retrieve the template group ID corresponding to the first mapping group from the second mapping;
[0063] The data entered into the data link by this system is converted into metadata according to the protocol group of this system and entered into the metadata table;
[0064] Merge and extract information from the metadata of the metadata table and the first mapping group filled in by the data link to generate a conversion information matching table;
[0065] Merge the template in the pre-filled data table corresponding to the template group ID with the protocol group of the external system to generate a pre-filled protocol information table;
[0066] Converting the pre-filled protocol information table into metadata according to a filling method and filling it into the metadata table, the filling method including using default data, using conversion entries, and automatically generating data, the default data being from a template of the pre-filled data table, and the conversion entries being from entries in a conversion information matching table that match the pre-filled protocol information table, preferably further comprising: filling the metadata converted from the pre-filled protocol information table into a data link, and transmitting it to an external system via the data link;
[0067] Preferably, the step of retrieving a mapping corresponding to a corresponding data table according to a business type to perform data exchange includes:
[0068] Read data from external systems through data links;
[0069] Convert the data read from the external system by the data link into metadata according to the protocol group of the external system and fill it into the metadata table;
[0070] Merge and extract information from the metadata of the metadata table and the first mapping group filled in by the data link to generate a conversion information matching table;
[0071] Merge the information of the template in the pre-filled data table corresponding to the template group ID and the protocol group of this system to generate a pre-filled protocol information table;
[0072] Converting the pre-filled protocol information table into metadata according to a filling method and filling it into the metadata table, the filling method including using default data, using conversion entries, and automatically generating data, the default data being from a template of the pre-filled data table, the conversion entries being from an entry in a conversion information matching table that matches the pre-filled protocol information table, and preferably, further comprising: converting the pre-filled protocol information table into metadata, filling it into a data link, and transmitting it to the system via the data link;
[0073] Preferably, the step of converting the pre-filled protocol information table into metadata according to the filling method and filling it into the metadata table includes:
[0074] The pre-filled entries in the pre-filled protocol information table are converted into metadata one by one using a template stack.
[0075] According to the second aspect of the present invention, the step of converting the pre-filled entries in the pre-filled protocol information table into metadata one by one by using a template stack comprises:
[0076] Load the template and retrieve the pre-filled entries according to the template group ID in the pre-filled protocol information table;
[0077] Pushing pre-filled entries from the top of the stack into the template stack, wherein the pre-filled entries are arranged in a set order in the template stack;
[0078] Determine how the first pre-filled entry is filled in;
[0079] If the above filling method uses default data, fill in the corresponding default data in the template into the metadata table;
[0080] If the above filling method uses conversion entries, obtain the corresponding matching items from the conversion information table through query matching and fill them into the metadata table:
[0081] If the above filling method is automatic generation, fill the automatically generated data into the metadata table;
[0082] After the first pre-filled entry is converted into metadata and filled into the metadata table, the template stack is popped;
[0083] Repeat the steps of determining the filling method, filling in the metadata table, and popping the template stack for the next pre-filled entry until all pre-filled entries are generated as metadata in the metadata table.
[0084] According to a second aspect of the present invention, the step of storing the communication protocol between the system and the external system as a communication protocol table includes:
[0085] Dividing the communication protocols into different communication protocol groups according to the protocol tags, wherein the protocol tags include at least a root protocol tag and further include one or more sub-protocol tags arranged after the root protocol tag, and dividing the communication protocols having the same root protocol tag into one communication protocol group;
[0086] Preferably, the step of storing the templates of the data of the present system and the external system as a pre-filled data table includes:
[0087] Storing templates for data in the current system and external systems as template groups in pre-filled data tables;
[0088] Preferably, the step of constructing a first mapping between the communication protocol of the present system and the communication protocol of the external system includes:
[0089] A first mapping between the communication protocol group of the present system and the communication protocol group of the external system is constructed.
[0090] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an interface application. When the interface application is executed by a processor, the steps of the above-mentioned data exchange method based on heterogeneous data of a network system are implemented.
[0091] The present invention also provides an electronic device comprising a memory, a processor and an interface application stored in the memory and runnable on the processor. When the processor executes the interface application, the steps in the above-mentioned data exchange method based on heterogeneous data of a network system are implemented.
[0092] The data exchange method and system based on heterogeneous data of a network system, the computer-readable storage medium and the electronic device provided by the present invention can realize the data exchange of heterogeneous data by calling different data tables and corresponding mappings without changing the code structure, thereby improving flexibility and scalability, meeting the requirements of rapid development under the conditions of expansion of information system needs, avoiding the impact of structural code changes on the functions and correctness of other parts of the information system, and not introducing new defects, thereby ensuring the normal operation of data exchange, stable functions, shortening the development cycle, reducing project costs, and improving usability and user experience satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] Figure 1 is a schematic diagram of an embodiment of a data exchange method in the prior art;
[0094] Figure 2 A schematic diagram of another embodiment of a data exchange method in the prior art;
[0095] Figure 3 It is a schematic diagram of an embodiment of the network system heterogeneous data exchange system according to the present invention;
[0096] Figure 4 This is a schematic block diagram of an embodiment of the network system heterogeneous data exchange system according to the present invention;
[0097] Figure 5 is a schematic diagram of a first embodiment of a network system heterogeneous data exchange system according to the present invention;
[0098] Figure 6 is a schematic diagram of a second embodiment of the network system heterogeneous data exchange system according to the present invention;
[0099] Figure 7 is a schematic diagram of a third embodiment of the network system heterogeneous data exchange system according to the present invention;
[0100] Figure 8 is a schematic diagram of a fourth embodiment of the network system heterogeneous data exchange system according to the present invention;
[0101] Figure 9 is a schematic diagram of the protocol group cascade according to the present invention;
[0102] Figure 10 is a schematic diagram of the control module of the present invention performing a single data conversion;
[0103] Figure 11 is a schematic diagram of an embodiment of data exchange performed by the control module according to the present invention;
[0104] Figure 12 is a schematic diagram of an embodiment of a control module write operation according to the present invention;
[0105] Figure 13 is a schematic diagram of a specific embodiment of the control module write operation of the present invention;
[0106] Figure 14 is a schematic diagram of another specific embodiment of the control module write operation of the present invention;
[0107] Figure 15 is a schematic diagram of another embodiment of the control module performing data exchange according to the present invention;
[0108] Figure 16 This is a flow chart of an embodiment of the data exchange method based on heterogeneous data in a network system according to the present invention;
[0109] Figure 17 is a schematic diagram of an embodiment of the method for generating a conversion information matching table according to the present invention;
[0110] Figure 18It is a schematic diagram of an embodiment of the method for generating a pre-filled protocol information table according to the present invention;
[0111] Figure 19 is a schematic diagram of an embodiment of the template stack matching method of the present invention;
[0112] Figure 20 is a schematic diagram of an embodiment of data exchange performed by a computer-readable storage medium according to the present invention;
[0113] Among them, the present system 1000; the exchange system 1 based on heterogeneous data of the network system; the storage module 10; the business database 11; the communication protocol table 111; the metadata table 112; the business data table 113; the pre-filled data table 114; the shared database 12; the shared data table 121; the cascade unit 13; the mapping module 20; the first mapping unit 21; the second mapping unit 22; the third mapping unit 23; the control module 30; the acquisition unit 31; the retrieval unit 32; the conversion unit 33; the first filling unit 34; the conversion information matching table generation unit 35; the pre-filled protocol information table generation unit 36; the second filling unit 37; the communication module 40; the data link 2000; the external system 3000; the computer-readable storage medium 100; the interface application 101; DETAILED DESCRIPTION
[0114] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0115] The present invention provides an exchange system based on heterogeneous data of a network system. The exchange system is arranged in the system and is used for data exchange between the system and an external system.
[0116] Figure 3 is a schematic diagram of an embodiment of the network system heterogeneous data exchange system according to the present invention. Figure 4 FIG. 1 is a block diagram of an embodiment of the network system heterogeneous data exchange system according to the present invention. Figure 3 and Figure 4As shown, the switching system 1 includes a storage module 10, a mapping module 20 and a control module 30. The storage module 10 is configured to store the communication protocol of the system 1000 and the external system 3000 as a communication protocol table 111, store the data of the system 1000 as a business data table 113 or a metadata table 112, store the data of the external system 3000 as a shared data table 121 or a metadata table 112, and store the templates of the data of the system 1000 and the external system 3000 as a pre-filled data table 114, where each template has a unique template group ID; the mapping module 20 is configured to construct a communication protocol between the system 1000 and the external system 3000. 00, a first mapping between the communication protocols, a second mapping between the first mapping and the template group ID, and a third mapping between the business data table 113 and the shared data table 121; the control module 30 is configured to retrieve the corresponding data table from the storage module 10 according to the business type and exchange data through the corresponding mapping of the mapping module 20, the business type includes data query, data filling, data deletion and data modification, the data table includes multiple ones of the communication protocol table 111, the business data table 113, the metadata table 112, the pre-filled data table 114 and the shared data table 121, and the mapping includes one or more of the first mapping, the second mapping and the third mapping.
[0117] The switching system 1 of the present invention includes a storage module 10, a mapping module 20, and a control module 30. When the interface method needs to be changed, only the parameter files corresponding to the storage module 10 and mapping module 20 are modified, while the control module 30 remains unchanged, thereby meeting the required specifications and preventing frequent changes to the code structure. Because the code structure is designed to remain unchanged over the long term, the switching system 1 of the present application can quickly implement functions compared to existing technologies, reduce software testing and deployment costs, and facilitate maintenance management and version control.
[0118] The storage module 10 of the present invention stores a communication protocol table 111, a metadata table 112, a business data table 113, a shared data table 121, and a pre-filled data table 114. The mapping module 20 constructs a first mapping between the communication protocol of the present system 1000 and the communication protocol of the external system 3000, a second mapping between the first mapping and the template group ID, and a third mapping between the business data table 113 and the shared data table 121. The control module 30 realizes the mapping function of data of different formats between information systems by calling the data tables and corresponding mappings of different storage modules.
[0119] In some embodiments of the present invention, the storage module 10 includes a business database 11 and a shared database 12, the business database 11 is used to store a communication protocol table 111, a metadata table 112, a business data table 113 and a pre-filled data table 114, and the shared database 12 is used to store a shared data table 121.
[0120] In some embodiments of the present invention, the storage module 10 includes a cascading unit 13, which is configured to divide the communication protocol into different communication protocol groups according to the protocol tag, wherein the protocol tag at least includes a root protocol tag, and the protocol tag also includes one or more sub-protocol tags set after the root protocol tag. The cascading unit 13 divides the communication protocols with the same root protocol tag into one communication protocol group.
[0121] Preferably, the cascading unit 13 further stores the templates of the data of the present system 1000 and the external system 3000 as a template group in the pre-filled data table 114 according to the protocol tags.
[0122] Preferably, the cascading unit 13 further stores the templates of the data of the present system 1000 and the external system 3000 as a template group in the pre-filled data table 114 according to the protocol tags.
[0123] In some embodiments of the present invention, the mapping module 20 includes a first mapping unit 21, a second mapping unit 22 and a third mapping unit 23. The first mapping unit 21 is configured to construct a first mapping between the communication protocol of the present system 1000 and the communication protocol of the external system 3000; the second mapping unit 22 is configured to construct a second mapping between the first mapping and the template group ID; and the third mapping unit 23 is configured to construct a third mapping between the business data table 113 and the shared data table 121.
[0124] Preferably, the first mapping unit 21 constructs a first mapping between the communication protocol group of the present system 1000 and the communication protocol group of the external system 3000 .
[0125] In some embodiments of the present invention, the control module 30 includes a collection unit 31, a retrieval unit 32 and a conversion unit 33. The collection unit 31 is configured to collect the business data table 113 loaded into the storage module 10 by the current system 1000 or the shared data table 121 loaded into the storage module 10 by the external system 3000; the retrieval unit 32 is configured to retrieve the third mapping of the business data table 113 and the shared data table 121 from the mapping module 20 to form a third mapping group; the conversion unit 33 is configured to realize the conversion between the business data table 113 and the shared data table 121 according to the third mapping group formed by the retrieval unit 32.
[0126] In some embodiments of the present invention, Figure 5As shown, the collection unit 31 is configured to collect the business data table 113 loaded into the storage module 10 by the system 1000; the calling unit 32 is configured to call the third mapping group of the third mapping of the business data table 113 and the shared data table 121 from the mapping module 20; the conversion unit 33 is configured to convert the business data table 113 into the shared data table 121 according to the third mapping group constructed by the calling unit 32.
[0127] The exchange system 1 of the present invention realizes data exchange by calling the third mapping group of the mapping module 20 through the control module 30. In the prior art, the heterogeneous data exchange between the system 1000 and the external system 3000 is realized by changing the structure of the business data table 113 of the system 1000 through coding. The present invention does not need to change the code structure. Compared with the prior art, it has high stability, can quickly realize functions, reduce software testing and deployment costs, facilitate maintenance management and version control, has low cost, and can be applied to occasions where the system interface mode changes frequently.
[0128] In some embodiments of the present invention, Figure 6 As shown, the collection unit 31 is configured to collect the shared data table 121 loaded into the storage module 10 by the external system 3000; the calling unit 32 is configured to call the third mapping of the business data table 113 and the shared data table 121 from the mapping module 20 to form a third mapping group; the conversion unit 33 is configured to convert the shared data table 121 into the business data table 113 according to the third mapping group formed by the calling unit 32.
[0129] The exchange system 1 of the present invention realizes data exchange by calling the third mapping group of the mapping module 20 through the control module 30. In the prior art, heterogeneous data exchange from the external system 3000 to the present system 1000 is realized by changing the shared data table 121 structure by coding. The present invention does not need to change the code structure. Compared with the prior art, it has high stability, can quickly realize functions, reduce software testing and deployment costs, facilitate maintenance management and version control, has low cost, and can be applied to occasions where the system interface mode changes frequently.
[0130] In some embodiments of the present invention, the conversion unit 33 performs a relational database write operation on the business data table 113 and the shared data table 121 according to the third mapping group to achieve data conversion.
[0131] Preferably, the shared data table 121 and the business data table 113 include table identifiers, column identifiers and column serial numbers. The conversion unit 33 loads the table identifiers and column identifiers of the business data table 113 and the shared data table 121 one by one according to the column serial numbers according to the third mapping group and generates SQL statements. By writing keywords through INSERT INTO and querying keywords through SELECT, the write operation of the relational database is executed to realize data conversion.
[0132] The business data table 113 is the basic data organization method of the information system (such as the present system 1000). It is composed of multiple data columns and is used to store various types of data necessary for the implementation of module functions. By calling the business data table 113, the information system can efficiently store, retrieve, and manage all business data, thereby supporting various functions and business processes of the information system. Because the information system needs to process data of different types, structures, and quantities, there are multiple business data tables 113 designed for different functions in the information system. The data types used in the business data table 113 include numeric, text, date, Boolean, etc. The business data table 113 described in the present invention is shown in Table 2 below.
[0133] Table 2
[0134]
[0135] The shared data table 121 is used to transmit data between different information systems and ensure that the data is correctly transmitted in each system. It contains data that needs to be read and written. The shared data table 121 of the current system 1000 is written by the current system 1000, and the external system 3000 can only read the data. The shared data table 121 of the external system 3000 is written by the external system 3000, and the current system 1000 can only read the data. By using the shared data table 121, large-scale data transmission and sharing can be achieved between different information systems while ensuring the consistency and integrity of the data. The shared data table 121 is shown in Table 3 below.
[0136] Table 3
[0137]
[0138] In some embodiments of the present invention, a data link 2000 is set between the system 1000 and the external system 3000; the switching system 1 further includes a communication module 40, which is configured for communication between the data link 2000 and the storage module 10, and the control module 30 includes a calling unit 32, a first filling unit 34, a conversion information matching table generating unit 35, a pre-filled protocol information table generating unit 36 and a second filling unit 37. The calling unit 32 is configured to call the communication protocols of the system 1000 and the external system 3000 corresponding to the business type from the communication protocol table 111 of the storage module 10, respectively forming the protocol groups of the system 1000 and the external system 3000, call the first mapping corresponding to the protocol group of the system 1000 and the protocol group of the external system 3000 from the first mapping of the mapping module 20 to form a first mapping group, and call the template group ID corresponding to the first mapping group from the second mapping of the mapping module 20; the first filling unit 34 is configured to convert the data of the data link 2000 transmitted by the communication module 40 into a template group ID. The data is converted into metadata according to the protocol group of the data source system and filled into the metadata table 112, wherein the data source system is the present system 1000 or the external system 3000; the conversion information matching table generating unit 35 is configured to merge and extract information from the metadata filled in by the first filling unit 34 and the first mapping group formed by the retrieval unit 32 to generate a conversion information matching table; the pre-filled protocol information table generating unit 36 is configured to merge information from the template in the pre-filled data table 114 corresponding to the template group ID and the protocol group of the data destination system to generate a pre-filled protocol information table, wherein the data destination system is opposite to the data source system and is the external system 3000 or the present system 1000; the second filling unit 37 is configured to convert the pre-filled protocol information table into metadata and fill into the metadata table 112 according to the filling method, wherein the filling method includes using default data, using conversion entries and automatically generating data, wherein the default data comes from the template of the pre-filled data table 114, and the conversion entries come from the entries that match the conversion information matching table and the pre-filled protocol information table.
[0139] In some embodiments of the present invention, Figure 7As shown, the data link 2000 is used to read or fill in the data of the present system 1000; the calling unit 32 is configured to call the communication protocols of the present system 1000 and the external system 3000 corresponding to the business type from the communication protocol table 111 of the storage module 10, respectively constituting the present system 1000 protocol group and the external system 3000 protocol group, and to call the first mapping corresponding to the present system 1000 protocol group and the external system 3000 protocol group from the first mapping of the mapping module 20 to form a first mapping group, and to call the template group ID corresponding to the first mapping group from the second mapping of the mapping module 20; the first filling unit 34 is configured to convert the data of the present system 1000 transmitted by the communication module 40 and filled in the data link 2000 into metadata according to the present system 1000 protocol group and fill it in Metadata table 112; the conversion information matching table generation unit 35 is configured to merge and extract information from the metadata filled in by the first filling unit 34 and the first mapping group formed by the calling unit 32 to generate a conversion information matching table; the pre-filled protocol information table generation unit 36 is configured to merge information from the template in the pre-filled data table 114 corresponding to the template group ID and the protocol group of the external system 3000 to generate a pre-filled protocol information table; the second filling unit 37 is configured to convert the pre-filled protocol information table into metadata according to the filling method and fill it into the metadata table 112, the filling method including using default data, using conversion entries and automatically generating data, the default data comes from the template of the pre-filled data table 114, and the conversion entries come from the entries that match the conversion information matching table and the pre-filled protocol information table.
[0140] The switching system 1 of the present invention realizes data exchange by combining the first mapping group and the second mapping group of the mapping module 20 with the pre-filled data table 114 of the storage module 10 through the control module 30. In the prior art, the 1000-byte data structure of the system is changed to the 3000-byte data structure of the external system by coding, such as Figure 7 The middle dotted line transmits the byte stream converted into the external system 3000-byte data structure to the external system 3000 through the communication module 40, thereby realizing heterogeneous data exchange from the present system 1000 to the external system 3000. The present invention does not require changing the code structure, has high stability compared to the existing technology, can quickly implement functions, reduce software testing and deployment costs, facilitates maintenance management and version control, has low cost, and can be applied to occasions where the system interface mode changes frequently.
[0141] In some embodiments of the present invention, Figure 8As shown, the data link 2000 is used to read data from the external system 3000 or fill in data of the present system 1000; the calling unit 32 is configured to call the communication protocols of the present system 1000 and the external system 3000 corresponding to the business type from the communication protocol table 111 of the storage module 10, respectively constituting the protocol group of the present system 1000 and the protocol group of the external system 3000, and to call the first mapping corresponding to the protocol group of the present system 1000 and the protocol group of the external system 3000 from the first mapping of the mapping module 20 to form a first mapping group, and to call the template group ID corresponding to the first mapping group from the second mapping of the mapping module 20; the first filling unit 34 is configured to convert the data read from the external system 3000 by the data link 2000 transmitted by the communication module 40 into the protocol group of the external system 3000 according to the protocol group of the external system 3000. The conversion information matching table generating unit 35 is configured to merge and extract information from the metadata filled in by the first filling unit 34 and the first mapping group formed by the retrieval unit 32 to generate a conversion information matching table; the pre-filled protocol information table generating unit 36 is configured to merge information from the template in the pre-filled data table 114 corresponding to the template group ID and the protocol group of this system 1000 to generate a pre-filled protocol information table; the second filling unit 37 is configured to convert the pre-filled protocol information table into metadata and fill it into the metadata table 112 according to the filling method, the filling method includes using default data, using conversion entries and automatically generating data, the default data comes from the template of the pre-filled data table 114, and the conversion entry comes from the entry that matches the conversion information matching table with the pre-filled protocol information table.
[0142] The switching system 1 of the present invention realizes data exchange by combining the first mapping group and the second mapping group of the mapping module 20 with the pre-filled data table 114 of the storage module 10 through the control module 30. In the prior art, the 3000-byte data structure of the external system is changed to the 1000-byte data structure of the system by coding, such as Figure 8 The middle dotted line transmits the byte stream of the changed cost system 1000-byte data structure to the present system 1000 through the communication module 40, thereby realizing heterogeneous data exchange from the external present system 1000 to the present system 1000. The present invention does not require changing the code structure, has high stability compared to the existing technology, can quickly implement functions, reduce software testing and deployment costs, facilitates maintenance management and version control, has low cost, and can be applied to occasions where the system interface mode changes frequently.
[0143] In some embodiments of the present invention, the second filling unit 37 converts the pre-filled entries in the pre-filled protocol information table into metadata one by one by using a template stack.
[0144] In some embodiments of the present invention, the communication protocol table 111 is used for the Socket communication protocol parameters of the storage information system to determine the mode and format of data transmission under the Socket communication protocol. The Socket communication protocol defines the sorting number and the number of bytes occupied by each business data in the byte stream. According to the difference between reading and data classification, the business data can be further classified into fixed-length data, word-length data, variable-length data, loop mark, type mark and splicing mark. Fixed-length data and word-length data occupy a fixed number of bytes, the number of bytes occupied by variable-length data is specified by the fixed-length data of the previous number in the sorting, the loop mark is used to specify the number of times that multiple numbers are repeatedly read or written within a certain range in the future, the type mark and splicing mark are used to load the Socket protocol group, and the communication protocol table 111 is shown in Table 4 below.
[0145] Table 4
[0146]
[0147]
[0148] The communication protocols in the table are divided into different protocol groups according to the protocol tag. The protocol tag is a unique string identifier of the protocol group. If the protocol tag of a protocol group contains the protocol tag of another protocol group, the protocol group can be filled in the position of the splicing tag of the included protocol group, and the cascade constitutes the socket protocol group that the communication module 40 can process. The cascade method of the socket protocol group is as follows: Figure 7 As shown, Figure 7 The protocol tag A on the left is used by all protocol groups in a cascade manner and is recorded as the root protocol tag of the information system.
[0149] In some embodiments of the present invention, mapping module 20 implements the first, second, and third mappings in the form of a mapping table. The mapping table is used to store information about mapping groups, including one or more of the first, second, and third mapping groups. Each mapping group contains all the information required by control module 30 to perform a single conversion operation. By loading the information from the mapping groups, control module 30 can implement data conversion in two ways: conversion between the shared data table 121 and the business data table 113 of the present system 1000, and conversion between metadata tables 112 of different information systems. The mapping table is shown in Table 5. The meanings of the marks and serial numbers before and after data conversion vary depending on the conversion method. For data conversion operations between the shared data table 121 of the system 1000 and the business data table 113, the tags and sequence numbers before and after the conversion represent the table identifiers, column identifiers, and sequence numbers of the system 1000 and the external system 3000, respectively. For data conversion operations between metadata tables 112 of different information systems, the tags and sequence numbers before and after the conversion represent the socket communication protocol tags and sequence numbers of the metadata table 112 of the system 1000 and the external system 3000, respectively. When the conversion method is to convert metadata tables 112 of different information systems, the control module 30 uses the template group ID to call the template group in the pre-filled data table 114 and performs logical operations in the relational database to generate a conversion information matching table as the information source for the metadata data conversion.
[0150] Table 5
[0151]
[0152]
[0153] In some embodiments of the present invention, the pre-filled data table 114 is used to store formatting information of Socket communication protocol data. The pre-filled data table 114 is designed according to the attribute information of the Socket communication protocol. The template entries in the template in the table can be divided into template groups according to the protocol tags and are Figure 9 Cascading is performed in the manner shown. A single template group ID corresponds to a protocol group under a single protocol tag. The template group ID is associated with the protocol sequence number. The specific ordering method depends on the service data order specified in the Socket communication protocol. By loading default content or conversion entries, the control module 30 can generate metadata groups and store them in the metadata table 112. The format of the generated metadata complies with the Socket communication protocol requirements of the data destination system. Pre-populated data table 114 is shown in Table 6 below.
[0154] Table 6
[0155]
[0156] In some embodiments of the present invention, Figure 10 As shown, when performing a data conversion operation, the control module 30 first obtains a mapping from the mapping module 20, and then performs a single data conversion based on the data matching relationships corresponding to different conversion methods. During the data conversion process, not all business data in the storage module needs to be converted; only business data that matches the mapping group needs to be converted. After the business data completes the data conversion, the control module 30 writes the processed business data and the default filled data into the converted storage module to meet the format requirements of the data destination system data. The default filled data is stored in the pre-filled data table 114, which is automatically extracted and filled by the control module 30, thereby ensuring the standardization and integrity of the format of the converted business data.
[0157] In some embodiments of the present invention, Figure 11 As shown, the control module 30 uses the input and output information in the mapping table to perform write operations on the relational database. Depending on the application programming language, the control module 30 can implement write operations by executing SQL statements. SQL statements are structured query languages used to perform operations such as data query, write, delete, and modify in relational databases. The control module 30 fills in the SQL statement based on the table identifier and column identifier in the input information and output information, and the column identifier is filled in in ascending order of the column number. The write operation of the control module 30 is implemented as follows: Figure 12 shown.
[0158] In one embodiment of the present invention, business data from system 1000 is shared with external system 3000. For example, documents from system 1000 are shared with external system 3000. Document archives from system 1000 are stored in business data table 113A_CONTENT, corresponding to shared data table 121 called A_SHARE_CONTENT. Exchange system 1 first converts the business data in A_CONTENT into shared data in A_SHARE_CONTENT. External system 3000 then obtains document archive information by accessing the shared data in table A_SHARE_CONTENT. Business data table 113A_CONTENT and shared data table 121A_SHARE_CONTENT are shown in Table 113 and Table 121.
[0159] Table 7
[0160]
[0161]
[0162] Table 8
[0163]
[0164] The control module 30 obtains a mapping group consisting of a third mapping for mutual conversion between the shared data table 121 and the business data table 113 of the system 1000 from the mapping table according to the names of the business data table 113A_CONTENT and the shared data table 121A_SHARE_CONTENT, as shown in Table 9.
[0165] Table 9
[0166]
[0167] Based on the mapping of the business data table A_CONTENT to the shared data table A_SHARE_CONTENT, the control module 30 loads the input and output table identifiers and column identifiers one by one according to the column sequence number and generates SQL statements. Through INSERT INTO to write keywords and SELECT to query keywords, it executes the write operation of the relational database and transmits the business data according to the format requirements of the external system 3000. The control module 30 generates SQL statements to transmit text archive data as follows: Figure 13 shown.
[0168] In another embodiment of the present invention, business data from external system 3000 is stored in business data table 113 of system 1000. For example, plan information from external system 3000 is stored in business data table 113 of system 1000. The plan information from external system 3000 is stored in plan information table B_SHARE_PLAN, and the corresponding business data table 113 is A_PLAN. Exchange system 1 first converts the shared data in B_SHARE_PLAN into business data in A_PLAN. System 1000 then obtains the plan information by retrieving the business data from table A_PLAN. The formats of shared data table B_SHARE_PLAN and business data table A_PLAN are shown in Tables 10 and 11.
[0169] Table 10
[0170]
[0171]
[0172] Table 11
[0173]
[0174] The control module 30 obtains a mapping group consisting of a third mapping for mutual conversion between the shared data table 121 and the business data table 113 of the system 1000 from the mapping table according to the names of the shared data table B_SHARE_PLAN and the business data table A_PLAN, as shown in Table 12.
[0175] Table 12
[0176]
[0177]
[0178] Based on the mapping of the shared data table B_SHARE_CONTENT to the business data table A_PLAN, the control module 30 loads the input and output table identifiers and column identifiers one by one according to the column sequence number and generates SQL statements. Through INSERT INTO, the keywords are written and SELECT query keywords are searched, the write operation of the relational database is performed, and the text archive data is transmitted according to the format requirements of this system. The control module 30 generates SQL statements to transmit text archive data as follows: Figure 14 shown.
[0179] In some embodiments of the present invention, when the control module 30 executes the conversion method for converting between metadata tables 112 of different information systems, the data matching relationship between the communication protocol table 111, the metadata table 112, the pre-filled data table 114 and the mapping table is as follows: Figure 15 As shown, the communication protocol table 111 and metadata table 112 of the data source system match the Socket communication protocol of the data source system, and the pre-filled data table 114 and the communication protocol table 111 and metadata table 112 of the data destination system Socket match the Socket communication protocol of the data destination system. The mapping table has a matching relationship with the Socket communication protocols of different information systems. Figure 15 The control module 30 can perform logical operations and write operations of the relational database, meet the data format conversion requirements between information systems, and realize the format conversion of heterogeneous data in different information systems.
[0180] Through the data matching relationship of the Socket communication protocol attributes, the control module 30 can match the input metadata table 112 with the mapping table to form a conversion information matching table, and integrate the input pre-filled data table 114 with the communication protocol table 111 into a pre-filled protocol information table. In the internal connection logic operation of the metadata table 112, the units of the control module 30 perform operations in sequence: the conversion information matching table generation unit merges the metadata filled in by the first filling unit 34 and the data matching the protocol tag and protocol serial number in the first mapping group formed by the calling unit 32, and matches all the information of the data, including the data packet ID, data item number, content, mapping group ID, mapping number, conversion method, input protocol tag, input protocol serial number, output protocol tag, output protocol serial number and usage tag, selects the data packet ID, data item number, content, output protocol tag, output The protocol serial number and usage tag information generate a conversion information matching table; the pre-filled protocol information table generation unit 36 is configured to merge the template in the pre-filled data table 114 corresponding to the template group ID and the data matching the protocol group of the data destination system to generate a pre-filled protocol information table, and the merged information includes the template group ID, template serial number, protocol tag, protocol serial number, data classification, occupied byte length, additional information, filling method and default content; the second filling unit 37 is configured to convert the pre-filled protocol information table into metadata according to the filling method using the template stack matching method and fill it into the metadata table 112.
[0181] In one embodiment of the present invention, system 1000 sends messages to external system 3000. For example, system 1000 can transmit system status monitoring results to external system 3000 via real-time status messages. Based on business requirements, system 1000 can periodically write real-time status messages to data link 2000. The real-time status messages to be written are stored in metadata table 112. The socket protocol groups corresponding to the real-time status information of system 1000 and external system 3000 are shown in Tables 13 and 14.
[0182] Table 13
[0183]
[0184]
[0185] Table 14
[0186]
[0187] The real-time status message communication protocol in the present system 1000 is composed of the protocol group A and the protocol group A,3. The protocol group A,3 is concatenated through the concatenation mark in A to form the metadata of the real-time status message shown in Table 15, indicating that the memory usage of the monitored device is 53%. The control module 30 obtains the mapping group consisting of the first mapping group and the second mapping group of the protocol mark of the real-time status message shown in Table 16 from the mapping table, and then performs the inner join logic operation of the metadata table 112. The control module 30 obtains the mapping group consisting of the first mapping group and the second mapping group of the protocol mark of the real-time status message shown in Table 16 from the mapping table, and then performs the inner join logic operation of the metadata table 112. Figure 15 The data matching relationship is based on the data merging and extraction of metadata of the real-time status message and the data matching the protocol tag and protocol sequence number in the mapping table to generate a conversion information matching table as shown in Table 17.
[0188] Table 15
[0189]
[0190] Table 16
[0191]
[0192] Table 17
[0193]
[0194] According to the template group ID in the mapping, the control module 30 obtains the real-time status message template group shown in Table 18 from the pre-filled data table 114, and then performs the inner connection logic operation of the pre-filled data table 114. Figure 15 The data matching relationship is based on which the real-time status pre-filled entries are merged with the data matching the protocol tag and protocol sequence number in the communication protocol table 111 of the external system 3000 to generate a pre-filled protocol information table as shown in Table 19.
[0195] Table 18
[0196]
[0197] Table 19
[0198]
[0199] Control module 30 pre-populates the protocol information table with the template group ID in Table 19, extracts the corresponding pre-populated entries, and pushes them onto the template stack in ascending template sequence order. It then converts each pre-populated entry into metadata and writes it into metadata table 112 of external system 3000. The write results are shown in Table 20. Data item 1 in Table 20 contains a unique ID value generated by control module 30. The contents of items 2, 5, 6, and 8 are from the conversion information matching table in Table 17. The contents of the remaining data items are from the default values in Table 18. The packet IDs in metadata table 112 are automatically assigned by control module 30. The data item numbers correspond to the order in which the control module 30 writes the metadata. The written metadata is loaded into data link 2000 by communication module 40 of switching system 1 and transmitted to external system 3000.
[0200] Table 20
[0201]
[0202] In one embodiment of the present invention, external system 3000 sends messages to system 1000. For example, external system 3000 can send alarm information, update reminders, and error information to system 1000 via real-time notification messages. Based on business requirements, external system 3000 can write real-time notification messages to data link 2000. The real-time notification messages to be written are stored in metadata table 112. The socket protocol groups corresponding to the real-time notification information of system 1000 and external system 3000 are shown in Tables 21 and 22.
[0203] Table 21
[0204]
[0205] Table 22
[0206]
[0207] The real-time notification message communication protocol in the external system 3000 is composed of the protocol group B and the protocol group B,9. The B,9 group is cascaded through the splicing mark in B to form the real-time notification message shown in Table 23. The control module 30 obtains the mapping group consisting of the first mapping group and the second mapping group of the protocol mark of the real-time notification message shown in Table 24 from the mapping table, and then performs the inner connection logic operation of the metadata table 112. The control module 30 obtains the mapping group consisting of the first mapping group and the second mapping group of the protocol mark of the real-time notification message shown in Table 24 from the mapping table, and then performs the inner connection logic operation of the metadata table 112. Figure 15 The data matching relationship is based on the metadata of the real-time notification message and the data that matches the protocol tag and protocol sequence number in the mapping table. The information is merged and extracted to generate a conversion information matching table as shown in Table 25.
[0208] Table 23
[0209]
[0210]
[0211] Table 24
[0212]
[0213] Table 25
[0214]
[0215] According to the template group ID in the mapping, the control module 30 obtains the real-time notification message template group shown in Table 26 from the pre-filled data table 114, and then performs the inner connection logic operation of the pre-filled data table 114. Figure 15 The data matching relationship is based on the pre-filled entries of the real-time notification and the data matching the protocol tag and protocol sequence number in the communication protocol table 111, and the pre-filled protocol information table is generated as shown in Table 27.
[0216] Table 26
[0217] Template Group ID Template serial number Protocol Tags Protocol number How to fill in Default content 14 1 A 1 2 0 14 2 A 2 0 5 14 3 A 3 1 2001-01-01 03:00 14 4 A,5 1 0 2 14 5 A,5 2 1 0 14 6 A,5 3 1 0 14 7 A,5 4 1 0
[0218] Table 27
[0219]
[0220]
[0221] The control module 30 pre-fills the template group ID of the protocol information table according to Table 27, takes out the corresponding pre-filled entries and pushes them into the template stack in ascending order of the template sequence number, and then converts the pre-filled entries into metadata one by one and writes them into the metadata table 112. The writing result is shown in Table 28. Data item number 5 in Table 28 is a loop mark. The control module 30 pushes the pre-filled entries with protocol sequence numbers 3 and 4 in Table 27 into the template stack based on the additional information. Since the content of data row number 5 is 2, the numbered items with protocol sequence numbers 3 and 4 in Table 28 are repeated twice. The content of data item number 1 in Table 28 is the unique ID value generated by the control module 30. The content of data item numbers 5, 6, 7, 8, and 9 comes from the conversion information matching table in Table 25, and the content of other data items comes from the default content in Table 26. The data packet ID of the metadata table 112 is automatically assigned by the control module 30, and the data item number corresponds to the order in which the control module 30 writes the metadata. The written metadata is loaded into the data link 2000 by the communication module 40 of the switching system 1 and sent to the present system 1000.
[0222] Table 28
[0223]
[0224] Figure 16 FIG. 1 is a flow chart of an embodiment of a data exchange method based on heterogeneous data in a network system according to the present invention. Figure 16 As shown, the data exchange method includes:
[0225] Step S1, storing the communication protocol between the system 1000 and the external system 3000 as a communication protocol table 111;
[0226] Step S2, storing the data of the system 1000 as the business data table 113 or the metadata table 112;
[0227] Step S3, storing the data of the external system 3000 as the shared data table 121 or the metadata table 112;
[0228] Step S4, storing the templates of the data of the system 1000 and the external system 3000 as a pre-filled data table 114, where each template has a unique template group ID;
[0229] Step S5, constructing a first mapping between the communication protocol of the system 1000 and the communication protocol of the external system 3000, a second mapping between the first mapping and the template group ID, and a third mapping between the business data table 113 and the shared data table 121;
[0230] Step S6, according to the business type, retrieve the mapping corresponding to the corresponding data table to perform data exchange, the business type includes data query, data filling, data deletion and data modification, the data table includes multiple of the communication protocol table 111, the business data table 113, the metadata table 112, the pre-filled data table 114 and the shared data table 121, and the mapping includes one or more of the first mapping, the second mapping and the third mapping.
[0231] The above step numbers S1, S2...S6 do not limit the order of the steps. The order of the steps can be changed according to actual applications. For example, the order of the steps between step S1-step S4 can be changed arbitrarily.
[0232] In some embodiments of the present invention, step S6 includes:
[0233] Collect the business data table 113 loaded into the system 1000 or the shared data table 121 loaded into the external system 3000;
[0234] Retrieve the third mapping of the business data table 113 and the shared data table 121 to form a third mapping group;
[0235] Implementing conversion between the business data table 113 and the shared data table 121 according to the third mapping group;
[0236] In some embodiments of the present invention, step S6 includes:
[0237] Collect the business data table 113 loaded into the system 1000;
[0238] Retrieve the third mapping of the business data table 113 and the shared data table 121 to form a third mapping group;
[0239] The business data table 113 is converted into the shared data table 121 according to the third mapping group.
[0240] In some embodiments of the present invention, step S6 includes:
[0241] Collect shared data table 121 loaded from external system 3000;
[0242] Retrieve the third mapping of the business data table 113 and the shared data table 121 to form a third mapping group;
[0243] The shared data table 121 is converted into the business data table 113 according to the third mapping group.
[0244] In some embodiments of the present invention, step S6 includes:
[0245] According to the third mapping group, the business data table 113 and the shared data table 121 are subjected to a relational database write operation to realize data conversion.
[0246] Preferably, the shared data table 121 and the business data table 113 include table identifiers, column identifiers, and column sequence numbers. The step of performing a relational database write operation on the business data table 113 and the shared data table 121 according to the third mapping group to implement data conversion includes:
[0247] According to the third mapping group, the table identifiers and column identifiers of the business data table 113 and the shared data table 121 are loaded one by one according to the column sequence numbers and an SQL statement is generated;
[0248] By using the INSERT INTO keyword and the SELECT query keyword, write operations on the relational database are performed to achieve data conversion.
[0249] In some embodiments of the present invention, step S6 includes:
[0250] Fill in data of the system 1000 or read data of the external system 3000 through the data link 2000;
[0251] The communication protocols of the system 1000 and the external system 3000 corresponding to the service type are retrieved from the communication protocol table 111 to form the protocol groups of the system 1000 and the external system 3000 respectively;
[0252] Retrieving from the first mapping the first mappings corresponding to the protocol group of the local system 1000 and the protocol group of the external system 3000 to form a first mapping group;
[0253] Retrieve the template group ID corresponding to the first mapping group from the second mapping;
[0254] The data of the data link 2000 is converted into metadata according to the protocol group of the data source system and filled into the metadata table 112. The data source system is the system 1000 or the external system 3000;
[0255] Merging and extracting information from the metadata and the first mapping group to generate a conversion information matching table;
[0256] Merging the template in the pre-filled data table 114 corresponding to the template group ID and the protocol group of the data destination system to generate a pre-filled protocol information table, wherein the data destination system corresponds to the data source system and the data destination system is the external system 3000 or the current system 1000;
[0257] The pre-filled protocol information table is converted into metadata and filled into the metadata table 112 according to the filling method, the filling method includes using default data, using conversion entries and automatically generating data, the default data comes from the template of the pre-filled data table 114, the conversion entries come from the entries that match the conversion information matching table and the pre-filled protocol information table, and preferably, it also includes: filling the metadata converted from the pre-filled protocol information table into the data link 2000.
[0258] In some embodiments of the present invention, Figure 17 As shown, the step of merging and extracting the metadata and the first mapping group to generate a conversion information matching table includes:
[0259] Merge the metadata table 112 and the data whose protocol tag and protocol sequence number match the first mapping group in the mapping table;
[0260] Merge all the information of the matching data, including the data packet ID, data item number, content, mapping group ID, mapping number, conversion mode, input protocol tag, input protocol sequence number, output protocol tag, output protocol sequence number and usage tag;
[0261] Extract the data packet ID, data item number, content, output protocol tag, output protocol sequence number and usage tag information to form Figure 17 The conversion information match table in .
[0262] In some embodiments of the present invention, Figure 18As shown, the step of merging information of the template in the pre-filled data table 114 corresponding to the template group ID and the protocol group of the data destination system to generate the pre-filled protocol information table includes:
[0263] Merge the data matching the protocol tags and protocol serial numbers in the communication protocol table 111 and the pre-filled data table 114;
[0264] Merge all the information of the matching data, including template group ID, template serial number, protocol tag, protocol serial number, data classification, occupied byte length, additional information, filling method and default content;
[0265] The entire information of the matching data is constructed as follows Figure 18 Pre-filled Agreement Information form shown.
[0266] In some embodiments of the present invention, step S6 includes:
[0267] Fill the data of this system 1000 into the data link 2000;
[0268] The communication protocols of the system 1000 and the external system 3000 corresponding to the service type are retrieved from the communication protocol table 111 to form the protocol groups of the system 1000 and the external system 3000 respectively;
[0269] Retrieving from the first mapping the first mappings corresponding to the protocol group of the local system 1000 and the protocol group of the external system 3000 to form a first mapping group;
[0270] Retrieve the template group ID corresponding to the first mapping group from the second mapping;
[0271] The data entered into the data link 2000 by the system 1000 is converted into metadata according to the protocol group of the system 1000 and entered into the metadata table 112;
[0272] Merge and extract information from the metadata of the metadata table 112 and the first mapping group filled with the data link 2000 to generate a conversion information matching table;
[0273] Merge the template in the pre-filled data table 114 corresponding to the template group ID and the protocol group of the external system 3000 to generate a pre-filled protocol information table;
[0274] The pre-filled protocol information table is converted into metadata and filled into the metadata table 112 according to the filling method, the filling method includes using default data, using conversion entries and automatically generating data, the default data comes from the template of the pre-filled data table 114, and the conversion entries come from the entries that match the conversion information matching table and the pre-filled protocol information table. Preferably, it also includes: filling the metadata converted from the pre-filled protocol information table into the data link 2000, and transmitting it to the external system 3000 through the data link 2000.
[0275] In some embodiments of the present invention, Figure 19 As shown, step S6 includes:
[0276] Reading data from an external system 3000 via a data link 2000;
[0277] Convert the data read by the data link 2000 from the external system 3000 into metadata according to the protocol group of the external system 3000 and fill it into the metadata table 112;
[0278] Merge and extract information from the metadata of the metadata table 112 and the first mapping group filled with the data link 2000 to generate a conversion information matching table;
[0279] Merge the template in the pre-filled data table 114 corresponding to the template group ID and the protocol group of the system 1000 to generate a pre-filled protocol information table;
[0280] The pre-filled protocol information table is converted into metadata and filled into the metadata table 112 according to the filling method, the filling method includes using default data, using conversion entries and automatically generating data, the default data comes from the template of the pre-filled data table 114, and the conversion entries come from the entries that match the conversion information matching table and the pre-filled protocol information table. Preferably, it also includes: converting the pre-filled protocol information table into metadata and filling it into the data link 2000, and transmitting it to the present system 1000 through the data link 2000.
[0281] In each of the above embodiments, the step of converting the pre-filled protocol information table into metadata according to the filling method and filling it into the metadata table includes:
[0282] The pre-filled entries in the pre-filled protocol information table are converted into metadata one by one using a template stack.
[0283] In some embodiments of the present invention, Figure 19 As shown, the steps of converting the pre-filled entries in the pre-filled protocol information table into metadata one by one by using a template stack include:
[0284] Load the template and retrieve the pre-filled entries according to the template group ID in the pre-filled protocol information table;
[0285] Pushing pre-filled entries from the top of the stack into the template stack, wherein the pre-filled entries are arranged in a set order in the template stack;
[0286] Determine how the first pre-filled entry is filled in;
[0287] If the above filling method is to use default data, fill the corresponding default data in the template into the metadata table 112;
[0288] If the above filling method is to use conversion entries, the corresponding matching items are obtained from the conversion information table through query matching and filled into the metadata table 112:
[0289] If the above filling method is automatic generation, the automatically generated data is filled into the metadata table 112;
[0290] After the first pre-filled entry is converted into metadata and filled into the metadata table 112, the template stack is popped out;
[0291] The steps of determining the filling mode, filling in the metadata table 112 and popping the template stack are repeated for the next pre-filled entry until all pre-filled entries are generated as metadata in the metadata table 112 .
[0292] In one embodiment of the present invention, the step of converting the pre-filled entries in the pre-filled protocol information table into metadata one by one by using a template stack includes:
[0293] Execute the template loading operation, and according to the template group ID in the pre-filled protocol information table, take out the pre-filled entry and push it from the top of the stack into the template stack. The pre-filled entries are sorted in ascending order of the template sequence number;
[0294] The pre-filled entries are converted into metadata one by one and written into the content field corresponding to the data destination system in the metadata table 112. If the filling method is to use default data, the default data is written into the content field of the metadata. If the filling method is to use template data, a matching item check operation is performed to check whether there are any unprocessed matching items in the conversion information matching table. If a matching item is found, the matching item in the conversion information matching table is written into the content field of the metadata, and the usage mark of the conversion information matching item is changed to processed. Otherwise, the default data is still used to write into the content field of the metadata. If the pre-filled entry data currently being processed is classified as a loop mark, after the pre-filled entry is written into the metadata table 112, the pre-filled entry within the corresponding protocol sequence number range is searched in the pre-filled protocol information table based on the additional information. The search range is limited to pre-filled entries with the same protocol mark and template group ID as the currently processed entry. After the pre-filled entry is found, the number of loops is read first, and then the currently processed entry is popped out of the template stack. Then, multiple copies of the found pre-filled entry are copied and pushed into the template stack from the top of the stack. The pre-filled entries pushed into the template stack are sorted in ascending order of the template sequence number. The number of copies is consistent with the number of loops.
[0295] The processed pre-filled entry is popped from the template stack so that the control module 30 can continue to process the next one until all the pre-filled entries in the template stack are processed and the metadata conversion of the single data packet is completed.
[0296] In some embodiments of the present invention, the step of storing the communication protocol between the system 1000 and the external system 3000 as the communication protocol table 111 includes:
[0297] Dividing the communication protocols into different communication protocol groups according to the protocol tags, wherein the protocol tags include at least a root protocol tag and further include one or more sub-protocol tags arranged after the root protocol tag, and dividing the communication protocols having the same root protocol tag into one communication protocol group;
[0298] Preferably, the step of storing the template of the data of the system 1000 and the external system 3000 as the pre-filled data table 114 includes:
[0299] The templates of the data of the present system 1000 and the external system 3000 are stored as a template group in the pre-filled data table 114;
[0300] Preferably, the step of constructing a first mapping between the communication protocol of the present system 1000 and the communication protocol of the external system 3000 includes:
[0301] A first mapping between the communication protocol group of the present system 1000 and the communication protocol group of the external system 3000 is constructed.
[0302] Figure 20 is a schematic diagram of an embodiment of the computer-readable storage medium 100 of the present invention, as shown in FIG. Figure 20 As shown, the computer-readable storage medium 100 stores an interface application 101. When the interface application 101 is executed by the processor, the steps of the data exchange method based on heterogeneous data in the network system of the above embodiments are implemented.
[0303] In some embodiments of the present invention, the system 1000 and the external system 3000 use the shared database 12 and the data link 2000 cache to establish an information exchange mechanism, such as Figure 20As shown, the shared database 12 includes a shared data table 121. The switching system 1 can read and write the shared data table 121 in the shared database 12 and the business data table 113 of the present system 1000. The interface application 101 can read business data from the data link 2000 cache or write business data to the data link 2000 cache according to the communication protocol format of the present system 1000 and the external system 3000. The read and write contents of the data link 2000 correspond to different communication protocol formats and are stored in an independent metadata table 112 of the present system 1000 (the metadata table 112 of the data format of the present system 1000 and the metadata table 112 of the data format of the external system 3000).
[0304] The present invention addresses the lack of flexibility and scalability of interface applications 101 in the prior art by constructing an exchange system 1 for data exchange between different information systems. This system 101 is able to meet the requirements of information system expansion and rapid development without changing its code structure over the long term. Constructed using a model-driven development approach and formalized representation, exchange system 1 is capable of performing the following types of data conversion operations: conversion between shared data tables 121 and business data tables 113 within the system 1000; and conversion between metadata tables 112 across different information systems. Exchange system 1 is capable of handling the exchange of heterogeneous data between information systems. For example, the information in the system 1000 is used to execute monitoring plans and report status, while the information in the external system 3000 is used to aggregate information and make planning decisions. The present invention enables the conversion of text archive tables, plan information tables, real-time status messages, and real-time notification messages between the system 1000 and the external system 3000.
[0305] The present invention also provides an electronic device, which includes a memory, a processor, and an interface application 101 stored in the memory and runnable on the processor. When the processor executes the interface application 101, it implements the steps of the data exchange method based on heterogeneous data of the network system in the above-mentioned embodiments, such as a server.
[0306] The specific implementations of the electronic device and computer-readable storage medium of the present invention are substantially the same as the specific implementations of the data exchange system and method based on heterogeneous data in a network system, and are not described in detail here.
[0307] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is merely a logical function division, and other division methods may be used in actual implementation.
[0308] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected to achieve the purpose of the solution of this embodiment according to actual needs.
[0309] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional modules.
[0310] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0311] Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the claims are intended to be embraced therein. Any reference to a figure in a claim should not be construed as limiting the claim to which it relates.
[0312] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. Second-order terms are used to indicate names and do not imply any particular order.
[0313] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A heterogeneous data exchange system based on a network system, characterized in that: The exchange system is provided in the present system and is used for exchanging data between the present system and an external system. The exchange system includes a storage module, a mapping module, and a control module. The storage module is configured to store the communication protocol between the present system and the external system as a communication protocol table, store the data of the present system as a business data table or a metadata table, store the data of the external system as a shared data table or a metadata table, and store templates of the data of the present system and the external system as pre-filled data tables, wherein each template has a unique template group ID. The mapping module is configured to construct a first mapping between the communication protocol of the present system and the communication protocol of the external system, a second mapping between the first mapping and the template group ID, and a third mapping between the business data table and the shared data table. The control module is configured to retrieve the corresponding data table from the storage module according to the business type and perform data exchange through the corresponding mapping of the mapping module. The business type includes data query, data filling, data deletion and data modification. The data table includes multiple communication protocol tables, business data tables, metadata tables, pre-filled data tables and shared data tables. The mapping includes one or more of the first mapping, the second mapping and the third mapping.
2. The network system heterogeneous data exchange system according to claim 1, characterized in that: The storage module includes a business database and a shared database. The business database is used to store a communication protocol table, a metadata table, a business data table and a pre-filled data table. The shared database is used to store a shared data table.
3. The network system heterogeneous data exchange system according to claim 1, characterized in that: The control module includes an acquisition unit, a retrieval unit and a conversion unit. The acquisition unit is configured to acquire the business data table loaded into the storage module by the current system or the shared data table loaded into the storage module by the external system; the retrieval unit is configured to retrieve the third mapping of the business data table and the shared data table from the mapping module to form a third mapping group; the conversion unit is configured to realize the conversion between the business data table and the shared data table according to the third mapping group formed by the retrieval unit.
4. The network system heterogeneous data exchange system according to claim 3, characterized in that: The acquisition unit is configured to acquire the business data table loaded into the storage module of this system; the calling unit is configured to call the third mapping group of the third mapping of the business data table and the shared data table from the mapping module; the conversion unit is configured to convert the business data table into the shared data table according to the third mapping group constructed by the calling unit.
5. The network system heterogeneous data exchange system according to claim 3, characterized in that: The acquisition unit is configured to acquire the shared data table loaded into the storage module by the external system; the calling unit is configured to call the third mapping of the business data table and the shared data table from the mapping module to form a third mapping group; the conversion unit is configured to convert the shared data table into a business data table according to the third mapping group formed by the calling unit.
6. The network system heterogeneous data exchange system according to claim 3, characterized in that: The conversion unit performs a relational database write operation on the business data table and the shared data table according to the third mapping group to achieve data conversion.
7. The network system heterogeneous data exchange system according to claim 6, characterized in that: The shared data table and the business data table include table identifiers, column identifiers, and column ordinal numbers. The conversion unit loads the table identifiers and column identifiers of the business data table and the shared data table one by one according to the column ordinal numbers according to the third mapping group and generates SQL statements. The INSERT INTO write keyword and the SELECT query keyword are used to execute the write operation of the relational database to realize data conversion.
8. The network system heterogeneous data exchange system according to claim 1, characterized in that: A data link is set between the present system and the external system; the exchange system also includes a communication module, the communication module is configured for communication between the data link and the storage module, the control module includes a calling unit, a first filling unit, a conversion information matching table generating unit, a pre-filled protocol information table generating unit and a second filling unit, the calling unit is configured to call the communication protocols of the present system and the external system corresponding to the business type from the communication protocol table of the storage module, respectively forming the protocol groups of the present system and the external system, call the first mapping corresponding to the protocol group of the present system and the protocol group of the external system from the first mapping of the mapping module to form a first mapping group, and call the template group ID corresponding to the first mapping group from the second mapping of the mapping module; the first filling unit is configured to convert the data of the data link transmitted by the communication module into metadata according to the protocol group of the data source system and fill it into the metadata table, the data source system being the present system or the external system; The conversion information matching table generating unit is configured to merge and extract information from the metadata filled in by the first filling unit and the first mapping group formed by the retrieval unit to generate a conversion information matching table; The pre-filled protocol information table generation unit is configured to merge information of the template in the pre-filled data table corresponding to the template group ID and the protocol group of the data destination system to generate a pre-filled protocol information table. The data destination system is relative to the data source system, and the data destination system is an external system or this system; the second filling unit is configured to convert the pre-filled protocol information table into metadata according to the filling method and fill it into the metadata table. The filling method includes using default data, using conversion entries and automatically generating data. The default data comes from the template of the pre-filled data table, and the conversion entry comes from the entry that matches the conversion information matching table with the pre-filled protocol information table.
9. The network system heterogeneous data exchange system according to claim 8, characterized in that: The data link is used to read or fill in the data of this system; the calling unit is configured to call the communication protocols of this system and the external system corresponding to the business type from the communication protocol table of the storage module, respectively forming a protocol group of this system and a protocol group of the external system, call the first mapping corresponding to the protocol group of this system and the protocol group of the external system from the first mapping of the mapping module to form a first mapping group, and call the template group ID corresponding to the first mapping group from the second mapping of the mapping module; the first filling unit is configured to convert the data of this system filled in the data link transmitted by the communication module into metadata according to the protocol group of this system and fill it into the metadata table; the conversion information matching table generating unit is configured to merge and extract information from the metadata filled in by the first filling unit and the first mapping group formed by the calling unit to generate a conversion information matching table; The pre-filled protocol information table generation unit is configured to merge information of the template in the pre-filled data table corresponding to the template group ID and the protocol group of the external system to generate a pre-filled protocol information table; the second filling unit is configured to convert the pre-filled protocol information table into metadata according to a filling method and fill it into the metadata table, the filling method including using default data, using conversion entries and automatically generating data, the default data comes from the template of the pre-filled data table, and the conversion entries come from the entries in the conversion information matching table that match the pre-filled protocol information table.
10. The network system heterogeneous data exchange system according to claim 8, characterized in that: The data link is used to read data from an external system or fill in data of the present system; the retrieval unit is configured to retrieve the communication protocols of the present system and the external system corresponding to the business type from the communication protocol table of the storage module, respectively forming a protocol group of the present system and a protocol group of the external system, retrieve the first mapping corresponding to the protocol group of the present system and the protocol group of the external system from the first mapping of the mapping module to form a first mapping group, and retrieve the template group ID corresponding to the first mapping group from the second mapping of the mapping module; the first filling unit is configured to convert the data read from the external system by the data link transmitted by the communication module into metadata according to the protocol group of the external system and fill in the metadata table; The conversion information matching table generating unit is configured to merge and extract information from the metadata filled in by the first filling unit and the first mapping group formed by the retrieval unit to generate a conversion information matching table; The pre-filled protocol information table generation unit is configured to merge the information of the template in the pre-filled data table corresponding to the template group ID and the protocol group of this system to generate a pre-filled protocol information table; the second filling unit is configured to convert the pre-filled protocol information table into metadata according to the filling method and fill it into the metadata table. The filling method includes using default data, using conversion entries and automatically generating data. The default data comes from the template of the pre-filled data table, and the conversion entry comes from the entry that matches the conversion information matching table with the pre-filled protocol information table.
11. The network system heterogeneous data exchange system according to claim 8, characterized in that: The second filling unit converts the pre-filled entries in the pre-filled protocol information table into metadata one by one by using a template stack.
12. The network system heterogeneous data exchange system according to claim 1, characterized in that: The storage module includes a cascading unit, which is configured to divide the communication protocols into different communication protocol groups according to protocol tags, wherein the protocol tags at least include a root protocol tag, and the protocol tags also include one or more sub-protocol tags arranged after the root protocol tag. The cascading unit divides the communication protocols with the same root protocol tag into one communication protocol group.
13. The network system heterogeneous data exchange system according to claim 12, characterized in that: The cascading unit also stores the templates of the data of the present system and the external system as a template group in the pre-filled data table according to the protocol tags.
14. The network system heterogeneous data exchange system according to claim 12, characterized in that: The mapping module includes a first mapping unit, a second mapping unit and a third mapping unit. The first mapping unit is configured to construct a first mapping between the communication protocol of this system and the communication protocol of the external system; the second mapping unit is configured to construct a second mapping between the first mapping and the template group ID; and the third mapping unit is configured to construct a third mapping between the business data table and the shared data table.
15. The network system heterogeneous data exchange system according to claim 14, characterized in that: The first mapping unit constructs a first mapping between the communication protocol group of the current system and the communication protocol group of the external system.
16. A data exchange method based on heterogeneous data in a network system, used for data exchange between the system and an external system, characterized in that: include: Storing the communication protocols between the system and the external system as a communication protocol table; Store the system's data in business data tables or metadata tables; Store data from external systems in shared data tables or metadata tables; Store templates of data from this system and external systems as pre-filled data tables, with each template having a unique template group ID; Constructing a first mapping between the communication protocol of the system and the communication protocol of the external system, a second mapping between the first mapping and the template group ID, and a third mapping between the business data table and the shared data table; According to the business type, the mapping corresponding to the corresponding data table is called to perform data exchange. The business type includes data query, data filling, data deletion and data modification. The data table includes multiple communication protocol tables, business data tables, metadata tables, pre-filled data tables and shared data tables. The mapping includes one or more of the first mapping, the second mapping and the third mapping.
17. The data exchange method according to claim 16, characterized in that: The step of retrieving the mapping corresponding to the corresponding data table according to the business type to perform data exchange includes: Collect business data tables loaded into this system or shared data tables loaded into external systems; Retrieving the third mapping of the business data table and the shared data table to form a third mapping group; Conversion between the business data table and the shared data table is implemented according to the third mapping group.
18. The data exchange method according to claim 16, characterized in that: The step of retrieving the mapping corresponding to the corresponding data table according to the business type to perform data exchange includes: Collect business data tables loaded into this system; Retrieving the third mapping of the business data table and the shared data table to form a third mapping group; The business data table is converted into a shared data table according to the third mapping group.
19. The data exchange method according to claim 16, characterized in that: The step of retrieving the mapping corresponding to the corresponding data table according to the business type to perform data exchange includes: Collect shared data tables loaded from external systems; Retrieving the third mapping of the business data table and the shared data table to form a third mapping group; The shared data table is converted into a business data table according to the third mapping group.
20. The data exchange method according to claim 17, wherein: The step of implementing conversion between the business data table and the shared data table according to the third mapping group includes: According to the third mapping group, a write operation of a relational database is performed on the business data table and the shared data table to realize data conversion.
21. The data exchange method according to claim 20, characterized in that: The shared data table and the business data table include table identifiers, column identifiers, and column sequence numbers. The step of performing a relational database write operation on the business data table and the shared data table to implement data conversion according to the third mapping group includes: According to the third mapping group, the table identifiers and column identifiers of the business data table and the shared data table are loaded one by one according to the column sequence number and an SQL statement is generated; By using the INSERT INTO keyword and the SELECT query keyword, write operations on the relational database are performed to achieve data conversion.
22. The data exchange method according to claim 16, characterized in that: The step of retrieving the mapping corresponding to the corresponding data table according to the business type to perform data exchange includes: Fill in the data of this system or read the data of the external system through the data link; Retrieve the communication protocols of the current system and the external system corresponding to the business type from the communication protocol table, and form the protocol groups of the current system and the external system respectively; Retrieving from the first mapping the first mappings corresponding to the protocol group of the local system and the protocol group of the external system to form a first mapping group; Retrieve the template group ID corresponding to the first mapping group from the second mapping; Convert the data of the data link into metadata according to the protocol group of the data source system and fill it into the metadata table, wherein the data source system is the current system or an external system; Merging and extracting information from the metadata and the first mapping group to generate a conversion information matching table; Merging information of the template in the pre-filled data table corresponding to the template group ID and the protocol group of the data destination system to generate a pre-filled protocol information table, wherein the data destination system corresponds to the data source system and the data destination system is an external system or the current system; The pre-filled protocol information table is converted into metadata and filled into the metadata table according to the filling method, the filling method includes using default data, using conversion entries and automatically generating data, the default data comes from the template of the pre-filled data table, and the conversion entries come from the entries that match the conversion information matching table and the pre-filled protocol information table.
23. The data exchange method according to claim 22, characterized in that: Also includes: Fill in the metadata converted from the pre-filled protocol information table into the data link.
24. The data exchange method according to claim 16, characterized in that: The step of retrieving the mapping corresponding to the corresponding data table according to the business type to perform data exchange includes: Fill the data of this system into the data link; Retrieve the communication protocols of the current system and the external system corresponding to the business type from the communication protocol table, and form the protocol groups of the current system and the external system respectively; Retrieving from the first mapping the first mappings corresponding to the protocol group of the local system and the protocol group of the external system to form a first mapping group; Retrieve the template group ID corresponding to the first mapping group from the second mapping; The data entered into the data link by this system is converted into metadata according to the protocol group of this system and entered into the metadata table; Merge and extract information from the metadata of the metadata table and the first mapping group filled in by the data link to generate a conversion information matching table; Merge the template in the pre-filled data table corresponding to the template group ID with the protocol group of the external system to generate a pre-filled protocol information table; The pre-filled protocol information table is converted into metadata and filled into the metadata table according to the filling method, the filling method includes using default data, using conversion entries and automatically generating data, the default data comes from the template of the pre-filled data table, and the conversion entries come from the entries that match the conversion information matching table and the pre-filled protocol information table.
25. The data exchange method according to claim 24, characterized in that: Also includes: The metadata converted from the pre-filled protocol information table is filled into the data link and transmitted to the external system through the data link.
26. The data exchange method according to claim 16, characterized in that: The step of retrieving the mapping corresponding to the corresponding data table according to the business type to perform data exchange includes: Read data from external systems through data links; Convert the data read from the external system by the data link into metadata according to the protocol group of the external system and fill it into the metadata table; Merge and extract information from the metadata of the metadata table and the first mapping group filled in by the data link to generate a conversion information matching table; Merge the information of the template in the pre-filled data table corresponding to the template group ID and the protocol group of this system to generate a pre-filled protocol information table; The pre-filled protocol information table is converted into metadata and filled into the metadata table according to the filling method, the filling method includes using default data, using conversion entries and automatically generating data, the default data comes from the template of the pre-filled data table, and the conversion entries come from the entries that match the conversion information matching table and the pre-filled protocol information table.
27. The data exchange method according to claim 26, characterized in that: Also includes: The pre-filled agreement information table is converted into metadata and filled into the data link, and then transmitted to this system through the data link.
28. The data exchange method according to claim 22, characterized in that: The steps of converting the pre-filled protocol information table into metadata according to the filling method and filling it into the metadata table include: The pre-filled entries in the pre-filled protocol information table are converted into metadata one by one using a template stack.
29. The data exchange method according to claim 28, characterized in that: The step of converting the pre-filled entries in the pre-filled protocol information table into metadata one by one by using a template stack comprises: Load the template and retrieve the pre-filled entries according to the template group ID in the pre-filled protocol information table; Pushing pre-filled entries from the top of the stack into the template stack, wherein the pre-filled entries are arranged in a set order in the template stack; Determine how the first pre-filled entry is filled in; If the above filling method uses default data, fill in the corresponding default data in the template into the metadata table; If the above filling method uses conversion entries, obtain the corresponding matching items from the conversion information table through query matching and fill them into the metadata table: If the above filling method is automatic generation, fill the automatically generated data into the metadata table; After the first pre-filled entry is converted into metadata and filled into the metadata table, the template stack is popped; Repeat the steps of determining the filling method, filling in the metadata table, and popping the template stack for the next pre-filled entry until all pre-filled entries are generated as metadata in the metadata table.
30. The data exchange method according to claim 16, wherein: The step of storing the communication protocols of the system and the external system as a communication protocol table comprises: Communication protocols are divided into different communication protocol groups according to protocol tags, wherein the protocol tags at least include a root protocol tag, and the protocol tags also include one or more sub-protocol tags set after the root protocol tag, and communication protocols with the same root protocol tag are divided into one communication protocol group.
31. The data exchange method according to claim 16, wherein: The step of storing the templates of the data of the system and the external system as a pre-filled data table includes: Templates for data of the current system and external systems are stored as template groups in pre-filled data tables.
32. The data exchange method according to claim 16, characterized in that: The step of constructing a first mapping between the communication protocol of the present system and the communication protocol of the external system comprises: A first mapping between the communication protocol group of the present system and the communication protocol group of the external system is constructed.
33. A computer-readable storage medium, characterized in that The computer-readable storage medium stores an interface application, and when the interface application is executed by the processor, the steps of the data exchange method based on heterogeneous data of a network system as described in any one of claims 16 to 32 are implemented.
34. An electronic device, characterized in that: It includes a memory, a processor, and an interface application stored in the memory and executable on the processor. When the processor executes the interface application, it implements the steps of the data exchange method based on heterogeneous data of a network system as described in any one of claims 16 to 32.
Citation Information
Patent Citations
Mapping conversion method between data access level Xml format data and relational data
CN101067814A
Data transmission method and device, electronic equipment and storage medium
CN115086306A