CN105550220A - Fetching method and apparatus for heterogeneous system - Google Patents

Fetching method and apparatus for heterogeneous system Download PDF

Info

Publication number
CN105550220A
CN105550220A CN201510885298.3A CN201510885298A CN105550220A CN 105550220 A CN105550220 A CN 105550220A CN 201510885298 A CN201510885298 A CN 201510885298A CN 105550220 A CN105550220 A CN 105550220A
Authority
CN
China
Prior art keywords
description list
source
field
target
major key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510885298.3A
Other languages
Chinese (zh)
Other versions
CN105550220B (en
Inventor
韩伟
李文栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur General Software Co Ltd
Original Assignee
Inspur General Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur General Software Co Ltd filed Critical Inspur General Software Co Ltd
Priority to CN201510885298.3A priority Critical patent/CN105550220B/en
Publication of CN105550220A publication Critical patent/CN105550220A/en
Application granted granted Critical
Publication of CN105550220B publication Critical patent/CN105550220B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a fetching method and apparatus for a heterogeneous system. The method comprises the steps of: determining a to-be-processed source table corresponding to a to-be-processed target table; determining target fields of the to-be-processed target table and source fields of the to-be-processed source table; aiming at each target field of the to-be-processed target table, determining a source field matched with a current target field; and aiming each target field of the to-be-processed target table, acquiring a source value of the source field matched with the current target field, and converting the source value into a target value of the current target field. The invention provides the fetching method and apparatus for the heterogeneous system, and data processing efficiency can be improved.

Description

A kind of method of peek of heterogeneous system and device
Technical field
The present invention relates to field of computer technology, the method for particularly a kind of peek of heterogeneous system and device.
Background technology
In the information age, the operation system of different manufacturers may be selected in Process of Information by an enterprise.Owing to storing the difference such as mode, structure of data between each operation system, cause the data between each operation system cannot be mutual, these different operation systems be called heterogeneous system, due to the difference of system architecture between heterogeneous system, form information island.When some data that certain system needs are in other system, this system cannot directly obtain from other system, needs native system Resurvey raw data, carries out process obtain raw data, and the processing procedure efficiency of data is lower.
Summary of the invention
The invention provides a kind of method and device of peek of heterogeneous system, the efficiency of data processing can be improved.
On the one hand, the invention provides a kind of method of peek of heterogeneous system, comprising:
S1: determine the pending source table that pending object table is corresponding;
S2: determine the aiming field of described pending object table and the source field of described pending source table;
S3: for each aiming field of described pending object table, determines and the source field that current goal field matches;
S4: for each aiming field of described pending object table, what gather the source field matched with current goal field carrys out source value, by described come source value convert the desired value of current goal field to.
Further, before described S1, also comprise:
For each object table, set up the first description list of the table information of preserving current goal table, described first description list comprises: the major key of the first description list, the table name of current goal table;
For each source table, set up the second description list of the table information of preserving current source table, described second description list comprises: the table name of the major key of the second description list, current source table;
Set up at least one first mapping table that object table and source are shown, described first mapping table comprises: the major key of the first description list, the major key of the second description list;
Described S1, comprising:
Obtain the table name of described pending object table;
The table name of the table name of described pending object table with the object table in each first description list is mated, determines target first description list that described pending object table is corresponding;
The major key of the first description list in described target first description list is mated with the major key of the first description list in each first mapping table, determines target first mapping table that described target first description list is corresponding;
The major key of the second description list in described target first mapping table is mated with the major key of the second description list in each second description list, determines target second description list;
According to the table name of the source table in described target second description list, determine the described pending source table that described pending object table is corresponding.
Further, before described S2, also comprise:
For each aiming field of object table, set up the 3rd description list of the field information preserving current goal field, in described 3rd description list, comprising: the major key of the major key of the 3rd description list, the first description list that the object table at current goal field place is corresponding;
For each source field of source table, set up the 4th description list of the field information preserving current source field, in described 4th description list, comprising: the major key of the second corresponding description list is shown in the source at the major key of the 4th description list, current source field place;
Described S2 comprises:
The major key of the major key of the first description list in target first description list corresponding for described pending object table with the first description list in each 3rd description list is mated, determine each target the 3rd description list that described pending object table is corresponding, using the aiming field of aiming field corresponding for each target the 3rd description list of determining as described pending object table;
The major key of the second description list in target second description list corresponding for described pending source table is mated with the major key of the second description list in each 4th description list, determine each target the 4th description list that described pending source table is corresponding, source field corresponding for each target the 4th description list determined is shown corresponding source field as described pending source.
Further, before described S3, also comprise:
Set up at least one second mapping table of aiming field and source field, described second mapping table comprises: the major key of the 3rd description list, the major key of the 4th description list;
Described S3 comprises:
For the aiming field that each target the 3rd description list that described pending object table is corresponding is corresponding, the major key of the major key of the 3rd description list in current goal the 3rd description list with the 3rd description list in each second mapping table is mated, determine target second mapping table that current goal the 3rd description list is corresponding, the major key of the major key of the 4th description list in described target second mapping table with the 4th description list in each target the 4th description list is mated, determine coupling target the 4th description list that described target second mapping table is corresponding, determine that described coupling target the 4th description list and current goal the 3rd description list match, using the source field that source field corresponding for described coupling target the 4th description list matches as the current goal field corresponding with current goal the 3rd description list.
Further, also comprise:
Set up the desired value of aiming field and at least one mapping table carrying out source value of source field, described mapping table comprises: the major key of mapping table, and desired value, carrys out source value;
Described second mapping table, also comprises: the major key of mapping table, corresponding types, and described corresponding types comprises: directly corresponding, mapping;
Described S4, comprising:
For the aiming field that each target the 3rd description list that described pending object table is corresponding is corresponding, gather the source field matched with current goal field pending come source value, when the corresponding types in described target second mapping table be directly to correspondence time using described pending come source value as the described desired value of current goal field, when the corresponding types in described target second mapping table is for mapping, according to the major key determination objective mapping table of the mapping table in described second mapping table, using described in described objective mapping table pending come desired value corresponding to source value as the desired value of current goal field.
On the other hand, the invention provides a kind of device of peek of heterogeneous system, comprising:
First determining unit, for determining the pending source table that pending object table is corresponding;
Second determining unit, the source field that aiming field and described pending source for determining described pending object table are shown;
3rd determining unit, for each aiming field for described pending object table, determines and the source field that current goal field matches;
Fetch unit, for each aiming field for described pending object table, what gather the source field matched with current goal field carrys out source value, by described come source value convert the desired value of current goal field to.
Further, this device also comprises:
First sets up unit, and for for each object table, set up the first description list of the table information of preserving current goal table, described first description list comprises: the major key of the first description list, the table name of current goal table;
Second sets up unit, and for showing for each source, set up the second description list of the table information of preserving current source table, described second description list comprises: the table name that the major key of the second description list, current source are shown;
3rd sets up unit, and for setting up at least one first mapping table that object table and source are shown, described first mapping table comprises: the major key of the first description list, the major key of the second description list;
Described first determining unit, specifically for:
Obtain the table name of described pending object table;
The table name of the table name of described pending object table with the object table in each first description list is mated, determines target first description list that described pending object table is corresponding;
The major key of the first description list in described target first description list is mated with the major key of the first description list in each first mapping table, determines target first mapping table that described target first description list is corresponding;
The major key of the second description list in described target first mapping table is mated with the major key of the second description list in each second description list, determines target second description list;
According to the table name of the source table in described target second description list, determine the described pending source table that described pending object table is corresponding.
Further, this device also comprises:
4th sets up unit, for each aiming field for object table, set up the 3rd description list of the field information preserving current goal field, in described 3rd description list, comprising: the major key of the major key of the 3rd description list, the first description list that the object table at current goal field place is corresponding;
5th sets up unit, for each source field for source table, set up the 4th description list of the field information preserving current source field, in described 4th description list, comprising: the major key of the second description list of the source table correspondence at the major key of the 4th description list, current source field place;
Described second determining unit, specifically for:
The major key of the major key of the first description list in target first description list corresponding for described pending object table with the first description list in each 3rd description list is mated, determine each target the 3rd description list that described pending object table is corresponding, using the aiming field of aiming field corresponding for each target the 3rd description list of determining as described pending object table;
The major key of the second description list in target second description list corresponding for described pending source table is mated with the major key of the second description list in each 4th description list, determine each target the 4th description list that described pending source table is corresponding, source field corresponding for each target the 4th description list determined is shown corresponding source field as described pending source.
Further, this device also comprises:
6th sets up unit, and for setting up at least one second mapping table of aiming field and source field, described second mapping table comprises: the major key of the 3rd description list, the major key of the 4th description list;
Described 3rd determining unit, specifically for:
For the aiming field that each target the 3rd description list that described pending object table is corresponding is corresponding, the major key of the major key of the 3rd description list in current goal the 3rd description list with the 3rd description list in each second mapping table is mated, determine target second mapping table that current goal the 3rd description list is corresponding, the major key of the major key of the 4th description list in described target second mapping table with the 4th description list in each target the 4th description list is mated, determine coupling target the 4th description list that described target second mapping table is corresponding, determine that described coupling target the 4th description list and current goal the 3rd description list match, using the source field that source field corresponding for described coupling target the 4th description list matches as the current goal field corresponding with current goal the 3rd description list.
Further, this device also comprises:
7th sets up unit, and at least one mapping table carrying out source value of the desired value and source field of setting up aiming field, described mapping table comprises: the major key of mapping table, and desired value, carrys out source value;
Described second mapping table, also comprises: the major key of mapping table, corresponding types, and described corresponding types comprises: directly corresponding, mapping;
Described fetch unit, specifically for:
For the aiming field that each target the 3rd description list that described pending object table is corresponding is corresponding, gather the source field matched with current goal field pending come source value, when the corresponding types in described target second mapping table be directly to correspondence time using described pending come source value as the described desired value of current goal field, when the corresponding types in described target second mapping table is for mapping, according to the major key determination objective mapping table of the mapping table in described second mapping table, using described in described objective mapping table pending come desired value corresponding to source value as the desired value of current goal field.
The invention provides a kind of method and device of peek of heterogeneous system, determine the pending source table that pending object table is corresponding, determine the source field that each aiming field is corresponding, the source value of coming of source field is converted to desired value, pass through the method, the data that realize target table needs can directly gather from the table of source, processing, improve the efficiency of data processing without the need to again obtaining raw data.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram of the method for the peek of a kind of heterogeneous system that one embodiment of the invention provides;
Fig. 2 is the process flow diagram of the method for the peek of the another kind of heterogeneous system that one embodiment of the invention provides;
Fig. 3 is the device schematic diagram of the peek of a kind of heterogeneous system that one embodiment of the invention provides;
Fig. 4 is the device schematic diagram of the peek of the another kind of heterogeneous system that one embodiment of the invention provides.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly; below in conjunction with the accompanying drawing in the embodiment of the present invention; technical scheme in the embodiment of the present invention is clearly and completely described; obviously; described embodiment is the present invention's part embodiment, instead of whole embodiments, based on the embodiment in the present invention; the every other embodiment that those of ordinary skill in the art obtain under the prerequisite not making creative work, all belongs to the scope of protection of the invention.
As shown in Figure 1, embodiments provide a kind of method of peek of heterogeneous system, the method can comprise the following steps:
S1: determine the pending source table that pending object table is corresponding;
S2: determine the aiming field of described pending object table and the source field of described pending source table;
S3: for each aiming field of described pending object table, determines and the source field that current goal field matches;
S4: for each aiming field of described pending object table, what gather the source field matched with current goal field carrys out source value, by described come source value convert the desired value of current goal field to.
Embodiments provide a kind of method of peek of heterogeneous system, determine the pending source table that pending object table is corresponding, determine the source field that each aiming field is corresponding, the source value of coming of source field is converted to desired value, pass through the method, the data that realize target table needs can directly gather from the table of source, processing, improve the efficiency of data processing without the need to again obtaining raw data.
In a kind of possible implementation, before described S1, also comprise:
For each object table, set up the first description list of the table information of preserving current goal table, described first description list comprises: the major key of the first description list, the table name of current goal table;
For each source table, set up the second description list of the table information of preserving current source table, described second description list comprises: the table name of the major key of the second description list, current source table;
Set up at least one first mapping table that object table and source are shown, described first mapping table comprises: the major key of the first description list, the major key of the second description list;
Described S1, comprising:
Obtain the table name of described pending object table;
The table name of the table name of described pending object table with the object table in each first description list is mated, determines target first description list that described pending object table is corresponding;
The major key of the first description list in described target first description list is mated with the major key of the first description list in each first mapping table, determines target first mapping table that described target first description list is corresponding;
The major key of the second description list in described target first mapping table is mated with the major key of the second description list in each second description list, determines target second description list;
According to the table name of the source table in described target second description list, determine the described pending source table that described pending object table is corresponding.
In this implementation, can be that each object table sets up the first corresponding description list, for the second corresponding description list set up by each source table.For each object table sets up the first corresponding mapping table, object table may be shown corresponding with multiple source, and therefore, an object table may have multiple first mapping table.
Particularly, the first description list can be realized by the mode of table 1:
Table 1
Second description list can be realized by the mode of table 2:
Table 2
In addition, the first description list and the second description list can be realized by the mode of table 3:
Table 3
Wherein, when type is 0, this table is the first description list, and GUID is wherein the major key of the first description list, and name is called the title of object table; When type is 1, this table is the second description list, and GUID is wherein the major key of the second description list, and name is called the title that source is shown.
Further, the target database at pending object table place can be communicated with by DBlink with the source database at table place, pending source.This information also can in setting in table 3, and when table 3 is the first description list, this information must be filled out, and when table 3 is the second description list, this information is empty.
First mapping table can be realized by the mode of table 4:
Table 4
As shown in table 4, can also comprise in the first mapping table: the information such as the title of the major key of the first mapping table, the numbering of the first mapping table, the first mapping table.
In a kind of possible implementation, before described S2, also comprise:
For each aiming field of object table, set up the 3rd description list of the field information preserving current goal field, in described 3rd description list, comprising: the major key of the major key of the 3rd description list, the first description list that the object table at current goal field place is corresponding;
For each source field of source table, set up the 4th description list of the field information preserving current source field, in described 4th description list, comprising: the major key of the second corresponding description list is shown in the source at the major key of the 4th description list, current source field place;
Described S2 comprises:
The major key of the major key of the first description list in target first description list corresponding for described pending object table with the first description list in each 3rd description list is mated, determine each target the 3rd description list that described pending object table is corresponding, using the aiming field of aiming field corresponding for each target the 3rd description list of determining as described pending object table;
The major key of the second description list in target second description list corresponding for described pending source table is mated with the major key of the second description list in each 4th description list, determine each target the 4th description list that described pending source table is corresponding, source field corresponding for each target the 4th description list determined is shown corresponding source field as described pending source.
3rd description list and the 4th description list can be realized by the mode of table 5:
Table 5
Title Field Data type Remarks
GUID GUID VARchar(36) Major key
ID ID VARchar(100) Major key
Row name FieldName VARchar(100)
Describe Describe VARchar(200) 7 -->
Field type FieldType char(2)
Field length FieldLength VARchar(10)
As shown in table 5, all can comprise the information such as row name, field type, field length in the 3rd description list and the 4th description list.
When table 5 is the 3rd description list, the GUID in table 5 is the major key of the 3rd description list, and ID is the major key of the first description list, the title of row aiming field by name, and field type is the type of aiming field, and field length is the length of aiming field; When table 5 is the 4th description list, the GUID in table 5 is the major key of the 4th description list, and ID is the major key of the second description list, and the title of row source field by name, field type is the type of source field, and field length is the length of source field.
In a kind of possible implementation, before described S3, also comprise:
Set up at least one second mapping table of aiming field and source field, described second mapping table comprises: the major key of the 3rd description list, the major key of the 4th description list;
Described S3 comprises:
For the aiming field that each target the 3rd description list that described pending object table is corresponding is corresponding, the major key of the major key of the 3rd description list in current goal the 3rd description list with the 3rd description list in each second mapping table is mated, determine target second mapping table that current goal the 3rd description list is corresponding, the major key of the major key of the 4th description list in described target second mapping table with the 4th description list in each target the 4th description list is mated, determine coupling target the 4th description list that described target second mapping table is corresponding, determine that described coupling target the 4th description list and current goal the 3rd description list match, using the source field that source field corresponding for described coupling target the 4th description list matches as the current goal field corresponding with current goal the 3rd description list.
In this implementation, an aiming field can be corresponding with multiple source field, and therefore, an aiming field can corresponding multiple second mapping table.The major key of the 3rd description list in the second mapping table that same aiming field is corresponding is identical, and the major key of the 4th description list is different.
In this implementation, the second mapping table can be realized by the mode of table 6:
Table 6
In a kind of possible implementation, the method also comprises:
Set up the desired value of aiming field and at least one mapping table carrying out source value of source field, described mapping table comprises: the major key of mapping table, and desired value, carrys out source value;
Described second mapping table, also comprises: the major key of mapping table, corresponding types, and described corresponding types comprises: directly corresponding, mapping;
Described S4, comprising:
For the aiming field that each target the 3rd description list that described pending object table is corresponding is corresponding, gather the source field matched with current goal field pending come source value, when the corresponding types in described target second mapping table be directly to correspondence time using described pending come source value as the described desired value of current goal field, when the corresponding types in described target second mapping table is for mapping, according to the major key determination objective mapping table of the mapping table in described second mapping table, using described in described objective mapping table pending come desired value corresponding to source value as the desired value of current goal field.
In this implementation, because the value in a source field may have multiple, that is, the carrying out source value and may have a multiple of source field, can be that a source field arranges multiple mapping table, source field also can be set in a mapping table multiple possible come source value respectively with the corresponding relation of desired value.
In this implementation, the second mapping table can be realized by the mode of table 7:
Table 7
As shown in table 7, described second mapping table can also comprise: the information such as the major key of the first mapping table.When the value of corresponding types is 0, representing that corresponding types is directly corresponding, when the value of corresponding types is 1, representing that corresponding types is for mapping.
In addition, may exist in source field do not criticize aiming field carry out source value, that can carry out alternative source field by a fixing constant in this case carrys out source value.In the second mapping table, also comprise: constant, corresponding types also comprises constant type.When corresponding types is constant type, using the desired value of the constant in the second mapping table as current goal field.
In this implementation, mapping table can be realized by the mode of table 8:
Table 8
Title Field Data type Remarks
GUID GUID VARchar(36) The major key of mapping table
Desired value TVALUE VARchar(100)
Carry out source value SVALUE VARchar(100)
In addition, in a kind of possible implementation, the method can also comprise: set up at least one middle mapping relations table, middle mapping relations table comprises: the major key of the 3rd description list, the major key of the 4th description list, the major key of middle mapping relations table.Described second mapping table, also comprises: major key, the corresponding types of middle mapping relations table, and described corresponding types comprises: directly corresponding, mapping.Described mapping table comprises: the major key of middle mapping relations table, and desired value, carrys out source value;
Described S4, comprise: when the corresponding types in described target second mapping table is for mapping, according to mapping relations table in the middle of the major key determination target of the middle mapping relations table in described second mapping table, according to the major key determination objective mapping table of the middle mapping relations table in mapping relations table in the middle of target, using described in described objective mapping table pending come desired value corresponding to source value as the desired value of current goal field.
In this implementation, middle mapping relations table can be realized by the mode of table 9:
Table 9
As shown in table 9, can also comprise in middle mapping relations table: the major key of the first mapping table.
Further, in a kind of possible implementation, in described S4, the source field that described collection and current goal field match carry out source value, comprising:
According to the source field matched with current goal field determining the described pending source table that described pending object table is corresponding and determine, generate peek SQL statement, by described peek SQL statement gather described come source value.
In a kind of possible implementation, after described S4, also comprise: the desired value of each aiming field is filled in the aiming field of the correspondence of described pending object table.
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with drawings and the specific embodiments, the present invention is described in further detail.
The embodiment of the present invention needs the data acquisition in operation system A in operation system B, make can carry out data interaction between two heterogeneous systems, data in operation system A are stored in source database, and the data in operation system B are stored in target database.Source database is connected by DBlink with target database.Object table is stored in target database, and source table is stored in source database.
As shown in Figure 2, embodiments provide a kind of method of peek of heterogeneous system, the method can comprise the following steps:
Step 201: for each object table, set up the first description list of the table information of preserving current goal table, for each source table, set up the second description list of the table information of preserving current source table, set up at least one first mapping table that object table and source are shown, wherein, described first mapping table comprises: the major key of the first description list, the major key of the second description list, described first description list comprises: the major key of the first description list, the table name of current goal table, and described second description list comprises: the table name of the major key of the second description list, current source table.
Step 202: for each aiming field of object table, set up the 3rd description list of the field information preserving current goal field, for each source field of source table, set up the 4th description list of the field information preserving current source field, wherein, in described 3rd description list, comprise: the major key of the major key of the 3rd description list, the first description list that the object table at current goal field place is corresponding, in described 4th description list, comprising: the major key of the second description list of the source table correspondence at the major key of the 4th description list, current source field place.
Step 203: at least one second mapping table setting up aiming field and source field, wherein, described second mapping table comprises: the major key of the 3rd description list, the major key of the 4th description list, the major key of mapping table, corresponding types, described corresponding types comprises: directly corresponding, mapping.
Step 204: set up the desired value of aiming field and at least one mapping table carrying out source value of source field, described mapping table comprises: the major key of mapping table, and desired value, carrys out source value.
Step 205: the table name obtaining described pending object table, the table name of the table name of described pending object table with the object table in each first description list is mated, determine target first description list that described pending object table is corresponding, the major key of the first description list in described target first description list is mated with the major key of the first description list in each first mapping table, determine target first mapping table that described target first description list is corresponding, the major key of the second description list in described target first mapping table is mated with the major key of the second description list in each second description list, determine target second description list, according to the table name of the source table in described target second description list, determine the described pending source table that described pending object table is corresponding.
Step 206: the major key of the major key of the first description list in target first description list corresponding for described pending object table with the first description list in each 3rd description list is mated, determine each target the 3rd description list that described pending object table is corresponding, using the aiming field of aiming field corresponding for each target the 3rd description list determined as described pending object table, the major key of the second description list in target second description list corresponding for described pending source table is mated with the major key of the second description list in each 4th description list, determine each target the 4th description list that described pending source table is corresponding, using the source field of source field corresponding for each target the 4th description list determined as described pending source table correspondence.
Step 207: for the aiming field that each target the 3rd description list that described pending object table is corresponding is corresponding, the major key of the major key of the 3rd description list in current goal the 3rd description list with the 3rd description list in each second mapping table is mated, determine target second mapping table that current goal the 3rd description list is corresponding, the major key of the major key of the 4th description list in described target second mapping table with the 4th description list in each target the 4th description list is mated, determine coupling target the 4th description list that described target second mapping table is corresponding, determine that described coupling target the 4th description list and current goal the 3rd description list match, using the source field that source field corresponding for described coupling target the 4th description list matches as the current goal field corresponding with current goal the 3rd description list.
Step 208: for the aiming field that each target the 3rd description list that described pending object table is corresponding is corresponding, gather the source field matched with current goal field pending come source value, when the corresponding types in described target second mapping table be directly to correspondence time using described pending come source value as the described desired value of current goal field, when the corresponding types in described target second mapping table is for mapping, according to the major key determination objective mapping table of the mapping table in described second mapping table, using described in described objective mapping table pending come desired value corresponding to source value as the desired value of current goal field.
The method of the peek of a kind of heterogeneous system provided by the embodiment of the present invention, has broken the information island between different operation systems, makes can realize data interaction between heterogeneous system, improves the efficiency of data processing, improve the utilization factor of data.
As shown in Figure 3, Figure 4, a kind of device of peek of heterogeneous system is embodiments provided.Device embodiment can pass through software simulating, also can be realized by the mode of hardware or software and hardware combining.Say from hardware view; as shown in Figure 3; a kind of hardware structure diagram of the device place equipment of the peek of a kind of heterogeneous system provided for the embodiment of the present invention; except the processor shown in Fig. 3, internal memory, network interface and nonvolatile memory; in embodiment, the equipment at device place can also comprise other hardware usually, as the forwarding chip etc. of responsible process message.For software simulating, as shown in Figure 4, as the device on a logical meaning, be by the CPU of its place equipment, computer program instructions corresponding in nonvolatile memory is read operation in internal memory to be formed.The device of the peek of a kind of heterogeneous system that the present embodiment provides, comprising:
First determining unit 401, for determining the pending source table that pending object table is corresponding;
Second determining unit 402, the source field that aiming field and described pending source for determining described pending object table are shown;
3rd determining unit 403, for each aiming field for described pending object table, determines and the source field that current goal field matches;
Fetch unit 404, for each aiming field for described pending object table, what gather the source field matched with current goal field carrys out source value, by described come source value convert the desired value of current goal field to.
In a kind of possible implementation, this device also comprises:
First sets up unit, and for for each object table, set up the first description list of the table information of preserving current goal table, described first description list comprises: the major key of the first description list, the table name of current goal table;
Second sets up unit, and for showing for each source, set up the second description list of the table information of preserving current source table, described second description list comprises: the table name that the major key of the second description list, current source are shown;
3rd sets up unit, and for setting up at least one first mapping table that object table and source are shown, described first mapping table comprises: the major key of the first description list, the major key of the second description list;
Described first determining unit 401, specifically for:
Obtain the table name of described pending object table;
The table name of the table name of described pending object table with the object table in each first description list is mated, determines target first description list that described pending object table is corresponding;
The major key of the first description list in described target first description list is mated with the major key of the first description list in each first mapping table, determines target first mapping table that described target first description list is corresponding;
The major key of the second description list in described target first mapping table is mated with the major key of the second description list in each second description list, determines target second description list;
According to the table name of the source table in described target second description list, determine the described pending source table that described pending object table is corresponding.
In a kind of possible implementation, this device also comprises:
4th sets up unit, for each aiming field for object table, set up the 3rd description list of the field information preserving current goal field, in described 3rd description list, comprising: the major key of the major key of the 3rd description list, the first description list that the object table at current goal field place is corresponding;
5th sets up unit, for each source field for source table, set up the 4th description list of the field information preserving current source field, in described 4th description list, comprising: the major key of the second description list of the source table correspondence at the major key of the 4th description list, current source field place;
Described second determining unit 402, specifically for:
The major key of the major key of the first description list in target first description list corresponding for described pending object table with the first description list in each 3rd description list is mated, determine each target the 3rd description list that described pending object table is corresponding, using the aiming field of aiming field corresponding for each target the 3rd description list of determining as described pending object table;
The major key of the second description list in target second description list corresponding for described pending source table is mated with the major key of the second description list in each 4th description list, determine each target the 4th description list that described pending source table is corresponding, source field corresponding for each target the 4th description list determined is shown corresponding source field as described pending source.
In a kind of possible implementation, this device also comprises:
6th sets up unit, and for setting up at least one second mapping table of aiming field and source field, described second mapping table comprises: the major key of the 3rd description list, the major key of the 4th description list;
Described 3rd determining unit 403, specifically for:
For the aiming field that each target the 3rd description list that described pending object table is corresponding is corresponding, the major key of the major key of the 3rd description list in current goal the 3rd description list with the 3rd description list in each second mapping table is mated, determine target second mapping table that current goal the 3rd description list is corresponding, the major key of the major key of the 4th description list in described target second mapping table with the 4th description list in each target the 4th description list is mated, determine coupling target the 4th description list that described target second mapping table is corresponding, determine that described coupling target the 4th description list and current goal the 3rd description list match, using the source field that source field corresponding for described coupling target the 4th description list matches as the current goal field corresponding with current goal the 3rd description list.
In a kind of possible implementation, this device also comprises:
7th sets up unit, and at least one mapping table carrying out source value of the desired value and source field of setting up aiming field, described mapping table comprises: the major key of mapping table, and desired value, carrys out source value;
Described second mapping table, also comprises: the major key of mapping table, corresponding types, and described corresponding types comprises: directly corresponding, mapping;
Described fetch unit 404, specifically for:
For the aiming field that each target the 3rd description list that described pending object table is corresponding is corresponding, gather the source field matched with current goal field pending come source value, when the corresponding types in described target second mapping table be directly to correspondence time using described pending come source value as the described desired value of current goal field, when the corresponding types in described target second mapping table is for mapping, according to the major key determination objective mapping table of the mapping table in described second mapping table, using described in described objective mapping table pending come desired value corresponding to source value as the desired value of current goal field.
The content such as information interaction, implementation between each unit in said apparatus, due to the inventive method embodiment based on same design, particular content can see in the inventive method embodiment describe, repeat no more herein.
The method of the peek of a kind of heterogeneous system that the embodiment of the present invention provides and device, have following beneficial effect:
1, a kind of method and device of peek of heterogeneous system is embodiments provided, determine the pending source table that pending object table is corresponding, determine the source field that each aiming field is corresponding, the source value of coming of source field is converted to desired value, pass through the method, the data that realize target table needs can directly gather from the table of source, processing, improve the efficiency of data processing without the need to again obtaining raw data.
The method of the peek of a kind of heterogeneous system 2, provided by the embodiment of the present invention and device, break the information island between different operation systems, make can realize data interaction between heterogeneous system, improve the efficiency of data processing, improve the utilization factor of data.
It should be noted that, in this article, the relational terms of such as first and second and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element " being comprised a 〃 〃 〃 〃 〃 〃 " limited by statement, and be not precluded within process, method, article or the equipment comprising described key element and also there is other same factor.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can have been come by the hardware that programmed instruction is relevant, aforesaid program can be stored in the storage medium of embodied on computer readable, this program, when performing, performs the step comprising said method embodiment; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium in.
Finally it should be noted that: the foregoing is only preferred embodiment of the present invention, only for illustration of technical scheme of the present invention, be not intended to limit protection scope of the present invention.All any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., be all included in protection scope of the present invention.

Claims (10)

1. a method for the peek of heterogeneous system, is characterized in that, comprising:
S1: determine the pending source table that pending object table is corresponding;
S2: determine the aiming field of described pending object table and the source field of described pending source table;
S3: for each aiming field of described pending object table, determines and the source field that current goal field matches;
S4: for each aiming field of described pending object table, what gather the source field matched with current goal field carrys out source value, by described come source value convert the desired value of current goal field to.
2. method according to claim 1, is characterized in that, before described S1, also comprises:
For each object table, set up the first description list of the table information of preserving current goal table, described first description list comprises: the major key of the first description list, the table name of current goal table;
For each source table, set up the second description list of the table information of preserving current source table, described second description list comprises: the table name of the major key of the second description list, current source table;
Set up at least one first mapping table that object table and source are shown, described first mapping table comprises: the major key of the first description list, the major key of the second description list;
Described S1, comprising:
Obtain the table name of described pending object table;
The table name of the table name of described pending object table with the object table in each first description list is mated, determines target first description list that described pending object table is corresponding;
The major key of the first description list in described target first description list is mated with the major key of the first description list in each first mapping table, determines target first mapping table that described target first description list is corresponding;
The major key of the second description list in described target first mapping table is mated with the major key of the second description list in each second description list, determines target second description list;
According to the table name of the source table in described target second description list, determine the described pending source table that described pending object table is corresponding.
3. method according to claim 2, is characterized in that, before described S2, also comprises:
For each aiming field of object table, set up the 3rd description list of the field information preserving current goal field, in described 3rd description list, comprising: the major key of the major key of the 3rd description list, the first description list that the object table at current goal field place is corresponding;
For each source field of source table, set up the 4th description list of the field information preserving current source field, in described 4th description list, comprising: the major key of the second corresponding description list is shown in the source at the major key of the 4th description list, current source field place;
Described S2 comprises:
The major key of the major key of the first description list in target first description list corresponding for described pending object table with the first description list in each 3rd description list is mated, determine each target the 3rd description list that described pending object table is corresponding, using the aiming field of aiming field corresponding for each target the 3rd description list of determining as described pending object table;
The major key of the second description list in target second description list corresponding for described pending source table is mated with the major key of the second description list in each 4th description list, determine each target the 4th description list that described pending source table is corresponding, source field corresponding for each target the 4th description list determined is shown corresponding source field as described pending source.
4. method according to claim 3, is characterized in that, before described S3, also comprises:
Set up at least one second mapping table of aiming field and source field, described second mapping table comprises: the major key of the 3rd description list, the major key of the 4th description list;
Described S3 comprises:
For the aiming field that each target the 3rd description list that described pending object table is corresponding is corresponding, the major key of the major key of the 3rd description list in current goal the 3rd description list with the 3rd description list in each second mapping table is mated, determine target second mapping table that current goal the 3rd description list is corresponding, the major key of the major key of the 4th description list in described target second mapping table with the 4th description list in each target the 4th description list is mated, determine coupling target the 4th description list that described target second mapping table is corresponding, determine that described coupling target the 4th description list and current goal the 3rd description list match, using the source field that source field corresponding for described coupling target the 4th description list matches as the current goal field corresponding with current goal the 3rd description list.
5. method according to claim 4, is characterized in that, also comprises:
Set up the desired value of aiming field and at least one mapping table carrying out source value of source field, described mapping table comprises: the major key of mapping table, and desired value, carrys out source value;
Described second mapping table, also comprises: the major key of mapping table, corresponding types, and described corresponding types comprises: directly corresponding, mapping;
Described S4, comprising:
For the aiming field that each target the 3rd description list that described pending object table is corresponding is corresponding, gather the source field matched with current goal field pending come source value, when the corresponding types in described target second mapping table be directly to correspondence time using described pending come source value as the described desired value of current goal field, when the corresponding types in described target second mapping table is for mapping, according to the major key determination objective mapping table of the mapping table in described second mapping table, using described in described objective mapping table pending come desired value corresponding to source value as the desired value of current goal field.
6. a device for the peek of heterogeneous system, is characterized in that, comprising:
First determining unit, for determining the pending source table that pending object table is corresponding;
Second determining unit, the source field that aiming field and described pending source for determining described pending object table are shown;
3rd determining unit, for each aiming field for described pending object table, determines and the source field that current goal field matches;
Fetch unit, for each aiming field for described pending object table, what gather the source field matched with current goal field carrys out source value, by described come source value convert the desired value of current goal field to.
7. device according to claim 6, is characterized in that, also comprises:
First sets up unit, and for for each object table, set up the first description list of the table information of preserving current goal table, described first description list comprises: the major key of the first description list, the table name of current goal table;
Second sets up unit, and for showing for each source, set up the second description list of the table information of preserving current source table, described second description list comprises: the table name that the major key of the second description list, current source are shown;
3rd sets up unit, and for setting up at least one first mapping table that object table and source are shown, described first mapping table comprises: the major key of the first description list, the major key of the second description list;
Described first determining unit, specifically for:
Obtain the table name of described pending object table;
The table name of the table name of described pending object table with the object table in each first description list is mated, determines target first description list that described pending object table is corresponding;
The major key of the first description list in described target first description list is mated with the major key of the first description list in each first mapping table, determines target first mapping table that described target first description list is corresponding;
The major key of the second description list in described target first mapping table is mated with the major key of the second description list in each second description list, determines target second description list;
According to the table name of the source table in described target second description list, determine the described pending source table that described pending object table is corresponding.
8. device according to claim 7, is characterized in that, also comprises:
4th sets up unit, for each aiming field for object table, set up the 3rd description list of the field information preserving current goal field, in described 3rd description list, comprising: the major key of the major key of the 3rd description list, the first description list that the object table at current goal field place is corresponding;
5th sets up unit, for each source field for source table, set up the 4th description list of the field information preserving current source field, in described 4th description list, comprising: the major key of the second description list of the source table correspondence at the major key of the 4th description list, current source field place;
Described second determining unit, specifically for:
The major key of the major key of the first description list in target first description list corresponding for described pending object table with the first description list in each 3rd description list is mated, determine each target the 3rd description list that described pending object table is corresponding, using the aiming field of aiming field corresponding for each target the 3rd description list of determining as described pending object table;
The major key of the second description list in target second description list corresponding for described pending source table is mated with the major key of the second description list in each 4th description list, determine each target the 4th description list that described pending source table is corresponding, source field corresponding for each target the 4th description list determined is shown corresponding source field as described pending source.
9. device according to claim 8, is characterized in that, also comprises:
6th sets up unit, and for setting up at least one second mapping table of aiming field and source field, described second mapping table comprises: the major key of the 3rd description list, the major key of the 4th description list;
Described 3rd determining unit, specifically for:
For the aiming field that each target the 3rd description list that described pending object table is corresponding is corresponding, the major key of the major key of the 3rd description list in current goal the 3rd description list with the 3rd description list in each second mapping table is mated, determine target second mapping table that current goal the 3rd description list is corresponding, the major key of the major key of the 4th description list in described target second mapping table with the 4th description list in each target the 4th description list is mated, determine coupling target the 4th description list that described target second mapping table is corresponding, determine that described coupling target the 4th description list and current goal the 3rd description list match, using the source field that source field corresponding for described coupling target the 4th description list matches as the current goal field corresponding with current goal the 3rd description list.
10. device according to claim 9, is characterized in that, also comprises:
7th sets up unit, and at least one mapping table carrying out source value of the desired value and source field of setting up aiming field, described mapping table comprises: the major key of mapping table, and desired value, carrys out source value;
Described second mapping table, also comprises: the major key of mapping table, corresponding types, and described corresponding types comprises: directly corresponding, mapping;
Described fetch unit, specifically for:
For the aiming field that each target the 3rd description list that described pending object table is corresponding is corresponding, gather the source field matched with current goal field pending come source value, when the corresponding types in described target second mapping table be directly to correspondence time using described pending come source value as the described desired value of current goal field, when the corresponding types in described target second mapping table is for mapping, according to the major key determination objective mapping table of the mapping table in described second mapping table, using described in described objective mapping table pending come desired value corresponding to source value as the desired value of current goal field.
CN201510885298.3A 2015-12-03 2015-12-03 A kind of method and device of the access of heterogeneous system Active CN105550220B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510885298.3A CN105550220B (en) 2015-12-03 2015-12-03 A kind of method and device of the access of heterogeneous system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510885298.3A CN105550220B (en) 2015-12-03 2015-12-03 A kind of method and device of the access of heterogeneous system

Publications (2)

Publication Number Publication Date
CN105550220A true CN105550220A (en) 2016-05-04
CN105550220B CN105550220B (en) 2018-11-27

Family

ID=55829409

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510885298.3A Active CN105550220B (en) 2015-12-03 2015-12-03 A kind of method and device of the access of heterogeneous system

Country Status (1)

Country Link
CN (1) CN105550220B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106991196A (en) * 2017-05-02 2017-07-28 山东浪潮通软信息科技有限公司 A kind of general data traceability method and system
CN108573010A (en) * 2017-08-25 2018-09-25 北京金山云网络技术有限公司 It is associated with method, apparatus, electronic equipment and the medium of the synonymous data of heterogeneous system
CN109783611A (en) * 2018-12-29 2019-05-21 北京明略软件系统有限公司 A kind of method, apparatus of fields match, computer storage medium and terminal
CN109783483A (en) * 2018-12-29 2019-05-21 北京明略软件系统有限公司 A kind of method, apparatus of data preparation, computer storage medium and terminal

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101304424A (en) * 2008-06-10 2008-11-12 南京财经大学 Method for exhibiting data of different source data switching middleware based on XML
US7542958B1 (en) * 2002-09-13 2009-06-02 Xsb, Inc. Methods for determining the similarity of content and structuring unstructured content from heterogeneous sources
CN101697166A (en) * 2009-10-28 2010-04-21 浪潮电子信息产业股份有限公司 Method for accelerating data integration of heterogeneous platform
CN101957865A (en) * 2010-10-27 2011-01-26 杭州新中大软件股份有限公司 Data exchange and sharing technology among heterogeneous systems
CN103412956A (en) * 2013-08-30 2013-11-27 北京中科江南软件有限公司 Data processing method and system for heterogeneous data sources
CN104346681A (en) * 2013-08-08 2015-02-11 中国科学院计算机网络信息中心 Method for actively acquiring data from heterogeneous enterprise information systems

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7542958B1 (en) * 2002-09-13 2009-06-02 Xsb, Inc. Methods for determining the similarity of content and structuring unstructured content from heterogeneous sources
CN101304424A (en) * 2008-06-10 2008-11-12 南京财经大学 Method for exhibiting data of different source data switching middleware based on XML
CN101697166A (en) * 2009-10-28 2010-04-21 浪潮电子信息产业股份有限公司 Method for accelerating data integration of heterogeneous platform
CN101957865A (en) * 2010-10-27 2011-01-26 杭州新中大软件股份有限公司 Data exchange and sharing technology among heterogeneous systems
CN104346681A (en) * 2013-08-08 2015-02-11 中国科学院计算机网络信息中心 Method for actively acquiring data from heterogeneous enterprise information systems
CN103412956A (en) * 2013-08-30 2013-11-27 北京中科江南软件有限公司 Data processing method and system for heterogeneous data sources

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106991196A (en) * 2017-05-02 2017-07-28 山东浪潮通软信息科技有限公司 A kind of general data traceability method and system
CN106991196B (en) * 2017-05-02 2020-05-05 浪潮通用软件有限公司 Universal data tracing method and system
CN108573010A (en) * 2017-08-25 2018-09-25 北京金山云网络技术有限公司 It is associated with method, apparatus, electronic equipment and the medium of the synonymous data of heterogeneous system
CN108573010B (en) * 2017-08-25 2020-06-19 北京金山云网络技术有限公司 Method, device, electronic equipment and medium for associating synonymy data of heterogeneous system
CN109783611A (en) * 2018-12-29 2019-05-21 北京明略软件系统有限公司 A kind of method, apparatus of fields match, computer storage medium and terminal
CN109783483A (en) * 2018-12-29 2019-05-21 北京明略软件系统有限公司 A kind of method, apparatus of data preparation, computer storage medium and terminal

Also Published As

Publication number Publication date
CN105550220B (en) 2018-11-27

Similar Documents

Publication Publication Date Title
CN110321344B (en) Information query method and device for associated data, computer equipment and storage medium
CN109885614B (en) Data synchronization method and device
US10102039B2 (en) Converting a hybrid flow
CN106970929B (en) Data import method and device
CN105550220A (en) Fetching method and apparatus for heterogeneous system
CN103514201A (en) Method and device for querying data in non-relational database
CN107977441A (en) The method for processing business and transaction processing system of rule-based engine
CN104360865A (en) Serialization method, deserialization method and related equipment
CN104298736A (en) Method and device for aggregating and connecting data as well as database system
CN104573022A (en) Data query method and device for HBase
CN102819589B (en) ETL (Extract Transform Load)-based data optimization method and equipment
CN111125229A (en) Data blood margin generation method and device and electronic equipment
CN103971036A (en) Page field access control system and method
CN103714086A (en) Method and device used for generating non-relational data base module
CN105701251A (en) Data export and import method based on object definition
CN102915344B (en) SQL (structured query language) statement processing method and device
CN106933919B (en) Data table connection method and device
CN104615490A (en) Method and device for data conversion
CN106557307A (en) The processing method and processing system of business datum
CN105302915A (en) High-performance data processing system based on memory calculation
CN102508839B (en) Data processing device and data processing method
CN109408035B (en) Flow configuration method, storage medium and server of business system
CN104573098A (en) Large-scale object recognition method based on Spark system
CN117236304A (en) Method for realizing Excel general import based on template configuration
CN110008236A (en) A kind of data distribution formula is from increasing coding method, system, equipment and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant