CN101196927A - Data mapping method and device thereof - Google Patents

Data mapping method and device thereof Download PDF

Info

Publication number
CN101196927A
CN101196927A CNA2007103083947A CN200710308394A CN101196927A CN 101196927 A CN101196927 A CN 101196927A CN A2007103083947 A CNA2007103083947 A CN A2007103083947A CN 200710308394 A CN200710308394 A CN 200710308394A CN 101196927 A CN101196927 A CN 101196927A
Authority
CN
China
Prior art keywords
data
target data
source
name
array
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.)
Pending
Application number
CNA2007103083947A
Other languages
Chinese (zh)
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CNA2007103083947A priority Critical patent/CN101196927A/en
Publication of CN101196927A publication Critical patent/CN101196927A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a data mapping method, which comprises converting source data to structures of target data; reading and executing mapping expression of the source data; if the value of the expression comprises array data, extracting and storing the array data in the target data according to corresponding array names; if the value of the expression comprises structured data, extracting and storing the structured data in the target data according to corresponding structure names; if the value of the expression comprises field data, establishing field and assigning value according to preset definition and storing the field in the target data. The invention can realize whole mapping of data and support mapping processing of data which describe complex conversion logic.

Description

A kind of data mapping method and a kind of data mapping unit
Technical field
The present invention relates to technical field of data processing, particularly relate to a kind of data mapping method and a kind of data mapping unit.
Background technology
Information is the valuable source of modern enterprise, is the basis of enterprise's utilization scientific management, decision analysis.At present, the operation system and the office automation system that fund that the cost of most of enterprises is a large amount of and time make up Transaction Processing OLTP are used for writing down the various related datas of issued transaction.According to statistics, per 2~3 years of data volume will be doubled and redoubled, and these data are containing huge commercial value, and common only the accounting in about 2%~4% of total amount of data that enterprise paid close attention to.Therefore, enterprise does not still utilize already present data resource substantially, to such an extent as to wasted more time and fund, loses the best opportunity of formulating the key business decision-making yet.So, how by various technological means, and data are converted to information, knowledge, become to improve the main bottleneck of its core competitiveness.Data map then is a main technological means.
Data map can describe from data source, extract data, translation data and with data load to sequence of operations such as targets, can be used for representing how data are delivered to target from data source.In the prior art, use the ETL technology to realize data map usually. particularly, ETL is the abbreviation of Extraction-Transformation-Loading, and Chinese is data pick-up, conversion and loading.ETL is responsible for source data that distribute, in the heterogeneous data source, as relation data, flat data file etc., be drawn into clean behind the interim middle layer, conversion, integrated, be loaded at last in data warehouse or the Data Mart, become the basis of on-line analytical processing, data mining.ETL is an important ring that makes up data warehouse, and the user extracts required data from data source, and is final according to the data warehouse model that pre-defines through data cleansing, with data load in data warehouse.
Yet, existing data map technology can only realize the independent mapping of source data to target data, and, can only shine upon simple data type, as character string, integer, decimal etc., thereby can not realize that complicated expression formula describes, thereby cause to support to describe the access of the data (as a.c[0] .c) of complicated conversion logic.
In a word, need the urgent technical matters that solves of those skilled in the art to be exactly at present: how can a kind of data mapping method of creationary proposition, in order to realizing the integral body mapping of data, and support to describe the data map processing of complicated conversion logic.
Summary of the invention
Technical matters to be solved by this invention provides a kind of data mapping method, shines upon in order to the integral body that realizes data, and supports the data map of describing complicated conversion logic to handle.
The present invention also provides a kind of data mapping unit, in order to guarantee said method realization and application in practice.
In order to address the above problem, the invention discloses a kind of data mapping method, comprising:
Source data is converted in the structure of target data;
Read and carry out the mapping expression formula of described source data;
If the value of described expression formula comprises array data, then extract described array data, and deposit in the target data according to the array name of correspondence;
If the value of described expression formula comprises structured data, then extract described structured data, and deposit in the target data according to the structure name of correspondence;
If the value of described expression formula comprises numeric field data, then create the territory and carry out assignment according to presetting definition, described territory is deposited in the target data.
Preferably, described method also comprises:
The specified data source.
Preferably, described source data switch process comprises:
Judge whether with the data with existing in the source data coverage goal data in the described data source, if then described source data is copied in the target data; If not, then carry out following steps:
Described target data is carried out buffer memory;
Source data in the described data source is copied in the target data;
Target data in the described buffer memory is covered described target data.
Preferably, described data have identification information, and described identification information is by domain name, or structure name and domain name, or array name, structure name and domain name are formed.
Preferably, described source data switch process also comprises:
If the identification information of described source data and target data is identical, then cover described target data with described source data.
Preferably, described source data switch process also comprises:
Described target data is added in the target data structure as ephemeral data.
Preferably, described method also comprises:
Remove the ephemeral data in the described target data structure.
Preferably, described array data and structured data have cascade establishment attribute.
Preferably, being defined in the data dictionary of described numeric field data described.
The embodiment of the invention also discloses a kind of data mapping unit, comprising:
Modular converter is used for source data is converted to the structure of target data;
Read execution module, be used to read and carry out the mapping expression formula of described source data;
The array manipulation module is used for extracting described array data when the value of described expression formula comprises array data, and deposits in the target data according to the array name of correspondence;
The structure treatment module is used for extracting described structured data when the value of described expression formula comprises structured data, and deposits in the target data according to the structure name of correspondence;
The territory processing module is used for when the value of described expression formula comprises numeric field data, creates the territory and carries out assignment according to presetting definition, and described territory is deposited in the target data.
Preferably, described device also comprises:
The data source locating module is used for the specified data source.
Preferably, described modular converter comprises:
Judge submodule, be used for judging whether data with existing, if then trigger first processing sub with in the source data coverage goal data of described data source; If not, then trigger second processing sub;
First processing sub is used for described source data is copied to target data;
Second processing sub is used to carry out following steps:
Described target data is carried out buffer memory;
Source data in the described data source is copied in the target data;
Target data in the described buffer memory is covered described target data.
Preferably, described data have identification information, and described identification information is by domain name, or structure name and domain name, or array name, structure name and domain name are formed.
Preferably, described modular converter also comprises:
The duplication of name processing sub is used for identification information in described source data and target data when identical, covers described target data with described source data.
Preferably, described modular converter also comprises:
Add submodule, be used for described target data is added into target data structure as ephemeral data.
Preferably, described device also comprises:
Remove module, be used for removing the ephemeral data of described target data structure.
Compared with prior art, the present invention has the following advantages:
At first, the present invention is by resolution data form (being divided into array, structure and territory), and create the structure of uniform data according to the identification information of corresponding data form, thereby can realize the integral body mapping of data, and can in mapping, once create the data of many levels, and, because the built-in expression formula of a large amount of realizations, support complex data, thereby can support the data map of describing complicated conversion logic to handle;
Moreover, because uniform data and other uniform data can call mutually, thereby can avoid a large amount of nested duplicating, effectively saved storage space and system resource;
In addition, the data map that realizes based on uniform data of the present invention, expression formula is configurable, thereby extendability and dirigibility are very good;
At last, the present invention is for the service provider, and technology realizes simple, and no technology barrier does not have special secret algorithm, and cost and risk is lower.
Description of drawings
Fig. 1 is the process flow diagram of a kind of data mapping method embodiment 1 of the present invention;
Fig. 2 is the process flow diagram of a kind of data mapping method embodiment 2 of the present invention;
Fig. 3 is the process flow diagram of the instantiation of a kind of data map of the present invention;
Fig. 4 is the structured flowchart of a kind of data mapping unit embodiment of the present invention.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
The present invention can be used in numerous general or special purpose computingasystem environment or the configuration.For example: personal computer, server computer, handheld device or portable set, plate equipment, multicomputer system, comprise distributed computing environment of above any system or equipment or the like.
The present invention can describe in the general context of the computer executable instructions of being carried out by computing machine, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract, program, object, assembly, data structure or the like.Also can in distributed computing environment, put into practice the present invention, in these distributed computing environment, by by communication network connected teleprocessing equipment execute the task.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
With reference to figure 1, show the process flow diagram of a kind of data mapping method embodiment 1 of the present invention, specifically can may further comprise the steps:
Step 101, source data is converted in the structure of target data;
Step 102, read and carry out the mapping expression formula of described source data;
Step 103a, if the value of described expression formula comprises array data, then extract described array data, and deposit in the target data according to the array name of correspondence;
Step 103b, if the value of described expression formula comprises structured data, then extract described structured data, and deposit in the target data according to the structure name of correspondence;
Step 103c, if the value of described expression formula comprises numeric field data, then create the territory and carry out assignment according to presetting definition, described territory is deposited in the target data.
Intermediate business system has connected multiple channel, multiple service system mostly, data are transmitted between different systems, but their data layout all is different, it is very complicated directly will to become alternately, so need in system, they all be converted to a kind of data of form, then the data of this data and extended formatting be changed respectively.This data standard can be called uniform data (CompositeData), and in this case, data map of the present invention can be for producing the process of a new uniform data from one or more uniform data.
In the present embodiment, described uniform data can be understood as target data structure, and particularly, the common type of described uniform data is an atomic data, and atomic data comprises 3 types: array, structure, territory.In practice, these three kinds of data can be used in combination, and can satisfy most demand data.Atomic data possesses unified atomic data type and property set.Atomic data has been inherited in array, structure, territory.Array, structure are container data, and no value own is used to store the data of other types.Wherein, structured data comprises title, can visit this structured data according to described title, and the data element in the structure also can and obtain by corresponding title interpolation; Array data is the data of the same type of storing in order, and array data can be visited by subscript, and the data element in the array also can add and obtains by subscript.Numeric field data comprises value and definition, and the territory is a Value Data, is used for storing value.Field type is to enumerate class, so defined the data type of the value that can store in the territory.Territory definition comprises definition information such as the data type, length in territory.Preferably, numeric field data can be supported following type: integer, decimal, character string, byte, byte arrays etc., in this case, the data of other type all can be exchanged into the data of the above-mentioned type.For example, the fundamental type of field of definition is:
STRING: character string type, length is defined by length.
IMAGE: the byte stream type, length is defined by length.
BYTE: byte type, span are-0x80-0x7F that length is 10 system figure places.
SHORT: short shaping, span is-0x8000-0x7FFF that length is 10 system figure places.
INT24:24Bit shaping, span are-0x800000-0x7FFFFF that length is 10 system figure places.
INT:32Bit shaping, span are-0x80000000-0x7FFFFFFF that length is 10 system figure places.
LONG:64Bit shaping, span are-0x8000000000000000-0x7FFFFFFFFFFFFFFF that length is 10 system figure places.
FLOAT: single precision floating datum, length are decimal place and integer-bit sum, and scale is a decimal digits.
DOUBLE: double-precision floating points, length are decimal place and integer-bit sum, and scale is a decimal digits.
In practice, numeric field data is the minimum data unit in the system handles process, and there is a title in each territory, this title generally with the professional implication of its representative to related; There is clear and definite attribute in each territory in system, comprises type, length, decimal place etc.; On business, certain attribute of certain Business Entity object is represented in the territory.
For example, being exemplified as of a uniform data:
tran1101
{
version:1.0
date:2004-01-08
traninfo
{
userid:001800
password:AAAAA
person
{
Name: Zhang San
Sex: man
address:[
Shanghai * * district * * street * * number,
Beijing * * district * * street * * number
]
}
}
attachinfo
{
len:5
data:BBBBB
}
}
As can be seen, in uniform data, each data all identifies by name, and under the nested situation of structure, name is stratified, having under the situation of array, then represents by the subscript of array.This uniform data is an array element, wherein, tran1101, traninfo, person, attachinfo are structure name, corresponding version, date, userid, password etc. are domain name, in this case, suppose to want the accurate presentation address field then can be with following coded representation: tran1101.traninfo.person.address, if represent first address, so can be by following coded representation: tran1101.traninfo.person.address[0].By this structurized method for expressing, just can embody data or a structure in the uniform data.Owing to adopted above design, thereby the present invention can satisfy the realization that circulation is read when nested, also satisfies the requirement on the performance simultaneously, takes into account function and performance.For example, can also be to tran1101.traninfo.person.address[0] carry out some complex operations, even complex operations can be transferred to the third party and realize, as long as the third party is encapsulated in operation in the static method, when mapping, needs only the static method name is disposed up.
Can draw, uniform data is the combination in territory, and comprises following two kinds of array modes: a kind of is with the synthetic structure of several territory der group; Another kind is that an array is formed in the territory that several are of the same name.Certainly, the data that are combined to form also can be participated in new combination, and promptly this array mode can be nested (being equivalent to Struct organization definition or the definition of the record of the Record in the Pascal language in the C language).
In this case, array data and structured data can be provided with cascade and create attribute, in this case, if the data of many levels in mapping, occur once creating, a.b.c[0 for example] data shown in this section of .f=1 code, then can successively create data until complete.And uniform data can be quoted another uniform data, for the external reference person, can be used as a big uniform data, this kind mode can avoid a large amount of degree of depth to duplicate, can save storage space, and the cpu resource consumption that brings when avoiding the degree of depth to duplicate.Simultaneously, uniform data has also realized the degree of depth copy function to atomic data.Need to prove, when needs duplicate certain uniform data when another uniform data, be value duplicate rather than quote duplicate.
Preferably, can describe in data dictionary for the definition of described numeric field data, described data dictionary can be that the overall situation is unique, information such as the type that data dictionary can definition of data territory correspondence, length, precision.In practice, employed all data fields can define in data dictionary in the system, that is to say, data dictionary can be defined in the data field standard that internal system is used.
For example, a kind of configuration file of data dictionary is shown in following code:
<?xml?version=″1.0″encoding=″GB2312″?>
<!--the data dictionary configuration file comprises the essential information configuration in all territories in the system.-->
<!ELEMENT?data-dict(field*)>
<!--
The definition of each domain node in the data dictionary.
The title in name territory, this title must be unique in data dictionary, and meet variable
Rule
The actual type in this territory of type
The length in this territory of length, if the decimal type, length comprises decimal place
If the type in this territory of scale is the decimal type, represent decimal digits so, to it
The territory of its type is invalid
The Chinese in this territory of cname
The description field in desc territory
The classification in class territory is represented by a character string, when being used for graphically editing
Classify
-->
<!ELEMENT?field?EMPTY>
<!ATTLIST?field
name?ID#REQUIRED
type(byte|short|int|long|string|float|double|image)
#REQUIRED
length?CDATA#REQUIRED
scale?CDATA#IMPLIED
cname?CDATA#IMPLIED
desc?CDATA#IMPLIED
class?CDATA#IMPLIED
Preferably, the present invention can represent mapping relations by a mapping expression formula, realizes mapping by the method for explaining this expression formula then.Utilize expression formula that the formula of dynamic calculation is resolved and calculated.Various types of data, operational symbol are supported, and can support function call.In expression formula, support general operational character and some intrinsic functions.Below be the expression formula content of supporting among the present invention:
1. data type
In expression formula, support polytype data type, except supporting basic data types such as character string, integer and decimal, also can support array, complex data types such as structure.
2. constant
In expression formula, can use character string constant and digital constant, character string constant need bracket with single quotation marks or double quotation marks.The numeral constant can comprise pure digi-tal as 189, the decimal 12.44 of mixed decimal point, and all numerals all are metric modes.The span of integer number is not more than ' 2147483647 ' for being not less than ' 2147483648 '.The span of decimal is identical with the double precision decimal.
3. variable
The variable that can use in expression formula is exactly the title or the another name of data field, can not define any extra variable in expression formula.
4. String Operators
'+': represent two character string additions.
5. digit manipulation accords with
'+': represent two digital additions, comprise integer and decimal.
'-': represent two digital subtractions, comprise integer and decimal.
' * ': represent two digital multiplies, comprise integer and decimal.
'/': represent two digital divides, comprise integer and decimal.
6. comparison operator
'==': equal, character string or numeral compare the character string case sensitive.
'>': greater than, character string or numeral compare the character string case sensitive.
'<': less than, character string or numeral compare the character string case sensitive.
'<=': be less than or equal to, character string or numeral compare the character string case sensitive.
'>=': more than or equal to, character string or numeral compare the character string case sensitive.
'<>': be not equal to, character string or numeral compare the character string case sensitive.
'!=': be not equal to, character string or numeral compare the character string case sensitive.
7. logical operator
‘ ﹠amp; ﹠amp; ': logical and
' || ' logical OR
'! ': logic NOT
8. array manipulation accords with
' [] ': when a data field be data field in the array of a record time (see data unpack), in expression formula, can use left and right sides bracket in the similar C language to quote element in the array, the radix of array is since 0.Radix can be constant or variable and expression formula.
9. intrinsic function
a)SUBSTR(str,start,length)
Obtain ' length ' individual character from the position of ' start ' of character string ' str ' beginning and form substring.' start ' is since 0.
b)TRIM(str)
Return the character string of all spaces of removing character string ' str ' both sides, tab, carriage return, newline.
c)LEN(str)
The length of return string ' str '.
d)UPPER(str)
Return that each character all converts uppercase character string in one ' str '.
e)LOWER(str)
Return the character string that each character in ' str ' all converts lowercase to.
f)INT2STR(intvalue)
With the integer conversion character string, return this character string.
g)STR2INT(str)
ParseInt, return this integer, make mistakes and return 0.
h)ISBITSET(long?value,int?index)
Whether the index position of test value is 1.Index is from low level, and lowest order is 0.
i)IFF(expr,truevalue,falsevalue)
Check the value of expression formula ' expr ', if the value of this expression formula is value of true, the value in the return expression ' truevalue ' then, otherwise the value in the return expression ' falsevalue '.
j)SWITCH(case1,value1,case2,value2,defaultvalue)
Expression formula case1 is true, then the value in the return expression ' value1 '; Expression formula case2 is true, then the value in the return expression ' value2 '; Other situation, the value in the return expression ' defaultvalue '
k)DBL2STR(double,length,scale)
Transfer double to character string, length is a length, and scale is a precision
With reference to figure 2, show the process flow diagram of a kind of data mapping method embodiment 2 of the present invention, specifically can may further comprise the steps:
Step 201, specified data source;
Step 202, judge whether with the data with existing in the source data coverage goal data in the described data source, if then execution in step 203; If not, execution in step 204-206 then;
Step 203, described source data is copied in the target data, if the identification information of described source data and target data is identical, then covers described target data with described source data, execution in step 207 then;
Step 204, described target data is carried out buffer memory;
Step 205, the source data in the described data source is copied in the target data,, then covers described target data with described source data if the identification information of described source data and target data is identical;
Step 206, the target data in the described buffer memory is covered described target data, execution in step 207 then;
Step 207, described target data is added in the target data structure as ephemeral data;
The mapping expression formula of described source data is read in step 208, circulation;
Step 209, the described mapping expression formula of execution;
The type of step 210, the described transition formula evaluation of judgement, if be structure, then execution in step 211; If be the territory, then execution in step 212-215; If be data, then execution in step 216;
Step 211, extract described array data, and deposit in the target data according to the array name of correspondence, execution in step 217 then;
Step 212, obtain data dictionary;
Step 213, create the territory according to the territory in described data dictionary definition;
Step 214, according to the value type definition in the described data dictionary to the territory assignment;
Step 215, described territory is deposited in the target data, execution in step 217 then;
Step 216, extract described array data, and deposit in the target data according to the array name of correspondence, execution in step 217 then;
Step 217, if circulation is carried out to be finished then to continue to carry out, otherwise finish;
Ephemeral data in step 218, the described target data structure of removing.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, do not have the part that describes in detail among certain embodiment, can be referring to the associated description of other embodiment.
For making those skilled in the art understand the present invention better, below describe in detail at the concrete data map process of using present embodiment in practice.
In practice, data map comprises source and destination as a kind of conversion of data, and the source is an expression formula, and purpose is a name variable.As: a.b.c=x+y*5, a.b.c are the purpose variable, and x+y*5 is the source expression formula.During interface conversion between the interface conversion of channel and service, service, need be configured the data mapping, for example, a kind of configuration of data map is shown in following code:
<?xml?version=″1.0″encoding=″GB2312″?>
<!--the data map definition.
Data map is used for conversion semantic between data.Each data map is made up of several map entrys, and a map entry is represented data mapping relations.Because mapping relates to contextual relation, so in the definition of mapping, do not suppose how mapping relations realize, that is to say, the mapping in the different modules can have the implication of oneself.Item data map clauses and subclauses-->
<!ELEMENT?mapping(item*)>
<!--the name list of the basic CompositeData that adopts during mapping, can use ", " to separate between a plurality of titles; The concrete implication of title can be understood the title implication with reference to each DTD or service manual by the various different regulations that realize.-->
<!ATTLIST?mapping
base?CDATA #IMPLIED>
<!--the definition of map entry.
Each map entry has a name attribute to specify the aiming field of required mapping.Content in element item is the mapping expression formula in addition.In the mapping expression formula, can comprise various constants and variable and some functions.Wherein the regulation of variable generally is a field name, and the front has a prefix, and the implication of prefix is defined by the implementor.
-->
<!ELEMENT?item(#PCDATA)>
<!--the aiming field of name mapping is described.-->
<!ATTLIST?item
name?CDATA?#REQUIRED>
In mapping, Data Source may have a plurality of, as the mapping of the 2nd service in the composite services, may need to refer to the data that input or output of the 1st service, require mapping to be distinguished with under the situation, and can have access to this class data by unique name the data field famous prime minister; In addition, in mapping, the problem that data cover mutually can occur, override the data of front as the data of back, requirement can need according to circumstances judge whether to cover.In this case, uniform data expression formula data have realized the expression formula data-interface, and it supports a plurality of Data Sources.The mapping equation left side is a name, and the right is an expression formula, by map entry the two is mapped.Mapping realizes class, and the inner List that adopts comes many map entrys of sequential storage, and order is carried out the expression formula in the map entry in the execution, the value that obtains is stored in the data of corresponding name correspondence; The Base attribute is used for select participating in mapped data, and the Overwrite attribute is used for deal with data and covers.Wherein, the base attribute is meant the source of the input of this mapping (enum) data.Value is the title of data referencing, and no base attribute then defaults to the nearest data in the session, many-valued middle using ", " separate.Overwrite attribute representative is when the data in the base attribute and present input data have duplication of name, and true is the data that can override input, and false promptly imports the data covering of the same name that data can not quoted among the base.
For example, a kind of code sample that shines upon configuration is:
<mapping>
<item?name=″INM_CHANNEL_ID″>″000100″</item>
<item?name=″INM_PROCESS_CODE″>INM_APP_TX_CODE+
INM_SUB_TX_CODE</item>
<item?name=″OPM_MSG_CODE[0]″>″″</item>
</mapping>
With reference to figure 3, show the process flow diagram of the instantiation of data map, specifically can may further comprise the steps:
Step 301, judge whether with existing data in the base attribute data designated coverage goal data, if then execution in step 302; If not, execution in step 303-305 then;
Step 302, the data among the described base are copied in the target data, as with target data duplication of name being arranged, then cover described target data, execution in step 306 then;
Described duplication of name comprises domain name, or the combination of structure name and domain name, or the duplication of name of the combination of array name, structure name and domain name.
Step 303, described target data is carried out buffer memory;
Step 304, the data among the described base are copied in the target data,, then cover described target data as duplication of name being arranged with target data;
Step 305, the target data in the described buffer memory is covered described target data, execution in step 207 then;
Step 306, described target data is added among the CompositeDataExprData as ephemeral data;
MappingItem is read in step 307, circulation, then continues next circulation if NullPointerException occurs in the process;
Step 308, judge whether characteristic attribute symbol (as @) is arranged in the mapping variable name, if having but title is illegal, then execution in step 317; If have and title legal, then execution in step 318 to 321;
Mapping expression formula among step 309, the described MappingItem of execution, if unusual, then continue next circulation;
The type of step 310, the described transition formula evaluation of judgement, if be structure, then execution in step 311; If be the territory, then execution in step 312-315; If be data, then execution in step 316;
Step 311, extract described array data, and deposit in the target data according to the array name of correspondence, execution in step 317 then;
Step 312, obtain data dictionary, then do not continue next circulation if do not exist;
Step 313, create the territory according to the territory in described data dictionary definition;
Step 314, according to the value type definition in the described data dictionary to the territory assignment;
Step 315, described territory is deposited in the target data, execution in step 317 then;
Step 316, extract described array data, and deposit in the target data according to the array name of correspondence, execution in step 317 then;
Step 317, if circulation is carried out to be finished then to continue to carry out, otherwise finish, execution in step 322 then;
Step 318, the described mapping expression formula of execution obtain value expression;
Step 319, obtain the data of described characteristic attribute correspondence;
Step 320, judge whether these data exist, if then return step 317; If not, execution in step 321 then;
Step 321, the attribute that described data are set are the string value of value expression, return step 317 then;
The temporary variable that produces in step 322, the removing mapping;
Ephemeral data among step 323, the removing CompositeDataExprData.
Need to prove, for aforesaid each method embodiment, for simple description, so it all is expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not subjected to the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in the instructions all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
With reference to figure 4, show the structured flowchart of a kind of data mapping unit embodiment of the present invention, specifically can may further comprise the steps:
Modular converter 401 is used for source data is converted to the structure of target data;
Read execution module 402, be used to read and carry out the mapping expression formula of described source data;
Array manipulation module 403a is used for extracting described array data when the value of described expression formula comprises array data, and deposits in the target data according to the array name of correspondence;
Structure treatment module 403b is used for extracting described structured data when the value of described expression formula comprises structured data, and deposits in the target data according to the structure name of correspondence;
Territory processing module 403c is used for when the value of described expression formula comprises numeric field data, creates the territory and carries out assignment according to presetting definition, and described territory is deposited in the target data.
Preferably, present embodiment can also comprise the data source locating module, is used for the specified data source.
More preferred, described modular converter may further include following submodule:
Judge submodule, be used for judging whether data with existing, if then trigger first processing sub with in the source data coverage goal data of described data source; If not, then trigger second processing sub;
First processing sub is used for described source data is copied to target data;
Second processing sub is used to carry out following steps:
Described target data is carried out buffer memory;
Source data in the described data source is copied in the target data;
Target data in the described buffer memory is covered described target data.
Preferably, described data have identification information, and described identification information is by domain name, or structure name and domain name, or array name, structure name and domain name are formed.
In this case, described modular converter can also comprise following submodule:
The duplication of name processing sub is used for identification information in described source data and target data when identical, covers described target data with described source data.
Further, described modular converter can also comprise following submodule:
Add submodule, be used for described target data is added into target data structure as ephemeral data.
Correspondingly, present embodiment can also comprise with lower module:
Remove module, be used for removing the ephemeral data of described target data structure.
For device embodiment, because it is substantially corresponding to method embodiment, so description is fairly simple, relevant part gets final product referring to the part explanation of method embodiment.
To sum up, the present invention is by resolution data form (being divided into array, structure and territory), and create the structure of uniform data according to the identification information of corresponding data form, thereby can realize the integral body mapping of data, and can in mapping, once create the data of many levels, and, because the built-in expression formula of a large amount of realizations, support complex data, thereby can support the data map of describing complicated conversion logic to handle; Moreover, because uniform data and other uniform data can call mutually, thereby can avoid a large amount of nested duplicating, effectively saved storage space and system resource; In addition, the data map that realizes based on uniform data of the present invention, expression formula is configurable, thereby extendability and dirigibility are very good.
More than a kind of data mapping method provided by the present invention and a kind of data mapping unit are described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (16)

1. a data mapping method is characterized in that, comprising:
Source data is converted in the structure of target data;
Read and carry out the mapping expression formula of described source data;
If the value of described expression formula comprises array data, then extract described array data, and deposit in the target data according to the array name of correspondence;
If the value of described expression formula comprises structured data, then extract described structured data, and deposit in the target data according to the structure name of correspondence;
If the value of described expression formula comprises numeric field data, then create the territory and carry out assignment according to presetting definition, described territory is deposited in the target data.
2. the method for claim 1 is characterized in that, also comprises:
The specified data source.
3. method as claimed in claim 2 is characterized in that, described source data switch process comprises:
Judge whether with the data with existing in the source data coverage goal data in the described data source, if then described source data is copied in the target data; If not, then carry out following steps:
Described target data is carried out buffer memory;
Source data in the described data source is copied in the target data;
Target data in the described buffer memory is covered described target data.
4. method as claimed in claim 3 is characterized in that described data have identification information, and described identification information is by domain name, or structure name and domain name, or array name, structure name and domain name are formed.
5. method as claimed in claim 4 is characterized in that, described source data switch process also comprises:
If the identification information of described source data and target data is identical, then cover described target data with described source data.
6. method as claimed in claim 5 is characterized in that, described source data switch process also comprises:
Described target data is added in the target data structure as ephemeral data.
7. method as claimed in claim 6 is characterized in that, also comprises:
Remove the ephemeral data in the described target data structure.
8. the method for claim 1 is characterized in that, described array data and structured data have cascade and create attribute.
9. the method for claim 1 is characterized in that, being defined in the data dictionary of described numeric field data described.
10. a data mapping unit is characterized in that, comprising:
Modular converter is used for source data is converted to the structure of target data;
Read execution module, be used to read and carry out the mapping expression formula of described source data;
The array manipulation module is used for extracting described array data when the value of described expression formula comprises array data, and deposits in the target data according to the array name of correspondence;
The structure treatment module is used for extracting described structured data when the value of described expression formula comprises structured data, and deposits in the target data according to the structure name of correspondence;
The territory processing module is used for when the value of described expression formula comprises numeric field data, creates the territory and carries out assignment according to presetting definition, and described territory is deposited in the target data.
11. device as claimed in claim 10 is characterized in that, also comprises:
The data source locating module is used for the specified data source.
12. device as claimed in claim 11 is characterized in that, described modular converter comprises:
Judge submodule, be used for judging whether data with existing, if then trigger first processing sub with in the source data coverage goal data of described data source; If not, then trigger second processing sub;
First processing sub is used for described source data is copied to target data;
Second processing sub is used to carry out following steps:
Described target data is carried out buffer memory;
Source data in the described data source is copied in the target data;
Target data in the described buffer memory is covered described target data.
13. device as claimed in claim 12 is characterized in that, described data have identification information, and described identification information is by domain name, or structure name and domain name, or array name, structure name and domain name are formed.
14. device as claimed in claim 13 is characterized in that, described modular converter also comprises:
The duplication of name processing sub is used for identification information in described source data and target data when identical, covers described target data with described source data.
15. device as claimed in claim 14 is characterized in that, described modular converter also comprises:
Add submodule, be used for described target data is added into target data structure as ephemeral data.
16. device as claimed in claim 15 is characterized in that, also comprises:
Remove module, be used for removing the ephemeral data of described target data structure.
CNA2007103083947A 2007-12-29 2007-12-29 Data mapping method and device thereof Pending CN101196927A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2007103083947A CN101196927A (en) 2007-12-29 2007-12-29 Data mapping method and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2007103083947A CN101196927A (en) 2007-12-29 2007-12-29 Data mapping method and device thereof

Publications (1)

Publication Number Publication Date
CN101196927A true CN101196927A (en) 2008-06-11

Family

ID=39547339

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2007103083947A Pending CN101196927A (en) 2007-12-29 2007-12-29 Data mapping method and device thereof

Country Status (1)

Country Link
CN (1) CN101196927A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049475A (en) * 2011-10-28 2013-04-17 微软公司 Spreadsheet program-based data classification for source target mapping
CN104253847A (en) * 2013-06-28 2014-12-31 华为技术有限公司 Method and device for data interaction
CN104657371A (en) * 2013-11-20 2015-05-27 腾讯科技(深圳)有限公司 Data presentation method and device
CN105205037A (en) * 2015-09-16 2015-12-30 广东睿江科技有限公司 Method for converting numbers into strings
CN106557416A (en) * 2015-09-28 2017-04-05 百度在线网络技术(北京)有限公司 The implementation method and device of software cloud test
CN106909570A (en) * 2015-12-23 2017-06-30 阿里巴巴集团控股有限公司 A kind of data transfer device and device
CN107909359A (en) * 2017-11-21 2018-04-13 中国银行股份有限公司 Batch calls the data processing method and device of on-line transaction common process mechanism
CN107967369A (en) * 2017-12-29 2018-04-27 北京酷我科技有限公司 A kind of method that data are converted to structure of arrays in caching
CN108446319A (en) * 2018-02-09 2018-08-24 烽火通信科技股份有限公司 Data are carried out to the method and system of Binary Serialization
CN110263223A (en) * 2019-06-25 2019-09-20 深圳市元征科技股份有限公司 A kind of data type method for transformation, device, equipment and medium
CN110417880A (en) * 2019-07-19 2019-11-05 优信拍(北京)信息科技有限公司 It is a kind of applied to WEB exploitation data processing method, apparatus and system
CN111538942A (en) * 2020-04-21 2020-08-14 招商局金融科技有限公司 Expression processing method, electronic device and storage medium

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10546057B2 (en) 2011-10-28 2020-01-28 Microsoft Technology Licensing, Llc Spreadsheet program-based data classification for source target mapping
CN103049475A (en) * 2011-10-28 2013-04-17 微软公司 Spreadsheet program-based data classification for source target mapping
CN104253847A (en) * 2013-06-28 2014-12-31 华为技术有限公司 Method and device for data interaction
CN104253847B (en) * 2013-06-28 2017-11-24 华为技术有限公司 A kind of data interactive method and device
CN104657371A (en) * 2013-11-20 2015-05-27 腾讯科技(深圳)有限公司 Data presentation method and device
CN105205037A (en) * 2015-09-16 2015-12-30 广东睿江科技有限公司 Method for converting numbers into strings
CN106557416A (en) * 2015-09-28 2017-04-05 百度在线网络技术(北京)有限公司 The implementation method and device of software cloud test
CN106557416B (en) * 2015-09-28 2019-03-08 百度在线网络技术(北京)有限公司 The implementation method and device of software cloud test
CN106909570A (en) * 2015-12-23 2017-06-30 阿里巴巴集团控股有限公司 A kind of data transfer device and device
CN107909359A (en) * 2017-11-21 2018-04-13 中国银行股份有限公司 Batch calls the data processing method and device of on-line transaction common process mechanism
CN107909359B (en) * 2017-11-21 2021-12-07 中国银行股份有限公司 Data processing method and device for calling online transaction public processing mechanism in batch
CN107967369A (en) * 2017-12-29 2018-04-27 北京酷我科技有限公司 A kind of method that data are converted to structure of arrays in caching
CN107967369B (en) * 2017-12-29 2021-07-23 北京酷我科技有限公司 Method for converting data in cache into array structure
CN108446319A (en) * 2018-02-09 2018-08-24 烽火通信科技股份有限公司 Data are carried out to the method and system of Binary Serialization
CN110263223A (en) * 2019-06-25 2019-09-20 深圳市元征科技股份有限公司 A kind of data type method for transformation, device, equipment and medium
CN110263223B (en) * 2019-06-25 2023-10-20 深圳市元征科技股份有限公司 Data type conversion method, device, equipment and medium
CN110417880A (en) * 2019-07-19 2019-11-05 优信拍(北京)信息科技有限公司 It is a kind of applied to WEB exploitation data processing method, apparatus and system
CN110417880B (en) * 2019-07-19 2022-02-11 优信拍(北京)信息科技有限公司 Data processing method, device and system applied to WEB development
CN111538942A (en) * 2020-04-21 2020-08-14 招商局金融科技有限公司 Expression processing method, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN101196927A (en) Data mapping method and device thereof
US6633883B2 (en) Methods of organizing data and processing queries in a database system, and database system and software product for implementing such methods
US6564212B2 (en) Method of processing queries in a database system, and database system and software product for implementing such method
US7480661B2 (en) Query services for database system
US20040133581A1 (en) Database management system, data structure generating method for database management system, and storage medium therefor
Barrett Occam 3 reference manual
Buchsbaum et al. Linear-time algorithms for dominators and other path-evaluation problems
US20070198566A1 (en) Method and apparatus for efficient storage of hierarchical signal names
CN1661593B (en) Method for translating computer language and translation system
CN112219199A (en) Efficient use of TRIE data structures in databases
US20020093522A1 (en) Methods of encoding and combining integer lists in a computer system, and computer software product for implementing such methods
CN110795526B (en) Mathematical formula index creating method and system for retrieval system
US6675157B1 (en) System and method for balancing binary search trees
CN115048382A (en) Hierarchical data searching method, device, equipment and storage medium based on binary tree
WO2005065184A2 (en) Method for implementing and managing a database in hardware
Dworzanski et al. Structural place invariants for analyzing the behavioral properties of nested petri nets
Ferrera et al. Tuple MapReduce and Pangool: an associated implementation
EP1193619B1 (en) Use of indices for queries with comparisons based on a function
CN115630595A (en) Automatic logic circuit generation method and device, electronic device and storage medium
Fuhrmann Quadtree traversal algorithms for pointer-based and depth-first representations
Geissmann et al. Cache oblivious minimum cut
JP2988304B2 (en) String management device
Waters Methodology of computer systems design
Chunikhin Fundamentals of Semantic Numeration Systems. Can the Context be Calculated?
SE517340C2 (en) Method and system for storing data in structural elements

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Open date: 20080611