[go: up one dir, main page]

CN105550220B - A kind of method and device of the access of heterogeneous system - Google Patents

A kind of method and device of the access of heterogeneous system Download PDF

Info

Publication number
CN105550220B
CN105550220B CN201510885298.3A CN201510885298A CN105550220B CN 105550220 B CN105550220 B CN 105550220B CN 201510885298 A CN201510885298 A CN 201510885298A CN 105550220 B CN105550220 B CN 105550220B
Authority
CN
China
Prior art keywords
source
target
describes
field
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.)
Active
Application number
CN201510885298.3A
Other languages
Chinese (zh)
Other versions
CN105550220A (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 OR CALCULATING; 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 OR CALCULATING; 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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention provides a kind of method and device of the access of heterogeneous system, this method, including:Determine the corresponding source table to be processed of object table to be processed;Determine the aiming field of the object table to be processed and the source field of the source table to be processed;For each aiming field of the object table to be processed, the determining source field to match with current goal field;For each aiming field of the object table to be processed, source field that acquisition matches with current goal field carrys out source value, by it is described come source value be converted into the target value of current goal field.The present invention provides a kind of method and devices of the access of heterogeneous system, can be improved the efficiency of data processing.

Description

A kind of method and device of the access of heterogeneous system
Technical field
The present invention relates to field of computer technology, in particular to a kind of method and device of the access of heterogeneous system.
Background technique
In the information age, an enterprise may select the operation system of different manufacturers in Process of Information.It is each Due to differences such as the mode of storing data, structures between operation system, cause the data between each operation system that can not interact, These different operation systems are known as heterogeneous system, due to the difference of system structure between heterogeneous system, form information island.When When certain data that some system needs are in other systems, which can not directly be obtained from other systems, need this to be System resurveys initial data, is handled to obtain to initial data, the treatment process efficiency of data is lower.
Summary of the invention
The present invention provides a kind of method and devices of the access of heterogeneous system, can be improved the efficiency of data processing.
On the one hand, the present invention provides a kind of methods of the access of heterogeneous system, including:
S1:Determine the corresponding source table to be processed of object table to be processed;
S2:Determine the aiming field of the object table to be processed and the source field of the source table to be processed;
S3:For each aiming field of the object table to be processed, the determining source to match with current goal field Field;
S4:The source to match for each aiming field of the object table to be processed, acquisition with current goal field Field carrys out source value, by it is described come source value be converted into the target value of current goal field.
Further, before the S1, further include:
For each object table, establish the table information for saving current goal table first describes table, and described first describes table In include:First describes the table name of the major key of table, current goal table;
For each source table, establish the table information for saving current source table second describes table, and described second describes table In include:Second describes the table name of the major key of table, current source table;
At least one first mapping table of object table Yu source table is established, includes in first mapping table: First describes the major key of table, and second describes the major key of table;
The S1, including:
Obtain the table name of the object table to be processed;
The table name that the table name of the object table to be processed describes the object table in table with each first is matched, is determined The corresponding target first of the object table to be processed describes table;
The target first is described into the first major key for describing table in table and first in each first mapping table The major key of description table is matched, and determines that the target first describes corresponding the first mapping table of target of table;
By second in first mapping table of target describe the major key of table describe with each second in table second The major key of description table is matched, and determines that target second describes table;
The table name that the source table in table is described according to the target second determines that the object table to be processed is corresponding described Source table to be processed.
Further, before the S2, further include:
For each aiming field of object table, the third for establishing the field information of preservation current goal field describes table, The third describes in table, including:Object table corresponding first where third describes the major key of table, current goal field describes The major key of table;
For each source field of source table, establish the field information for saving current source field the 4th describes table, Described 4th describes in table, including:4th the major key of table, current source field are described where source table it is corresponding second description The major key of table;
The S2 includes:
By the corresponding target first of the object table to be processed describe in table first describe table major key and each third The first major key for describing table in description table is matched, and determines the corresponding each target third description of the object table to be processed The each target third determined is described the corresponding aiming field of table as the aiming field of the object table to be processed by table;
The corresponding target second of the source table to be processed is described to the second major key and each 4th for describing table in table The second major key for describing table in description table is matched, and determines that the corresponding each target the 4th of the source table to be processed describes Table, using each target the 4th determined describe the corresponding source field of table as the source table to be processed it is corresponding come source word Section.
Further, before the S3, further include:
At least one second mapping table of aiming field and source field is established, is wrapped in second mapping table It includes:Third describes the major key of table, and the 4th describes the major key of table;
The S3 includes:
The corresponding aiming field of table is described for the object table to be processed corresponding each target third, by current goal Third describe the third in table describe table major key and each second mapping table in third describe table major key carry out Match, determines that current goal third describes corresponding the second mapping table of target of table, it will be in second mapping table of target The 4th major key for describing table describe the 4th major key for describing table in table with each target the 4th and matched, determine the mesh It marks the corresponding matching target the 4th of the second mapping table and describes table, determine that the matching target the 4th describes table and current goal Third describes table and matches, and the matching target the 4th is described the corresponding source field of table as with current goal third and is described The source field that the corresponding current goal field of table matches.
Further, further include:
Establish the target value of aiming field and at least one mapping table for carrying out source value of source field, the mapping table packet It includes:The major key of mapping table, target value carry out source value;
Second mapping table further includes:The major key of mapping table, corresponding types, the corresponding types include:Directly Corresponding, mapping;
The S4, including:
The corresponding aiming field of table described for the object table to be processed corresponding each target third, acquisition with it is current The source field that aiming field matches it is to be processed come source value, when the corresponding types in second mapping table of target are Directly to it is corresponding when using it is described it is to be processed come source value be used as the target value of current goal field, when the target second correspondence When corresponding types in relation table are mapping, determine that target maps according to the major key of the mapping table in second mapping table Table, using described in the target mapping table it is to be processed come the corresponding target value of source value as the target value of current goal field.
On the other hand, the present invention provides a kind of devices of the access of heterogeneous system, including:
First determination unit, for determining the corresponding source table to be processed of object table to be processed;
Second determination unit, for determining the aiming field of the object table to be processed and coming for the source table to be processed Source field;
Third determination unit, for being directed to each aiming field of the object table to be processed, determining and current goal word The source field that section matches;
Access unit, for being directed to each aiming field of the object table to be processed, acquisition and current goal field phase Matched source field carrys out source value, by it is described come source value be converted into the target value of current goal field.
Further, which further includes:
First establishing unit establishes the first description of the table information for saving current goal table for being directed to each object table Table, described first describe include in table:First describes the table name of the major key of table, current goal table;
Second establishes unit, for being directed to each source table, establishes the second description of the table information for saving current source table Table, described second describe include in table:Second describes the table name of the major key of table, current source table;
Third establishes unit, for establishing at least one first mapping table of object table Yu source table, described first Include in mapping table:First describes the major key of table, and second describes the major key of table;
First determination unit, is specifically used for:
Obtain the table name of the object table to be processed;
The table name that the table name of the object table to be processed describes the object table in table with each first is matched, is determined The corresponding target first of the object table to be processed describes table;
The target first is described into the first major key for describing table in table and first in each first mapping table The major key of description table is matched, and determines that the target first describes corresponding the first mapping table of target of table;
By second in first mapping table of target describe the major key of table describe with each second in table second The major key of description table is matched, and determines that target second describes table;
The table name that the source table in table is described according to the target second determines that the object table to be processed is corresponding described Source table to be processed.
Further, which further includes:
4th establishes unit, for being directed to each aiming field of object table, establishes the field for saving current goal field The third of information describes table, and the third describes in table, including:Third describes the mesh where the major key of table, current goal field Mark table corresponding first describes the major key of table;
5th establishes unit, for being directed to each source field of source table, establishes the field for saving current source field The 4th of information describes table, and the described 4th describes in table, including:4th describes to come where the major key of table, current source field Source table corresponding second describes the major key of table;
Second determination unit, is specifically used for:
By the corresponding target first of the object table to be processed describe in table first describe table major key and each third The first major key for describing table in description table is matched, and determines the corresponding each target third description of the object table to be processed The each target third determined is described the corresponding aiming field of table as the aiming field of the object table to be processed by table;
The corresponding target second of the source table to be processed is described to the second major key and each 4th for describing table in table The second major key for describing table in description table is matched, and determines that the corresponding each target the 4th of the source table to be processed describes Table, using each target the 4th determined describe the corresponding source field of table as the source table to be processed it is corresponding come source word Section.
Further, which further includes:
6th establishes unit, described for establishing at least one second mapping table of aiming field and source field Include in second mapping table:Third describes the major key of table, and the 4th describes the major key of table;
The third determination unit, is specifically used for:
The corresponding aiming field of table is described for the object table to be processed corresponding each target third, by current goal Third describe the third in table describe table major key and each second mapping table in third describe table major key carry out Match, determines that current goal third describes corresponding the second mapping table of target of table, it will be in second mapping table of target The 4th major key for describing table describe the 4th major key for describing table in table with each target the 4th and matched, determine the mesh It marks the corresponding matching target the 4th of the second mapping table and describes table, determine that the matching target the 4th describes table and current goal Third describes table and matches, and the matching target the 4th is described the corresponding source field of table as with current goal third and is described The source field that the corresponding current goal field of table matches.
Further, which further includes:
7th establishes unit, for establishing the target value of aiming field and at least one mapping for carrying out source value of source field Table, the mapping table include:The major key of mapping table, target value carry out source value;
Second mapping table further includes:The major key of mapping table, corresponding types, the corresponding types include:Directly Corresponding, mapping;
The access unit, is specifically used for:
The corresponding aiming field of table described for the object table to be processed corresponding each target third, acquisition with it is current The source field that aiming field matches it is to be processed come source value, when the corresponding types in second mapping table of target are Directly to it is corresponding when using it is described it is to be processed come source value be used as the target value of current goal field, when the target second correspondence When corresponding types in relation table are mapping, determine that target maps according to the major key of the mapping table in second mapping table Table, using described in the target mapping table it is to be processed come the corresponding target value of source value as the target value of current goal field.
The present invention provides a kind of method and device of the access of heterogeneous system, determine that object table to be processed is corresponding wait locate Source table is managed, the corresponding source field of each aiming field is determined, the source value of coming of source field is converted into target value, is passed through This method, the data for realizing that object table needs can be acquired directly from the table of source, carried out without reacquiring initial data Processing, improves the efficiency of data processing.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.
Fig. 1 is a kind of flow chart of the method for the access for heterogeneous system that one embodiment of the invention provides;
Fig. 2 is the flow chart of the method for the access for another heterogeneous system that one embodiment of the invention provides;
Fig. 3 is a kind of schematic device of the access for heterogeneous system that one embodiment of the invention provides;
Fig. 4 is the schematic device of the access for another heterogeneous system that one embodiment of the invention provides.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
As shown in Figure 1, the embodiment of the invention provides a kind of method of the access of heterogeneous system, this method may include with Lower step:
S1:Determine the corresponding source table to be processed of object table to be processed;
S2:Determine the aiming field of the object table to be processed and the source field of the source table to be processed;
S3:For each aiming field of the object table to be processed, the determining source to match with current goal field Field;
S4:The source to match for each aiming field of the object table to be processed, acquisition with current goal field Field carrys out source value, by it is described come source value be converted into the target value of current goal field.
The embodiment of the invention provides a kind of method of the access of heterogeneous system, determine that object table to be processed is corresponding wait locate Source table is managed, the corresponding source field of each aiming field is determined, the source value of coming of source field is converted into target value, is passed through This method, the data for realizing that object table needs can be acquired directly from the table of source, carried out without reacquiring initial data Processing, improves the efficiency of data processing.
In one possible implementation, before the S1, further include:
For each object table, establish the table information for saving current goal table first describes table, and described first describes table In include:First describes the table name of the major key of table, current goal table;
For each source table, establish the table information for saving current source table second describes table, and described second describes table In include:Second describes the table name of the major key of table, current source table;
At least one first mapping table of object table Yu source table is established, includes in first mapping table: First describes the major key of table, and second describes the major key of table;
The S1, including:
Obtain the table name of the object table to be processed;
The table name that the table name of the object table to be processed describes the object table in table with each first is matched, is determined The corresponding target first of the object table to be processed describes table;
The target first is described into the first major key for describing table in table and first in each first mapping table The major key of description table is matched, and determines that the target first describes corresponding the first mapping table of target of table;
By second in first mapping table of target describe the major key of table describe with each second in table second The major key of description table is matched, and determines that target second describes table;
The table name that the source table in table is described according to the target second determines that the object table to be processed is corresponding described Source table to be processed.
In this implementation, corresponding first can be established for each object table and describe table, establish for each source table Corresponding second describes table.Establish corresponding first mapping table for each object table, object table may can with it is more A source table is corresponding, and therefore, an object table may have multiple first mapping tables.
Specifically, it first describes table and can be realized by way of table 1:
Table 1
Second describes table can be realized by way of table 2:
Table 2
It describes table furthermore it is possible to describe table and second for first by way of table 3 and realizes:
Table 3
Wherein, when type is 0, which describes table for first, and GUID therein is the first major key for describing table, entitled The title of object table;When type is 1, which describes table for second, and GUID therein is the second major key for describing table, entitled The title of source table.
In addition, the source database where target database and source table to be processed where object table to be processed can lead to DBlink is crossed to be connected to.The information can also be arranged in table 3, and when table 3 describes table for first, which must be filled out, when When table 3 describes table for second, which is sky.
First mapping table can be realized by way of table 4:
Table 4
As shown in table 4, can also include in the first mapping table:The major key of first mapping table, the first corresponding pass It is the information such as number, the title of the first mapping table of table.
In one possible implementation, before the S2, further include:
For each aiming field of object table, the third for establishing the field information of preservation current goal field describes table, The third describes in table, including:Object table corresponding first where third describes the major key of table, current goal field describes The major key of table;
For each source field of source table, establish the field information for saving current source field the 4th describes table, Described 4th describes in table, including:4th the major key of table, current source field are described where source table it is corresponding second description The major key of table;
The S2 includes:
By the corresponding target first of the object table to be processed describe in table first describe table major key and each third The first major key for describing table in description table is matched, and determines the corresponding each target third description of the object table to be processed The each target third determined is described the corresponding aiming field of table as the aiming field of the object table to be processed by table;
The corresponding target second of the source table to be processed is described to the second major key and each 4th for describing table in table The second major key for describing table in description table is matched, and determines that the corresponding each target the 4th of the source table to be processed describes Table, using each target the 4th determined describe the corresponding source field of table as the source table to be processed it is corresponding come source word Section.
Third describes table and the 4th and describes table and can be realized by way of table 5:
Table 5
Title Field Data type Remarks
GUID GUID VARchar(36) Major key
ID ID VARchar(100) Major key
Column name FieldName VARchar(100)
Description Describe VARchar(200)
Field type FieldType char(2)
Field length FieldLength VARchar(10)
As shown in table 5, third describes table and the 4th and describes to may each comprise column name, field type, field length etc. in table Information.
When table 5 is that third describes table, the GUID in table 5 is the major key that third describes table, and ID is the first master for describing table Key arranges the title of entitled aiming field, and field type is the type of aiming field, and field length is the length of aiming field;When When table 5 describes table for the 4th, the GUID in table 5 is the 4th major key for describing table, and ID is the second major key for describing table, is arranged entitled next The title of source field, field type are the type of source field, and field length is the length of source field.
In one possible implementation, before the S3, further include:
At least one second mapping table of aiming field and source field is established, is wrapped in second mapping table It includes:Third describes the major key of table, and the 4th describes the major key of table;
The S3 includes:
The corresponding aiming field of table is described for the object table to be processed corresponding each target third, by current goal Third describe the third in table describe table major key and each second mapping table in third describe table major key carry out Match, determines that current goal third describes corresponding the second mapping table of target of table, it will be in second mapping table of target The 4th major key for describing table describe the 4th major key for describing table in table with each target the 4th and matched, determine the mesh It marks the corresponding matching target the 4th of the second mapping table and describes table, determine that the matching target the 4th describes table and current goal Third describes table and matches, and the matching target the 4th is described the corresponding source field of table as with current goal third and is described The source field that the corresponding current goal field of table matches.
In this implementation, aiming field can be corresponding with multiple source fields, therefore, an aiming field Multiple second mapping tables can be corresponded to.Third in corresponding second mapping table of same aiming field describes table Major key is identical, and the 4th describes the major key difference of table.
In this implementation, the second mapping table can be realized by way of table 6:
Table 6
In one possible implementation, this method further includes:
Establish the target value of aiming field and at least one mapping table for carrying out source value of source field, the mapping table packet It includes:The major key of mapping table, target value carry out source value;
Second mapping table further includes:The major key of mapping table, corresponding types, the corresponding types include:Directly Corresponding, mapping;
The S4, including:
The corresponding aiming field of table described for the object table to be processed corresponding each target third, acquisition with it is current The source field that aiming field matches it is to be processed come source value, when the corresponding types in second mapping table of target are Directly to it is corresponding when using it is described it is to be processed come source value be used as the target value of current goal field, when the target second correspondence When corresponding types in relation table are mapping, determine that target maps according to the major key of the mapping table in second mapping table Table, using described in the target mapping table it is to be processed come the corresponding target value of source value as the target value of current goal field.
In this implementation, due in a source field value may there are many, that is to say, that one is carried out source word Coming there are many source value possibility for section, can be arranged multiple mapping tables for a source field, can also set in a mapping table Set source field it is a variety of it is possible come source value respectively with the corresponding relationship of target value.
In this implementation, the second mapping table can be realized by way of table 7:
Table 7
As shown in table 7, second mapping table can also include:The information such as the major key of the first mapping table.When The value of corresponding types is 0, indicates that corresponding types are directly to correspond to, and when the value of corresponding types is 1, expression corresponding types are mapping.
Additionally, it is possible in this case can pass through there are not having to criticize aiming field in source field to carry out source value One fixed constant carrys out source value substitute source field.In the second mapping table, further include:Constant, corresponding types It further include constant type.When corresponding types are constant type, using the constant in the second mapping table as current goal word The target value of section.
In this implementation, mapping table can be realized by way of table 8:
Table 8
Title Field Data type Remarks
GUID GUID VARchar(36) The major key of mapping table
Target value TVALUE VARchar(100)
Carry out source value SVALUE VARchar(100)
In addition, in one possible implementation, this method can also include:Establish at least one intermediate mapping relations Table, intermediate mapping table include:Third describes the major key of table, and the 4th describes the major key of table, the major key of intermediate mapping table. Second mapping table further includes:The major key of intermediate mapping table, corresponding types, the corresponding types include:Directly Corresponding, mapping.The mapping table includes:The major key of intermediate mapping table, target value carry out source value;
The S4, including:When the corresponding types in second mapping table of target are mapping, according to described second The major key of intermediate mapping table in mapping table determines mapping table among target, according to mapping relations among target The major key of intermediate mapping table in table determines target mapping table, by described in the target mapping table it is to be processed come source value pair Target value of the target value answered as current goal field.
In this implementation, intermediate mapping table can be realized by way of table 9:
Table 9
As shown in table 9, can also include in intermediate mapping table:The major key of first mapping table.
In addition, in one possible implementation, in the S4, the acquisition comes with what current goal field matched Source field carrys out source value, including:
According to determine the corresponding source table to be processed of the object table to be processed and determine and current goal The source field that field matches generates access SQL statement, is acquired by the access SQL statement described come source value.
In one possible implementation, after the S4, further include:The target value of each aiming field is filled Into the corresponding aiming field of the object table to be processed.
To make the object, technical solutions and advantages of the present invention clearer, with reference to the accompanying drawing and specific embodiment to this Invention is described in further detail.
The embodiment of the present invention needs to collect the data in operation system A in operation system B, so that two heterogeneous systems Between be able to carry out data interaction, the data in operation system A are stored in source database, and the data in operation system B are deposited Storage is in target database.Source database is connected with target database by DBlink.Object table is stored in target database In, source table is stored in source database.
As shown in Fig. 2, the embodiment of the invention provides a kind of method of the access of heterogeneous system, this method may include with Lower step:
Step 201:For each object table, establish the table information for saving current goal table first describes table, for every A source table, establish the table information for saving current source table second describe table, establish object table and source table at least one First mapping table, wherein include in first mapping table:First describes the major key of table, and second describes the master of table Key, described first describe include in table:First describes the table name of the major key of table, current goal table, and described second describes to wrap in table It includes:Second describes the table name of the major key of table, current source table.
Step 202:For each aiming field of object table, the third for saving the field information of current goal field is established Table is described, for each source field of source table, establish the field information for saving current source field the 4th describes table, In, the third describes in table, including:Third describes the object table corresponding first where the major key of table, current goal field The major key of table is described, the described 4th describes in table, including:4th describes the source table where the major key of table, current source field Corresponding second describes the major key of table.
Step 203:Establish at least one second mapping table of aiming field and source field, wherein described second Include in mapping table:Third describes the major key of table, and the 4th describes the major key of table, and the major key of mapping table, corresponding types are described Corresponding types include:Directly corresponding, mapping.
Step 204:The target value of aiming field and at least one mapping table for carrying out source value of source field are established, it is described to reflect Firing table includes:The major key of mapping table, target value carry out source value.
Step 205:The table name for obtaining the object table to be processed, by the table name of the object table to be processed and each first The table name of object table in description table is matched, and determines that the corresponding target first of the object table to be processed describes table, by institute It states target first and describes the major key that the first major key for describing table in table describes table with first in each first mapping table It is matched, determines that the target first describes corresponding the first mapping table of target of table, by the corresponding pass of the target first It is that the second major key for describing table that the second major key for describing table in table is described with each second in table is matched, determines target Second describes table, and the table name of the source table in table is described according to the target second, determines that the object table to be processed is corresponding The source table to be processed.
Step 206:By the corresponding target first of the object table to be processed describe in table first describe the major key of table with Each third describes the first major key for describing table in table and is matched, and determines the corresponding each target of the object table to be processed Third describes table, and each target third determined is described the corresponding aiming field of table as the mesh of the object table to be processed The corresponding target second of the source table to be processed is described second in table and describes the major key of table and each 4th and retouch by marking-up section The second major key for describing table stated in table is matched, and determines that the corresponding each target the 4th of the source table to be processed describes Table, using each target the 4th determined describe the corresponding source field of table as the source table to be processed it is corresponding come source word Section.
Step 207:The corresponding aiming field of table is described for the object table to be processed corresponding each target third, it will Current goal third describes that the third in table describes the major key of table and the third in each second mapping table describes the master of table Key is matched, and determines that current goal third describes corresponding the second mapping table of target of table, and the target second is corresponding The 4th in the relation table major key for describing table describes the 4th major key for describing table in table with each target the 4th and is matched, really The corresponding matching target the 4th of fixed second mapping table of target describes table, determine the matching target the 4th describe table and Current goal third describes table and matches, using the matching target the 4th describe the corresponding source field of table as with current goal Third describes the source field that the corresponding current goal field of table matches.
Step 208:The corresponding aiming field of table is described for the corresponding each target third of the object table to be processed, is adopted The source field that collection matches with current goal field it is to be processed come source value, pair in second mapping table of target Answer type be directly to it is corresponding when using it is described it is to be processed come source value as the target value of current goal field, when the target When corresponding types in second mapping table are mapping, determined according to the major key of the mapping table in second mapping table Target mapping table, using described in the target mapping table it is to be processed come the corresponding target value of source value as the mesh of current goal field Scale value.
A kind of method of the access of the heterogeneous system provided through the embodiment of the present invention, broken different operation systems it Between information island improve the efficiency of data processing so that can be realized data interaction between heterogeneous system, improve data Utilization rate.
As shown in Figure 3, Figure 4, the embodiment of the invention provides a kind of devices of the access of heterogeneous system.Installation practice can Can also be realized by way of hardware or software and hardware combining by software realization.For hardware view, such as Fig. 3 institute Show, is a kind of hardware structure diagram of equipment where a kind of device of access of heterogeneous system provided in an embodiment of the present invention, in addition to Except processor shown in Fig. 3, memory, network interface and nonvolatile memory, the equipment in embodiment where device is logical It often can also include other hardware, such as be responsible for the forwarding chip of processing message.Taking software implementation as an example, as shown in figure 4, making It is by the CPU of equipment where it by computer journey corresponding in nonvolatile memory for the device on a logical meaning Sequence instruction is read into memory what operation was formed.A kind of device of the access of heterogeneous system provided in this embodiment, including:
First determination unit 401, for determining the corresponding source table to be processed of object table to be processed;
Second determination unit 402, for determine the object table to be processed aiming field and the source table to be processed Source field;
Third determination unit 403, for being directed to each aiming field of the object table to be processed, determining and current goal The source field that field matches;
Unit 404 of fetching acquires and current goal field for being directed to each aiming field of the object table to be processed The source field to match carrys out source value, by it is described come source value be converted into the target value of current goal field.
In one possible implementation, which further includes:
First establishing unit establishes the first description of the table information for saving current goal table for being directed to each object table Table, described first describe include in table:First describes the table name of the major key of table, current goal table;
Second establishes unit, for being directed to each source table, establishes the second description of the table information for saving current source table Table, described second describe include in table:Second describes the table name of the major key of table, current source table;
Third establishes unit, for establishing at least one first mapping table of object table Yu source table, described first Include in mapping table:First describes the major key of table, and second describes the major key of table;
First determination unit 401, is specifically used for:
Obtain the table name of the object table to be processed;
The table name that the table name of the object table to be processed describes the object table in table with each first is matched, is determined The corresponding target first of the object table to be processed describes table;
The target first is described into the first major key for describing table in table and first in each first mapping table The major key of description table is matched, and determines that the target first describes corresponding the first mapping table of target of table;
By second in first mapping table of target describe the major key of table describe with each second in table second The major key of description table is matched, and determines that target second describes table;
The table name that the source table in table is described according to the target second determines that the object table to be processed is corresponding described Source table to be processed.
In one possible implementation, which further includes:
4th establishes unit, for being directed to each aiming field of object table, establishes the field for saving current goal field The third of information describes table, and the third describes in table, including:Third describes the mesh where the major key of table, current goal field Mark table corresponding first describes the major key of table;
5th establishes unit, for being directed to each source field of source table, establishes the field for saving current source field The 4th of information describes table, and the described 4th describes in table, including:4th describes to come where the major key of table, current source field Source table corresponding second describes the major key of table;
Second determination unit 402, is specifically used for:
By the corresponding target first of the object table to be processed describe in table first describe table major key and each third The first major key for describing table in description table is matched, and determines the corresponding each target third description of the object table to be processed The each target third determined is described the corresponding aiming field of table as the aiming field of the object table to be processed by table;
The corresponding target second of the source table to be processed is described to the second major key and each 4th for describing table in table The second major key for describing table in description table is matched, and determines that the corresponding each target the 4th of the source table to be processed describes Table, using each target the 4th determined describe the corresponding source field of table as the source table to be processed it is corresponding come source word Section.
In one possible implementation, which further includes:
6th establishes unit, described for establishing at least one second mapping table of aiming field and source field Include in second mapping table:Third describes the major key of table, and the 4th describes the major key of table;
The third determination unit 403, is specifically used for:
The corresponding aiming field of table is described for the object table to be processed corresponding each target third, by current goal Third describe the third in table describe table major key and each second mapping table in third describe table major key carry out Match, determines that current goal third describes corresponding the second mapping table of target of table, it will be in second mapping table of target The 4th major key for describing table describe the 4th major key for describing table in table with each target the 4th and matched, determine the mesh It marks the corresponding matching target the 4th of the second mapping table and describes table, determine that the matching target the 4th describes table and current goal Third describes table and matches, and the matching target the 4th is described the corresponding source field of table as with current goal third and is described The source field that the corresponding current goal field of table matches.
In one possible implementation, which further includes:
7th establishes unit, for establishing the target value of aiming field and at least one mapping for carrying out source value of source field Table, the mapping table include:The major key of mapping table, target value carry out source value;
Second mapping table further includes:The major key of mapping table, corresponding types, the corresponding types include:Directly Corresponding, mapping;
The access unit 404, is specifically used for:
The corresponding aiming field of table described for the object table to be processed corresponding each target third, acquisition with it is current The source field that aiming field matches it is to be processed come source value, when the corresponding types in second mapping table of target are Directly to it is corresponding when using it is described it is to be processed come source value be used as the target value of current goal field, when the target second correspondence When corresponding types in relation table are mapping, determine that target maps according to the major key of the mapping table in second mapping table Table, using described in the target mapping table it is to be processed come the corresponding target value of source value as the target value of current goal field.
The contents such as the information exchange between each unit, implementation procedure in above-mentioned apparatus, due to implementing with the method for the present invention Example is based on same design, and for details, please refer to the description in the embodiment of the method for the present invention, and details are not described herein again.
A kind of method and device of the access of heterogeneous system provided in an embodiment of the present invention, has the advantages that:
1, the embodiment of the invention provides a kind of method and devices of the access of heterogeneous system, determine object table pair to be processed The source table to be processed answered, determines the corresponding source field of each aiming field, and the source value of coming of source field is converted to mesh Scale value, in this way, the data for realizing that object table needs can be acquired directly from the table of source, without reacquiring original number According to being handled, the efficiency of data processing is improved.
2, a kind of method and device of the access of the heterogeneous system provided through the embodiment of the present invention has broken different industry Information island between business system improves the efficiency of data processing, mentions so that can be realized data interaction between heterogeneous system The high utilization rate of data.
It should be noted that, in this document, such as first and second etc relational terms are used merely to an entity Or operation is distinguished with another entity or operation, is existed without necessarily requiring or implying between these entities or operation Any actual relationship or order.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non- It is exclusive to include, so that the process, method, article or equipment for including a series of elements not only includes those elements, It but also including other elements that are not explicitly listed, or further include solid by this process, method, article or equipment Some elements.In the absence of more restrictions, the element limited by sentence " including a 〃 〃 〃 〃 〃 〃 ", it is not excluded that wrapping Include in the process, method, article or equipment of the element that there is also other identical factors.
Those of ordinary skill in the art will appreciate that:Realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, the program When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes:ROM, RAM, magnetic disk or light In the various media that can store program code such as disk.
Finally, it should be noted that:The foregoing is merely presently preferred embodiments of the present invention, is merely to illustrate skill of the invention Art scheme, is not intended to limit the scope of the present invention.Any modification for being made all within the spirits and principles of the present invention, Equivalent replacement, improvement etc., are included within the scope of protection of the present invention.

Claims (8)

1. a kind of method of the access of heterogeneous system, which is characterized in that including:
S1:Determine the corresponding source table to be processed of object table to be processed;
S2:Determine the aiming field of the object table to be processed and the source field of the source table to be processed;
S3:For each aiming field of the object table to be processed, the determining source field to match with current goal field;
S4:The source field to match for each aiming field of the object table to be processed, acquisition with current goal field Carry out source value, by it is described come source value be converted into the target value of current goal field;
Before the S1, further include:
For each object table, establish the table information for saving current goal table first describes table, and described first describes to wrap in table It includes:First describes the table name of the major key of table, current goal table;
For each source table, establish the table information for saving current source table second describes table, and described second describes to wrap in table It includes:Second describes the table name of the major key of table, current source table;
At least one first mapping table of object table Yu source table is established, includes in first mapping table:First The major key of table is described, second describes the major key of table;
The S1, including:
Obtain the table name of the object table to be processed;
The table name that the table name of the object table to be processed describes the object table in table with each first is matched, described in determination The corresponding target first of object table to be processed describes table;
The target first is described into the first major key for describing table in table and the first description in each first mapping table The major key of table is matched, and determines that the target first describes corresponding the first mapping table of target of table;
Second in first mapping table of target is described into the major key of table and describes with each second the second description in table The major key of table is matched, and determines that target second describes table;
The table name that the source table in table is described according to the target second determines that the object table to be processed is corresponding described wait locate Manage source table.
2. the method according to claim 1, wherein further including before the S2:
For each aiming field of object table, the third for establishing the field information of preservation current goal field describes table, described Third describes in table, including:Object table corresponding first where third describes the major key of table, current goal field describes table Major key;
For each source field of source table, establish the field information for saving current source field the 4th describes table, described 4th describes in table, including:4th the major key of table, current source field are described where source table corresponding second table is described Major key;
The S2 includes:
The corresponding target first of the object table to be processed is described first in table and describes the major key of table and each third describes The first major key for describing table in table is matched, and determines that the corresponding each target third of the object table to be processed describes table, The each target third determined is described into the corresponding aiming field of table as the aiming field of the object table to be processed;
By the corresponding target second of the source table to be processed describe in table second describe table major key and each 4th description The second major key for describing table in table is matched, and determines that the corresponding each target the 4th of the source table to be processed describes table, The each target the 4th determined is described into the corresponding source field of table as the corresponding source field of the source table to be processed.
3. according to the method described in claim 2, it is characterized in that, further including before the S3:
At least one second mapping table of aiming field and source field is established, includes in second mapping table: Third describes the major key of table, and the 4th describes the major key of table;
The S3 includes:
The corresponding aiming field of table is described for the object table to be processed corresponding each target third, by current goal third The major key that third in description table describes table is matched with the major key that the third in each second mapping table describes table, really Determine current goal third and describe corresponding the second mapping table of target of table, by the 4th in second mapping table of target The major key of description table describes the 4th major key for describing table in table with each target the 4th and is matched, and determines the target second The corresponding matching target the 4th of mapping table describes table, determines that the matching target the 4th describes table and retouches with current goal third It states table to match, it is corresponding as table is described with current goal third that the matching target the 4th is described the corresponding source field of table The source field that matches of current goal field.
4. according to the method described in claim 3, it is characterized in that, further including:
The target value of aiming field and at least one mapping table for carrying out source value of source field are established, the mapping table includes:It reflects The major key of firing table, target value carry out source value;
Second mapping table further includes:The major key of mapping table, corresponding types, the corresponding types include:It is directly right It answers, map;
The S4, including:
The corresponding aiming field of table, acquisition and current goal are described for the object table to be processed corresponding each target third The source field that field matches it is to be processed come source value, when the corresponding types in second mapping table of target are direct To it is corresponding when using it is described it is to be processed come source value as the target value of current goal field, when second corresponding relationship of target When corresponding types in table are mapping, target mapping table is determined according to the major key of the mapping table in second mapping table, Using described in the target mapping table it is to be processed come the corresponding target value of source value as the target value of current goal field.
5. a kind of device of the access of heterogeneous system, which is characterized in that including:
First determination unit, for determining the corresponding source table to be processed of object table to be processed;
Second determination unit, aiming field and the source table to be processed for determining the object table to be processed carry out source word Section;
Third determination unit, for being directed to each aiming field of the object table to be processed, determination and current goal field phase Matched source field;
Unit of fetching acquires and matches with current goal field for being directed to each aiming field of the object table to be processed Source field carry out source value, by it is described come source value be converted into the target value of current goal field;
Further include:
First establishing unit, for being directed to each object table, establish the table information for saving current goal table first describes table, institute It states first and describes and include in table:First describes the table name of the major key of table, current goal table;
Second establishes unit, and for being directed to each source table, establish the table information for saving current source table second describes table, institute It states second and describes and include in table:Second describes the table name of the major key of table, current source table;
Third establishes unit, and for establishing at least one first mapping table of object table Yu source table, described first is corresponding Include in relation table:First describes the major key of table, and second describes the major key of table;
First determination unit, is specifically used for:
Obtain the table name of the object table to be processed;
The table name that the table name of the object table to be processed describes the object table in table with each first is matched, described in determination The corresponding target first of object table to be processed describes table;
The target first is described into the first major key for describing table in table and the first description in each first mapping table The major key of table is matched, and determines that the target first describes corresponding the first mapping table of target of table;
Second in first mapping table of target is described into the major key of table and describes with each second the second description in table The major key of table is matched, and determines that target second describes table;
The table name that the source table in table is described according to the target second determines that the object table to be processed is corresponding described wait locate Manage source table.
6. device according to claim 5, which is characterized in that further include:
4th establishes unit, for being directed to each aiming field of object table, establishes the field information for saving current goal field Third table is described, the third describes in table, including:Third describes the object table where the major key of table, current goal field Corresponding first describes the major key of table;
5th establishes unit, for being directed to each source field of source table, establishes the field information for saving current source field The 4th table is described, the described 4th describes in table, including:4th describes the source table where the major key of table, current source field Corresponding second describes the major key of table;
Second determination unit, is specifically used for:
The corresponding target first of the object table to be processed is described first in table and describes the major key of table and each third describes The first major key for describing table in table is matched, and determines that the corresponding each target third of the object table to be processed describes table, The each target third determined is described into the corresponding aiming field of table as the aiming field of the object table to be processed;
By the corresponding target second of the source table to be processed describe in table second describe table major key and each 4th description The second major key for describing table in table is matched, and determines that the corresponding each target the 4th of the source table to be processed describes table, The each target the 4th determined is described into the corresponding source field of table as the corresponding source field of the source table to be processed.
7. device according to claim 6, which is characterized in that further include:
6th establishes unit, for establishing at least one second mapping table of aiming field and source field, described second Include in mapping table:Third describes the major key of table, and the 4th describes the major key of table;
The third determination unit, is specifically used for:
The corresponding aiming field of table is described for the object table to be processed corresponding each target third, by current goal third The major key that third in description table describes table is matched with the major key that the third in each second mapping table describes table, really Determine current goal third and describe corresponding the second mapping table of target of table, by the 4th in second mapping table of target The major key of description table describes the 4th major key for describing table in table with each target the 4th and is matched, and determines the target second The corresponding matching target the 4th of mapping table describes table, determines that the matching target the 4th describes table and retouches with current goal third It states table to match, it is corresponding as table is described with current goal third that the matching target the 4th is described the corresponding source field of table The source field that matches of current goal field.
8. device according to claim 7, which is characterized in that further include:
7th establishes unit, for establishing the target value of aiming field and at least one mapping table for carrying out source value of source field, The mapping table includes:The major key of mapping table, target value carry out source value;
Second mapping table further includes:The major key of mapping table, corresponding types, the corresponding types include:It is directly right It answers, map;
The access unit, is specifically used for:
The corresponding aiming field of table, acquisition and current goal are described for the object table to be processed corresponding each target third The source field that field matches it is to be processed come source value, when the corresponding types in second mapping table of target are direct To it is corresponding when using it is described it is to be processed come source value as the target value of current goal field, when second corresponding relationship of target When corresponding types in table are mapping, target mapping table is determined according to the major key of the mapping table in second mapping table, Using described in the target mapping table it is to be processed come the corresponding target value of source value as the target 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 CN105550220A (en) 2016-05-04
CN105550220B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106991196B (en) * 2017-05-02 2020-05-05 浪潮通用软件有限公司 Universal data tracing method and 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

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 南京财经大学 Data presentation method of heterogeneous data exchange 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 南京财经大学 Data presentation method of heterogeneous data exchange 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

Also Published As

Publication number Publication date
CN105550220A (en) 2016-05-04

Similar Documents

Publication Publication Date Title
CN104408159B (en) A kind of data correlation, loading, querying method and device
CN110471923B (en) Processing method and device for blockchain transaction records
CN105550220B (en) A kind of method and device of the access of heterogeneous system
CN109885614B (en) Data synchronization method and device
CN107015985A (en) A kind of data storage and acquisition methods and device
CN110413611A (en) Data storage, querying method and device
KR20170123336A (en) File manipulation method and apparatus
CN109766337B (en) Tree structure data storage method, electronic device, storage medium and system
CN104423982B (en) The processing method and processing equipment of request
US20130159347A1 (en) Automatic and dynamic design of cache groups
CN105095518A (en) Data conversion method and device
CN105447030A (en) Index processing method and equipment
CN108399175A (en) A kind of storage of data, querying method and its device
CN109656986A (en) A kind of householder method that business datum summarizes, device and electronic equipment
JP2017532658A (en) Method for efficient one-to-one coupling
CN110580255A (en) method and system for storing and retrieving data
CN111680472A (en) Table data processing method and device, computer equipment and readable storage medium
CN104424240A (en) Multi-table correlation method and system, main service node and computing node
CN112860412B (en) Service data processing method and device, electronic equipment and storage medium
CN117093619A (en) Rule engine processing method and device, electronic equipment and storage medium
CN104408183B (en) The data lead-in method and device of data system
CN111125088B (en) Multi-level data processing method and device
CN108228606A (en) The wiring method and device of data
CN105677645A (en) Data sheet comparison method and device
US11467973B1 (en) Fine-grained access memory controller

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