A kind of universal data switching method and system representing layer based on information
Technical field
The present invention relates to computer realm, particularly relate to a kind of universal data switching method and system representing layer based on information.
Background technology
Refer to Fig. 1, it is based on the data exchange system Organization Chart of existing management information system, the data of existing management information system process and are mostly divided into three layers: information represents layer, model layer, data Layer, and between simultaneity factor, data exchange is based primarily upon data Layer or model layer carries out data exchange.Data exchange based on data Layer depends on tables of data mapping mode, and exchange based on the data of model layer and depend on and between information system, create common data model, the data that will need exchange are delivered to goal systems after being packaged according to the data model of agreement, and goal systems carries out solution by the data model of agreement after receiving data and is honored as a queen acquisition desired data.
Above-mentioned technology have a disadvantage in that shortcoming 1, based on data Layer data exchange excessively rely on data list structure.When realizing integration across database, the data exchange between different pieces of information structural system is more complicated and the degree of coupling is high.Shortcoming 2, data based on model layer exchange, data based on data Layer are slightly better than for the dependence situation of list structure exchange, but it is necessarily dependent upon data exchange both sides and sets up common data model, and data model must agree with completely, exchange both sides must carry out the packaging of data and unpack by foundation data model.And different business object needs to build different data models, poor universality.Shortcoming 3, existing carry out the mode of data exchange based on data Layer or model layer and realize complexity, it is achieved the cycle is long.Once the data content that need to exchange changes, often exchange both sides' system is intended to upgrading, and needs after transforming again to implement to dispose, and implements the relatively costly of upgrading.Often cannot adapt to new changes in demand, poor universality.
Summary of the invention
For solving the problems referred to above, the technical scheme that the present invention adopts is:
A kind of universal data switching method representing layer based on information is provided, including: S1, exchange initiation system determine the form name needing to carry out data exchange, and goal systems creates the goal systems list with described form name;Form fields and data sheet field each are carried out binding and generate list binding information by S2, exchange initiation system with goal systems;S3, exchange initiation system generate form data according to form configuration information;Form data is generated exchange data packets by prescribed form by S4, exchange initiation system;Packet is sent to goal systems by network according to the data transfer link between exchange initiation system and goal systems by S5, exchange initiation system;The packet received is reduced into form data form by S6, goal systems;S7, the goal systems form name described in form data obtains list binding information and goal systems form data, then exchange initiation system form data and goal systems form data are compared and update or data process, and the data after updating or processing are saved in goal systems data base.
Wherein, the prescribed form of described exchange data packets is JSON, XML or storage file.
Wherein, described packet is sent to goal systems by modes such as http protocol, File Transfer Protocol, message queue, Soap agreements.
Another technical solution used in the present invention is:
There is provided a kind of conventional data exchange system representing layer based on information, it is characterised in that include exchange initiation system and the goal systems with the communication connection of described exchange initiation system;
Described exchange initiation system includes: unit is initiated in data exchange, for determining the form name needing to carry out data exchange;Form data generates unit, for generating form data according to form configuration information;First binding unit, for being undertaken binding and generate list binding information by form fields and data sheet field;Packet generation unit, for generating exchange data packets by form data by prescribed form;And packet transmitting element, for packet being sent to goal systems by network according to the data transfer link between exchange initiation system and goal systems;
Described goal systems includes: list creating unit, for creating the goal systems list with described form name;Second binding unit, for being undertaken binding and generate list binding information by the form fields of goal systems list and data sheet field;Form data reduction unit, is reduced into form data form for packet goal systems received;Goal systems form data acquiring unit, obtains list binding information and goal systems form data for the form name described in form data;Goal systems list represents unit, for being presented in by goal systems form data according to list binding information corresponding in goal systems in the form fields of the goal systems list of corresponding title;And Date Conversion Unit, for exchange initiation system form data and goal systems form data are compared renewal or data process, and the data after updating or processing are saved in goal systems data base.
Wherein, the prescribed form of described exchange data packets is JSON, XML or storage file.
Wherein, described packet is sent to goal systems by modes such as http protocol, File Transfer Protocol, message queue, Soap agreements.
The beneficial effects of the present invention is, exchange both sides utilize data that form name and form fields name confirmation to exchange and carry out data storage and map or data binding.Utilize based on information represent the form data of layer carry out the mode of data exchange realize Data Integration, information system intranet and extranet data exchange and homogeneity or heterogeneous information system between data exchange.The Information Level model making information system is more stable and clear, do not rely on data and exchange the data list structure of the opposing party and the definition of data model, decrease the degree of coupling of exchange both sides' system, simultaneously because most management information system platform all includes form system, all of list can be adopted unified tupe, so specific data exchange processing need not be done for each list again while greatly reducing the configuration workload of exchange list.
Accompanying drawing explanation
Fig. 1 is based on the data exchange mode schematic diagram of existing management information system;
Fig. 2 is a kind of data exchange mode schematic diagram representing layer based on information in an embodiment of the present invention;
Fig. 3 is a kind of conventional data exchange system Organization Chart representing layer based on information in an embodiment of the present invention;
Fig. 4 is the schematic diagram completing form data one_to_one corresponding process in an embodiment of the present invention;
Fig. 5 is the flow chart of a kind of universal data switching method representing layer based on information in an embodiment of the present invention.
Main element symbol description
The conventional data exchange system 100 of layer is represented based on information;Exchange initiation system 10;
Goal systems 20;The first information represents a layer S301;Second information represents a layer S302;
First list S401;Second list S402.
Detailed description of the invention
By describing the technology contents of the present invention, structural feature in detail, being realized purpose and effect, below in conjunction with embodiment and coordinate accompanying drawing to be explained in detail.
Seeing also Fig. 2, Fig. 3, Fig. 2 is a kind of data exchange mode schematic diagram representing layer based on information in an embodiment of the present invention, and Fig. 3 is a kind of conventional data exchange system Organization Chart representing layer based on information in an embodiment of the present invention.A kind of represent the conventional data exchange system 100 of layer based on information and include exchange initiation system 10 and the goal systems 20 with the communication connection of described exchange initiation system.Described exchange initiation system 10 carries out data exchange with goal systems 20 by representing layer transmission form data in information.
Described exchange initiation system 10 includes data exchange and initiates unit, form data generation unit, the first binding unit, packet generation unit and packet transmitting element.The exchange of described data initiates unit for determining the form name needing to carry out data exchange;Described form data generates unit for generating form data according to form configuration information;Described first binding unit is for being undertaken binding and generate list binding information by form fields and data sheet field;Described packet generation unit is for generating exchange data packets by form data by prescribed form, and wherein, the prescribed form of described exchange data packets is JSON, XML or storage file;Described packet transmitting element is for being sent to goal systems by packet by network according to the data transfer link between exchange initiation system and goal systems, wherein, described packet is sent to goal systems by modes such as http protocol, File Transfer Protocol, message queue, Soap agreements.
Described goal systems 20 includes list creating unit, the second binding unit, form data reduction unit, goal systems form data acquiring unit, goal systems list represent unit and Date Conversion Unit.Described list creating unit is for creating the goal systems list with described form name;Described second binding unit is for being undertaken binding and generate list binding information by the form fields of goal systems list and data sheet field;Described form data reduction unit is reduced into form data form for packet goal systems received;Described goal systems form data acquiring unit obtains list binding information and goal systems form data for the form name described in form data;Described goal systems list represents unit for being presented in by goal systems form data according to list binding information corresponding in goal systems in the form fields of the goal systems list of corresponding title;Described Date Conversion Unit is for exchange initiation system form data and goal systems form data are compared renewal or data process, and the data after updating or processing is saved in goal systems data base.
Such as, refer to Fig. 4, be the schematic diagram completing form data one_to_one corresponding process in an embodiment of the present invention.Although being arranged in exchange initiation system 10 first information to represent the list of layer S301 to be arranged in goal systems 20 second information and represent the list of layer S302 different on layout structure, but in " form configuration information " of both sides' agreement, the first business information S403, the second business information S404 that first list S401 of two kinds of different layout structures, the second list S402 each comprise respectively is but relation one to one, thus can guarantee that what all data can be complete swaps.Exchange the first data base S405 of initiation system 10 bottom, goal systems 20 bottom the second data base S406 then without doing any variation, system designer resolves and the problem such as coupling without considering to generate.Have highly versatile, efficiency is high, understand the characteristic that difficulty is low.
Refer to Fig. 5, be the flow chart of a kind of universal data switching method representing layer based on information in an embodiment of the present invention.A kind of universal data switching method representing layer based on information, including:
Step S1, exchange initiation system determine the form name needing to carry out data exchange, and goal systems creates the goal systems list with described form name;
Form fields and data sheet field each are carried out binding and generate list binding information by step S2, exchange initiation system with goal systems;
Step S3, exchange initiation system generate form data according to form configuration information;
Form data is generated exchange data packets by prescribed form by step S4, exchange initiation system, and wherein, the prescribed form of described exchange data packets is JSON, XML or storage file;
Packet is sent to goal systems by network according to the data transfer link between exchange initiation system and goal systems by step S5, exchange initiation system, wherein, described packet is sent to goal systems by modes such as http protocol, File Transfer Protocol, message queue, Soap agreements;
The packet received is reduced into form data form by step S6, goal systems;
Step S7, the goal systems form name described in form data obtains list binding information and goal systems form data, and according to list binding information corresponding in goal systems, goal systems form data is presented in the form fields of goal systems list of corresponding title, and exchange initiation system form data and goal systems form data are compared renewal or data process, and the data after updating or processing are saved in goal systems data base.
The present invention represent the universal data switching method of layer based on information and system represents layer based on information and carries out data exchange, specifically, goal systems creates has the goal systems list identical with the form name carrying out data exchange, then, form fields and data sheet field each are carried out binding and generate list binding information by exchange initiation system with goal systems;Exchange initiation system generates form data according to form configuration information and generates exchange data packets by prescribed form, and by network, packet is sent to goal systems further;The packet received is reduced into form data form by goal systems, and the form name described in form data obtains list binding information and goal systems form data, and according to list binding information, goal systems form data is presented in the form fields of goal systems list of corresponding title, and exchange initiation system form data and goal systems form data are compared renewal or data process, the data after updating or processing are saved in goal systems data base.
The beneficial effects of the present invention is, exchange both sides utilize data that form name and form fields name confirmation to exchange and carry out data storage and map or data binding.Utilize based on information represent the form data of layer carry out the mode of data exchange realize Data Integration, information system intranet and extranet data exchange and homogeneity or heterogeneous information system between data exchange.The Information Level model making information system is more stable and clear, do not rely on data and exchange the data list structure of the opposing party and the definition of data model, decrease the degree of coupling of exchange both sides' system, simultaneously because most management information system platform all includes form system, all of list can be adopted unified tupe, so specific data exchange processing need not be done for each list again while greatly reducing the configuration workload of exchange list.
The foregoing is only embodiments of the invention; not thereby the scope of the claims of the present invention is limited; every equivalent structure utilizing description of the present invention and accompanying drawing content to make or equivalence flow process conversion; or directly or indirectly it is used in other relevant technical fields, all in like manner include in the scope of patent protection of the present invention.