CN104331401B - A kind of interpretation method and system - Google Patents

A kind of interpretation method and system Download PDF

Info

Publication number
CN104331401B
CN104331401B CN201410685502.2A CN201410685502A CN104331401B CN 104331401 B CN104331401 B CN 104331401B CN 201410685502 A CN201410685502 A CN 201410685502A CN 104331401 B CN104331401 B CN 104331401B
Authority
CN
China
Prior art keywords
entity
chinese
attribute
english name
english
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
CN201410685502.2A
Other languages
Chinese (zh)
Other versions
CN104331401A (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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN201410685502.2A priority Critical patent/CN104331401B/en
Publication of CN104331401A publication Critical patent/CN104331401A/en
Application granted granted Critical
Publication of CN104331401B publication Critical patent/CN104331401B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the present invention provides a kind of interpretation method and system, and for Data Mart, wherein method includes:Obtain entity Chinese in logical model;The entity Chinese of acquisition is automatically translated into entity English name, the entity English name is considered as table English name in physical model;Attribute Chinese in logical model is obtained, the attribute Chinese of acquisition is automatically translated into attribute English name, the attribute English name is considered as field English name in physical model.

Description

A kind of interpretation method and system
Technical field
The present invention relates to translation technology field, more particularly to a kind of interpretation method and system are applied to Data Mart.
Background technology
Data Mart (Data Mart), is also Data Market, is one from the data of operation and other for certain is special Professional's community services data source in collect data warehouse.For from scope, data are the numbers from enterprise-wide Extracted in data warehouse according to storehouse, data warehouse or more professional.The emphasis of Data Mart is that it is catered to The specific demand of professional user colony, in analysis, content, performance, and easy-to-use aspect.The user of data center wishes data It is that term is showed familiar to them.
At present, in Data Mart development process, the Chinese of the entity in logical model and attribute is translated as thing Table has the female translation of Chinese phonetic alphabet full word, the translation of word first letter of pinyin, nothing to contain with the method for the English name of field in reason model Adopted field translation and English phrase translate four kinds;The female translation of Chinese phonetic alphabet full word, entity and the attribute Chinese according to logical model Title is using the full pinyin of Chinese character come the corresponding table of manual definition and field English name;Word first letter of pinyin is translated, according to Chinese character is manually carried out word segmentation processing by the entity and attribute Chinese of logical model first, then for each Word, translates into full pinyin, using each word phonetic initial as field and the English name of table name;Turned over without implication field Translate, by the way of being combined using the English alphabet without any particular meaning, numeral and spcial character manually, translation logic mould successively Entity and attribute Chinese in type;English phrase translation, entity and attribute Chinese according to logical model are used first Chinese character is carried out word segmentation processing by artificial mode, then for each word, translates into full English word, is then carried out using character Connection.
Because the general scale of Data Mart project is than larger, more than in four kinds of interpretation methods, substantial amounts of design is required to Personnel realize the generation of physical model, if each designer is if manually generating physical model, then, identical category When property is in different entities, it is likely that be just translated as different field English names, and set in Data Mart system logical model In meter, attribute of the same name, no matter it is in which entity, representative is all identical business implication, so in principle by logic During model generation physical model, attribute of the same name should be translated as identical field name, so complete using prior art Corresponding table and field English name are translated as into logical model entity and attribute Chinese, physical model can be caused to name Normative and quality cannot ensure.Meanwhile, during manually generating physical model, it is ensured that physical model is relatively clearly more anti- The implication of logical model is reflected, it is necessary to designer's serious analysis which English names can more accurately translate Chinese Implication, and different designers is when facing identical attribute, can all consider identical problem, has many repeatability labor Dynamic, physical model formation efficiency is relatively low.
The content of the invention
In view of this, the embodiment of the present invention provides a kind of interpretation method and system, to solve in the prior art using artificial Manually generate physical model and cause physical model name normalization and quality cannot ensure and physical model formation efficiency compared with Low problem.
To achieve the above object, the embodiment of the present invention provides following technical scheme:
A kind of interpretation method, for Data Mart, including:
Obtain entity Chinese in logical model;The entity Chinese of acquisition is automatically translated into entity English name Claim, the entity English name is considered as table English name in physical model;
Obtain attribute Chinese in logical model;The attribute Chinese of acquisition is automatically translated into attribute English name Claim, the attribute English name is considered as field English name in physical model.
Wherein, table English name includes in the entity English name being considered as into physical model:
Whether already present from physical model the entity English name all table English names obtained by judgement are different, such as Fruit is to obtain the table English name in physical model;If it is not, last letter of the entity English name of gained is replaced It is changed to a predetermined positive integer n, 0≤n≤9;Judge this by last letter replace with n entity English name whether with Already present all table English names are different in physical model, if it is not, this then to be replaced with last letter the reality of n Last letter of body English name replaces with n+1, until in physical model already present all table English names with this The entity English name that substituted for last letter is different, obtains the table English name in physical model;
It is described the attribute English name is considered as physical model in field English name include:
Whether already present from physical model the attribute English name all field English names obtained by judgement are different, If it is not, last letter of the attribute English name of gained is replaced with into a predetermined positive integer n, 0≤n≤9;Judge Whether already present all field English names last letter is replaced with the attribute English name of n with this in physical model Claim difference, if it is not, last letter that last letter is replaced with the attribute English name of n then is replaced with into n+ 1, until already present all field English names substituted for the attribute English name of last letter with this in physical model Claim difference, obtain the field English name in physical model.
Wherein, it is described the entity Chinese of acquisition is automatically translated into entity English name to include:
The entity Chinese of acquisition is split, entity root is obtained;All entity roots are translated according to root chart It is corresponding entity English abbreviation;All entity English abbreviations are spliced by preordering method in a predetermined order, and automatically Plus the English prefix for representing theme where the entity English name, the corresponding entity English name of entity Chinese is obtained Claim;
It is described the attribute Chinese of acquisition is automatically translated into attribute English name to include:
The attribute Chinese of acquisition is split, attribute root is obtained;All properties root is translated according to root chart It is corresponding attribute English abbreviation;All properties English abbreviation is spliced by preordering method in a predetermined order, is belonged to The property corresponding attribute English name of Chinese.
Wherein, it is described to be split the entity Chinese of acquisition, including:
Judge the entity Chinese for obtaining whether in root chart;If not existing, remove in the entity Chinese most Latter Chinese character, obtains the entity Chinese for removing one Chinese character of rearmost end;If, using the entity Chinese as One entity root, and the entity root is removed from the entity Chinese, obtain this and eliminate the entity root Entity Chinese;
It is described to be split the attribute Chinese of acquisition, including:
Judge the attribute Chinese for obtaining whether in root chart;If not existing, remove in the attribute Chinese most Latter Chinese character, obtains the attribute Chinese for removing one Chinese character of rearmost end;If, using the attribute Chinese as One attribute root, and the attribute root is removed from the entity Chinese, obtain this and eliminate the attribute root Attribute Chinese.
Wherein, described removing in the entity Chinese also includes after last Chinese character:
Judge whether that all Chinese characters have all been removed, if so, in then finding out the corresponding primary entities of entity Chinese Literary fame is not split as the Chinese character of entity root in claiming, all Chinese characters for not being split as entity root are added in root chart Translator of English and abbreviation;
Described removing in the attribute Chinese also includes after last Chinese character:
Judge whether that all Chinese characters have all been removed, if so, in then finding out the corresponding primitive attribute of attribute Chinese Literary fame is not split as the Chinese character of attribute root in claiming, all Chinese characters for not being split as attribute root are added in root chart Translator of English and abbreviation.
Wherein, described acquisition after this eliminates the entity Chinese of the entity root also includes:
Whether judge to obtain eliminates in the entity Chinese of the entity root comprising Chinese character, if not including, Illustrate that the entity Chinese for obtaining has split completion, all entity roots are translated as by corresponding entity English according to root chart Referred to as;
Described acquisition after this eliminates the attribute Chinese of the attribute root also includes:
Whether judge to obtain eliminates in the entity Chinese of the attribute root comprising Chinese character, if not including, Illustrate that the attribute Chinese for obtaining has split completion, all entity roots are translated as by corresponding entity English according to root chart Referred to as.
Wherein, it is described obtain the corresponding entity English name of entity Chinese after also include:
Whether the byte number of the entity English name obtained by judgement exceedes predetermined byte number, if exceeding, removes the reality The byte that body English name rearmost end exceeds;
It is described obtain the corresponding attribute English name of attribute Chinese after also include:
Whether the byte number of the attribute English name obtained by judgement exceedes predetermined byte number, if exceeding, removes the category The byte that property English name rearmost end exceeds.
The embodiment of the present invention also provides a kind of translation system, for Data Mart, including:First translation module and second is turned over Translate module;Wherein,
First translation module, for entity Chinese in logical model to be translated as into table English name in physical model Claim;
Second translation module, for attribute Chinese in logical model to be translated as into field English in physical model Title;
Wherein, first translation module includes:First acquisition unit and the first translation unit, wherein, described first obtains Unit is taken for obtaining entity Chinese in logical model;First translation unit is used for the entity Chinese that will be obtained Entity English name is automatically translated into, the entity English name is considered as table English name in physical model;
Wherein, second translation module includes:Second acquisition unit and the second translation unit, wherein, described second obtains Unit is taken for obtaining attribute Chinese in logical model;Second translation unit is used for the attribute Chinese that will be obtained Attribute English name is automatically translated into, the attribute English name is considered as field English name in physical model.
Wherein, first translation unit includes:First splits subelement, the first translation subelement and the first splicing son list Unit, wherein,
Described first splits subelement, for the entity Chinese of acquisition to be split, obtains entity root;
The first translation subelement, for all entity roots to be translated as into corresponding entity English letter according to root chart Claim;
The first splicing subelement, for all entity English abbreviations to be spelled by preordering method in a predetermined order Connect, and obtain the corresponding reality of entity Chinese plus the English prefix for representing theme where the entity English name automatically Body English name;
Wherein, second translation unit includes:Second splits subelement, the second translation subelement and the second splicing son list Unit, wherein,
Described second splits subelement, for the attribute Chinese of acquisition to be split, obtains attribute root;
The second translation subelement, for all properties root to be translated as into corresponding attribute English letter according to root chart Claim;
The second splicing subelement, for all properties English abbreviation to be spelled by preordering method in a predetermined order Connect, obtain the corresponding attribute English name of attribute Chinese.
Wherein, first translation unit also includes:First judgment sub-unit,
Whether first judgment sub-unit, the byte number for the entity English name obtained by judgement exceedes predetermined word Joint number, if exceeding, removes the byte that the entity English name rearmost end exceeds;
Whether first is considered as subelement, already present all with physical model for the entity English name obtained by judgement Table English name is different, if it is, the table English name in obtaining physical model, if it is not, the entity of gained is English Last letter of title replaces with a predetermined Integer n, 0≤n≤9;Judge that last letter is replaced with n's by this Whether already present from physical model entity English name all table English names are different, if it is not, then will be last by this Last letter for the entity English name that one letter replaces with n replaces with n+1, until already present institute in physical model There is table English name different from the entity English name that this substituted for last letter, obtain the table English in physical model Title;
Wherein, second translation unit also includes:Second judgment sub-unit,
Whether second judgment sub-unit, the byte number for the attribute English name obtained by judgement exceedes predetermined word Joint number, if exceeding, removes the byte that the attribute English name rearmost end exceeds;
Whether second is considered as subelement, already present all with physical model for the attribute English name obtained by judgement Field English name is different, if it is not, by last letter of the attribute English name of gained replace with one it is predetermined Integer n, 0≤n≤9;Judge in physical model already present all field English names whether with this by last letter The attribute English name for replacing with n is different, if it is not, last letter then this to be replaced with into the attribute English name of n Last letter replaces with n+1, until already present all field English names substituted for finally with this in physical model One attribute English name of letter is different, obtains the field English name in physical model.
Based on above-mentioned technical proposal, the interpretation method and system for Data Mart provided in an embodiment of the present invention will be obtained The entity Chinese for taking is automatically translated into entity English name, and table is English during the entity English name is considered as into physical model Title;The attribute Chinese of acquisition is automatically translated into attribute English name, the attribute English name is considered as physics mould Field English name in type.Interpretation method provided in an embodiment of the present invention and system, physics mould is generated using full automatic mode Type, the attribute of identical Chinese can be translated as identical field English name, and physical model mistake is being generated by logical model Cheng Zhong, it is ensured that the uniformity of attribute Chinese to field English name, so as to ensure that the normalization of physical model name; Whole Data Mart project team only needs to the one or one group personnel of specialty to carry out root translation, it is ensured that the standard of root translation True reasonability, so as to improve the quality of physical model name;Adopt completely and in an automated fashion translated Chinese, with Mode was manually generated in the past to compare, the workload of physical model generation was greatly reduced, and improve the formation speed of physical model, Logical model to the generating process of physical model is shortened, and then improves whole Data Mart Project design development efficiency.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this Inventive embodiment, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is the flow chart of interpretation method provided in an embodiment of the present invention;
Fig. 2 is the method that the entity English name that automatic translation is obtained is processed in interpretation method provided in an embodiment of the present invention Flow chart;
Fig. 3 is the method that the attribute English name that automatic translation is obtained is processed in interpretation method provided in an embodiment of the present invention Flow chart;
Fig. 4 is that the entity Chinese of acquisition is automatically translated into entity English in interpretation method provided in an embodiment of the present invention The method flow diagram that literary fame claims;
Fig. 5 is that the attribute Chinese of acquisition is automatically translated into attribute English in interpretation method provided in an embodiment of the present invention The method flow diagram that literary fame claims;
Fig. 6 is the method stream split the entity Chinese of acquisition in interpretation method provided in an embodiment of the present invention Cheng Tu;
Fig. 7 is the method stream split the attribute Chinese of acquisition in interpretation method provided in an embodiment of the present invention Cheng Tu;
Fig. 8 is the method flow diagram of expansion root chart in interpretation method provided in an embodiment of the present invention;
Fig. 9 is to judge whether the entity Chinese for obtaining splits completion in interpretation method provided in an embodiment of the present invention Method flow diagram;
Figure 10 is to judge whether the attribute Chinese for obtaining has split in interpretation method provided in an embodiment of the present invention The method flow diagram of completion;
Figure 11 is the method flow diagram of processing entities English name in interpretation method provided in an embodiment of the present invention;
Figure 12 is the method flow diagram of processing attribute English name in interpretation method provided in an embodiment of the present invention;
Figure 13 is the system block diagram of translation system provided in an embodiment of the present invention;
Figure 14 is the structured flowchart of the first translation module in translation system provided in an embodiment of the present invention;
Figure 15 is the structured flowchart of the second translation module in translation system provided in an embodiment of the present invention;
Figure 16 is the structured flowchart of the first translation unit in translation system provided in an embodiment of the present invention;
Figure 17 is the structured flowchart of the second translation unit in translation system provided in an embodiment of the present invention;
Figure 18 is another structured flowchart of the first translation unit in translation system provided in an embodiment of the present invention;
Figure 19 is another structured flowchart of the second translation unit in translation system provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
Fig. 1 is the flow chart of interpretation method provided in an embodiment of the present invention, for Data Mart, using full automatic mode Generation physical model, it is ensured that the normalization of physical model name, improves the quality of physical model name, and shorten logic Model and then improves whole Data Mart Project design development efficiency, reference picture 1, the method to the generating process of physical model Can include:
Step S100:Obtain entity Chinese in logical model;
Logical model includes all of entity and relation, and determines each entity attributes, defines the master of each entity Key, specifies the external key of each entity, specifies whether attribute is code etc..
For example, as shown in table 1, the logical model of " organizational unit " entity in financial accounting Data Mart:
The logical model of " organizational unit " entity in financial accounting Data Mart
Table 1
As can be seen that the logical model of " organizational unit " entity in financial accounting Data Mart is wherein, entity name is " tissue Unit ", entity Chinese obtains Chinese character " organizational unit " in obtaining the logical model.
Step S110:The entity Chinese of acquisition is automatically translated into entity English name, by the entity English name Title is considered as table English name in physical model;
Optionally, can be by the entity word that is split as being present in one by one in root chart by the entity Chinese of acquisition After root, all entity roots are translated further according to root chart, obtained the corresponding entity English abbreviation of each entity root, then The corresponding entity English abbreviation of each entity root that will be obtained is spliced by predetermined method in a predetermined sequence, and It is automatic plus the English prefix for representing theme where the entity English name before it, so as to the entity Chinese name for being obtained Claim corresponding entity English name.
Optionally, entity Chinese that can be according to longest match principle from left to right to obtaining is split as depositing one by one It is entity root in root chart, longest match principle is stored in root chart in the entity Chinese for finding acquisition and possesses The entity root of most Chinese character numbers, for example, there is root chart as shown in table 2:
Root chart
Table 2
When the entity Chinese for obtaining is " economic capital metric results ", existing root " economy " and word in root chart Root " capital ", also root " economic capital ", the entity Chinese using longest match principle from left to right to obtaining are carried out Split, then should be using " economic capital ", " metering " and " result " as the entity root for splitting out.
Due to the English name length in general database design, i.e., the byte number that English name is possessed has necessarily Limitation, using longest match principle to obtain entity Chinese split, use longest match principle split obtain Entity root translated, the entity English abbreviation that obtains will be translated afterwards and will be spliced, obtain the side of entity English name Method, can to greatest extent reduce the length of the entity English name of gained, i.e., entity English to greatest extent obtained by reduction The byte number that title is possessed,
Such as entity Chinese " economic capital ", if " economic capital " is split as into entity root " economy " and entity root " capital ", each entity English abbreviation is connected according to the method for underscore, then the entity English name of last acquisition is " ECO_CAP ", the entity English name for obtaining is 7 bytes;And if by " economic capital " in itself as entity root " economy money This ", then the last entity English name for obtaining is " ECAP ", and the entity English name for obtaining is 4 bytes, largely The length of the entity English name of acquisition is shortened, the probability of the entity English name length overlength of acquisition is reduced.
Simultaneously as the implication with oneself uniqueness when some combine Chinese present combinations together, the uniqueness Implication is not the simple combination of each root implication after it is split, therefore, the entity that will be obtained using maximum match principle Chinese is split, and can well ensure the full sense of these portmanteau words, such as entity Chinese " economic capital ", " economic capital " this portmanteau word itself have the exclusive implication of oneself, and the implication be not vocabulary " economy " implication and The simple combination of the implication of vocabulary " capital ".
Optionally, all entity English abbreviations that will can be obtained put in order according to its corresponding entity root Row splicing, for example, when " economic capital ", " metering " and " result " three entity roots are obtained, the corresponding reality that translation is obtained Body English abbreviation is respectively " ECAP ", " MESR " and " RST ", and arranging entity root " economic capital " in entity root High order end first is listed in, entity root " metering " is arranged in high order end second, and entity root " result " is arranged in low order end Primary putting in order realize English abbreviation arranging, then entity English abbreviation " ECAP " should be arranged in into high order end first Position, entity English abbreviation " MESR " is arranged in high order end second, and entity English abbreviation " RST " is arranged in low order end first.
Optionally, it is possible to use all entity English abbreviations that underlined characters will be obtained are spliced, such as the reality for obtaining Body English abbreviation is from left to right respectively " ECAP ", " MESR " and " RST ", then the entity English name for finally obtaining is " ECAP_ MESR_RST”。
Exist if the entity Chinese for obtaining fails to be split successfully, that is, in the entity Chinese for obtaining and be not present in Word or word in root chart, illustrate there is a problem of that root is lacked in root chart.
Optionally, when there is the word or word in being not present in root chart in the entity Chinese for obtaining, that is, acquisition is worked as Entity Chinese in exist cannot be found in root chart identical Chinese word word or word when.Can be failed by finding out this The word or word for being not present in root chart in the entity Chinese that success splits, root standard add the root it is corresponding in Cliction, translator of English and English abbreviation.
Optionally, because the entity English name for obtaining may already exceed predetermined length, therefore entity is obtained in translation After English name, it can be determined that whether overlength, i.e. entity English name obtained by judgement are possessed the entity English name of gained Byte number whether exceed the byte number subscribed, if exceeding, will the last byte that exceed in the entity English name of the overlength Removal, the entity English name that the English byte that will finally remain is obtained as translation;If not less than, then this is translated To entity English name to find a great convenience be the entity English name for finally obtaining.
Such as, if the most long word joint number that setting entity English name can possess is 12, if the entity Chinese for obtaining is " economic capital metric results ", the entity English name that entity Chinese translation is obtained is " ECAP_MESR_RST ", the reality Body English name possesses 13 bytes, more than 12 bytes, then, the 13rd bit byte in the use English name that just will be obtained Preceding 12 bit byte is removed in removal, reservation, and the entity English name for finally obtaining is " ECAP_MESR_RS ";If the entity Chinese for obtaining Entitled " metric results ", the entity English name that entity Chinese translation is obtained is " MESR_RST ", entity English Title possesses 8 bytes, not less than 12 bytes, then, it is " MESR_RST " that the entity English name for finally obtaining is found a great convenience.
Because Data Mart has dividing for theme, may there is identical entity Chinese in the logical model under different themes Title, identical entity Chinese name will be split as identical entity root, and then identical entity root is translated into phase Same English abbreviation, after these identical English abbreviations are mutually spliced according to predetermined method in a predetermined sequence, obtains Splicing entity English name also will be identical, if directly using the splicing entity English name as the table English name in physical model Claim, the table English name that there are same names in physical model will be caused, this is to be to be not allowed in design of physical model , therefore, for the entity of identical Chinese under distinguishing different themes in physical model aspect, obtaining splicing entity English After title, the English prefix for representing theme where it is added to the splicing entity English name automatically.
For example, " organizational unit satellite information " table is under " organizational unit " theme, " organizational unit is attached for entity Chinese The splicing entity English name that information " is obtained after splitting, translating and splicing is " OGU_ATCH_INFO ", can represent theme " group Knit unit " prefix for " B_OU_ ", will splicing entity English name " OGU_ATCH_INFO " automatically must plus prefix " B_OU_ " It is " B_OU_OGU_ATCH_INFO " to entity English name.
Optionally, the entity English name for adding gained after the prefix for representing theme may or exist in physical model Same table English name, this entity English name will be also not allowed to as table English name, therefore, it can obtaining The entity English name is judged after to entity English name, and whether already present all table English names are not with physical model It is identical, if differing, using the entity English name as the table English name in physical model;If not differ, Last letter of the entity English name is then replaced with into a predetermined Integer n, such as 1.
, wherein it is desired to illustrate, a letter in English name only takes up a byte, and a numeral also takes one Individual byte, during last letter of the entity English name obtained by replaced with a predetermined Integer n, due to only substituted for A byte in gained entity English name, therefore, the Integer n of the reservation should also only take up a byte, i.e. this is pre- The Integer n ordered should be that the scope of the Integer n of digit, the i.e. reservation one by one is 0 to 9, i.e. 0≤n≤9.
Optionally, for last letter to be replaced with the entity English name of n, still may be in physical model Through presence and its title identical table English name, therefore, obtaining replacing with last letter the entity English name of n Also need to judge whether the entity English name that last letter is replaced with n by this is already present all with physical model afterwards Table English name is different, if so, last letter then to be replaced with the entity English name of n as in physical model Table English name;If it is not, then last letter that last letter is replaced with the entity English name of n is replaced It is n+1, until already present all table English names substituted for the entity English of last letter with this in physical model Title is different, obtains the table English name in physical model.
Optionally, when the value of n is 9, and last letter is replaced with into the entity English name of n in physical model In the presence of with its title identical table English name, it is necessary to the entity English name that last letter is replaced with into n by this most When latter position letter replaces with n+1, n+1 now value mathematically is 10, and numeral 10 has two bytes, therefore, can To set, when the value of n is 9, the value of n+1 is 1.
The design of Data Mart includes:Conceptual Model Design, logic model design and the generation on the basis of logical model The step of physical model three, wherein, the target of conceptual data model is uniform traffic concept, used as between business personnel and technical staff The bridge of communication, determines the relation of the highest level between different entities;Logical model is then according to each upstream business system Data structure, according to the principle of point theme, designs multiple entities under each theme, and entity is contained within multiple attributes, and Main external key, storage strategy of designated entities etc.;Physical model is generated on the basis of logical model, groundwork is exactly by logic Entity Chinese in model translates into the used table English name of database design, meanwhile, by the category in logical model Property Chinese translate into the used field English name of database design, and determine field data type, whether major key, Whether the physico key element such as subregion.
As can be seen that generating physical model on the basis of the logical model during this, mainly include two parts, one Part is that the entity Chinese in logical model is translated into the used table English name of database design, and another part is Attribute Chinese in logical model is translated into the used field English name of database design.Step S100 is to step S110 is that the entity Chinese in logical model wherein is translated into the specific of the used table English name of database design Implementation steps.
Step S120:Obtain attribute Chinese in logical model;
For example, as shown in table 1, in the logical model of " organizational unit " entity in financial accounting Data Mart, " tissue is single for entity The attribute Chinese of 5 attributes included in unit " is respectively:" organizational unit numbering ", " source tissue's element number ", " Chinese Title ", " organization unit type code " and " mechanism's level ", the attribute Chinese obtained in the logical model are the acquisition Chinese Word " organizational unit numbering ", " source tissue's element number ", " Chinese ", " organization unit type code " and " mechanism's level ", Optionally, one of attribute Chinese is only obtained when can obtain every time, after the completion of the attribute Chinese is translated Word obtains next attribute Chinese.
Step S130:The attribute Chinese of acquisition is automatically translated into attribute English name, by the attribute English name Title is considered as field English name in physical model.
Optionally, can be by the attribute word that is split as being present in one by one in root chart by the attribute Chinese of acquisition After root, all properties root is translated further according to root chart, obtained the corresponding attribute English abbreviation of each attribute root, then The corresponding attribute English abbreviation of each attribute root that will be obtained is spliced by predetermined method in a predetermined sequence, from And the attribute English name corresponding to the attribute Chinese for being obtained.
Optionally, attribute Chinese that can be according to longest match principle from left to right to obtaining is split as depositing one by one It is attribute root in root chart, makes the length of the attribute English name that can to greatest extent reduce gained, i.e., to greatest extent The byte number that attribute English name obtained by ground reduction is possessed, so that the byte number of the attribute English name for obtaining is no more than pre- The byte number ordered;Meanwhile, make not destroy portmanteau word its distinctive implication.
Optionally, all properties English abbreviation that will can be obtained puts in order according to its corresponding entity root Row splicing, in order to quickly find its corresponding attribute Chinese after seeing attribute English abbreviation, improves readable.Can Choosing, all properties English abbreviation that can also will be obtained using underlined characters or space symbol is spliced, and is further carried It is high readable.
When the attribute Chinese for obtaining fails to be split successfully, that is, exist in the attribute Chinese for obtaining and be not present in Word or word in root chart, now, illustrate there is a problem of that root is lacked in root chart.
Optionally, when there is the word or word in being not present in root chart in the attribute Chinese for obtaining, that is, acquisition is worked as Attribute Chinese in exist cannot be found in root chart identical Chinese word word or word when.Can be failed by finding out this The word or word for being not present in root chart in the attribute Chinese that success splits, root standard add the root it is corresponding in Word word, translator of English and English abbreviation.
Optionally, because the attribute English name for obtaining may already exceed predetermined length, therefore attribute is obtained in translation After English name, it can be determined that whether overlength, i.e. attribute English name obtained by judgement are possessed the attribute English name of gained Byte number whether exceed the byte number subscribed, if exceeding, will the last byte that exceed in the attribute English name of the overlength Removal, the attribute English name that the English byte that will finally remain is obtained as translation;If not less than, then this is translated To attribute English name to find a great convenience be the attribute English name for finally obtaining.
Optionally, because the attribute English name for obtaining or may have same field English in physical model Literary fame claims, if the attribute English name will be also not allowed to as field English name, therefore, it can obtaining attribute English Judge whether already present all field English names are differed the attribute English name with physical model after title, if Differ, then using the attribute English name as the field English name in physical model;If not differing, then this is belonged to Property English name last letter replace with a predetermined positive integer n, such as 1.
Optionally, for last letter to be replaced with the attribute English name of n, still may be in physical model Through presence and its title identical field English name, therefore, obtaining replacing with last letter the attribute English name of n Also needed to after title judge this by last letter replace with n attribute English name whether with physical model already present institute There is field English name different, if so, last letter then to be replaced with the attribute English name of n as physical model In field English name;If it is not, this then to be replaced with last letter last word of the attribute English name of n Mother replaces with n+1, until already present all field English names substituted for last letter with this in physical model Attribute English name is different, obtains the field English name in physical model.
Based on above-mentioned technical proposal, the interpretation method and system for Data Mart provided in an embodiment of the present invention will be obtained The entity Chinese for taking is automatically translated into entity English name, and table is English during the entity English name is considered as into physical model Title;The attribute Chinese of acquisition is automatically translated into attribute English name, the attribute English name is considered as physics mould Field English name in type.Interpretation method provided in an embodiment of the present invention and system, physics mould is generated using full automatic mode Type, the attribute of identical Chinese can be translated as identical field English name, and physical model mistake is being generated by logical model Cheng Zhong, it is ensured that the uniformity of attribute Chinese to field English name, so as to ensure that the normalization of physical model name; Whole Data Mart project team only needs to the one or one group personnel of specialty to carry out root translation, it is ensured that the standard of root translation True reasonability, so as to improve the quality of physical model name;Adopt completely and in an automated fashion translated Chinese, with Mode was manually generated in the past to compare, the workload of physical model generation was greatly reduced, and improve the formation speed of physical model, Logical model to the generating process of physical model is shortened, and then improves whole Data Mart Project design development efficiency.
Optionally, Fig. 2 processes the entity English that automatic translation is obtained in showing interpretation method provided in an embodiment of the present invention The method flow diagram that literary fame claims, reference picture 2, the method for the entity Chinese that treatment automatic translation is obtained can include:
Step S200:The entity English name that obtains of judgement whether with physical model already present all table English names It is different, if so, then enter step S230, if it is not, then entering step S210;
May there is same table English name in the entity English name for obtaining, in physical model if by gained There is the entity English name of same table English name in physical model as table English name, will not be permitted Perhaps, accordingly, it would be desirable to be made to determine whether already present all table English with physical model to it after entity English name is obtained Literary fame claims the treatment for differing.
If the entity English name for obtaining all table English names already present from physical model are different, illustrate In physical model not with the entity English name identical table English name for obtaining, can be using the entity English name as thing Table English name in reason model.
Step S210:Last letter of the entity English name of gained is replaced with into a predetermined Integer n;
Wherein, the span of n is 0 to 9, i.e. 0≤n≤9.
Wherein, when the character in the entity English name of gained according to arranging from left to right, then described last letter Refer to a letter of low order end, it is when the character in described entity English name according to arranging from top to bottom, then described last One letter refers to a letter of bottom.
Optionally, it is 1 that can set the positive integer n, even one entity English name " B_0U_OGU " of acquisition, and physics There is the table English name of entitled " B_0U_OGU " in model, then, then the entity English name that this is obtained is changed It is " B_0U_OG1 ".
Step S220:Judge this by last letter replace with n entity English name whether with physical model in The all table English names for existing are different, if so, then enter step S230, if it is not, then entering step S240;
For the entity English name that last letter is replaced with n, still may exist in physical model With its title identical table English name, therefore, also needed after the entity English name for obtaining replacing with last letter n Judge this by last letter replace with n entity English name whether with physical model already present all tables English Title is different.
Step S230:Obtain the table English name in physical model;
Step S240:N is entered as n+1, i.e. n=n+1;
Optionally, if the value of n is set into 1 before, then after n is entered as into n+1, the value of the n for obtaining will be changed into 2.
Optionally, if when the value of n is 9, the value of the n+1 for obtaining is 1.
Step S250:Last letter of the entity English name of gained is replaced with into n, into step S220.
If always present in substituted for last alphabetical identical entity English name, the value of n is replaced always Change, until already present all table English names substituted for the entity English name of last letter with this in physical model Difference, obtains the table English name in physical model.
Optionally, Fig. 3 processes the attribute English that automatic translation is obtained in showing interpretation method provided in an embodiment of the present invention The method flow diagram that literary fame claims, reference picture 3, the method for processing the moral property Chinese of automatic translation can include:
Step S300:The attribute English name that obtains of judgement whether with physical model already present all field English names Claim different;If so, then enter step S330, if it is not, then entering step S310
May there is same field English name in the attribute English name of gained, in physical model if by gained Attribute English name will be also not allowed to as field English name, accordingly, it would be desirable to it after attribute English name is obtained It is made to determine whether the treatment that already present all field English names are differed with physical model.
If the attribute English name for obtaining all field English names already present from physical model are different, illustrate In physical model not with the attribute English name identical field English name for obtaining, the attribute English name can be referred to as It is the field English name in physical model.
Step S310:Last letter of the attribute English name of gained is replaced with into a predetermined Integer n;
Wherein, the span of n is 0 to 9, i.e. 0≤n≤9.Wherein, when the character in attribute English name is according to from a left side Turn right arrangement, then described last letter refers to a letter of low order end, when the character in attribute English name according to from On down arrange, then described last letter refers to a letter of bottom.
Step S320:Judge this by last letter replace with n attribute English name whether with physical model in The all field English names for existing are different, if so, then enter step S330, if it is not, then entering step S340;
For the attribute English name that last letter is replaced with n, still may exist in physical model With its title identical field English name, therefore, after the attribute English name for obtaining replacing with last letter n also Need judge this by last letter replace with n attribute English name whether with physical model already present all fields English name is different.
Step S330:Obtain the field English name in physical model;
Step S340:N is entered as n+1, i.e. n=n+1 by this;
Optionally, if the value of n is set into 1 before, then after n is entered as into n+1, the value of the n for obtaining will be changed into 2.
Optionally, if when the value of n is 9, the value of the n+1 for obtaining is 1.
Step S350:Last letter of the attribute English name of gained is replaced with into n, into step S320.
If always present in substituted for last alphabetical identical attribute English name, the value of n is replaced always Change, until already present all field English names substituted for the attribute English name of last letter with this in physical model Claim difference, obtain the field English name in physical model.
Optionally, Fig. 4 shows that the entity Chinese that will be obtained in interpretation method provided in an embodiment of the present invention is automatic The method flow diagram of entity English name is translated as, the entity Chinese of acquisition is automatically translated into entity English by reference picture 4 The method of title can include:
Step S400:The entity Chinese of acquisition is split, entity root is obtained;
Optionally, entity Chinese that can be according to longest match principle from left to right to obtaining is split as depositing one by one It is entity root in root chart.
Step S410:All entity roots are translated as by corresponding entity English abbreviation according to root chart;
There is Chinese word, translator of English and English abbreviation three in root chart, optionally, can be according to the entity word for obtaining Root, find in root chart with the entity root identical Chinese word, then the Chinese word again by finding find and the Chinese word Corresponding English abbreviation, the entity English abbreviation that the English abbreviation is obtained needed for being.
Step S420:All entity English abbreviations are spliced by preordering method in a predetermined order, and is added automatically The English prefix of theme where the entity English name is represented, the corresponding entity English name of entity Chinese is obtained.
Optionally, all entity English abbreviations that will can be obtained put in order according to its corresponding entity root Row splicing.
Optionally, it is possible to use all entity English abbreviations that underlined characters will be obtained are spliced.
Optionally, Fig. 5 shows that the attribute Chinese that will be obtained in interpretation method provided in an embodiment of the present invention is automatic The method flow diagram of attribute English name is translated as, the attribute Chinese of acquisition is automatically translated into attribute English by reference picture 5 The method of title can include:
Step S500:The attribute Chinese of acquisition is split, attribute root is obtained;
Optionally, attribute Chinese that can be according to longest match principle from left to right to obtaining is split as depositing one by one It is entity root in root chart.
Step S510:All properties root is translated as by corresponding attribute English abbreviation according to root chart;
There is Chinese word, translator of English and English abbreviation three in root chart, optionally, can be according to the attribute word for obtaining Root, find in root chart with the attribute root identical Chinese word, then the Chinese word again by finding find and the Chinese word Corresponding English abbreviation, the attribute English abbreviation that the English abbreviation is obtained needed for being.
Step S520:All properties English abbreviation is spliced by preordering method in a predetermined order, in obtaining attribute Literary fame claims corresponding attribute English name.
Optionally, all properties English abbreviation that will can be obtained puts in order according to its corresponding attribute root Row splicing.
Optionally, it is possible to use all properties English abbreviation that underlined characters will be obtained is spliced.
Optionally, Fig. 6 is carried out the entity Chinese of acquisition in showing interpretation method provided in an embodiment of the present invention The method flow diagram of fractionation, reference picture 6 can include the method that the entity Chinese of acquisition is split:
Step S600:Judge the entity Chinese for obtaining whether in root chart;
Step S610:If not existing, one Chinese character of rearmost end in the entity Chinese is removed, obtain this and remove rearmost end One entity Chinese of Chinese character;
Step S620:If using the entity Chinese as an entity root, and by the entity root from the reality Removed in body Chinese, obtain the entity Chinese for eliminating the entity root.
Wherein, the entity Chinese for being obtained in step S600 to step S620 is arranged for left and right directions, and step S600 is arrived Step S620 is the method split to the entity Chinese for obtaining from left to right using longest match principle.Wherein step Rearmost end in S620 refers to low order end.If turned left from the right side using longest match principle is carried out to the entity Chinese for obtaining Split, then the rearmost end in step S620 refers to high order end.
Accordingly, using longest match principle from left to right to the method that is split of attribute Chinese that obtains with make The method split to the attribute Chinese for obtaining from left to right with longest match principle is corresponding.
Optionally, Fig. 7 is carried out the attribute Chinese of acquisition in showing interpretation method provided in an embodiment of the present invention The method flow diagram of fractionation, reference picture 7 can include the method that the attribute Chinese of acquisition is split:
Step S700:Judge the attribute Chinese for obtaining whether in root chart;
Step S710:If not existing, one Chinese character of rearmost end in the attribute Chinese is removed, obtain this and remove rearmost end One attribute Chinese of Chinese character;
Step S720:If using the attribute Chinese as an attribute root, and by the attribute root from the category Property Chinese in remove, obtain the attribute Chinese for eliminating the attribute root.
Wherein, the attribute Chinese page for being obtained in step S700 to step S720 is left and right directions arrangement, step S700 It is the method split to the attribute Chinese for obtaining from left to right using longest match principle to step S720.Wherein walk Rearmost end in rapid S720 refers to low order end.If turning left to enter the attribute Chinese for obtaining from the right side using longest match principle Row splits, then the rearmost end in step S720 refers to high order end wherein.
Wherein, in entity Chinese is removed after one Chinese character of rearmost end, or last is removed in entity Chinese After individual Chinese character, there is no Chinese character in the entity Chinese of acquisition, i.e. a Chinese character for eliminating rearmost end is the reality for obtaining Last Chinese character in body Chinese, then non-existent neologisms in root chart, it is necessary to add during explanation has root chart Root, i.e., expand root chart.
Optionally, Fig. 8 shows the method flow diagram of expansion root chart in interpretation method provided in an embodiment of the present invention, ginseng According to Fig. 8, the method for adding root chart can include:
Step S800:It is determined that removing the entity Chinese of one Chinese character of rearmost end;
Step S810:Judge whether all Chinese characters have all been removed in the entity Chinese;
Step S820:If so, not being split as in then finding out the corresponding primary entities Chinese of the entity Chinese The Chinese character of entity root;
Wherein, primary entities Chinese refers to the original Chinese being stored in logical model.
Correspondence primary entities Chinese, wherein the word in being present in root chart, will be all split non-entity root, And do not exist and the word in root chart, it is impossible to it is split.
Step S830:Translator of English and the abbreviation of all Chinese characters for not being split as entity root are added in root chart;
Be not split as entity root Chinese character may that be a word or a word, or multiple word will be, it is necessary to respectively will These words not split and word are added in root chart.
Step S840:It is determined that removing the attribute Chinese of one Chinese character of rearmost end;
Step S850:Judge whether all Chinese characters have all been removed in the attribute Chinese;
Step S860:If so, not being split as in then finding out the corresponding primitive attribute Chinese of the attribute Chinese The Chinese character of attribute root;
Wherein, primitive attribute Chinese refers to the attribute Chinese being stored in logical model.
Correspondence primitive attribute Chinese, wherein the word in being present in root chart, will be all split non-attribute root, And do not exist and the word in root chart, it is impossible to it is split.
Step S870:Translator of English and the abbreviation of all Chinese characters for not being split as attribute root are added in root chart.
Be not split as attribute root Chinese character may that be a word or a word, or multiple word will be, it is necessary to respectively will These words not split and word are added in root chart.
Optionally, after being split to the entity Chinese for obtaining, whether the entity Chinese can be split Completion judged, again the entity root that each is splitted out translate after the completion of fractionation and is obtained entity English abbreviation.
Optionally, Fig. 9 judges that the entity Chinese for obtaining is in showing interpretation method provided in an embodiment of the present invention It is no to split the method flow diagram for completing, reference picture 9, judge acquisition entity Chinese whether split the method for completion can To include:
Step S900:It is determined that eliminating the entity Chinese of entity root;
Step S910:Whether judge to obtain eliminates in the entity Chinese of entity root comprising Chinese character;
Step S920:If not including, illustrate that the entity Chinese for obtaining has split completion, will be all according to root chart Entity root is translated as corresponding entity English abbreviation;
Step S930:If comprising, illustrating that the entity Chinese for obtaining does not split completion, acquisition does not split completion also Entity Chinese.
The entity Chinese for splitting is not completed pair also, continuation fractionation will be carried out to the entity Chinese, until splitting Complete.
Optionally, Figure 10 judges that the attribute Chinese for obtaining is in showing interpretation method provided in an embodiment of the present invention The no method flow diagram for having split completion, reference picture 10 judges whether the attribute Chinese for obtaining has split completion Method can include:
Step S1000:It is determined that except the attribute Chinese of attribute root;
Step S1010:Whether judge to obtain eliminates in the attribute Chinese of attribute root comprising Chinese character;
Step S1020:If not including, illustrate that the attribute Chinese for obtaining has split completion, according to root chart by institute There is attribute root to be translated as corresponding attribute English abbreviation;
Step S1030:If comprising, illustrating that the attribute Chinese for obtaining does not split completion, acquisition has not split also Into attribute Chinese.
The attribute Chinese for splitting is not completed pair also, continuation fractionation will be carried out to the attribute Chinese, until splitting Complete.
For the entity English name for obtaining, and the attribute English name for obtaining, both of which exists to exceed subscribes byte number Possibility, therefore, it can entity English name and attribute English name to obtaining judge whether the treatment of overlength.
Optionally, Figure 11 shows the method stream of processing entities English name in interpretation method provided in an embodiment of the present invention Cheng Tu, reference picture 11, the method for processing entities English name can include:
Step S1100:It is determined that the corresponding entity English name of the entity Chinese for obtaining;
Step S1110:Judge whether the byte number of gained entity English name exceedes predetermined byte number;
Optionally, the byte number of reservation can be 30, and the predetermined byte number of setting is more, then entity English name is permitted The byte number for being permitted to possess is then more.
Step S1120:If exceeding, remove the byte that the entity English name rearmost end exceeds.
Optionally, Figure 12 shows the method stream of processing attribute English name in interpretation method provided in an embodiment of the present invention Cheng Tu, reference picture 12, the method for processing attribute English name can include:
Step S1200:It is determined that the corresponding attribute English name of the attribute Chinese for obtaining;
Step S1210:Judge whether the byte number of gained attribute English name exceedes predetermined byte number;
Step S1220:If exceeding, remove the last byte for exceeding of the attribute English name.
Interpretation method provided in an embodiment of the present invention, for Data Mart, physical model is generated using full automatic mode, The normalization of physical model name is ensure that, the quality of physical model name is improve, and shortens logical model to physics mould The generating process of type, and then improve whole Data Mart Project design development efficiency.
Translation system provided in an embodiment of the present invention is introduced below, translation system described below with it is described above Interpretation method can be mutually to should refer to.
Figure 13 shows that the present invention implements the system block diagram of translation system for providing, reference picture 13, and the translation system can be with Including:First translation module 100 and the second translation module 200;Wherein,
First translation module 100, for entity Chinese in logical model to be translated as into table English name in physical model Claim;
Second translation module 200, for attribute Chinese in logical model to be translated as into field English in physical model Title.
Optionally, Figure 14 shows that the present invention implements the structured flowchart of the first translation module 100 in the translation system for providing, Reference picture 14, first translation module 100 can include:The translation unit 120 of first acquisition unit 110 and first, wherein,
First acquisition unit 110, for obtaining entity Chinese in logical model;
First translation unit 120, for the entity Chinese of acquisition to be automatically translated into entity English name, will be described Entity English name is considered as table English name in physical model.
Optionally, Figure 15 shows that the present invention implements the structured flowchart of the second translation module 200 in the translation system for providing, Reference picture 15, second translation module 200 can include:The translation unit 220 of second acquisition unit 210 and second, wherein,
Second acquisition unit 210, for obtaining attribute Chinese in logical model;
Second translation unit 220, for the attribute Chinese of acquisition to be automatically translated into attribute English name, will be described Attribute English name is considered as field English name in physical model.
Optionally, Figure 16 shows the structural frames of the first translation unit 120 in translation system provided in an embodiment of the present invention Figure, reference picture 16, first translation unit 120 can include:First splits the translation subelement 122 of subelement 121, first and the One splicing subelement 123, wherein,
First splits subelement 121, for the entity Chinese of acquisition to be split, obtains entity root;
First translation subelement 122, for all entity roots to be translated as into corresponding entity English letter according to root chart Claim;
First splicing subelement 123, for all entity English abbreviations to be spelled by preordering method in a predetermined order Connect, and obtain the corresponding reality of entity Chinese plus the English prefix for representing theme where the entity English name automatically Body English name.
Optionally, Figure 17 shows the structural frames of the second translation unit 220 in translation system provided in an embodiment of the present invention Figure, reference picture 17, second translation unit 220 can include:Second splits the translation subelement 222 of subelement 221, second and the Two splicing subelements 223, wherein,
Second splits subelement 221, for the attribute Chinese of acquisition to be split, obtains attribute root;
Second translation subelement 222, for all properties root to be translated as into corresponding attribute English letter according to root chart Claim;
Second splicing subelement 223, for all properties English abbreviation to be spelled by preordering method in a predetermined order Connect, obtain the corresponding attribute English name of attribute Chinese.
Optionally, Figure 18 shows another knot of the first translation unit 120 in translation system provided in an embodiment of the present invention Structure block diagram, reference picture 18, first translation unit 120 can also include:First judgment sub-unit 124,
Whether the first judgment sub-unit 124, the byte number for the entity English name obtained by judgement exceedes predetermined word Joint number, if exceeding, removes the byte that the entity English name rearmost end exceeds;
Whether first is considered as subelement 125, already present with physical model for the entity English name obtained by judgement All table English names are different, if it is, the table English name in obtaining physical model, if it is not, by the entity of gained Last letter of English name replaces with a predetermined Integer n, 0≤n≤9;Judge that this replaces last letter For whether already present from physical model the entity English name of n all table English names are different, if it is not, then will by this Last letter that last letter replaces with the entity English name of n replaces with n+1, until existing in physical model All table English names it is different from the entity English name that this substituted for last letter, obtain the table in physical model English name;
Optionally, Figure 19 shows another knot of the second translation unit 220 in translation system provided in an embodiment of the present invention Structure block diagram, reference picture 19, second translation unit 220 can also include:Second judgment sub-unit 224,
Whether the second judgment sub-unit 224, the byte number for the attribute English name obtained by judgement exceedes predetermined word Joint number, if exceeding, removes the byte that the attribute English name rearmost end exceeds;
Second is considered as subelement 225, and whether the attribute English name obtained by judgement is already present all with physical model Field English name is different, if it is not, by last letter of the attribute English name of gained replace with one it is predetermined Integer n, 0≤n≤9;Judge in physical model already present all field English names whether with this by last letter The attribute English name for replacing with n is different, if it is not, last letter then this to be replaced with into the attribute English name of n Last letter replaces with n+1, until already present all field English names substituted for finally with this in physical model One attribute English name of letter is different, obtains the field English name in physical model.
Translation system provided in an embodiment of the present invention, for Data Mart, physical model is generated using full automatic mode, The normalization of physical model name is ensure that, the quality of physical model name is improve, and shortens logical model to physics mould The generating process of type, and then improve whole Data Mart Project design development efficiency.
Each embodiment is described by the way of progressive in this specification, and what each embodiment was stressed is and other The difference of embodiment, between each embodiment identical similar portion mutually referring to.For device disclosed in embodiment For, because it is corresponded to the method disclosed in Example, so description is fairly simple, related part is said referring to method part It is bright.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or uses the present invention. Various modifications to these embodiments will be apparent for those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, the present invention The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one The scope most wide for causing.

Claims (9)

1. a kind of interpretation method, for Data Mart, it is characterised in that including:
Obtain entity Chinese in logical model;The entity Chinese of acquisition is automatically translated into entity English name, will The entity English name is considered as table English name in physical model;
Obtain attribute Chinese in logical model;The attribute Chinese of acquisition is automatically translated into attribute English name, will The attribute English name is considered as field English name in physical model;
Wherein, it is described the entity English name is considered as physical model in table English name include:Entity English obtained by judgement Literary fame claims whether all table English names already present from physical model are different, if it is, the table in obtaining physical model English name, if it is not, last letter of the entity English name of gained is replaced with into a predetermined Integer n, 0≤ n≤9;Judge this by last letter replace with n entity English name whether with physical model already present all tables English name is different, if it is not, this then to be replaced with last letter last letter of the entity English name of n N+1 is replaced with, until already present all table English names substituted for the entity of last letter with this in physical model English name is different, obtains the table English name in physical model;
It is described the attribute English name is considered as physical model in field English name include:Attribute English name obtained by judgement Claim whether all field English names already present from physical model are different, if it is not, by the attribute English name of gained Last letter replace with a predetermined Integer n, 0≤n≤9;Judge already present all field English in physical model Literary fame claim it is whether different from the attribute English name that last letter is replaced with n by this, if it is not, then by this by last Last letter for the attribute English name that position letter replaces with n replaces with n+1, until already present all in physical model Field English name is different from the attribute English name that this substituted for last letter, obtains the field English in physical model Literary fame claims.
2. method according to claim 1, it is characterised in that
It is described the entity Chinese of acquisition is automatically translated into entity English name to include:The entity Chinese of acquisition is entered Row splits, and obtains entity root;All entity roots are translated as by corresponding entity English abbreviation according to root chart;By all entities English abbreviation is spliced by preordering method in a predetermined order, and automatically plus representing theme where the entity English name English prefix, obtain the corresponding entity English name of entity Chinese;
It is described the attribute Chinese of acquisition is automatically translated into attribute English name to include:The attribute Chinese of acquisition is entered Row splits, and obtains attribute root;All properties root is translated as by corresponding attribute English abbreviation according to root chart;By all properties English abbreviation is spliced by preordering method in a predetermined order, obtains the corresponding attribute English name of attribute Chinese.
3. method according to claim 2, it is characterised in that
It is described to be split the entity Chinese of acquisition, including:Judge the entity Chinese for obtaining whether in root chart In;If not existing, remove last Chinese character in the entity Chinese, obtain during this removes one entity of Chinese character of rearmost end Literary fame claims;If using the entity Chinese as an entity root, and by the entity root from the entity Chinese Middle removal, obtains the entity Chinese for eliminating the entity root;
It is described to be split the attribute Chinese of acquisition, including:Judge the attribute Chinese for obtaining whether in root chart In;If not existing, remove last Chinese character in the attribute Chinese, obtain during this removes one attribute of Chinese character of rearmost end Literary fame claims;If using the attribute Chinese as an attribute root, and by the attribute root from the entity Chinese Middle removal, obtains the attribute Chinese for eliminating the attribute root.
4. method according to claim 3, it is characterised in that
Described removing in the entity Chinese also includes after last Chinese character:Judge whether that all Chinese characters have all been removed, If so, the Chinese character of entity root is not split as in then finding out the corresponding primary entities Chinese of the entity Chinese, Translator of English and the abbreviation of all Chinese characters for not being split as entity root are added in root chart;
Described removing in the attribute Chinese also includes after last Chinese character:Judge whether that all Chinese characters have all been removed, If so, the Chinese character of attribute root is not split as in then finding out the corresponding primitive attribute Chinese of the attribute Chinese, Translator of English and the abbreviation of all Chinese characters for not being split as attribute root are added in root chart.
5. method according to claim 3, it is characterised in that
Described acquisition after this eliminates the entity Chinese of the entity root also includes:Judge that what is obtained eliminates the reality Whether Chinese character is included in the entity Chinese of pronouns, general term for nouns, numerals and measure words root, if not including, illustrate that the entity Chinese for obtaining has split Into all entity roots are translated as into corresponding entity English abbreviation according to root chart;
Described acquisition after this eliminates the attribute Chinese of the attribute root also includes:Judge that what is obtained eliminates the category Property root entity Chinese in whether include Chinese character, if not including, illustrate obtain attribute Chinese split Into all entity roots are translated as into corresponding entity English abbreviation according to root chart.
6. method according to claim 2, it is characterised in that
It is described obtain the corresponding entity English name of entity Chinese after also include:The word of the entity English name obtained by judgement Whether joint number exceedes predetermined byte number, if exceeding, removes the byte that the entity English name rearmost end exceeds;
It is described obtain the corresponding attribute English name of attribute Chinese after also include:The word of the attribute English name obtained by judgement Whether joint number exceedes predetermined byte number, if exceeding, removes the byte that the attribute English name rearmost end exceeds.
7. a kind of translation system, for Data Mart, it is characterised in that including:First translation module and the second translation module;Its In,
First translation module, for entity Chinese in logical model to be translated as into table English name in physical model;
Second translation module, for attribute Chinese in logical model to be translated as into field English name in physical model Claim;
First translation module includes:First acquisition unit and the first translation unit, wherein, the first acquisition unit is used for Obtain entity Chinese in logical model;First translation unit is used to be automatically translated into the entity Chinese of acquisition Entity English name, table English name in physical model is considered as by the entity English name;
Second translation module includes:Second acquisition unit and the second translation unit, wherein, the second acquisition unit is used for Obtain attribute Chinese in logical model;Second translation unit is used to be automatically translated into the attribute Chinese of acquisition Attribute English name, field English name in physical model is considered as by the attribute English name;
Wherein, first translation unit also includes:First is considered as subelement, for the entity English name obtained by judgement whether All table English names already present from physical model are different, if it is, the table English name in obtaining physical model, such as Fruit is not that last letter of the entity English name of gained is replaced with into a predetermined Integer n, 0≤n≤9;Judging should Last letter is replaced with into the entity English name of n, and whether already present all table English names are not with physical model Together, if it is not, last letter that last letter is replaced with the entity English name of n then is replaced with into n+1, directly Already present all table English names are different from the entity English name that this substituted for last letter into physical model, Obtain the table English name in physical model;
Second translation unit also includes:Second is considered as subelement, for the attribute English name obtained by judgement whether with thing Already present all field English names are different in reason model, if it is not, by last position of the attribute English name of gained Letter replaces with a predetermined Integer n, 0≤n≤9;Judge in physical model whether is already present all field English names It is different from the attribute English name that last letter is replaced with n by this, if it is not, then this is replaced last letter For last letter of the attribute English name of n replaces with n+1, until already present all field English names in physical model Title is different from the attribute English name that this substituted for last letter, obtains the field English name in physical model.
8. translation system according to claim 7, it is characterised in that
First translation unit includes:First splits subelement, the first translation subelement and the first splicing subelement, wherein, The first fractionation subelement is used to be split the entity Chinese of acquisition, obtains entity root;First translation Unit is used to that all entity roots to be translated as into corresponding entity English abbreviation according to root chart;The first splicing subelement is used Spliced by preordering method in a predetermined order in by all entity English abbreviations, and it is automatically English plus the entity is represented The English prefix of theme, obtains the corresponding entity English name of entity Chinese where title;
Second translation unit includes:Second splits subelement, the second translation subelement and the second splicing subelement, wherein, The second fractionation subelement is used to be split the attribute Chinese of acquisition, obtains attribute root;Second translation Unit is used to that all properties root to be translated as into corresponding attribute English abbreviation according to root chart;The second splicing subelement is used Spliced by preordering method in a predetermined order in by all properties English abbreviation, obtained the corresponding attribute of attribute Chinese English name.
9. translation system according to claim 8, it is characterised in that
First translation unit also includes:First judgment sub-unit, for the byte number of the entity English name obtained by judgement Whether exceed predetermined byte number, if exceeding, remove the byte that the entity English name rearmost end exceeds;
Second translation unit also includes:Second judgment sub-unit, for the byte number of the attribute English name obtained by judgement Whether exceed predetermined byte number, if exceeding, remove the byte that the attribute English name rearmost end exceeds.
CN201410685502.2A 2014-11-25 2014-11-25 A kind of interpretation method and system Active CN104331401B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410685502.2A CN104331401B (en) 2014-11-25 2014-11-25 A kind of interpretation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410685502.2A CN104331401B (en) 2014-11-25 2014-11-25 A kind of interpretation method and system

Publications (2)

Publication Number Publication Date
CN104331401A CN104331401A (en) 2015-02-04
CN104331401B true CN104331401B (en) 2017-05-31

Family

ID=52406130

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410685502.2A Active CN104331401B (en) 2014-11-25 2014-11-25 A kind of interpretation method and system

Country Status (1)

Country Link
CN (1) CN104331401B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160105215A (en) * 2015-02-27 2016-09-06 삼성전자주식회사 Apparatus and method for processing text
CN108563645B (en) * 2018-04-24 2022-03-22 成都智信电子技术有限公司 Metadata translation method and device of HIS (hardware-in-the-system)
CN111144111A (en) * 2019-12-30 2020-05-12 北京世纪好未来教育科技有限公司 Translation method, device, equipment and storage medium
CN112084796B (en) * 2020-09-15 2021-04-09 南京文图景信息科技有限公司 Multi-language place name root Chinese translation method based on Transformer deep learning model

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6490590B1 (en) * 2000-02-14 2002-12-03 Ncr Corporation Method of generating a logical data model, physical data model, extraction routines and load routines
CN101094151A (en) * 2006-06-23 2007-12-26 国际商业机器公司 Method and device for changing web service policy from logic mode/into physic model
US7725434B2 (en) * 2003-04-15 2010-05-25 At&T Intellectual Property, I, L.P. Methods, systems, and computer program products for automatic creation of data tables and elements
CN103678714A (en) * 2013-12-31 2014-03-26 北京百度网讯科技有限公司 Construction method and device for entity knowledge base
CN103729460A (en) * 2014-01-10 2014-04-16 中国南方电网有限责任公司 Graphical data model managing method and system based on metadata

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9218408B2 (en) * 2010-05-27 2015-12-22 Oracle International Corporation Method for automatically creating a data mart by aggregated data extracted from a business intelligence server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6490590B1 (en) * 2000-02-14 2002-12-03 Ncr Corporation Method of generating a logical data model, physical data model, extraction routines and load routines
US7725434B2 (en) * 2003-04-15 2010-05-25 At&T Intellectual Property, I, L.P. Methods, systems, and computer program products for automatic creation of data tables and elements
CN101094151A (en) * 2006-06-23 2007-12-26 国际商业机器公司 Method and device for changing web service policy from logic mode/into physic model
CN103678714A (en) * 2013-12-31 2014-03-26 北京百度网讯科技有限公司 Construction method and device for entity knowledge base
CN103729460A (en) * 2014-01-10 2014-04-16 中国南方电网有限责任公司 Graphical data model managing method and system based on metadata

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
数据仓库建模技术的研究及其在银行客户管理系统中的应用;李兴;《中国优秀硕士学位论文全文数据库 信息科技辑》;20130415;第2013年卷(第4期);第37页倒数第4段到第38页 *

Also Published As

Publication number Publication date
CN104331401A (en) 2015-02-04

Similar Documents

Publication Publication Date Title
US9195738B2 (en) Tokenization platform
CN106649783B (en) Synonym mining method and device
CN103488648B (en) A kind of multilingual mixed index method and system
JP6163607B2 (en) Method and apparatus for constructing event knowledge database
CN105159949B (en) A kind of Chinese address segmenting method and system
CN105528372B (en) A kind of address search method and equipment
CN104331401B (en) A kind of interpretation method and system
WO2018040899A1 (en) Error correction method and device for search term
CN103365925B (en) Obtain polyphone phonetic, method based on phonetic retrieval and related device thereof
CN103514236B (en) Search condition error correcting prompt processing method based on phonetic in retrieval application
CN105975625A (en) Chinglish inquiring correcting method and system oriented to English search engine
CN110427618A (en) It fights sample generating method, medium, device and calculates equipment
US20030204400A1 (en) Constructing a translation lexicon from comparable, non-parallel corpora
CN106649464A (en) Method of building Chinese address tree and device
CN101131706A (en) Query amending method and system thereof
WO2003012685A2 (en) A data quality system
CN101131690A (en) Method and system for mutual conversion between simplified Chinese characters and traditional Chinese characters
CN108845982A (en) A kind of Chinese word cutting method of word-based linked character
JP2000181920A (en) Method for identifying one of many word groups by using question word
CN102867049A (en) Chinese PINYIN quick word segmentation method based on word search tree
US20090234852A1 (en) Sub-linear approximate string match
CN105159892B (en) A kind of language material extractor and the method for extracting language material
CN107608981B (en) Character matching method and system based on regular expression
CN105447104A (en) Knowledge map generating method and apparatus
CN105630764B (en) The address resolution method and device of finite state machine

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