CN104331401A - Translation method and translation system - Google Patents

Translation method and translation system Download PDF

Info

Publication number
CN104331401A
CN104331401A CN201410685502.2A CN201410685502A CN104331401A CN 104331401 A CN104331401 A CN 104331401A CN 201410685502 A CN201410685502 A CN 201410685502A CN 104331401 A CN104331401 A CN 104331401A
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.)
Granted
Application number
CN201410685502.2A
Other languages
Chinese (zh)
Other versions
CN104331401B (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

Landscapes

  • Document Processing Apparatus (AREA)
  • Machine Translation (AREA)

Abstract

The embodiment of the invention provides a translation method and a translation system, which are used for data marts. The translation method comprises the following steps: acquiring an entity Chinese name in a logic model; automatically translating the acquired entity Chinese name into an entity English name, and regarding the entity English name as a table English name in a physical model; acquiring an attribute Chinese name in the logic model, and automatically translating the acquired attribute Chinese name into an attribute English name, and regarding the attribute English name as a field English name in the physical model.

Description

A kind of interpretation method and system
Technical field
The present invention relates to translation technology field, particularly relate to a kind of interpretation method and system, be applied to Data Mart.
Background technology
Data Mart (Data Mart), is also Data Market, is a warehouse collecting data from the data of operation and other the data source for certain special professional's community services.From scope, data are database, data warehouse from enterprise-wide, or extract in more professional data warehouse.The emphasis of Data Mart is just that it has catered to the specific demand of professional user colony, in analysis, content, performance, and easy-to-use aspect.The user of data center wishes that data are that the term be familiar with by them shows.
At present, in Data Mart performance history, the Chinese of the entity in logical model and attribute is translated as in physical model and shows to have with the method for the English name of field that Chinese phonetic alphabet full word mother translates, word first letter of pinyin is translated, translate four kinds without implication Field translate and English phrase; Chinese phonetic alphabet full word mother translation, carrys out manual definition according to the entity of logical model and the full pinyin of attribute Chinese employing Chinese character and shows accordingly and field English name; Word first letter of pinyin is translated, manually first Chinese character is carried out word segmentation processing according to the entity of logical model and attribute Chinese, then for each word, translate into full pinyin, adopt the initial of the phonetic of each word as the English name of field and table name; Without implication Field translate, manually adopt the mode combined without the English alphabet of any particular meaning, numeral and special character, the entity successively in translation logic model and attribute Chinese; English phrase translation, according to entity and the attribute Chinese of logical model, first carries out word segmentation processing by artificial mode Chinese character, then for each word, translates into full English word, then uses character to connect.
Because the general scale of Data Mart project is larger, in above four kinds of interpretation methods, a large amount of designers is all needed to realize the generation of physical model, if each designer manually generates physical model, so, when identical attribute is in different entities, probably just be translated as different field English names, and in the design of Data Mart system logical model, attribute of the same name, no matter it is in which entity, what represent is all identical business implication, so generated in the process of physical model in principle by logical model, attribute of the same name should be translated as identical field name, so utilize prior art completion logic model entity and attribute Chinese to be translated as corresponding table and field English name, the standardization that physical model can be caused to name and quality cannot ensure.Simultaneously, in the process of manual generation physical model, ensure the implication of the reflection logical model that physical model is clearer and more definite, need which English name of designer's serious analysis can translate the implication of Chinese more accurately, and different designers is when facing identical attribute, identical problem is considered in capital, has a lot of repeated labor, and physical model formation efficiency is lower.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of interpretation method and system, generates physical model manually and the standardization that causes physical model to name and quality cannot ensure and the problem that physical model formation efficiency is lower to solve in prior art to use.
For achieving the above object, the embodiment of the present invention provides following technical scheme:
A kind of interpretation method, for Data Mart, comprising:
Obtain entity Chinese in logical model; The entity Chinese of acquisition is automatically translated into entity English name, described entity English name is considered as showing English name in physical model;
Obtain attribute Chinese in logical model; The attribute Chinese of acquisition is automatically translated into attribute English name, described attribute English name is considered as field English name in physical model.
Wherein, described entity English name is considered as showing English name in physical model to comprise:
Judge that whether the entity English name of gained is all different from all table English names already present in physical model, if so, obtain the table English name in physical model; If not, last letter of the entity English name of gained is replaced with a predetermined positive integer n, 0≤n≤9; Judge that whether this entity English name last letter being replaced with n is all different from all table English names already present in physical model, if not, last letter then last letter being replaced with by this entity English name of n replaces with n+1, until in physical model already present all table English names all substituted for last alphabetical entity English name from this different, obtain the table English name in physical model;
Describedly described attribute English name be considered as field English name in physical model comprise:
Judge that whether the attribute English name of gained is all different from all field English names already present in physical model, if not, last letter of the attribute English name of gained is replaced with a predetermined positive integer n, 0≤n≤9; Judge whether already present all field English names in physical model all replace with the attribute English name of n by last letter from this different, if not, last letter then last letter being replaced with by this attribute English name of n replaces with n+1, until in physical model already present all field English names all substituted for last alphabetical attribute English name from this different, obtain the field English name in physical model.
Wherein, the described entity Chinese by acquisition is automatically translated into entity English name and comprises:
The entity Chinese of acquisition is split, obtains entity root; According to root chart, all entity roots are translated as corresponding entity English abbreviation; All entity English abbreviation are spliced by preordering method in a predetermined order, and automatically adds the English prefix representing described entity English name place theme, obtain the entity English name that entity Chinese is corresponding;
The described attribute Chinese by acquisition is automatically translated into attribute English name and comprises:
The attribute Chinese of acquisition is split, obtains attribute root; According to root chart, all properties root is translated as corresponding attribute English abbreviation; All properties English abbreviation is spliced by preordering method in a predetermined order, obtains the attribute English name that attribute Chinese is corresponding.
Wherein, the described entity Chinese by acquisition splits, and comprising:
Judge that the entity Chinese obtained is whether in root chart; If do not exist, then remove last Chinese character in this entity Chinese, obtain the entity Chinese that this removes a rearmost end Chinese character; If, then using this entity Chinese as an entity root, and this entity root to be removed from this entity Chinese, obtains the entity Chinese that this eliminates described entity root;
The described attribute Chinese by acquisition splits, and comprising:
Judge that the attribute Chinese obtained is whether in root chart; If do not exist, then remove last Chinese character in this attribute Chinese, obtain the attribute Chinese that this removes a rearmost end Chinese character; If, then using this attribute Chinese as an attribute root, and this attribute root to be removed from this entity Chinese, obtains the attribute Chinese that this eliminates described attribute root.
Wherein, remove described in this entity Chinese and also comprise after last Chinese character:
Judge whether that all Chinese characters are all removed, if, then find out the Chinese character not being split as entity root in primary entities Chinese corresponding to this entity Chinese, in root chart, add all translator of English and the abbreviation that are not split as the Chinese character of entity root;
Described removing in this attribute Chinese also comprises after last Chinese character:
Judge whether that all Chinese characters are all removed, if, then find out the Chinese character not being split as attribute root in primitive attribute Chinese corresponding to this attribute Chinese, in root chart, add all translator of English and the abbreviation that are not split as the Chinese character of attribute root.
Wherein, described acquisition this eliminate the entity Chinese of described entity root after also comprise:
What judge acquisition eliminates in the entity Chinese of described entity root whether comprise Chinese character, if do not comprise, then illustrates that the entity Chinese of acquisition has split, according to root chart, all entity roots is translated as corresponding entity English abbreviation;
Described acquisition this eliminate the attribute Chinese of described attribute root after also comprise:
What judge acquisition eliminates in the entity Chinese of described attribute root whether comprise Chinese character, if do not comprise, then illustrates that the attribute Chinese of acquisition has split, according to root chart, all entity roots is translated as corresponding entity English abbreviation.
Wherein, also comprise after obtaining entity English name corresponding to entity Chinese described in:
Judge whether the byte number of the entity English name of gained exceedes predetermined byte number, if exceed, then remove the byte that this entity English name rearmost end exceeds;
Described obtain attribute English name corresponding to attribute Chinese after also comprise:
Judge whether the byte number of the attribute English name of gained exceedes predetermined byte number, if exceed, then remove the byte that this attribute English name rearmost end exceeds.
The embodiment of the present invention also provides a kind of translation system, for Data Mart, comprising: the first translation module and the second translation module; Wherein,
Described first translation module, shows English name for being translated as in physical model by entity Chinese in logical model;
Described second translation module, for being translated as field English name in physical model by attribute Chinese in logical model;
Wherein, described first translation module comprises: the first acquiring unit and the first translation unit, and wherein, described first acquiring unit is for obtaining entity Chinese in logical model; Described first translation unit is used for the entity Chinese of acquisition to be automatically translated into entity English name, is considered as showing English name in physical model by described entity English name;
Wherein, described second translation module comprises: second acquisition unit and the second translation unit, and wherein, described second acquisition unit is for obtaining attribute Chinese in logical model; Described second translation unit is used for the attribute Chinese of acquisition to be automatically translated into attribute English name, and described attribute English name is considered as field English name in physical model.
Wherein, described first translation unit comprises: first splits subelement, the first translation subelement and the first splicing subelement, wherein,
Described first splits subelement, for being split by the entity Chinese of acquisition, obtains entity root;
Described first translation subelement, for being translated as corresponding entity English abbreviation according to root chart by all entity roots;
Described first splicing subelement, for being spliced by preordering method in a predetermined order by all entity English abbreviation, and automatically being added the English prefix representing described entity English name place theme, obtaining the entity English name that entity Chinese is corresponding;
Wherein, described second translation unit comprises: second splits subelement, the second translation subelement and the second splicing subelement, wherein,
Described second splits subelement, for being split by the attribute Chinese of acquisition, obtains attribute root;
Described second translation subelement, for being translated as corresponding attribute English abbreviation according to root chart by all properties root;
Described second splicing subelement, for being spliced by preordering method in a predetermined order by all properties English abbreviation, obtains the attribute English name that attribute Chinese is corresponding.
Wherein, described first translation unit also comprises: the first judgment sub-unit,
Described first judgment sub-unit, whether the byte number for the entity English name judging gained exceedes predetermined byte number, if exceed, then removes the byte that this entity English name rearmost end exceeds;
First is considered as subelement, whether all different from all table English names already present in physical model for judging the entity English name of gained, if, obtain the table English name in physical model, if not, last letter of the entity English name of gained is replaced with a predetermined Integer n, 0≤n≤9; Judge that whether this entity English name last letter being replaced with n is all different from all table English names already present in physical model, if not, last letter then last letter being replaced with by this entity English name of n replaces with n+1, until in physical model already present all table English names all substituted for last alphabetical entity English name from this different, obtain the table English name in physical model;
Wherein, described second translation unit also comprises: the second judgment sub-unit,
Described second judgment sub-unit, whether the byte number for the attribute English name judging gained exceedes predetermined byte number, if exceed, then removes the byte that this attribute English name rearmost end exceeds;
Second is considered as subelement, whether all different from all field English names already present in physical model for judging the attribute English name of gained, if not, last letter of the attribute English name of gained is replaced with a predetermined Integer n, 0≤n≤9; Judge whether already present all field English names in physical model all replace with the attribute English name of n by last letter from this different, if not, last letter then last letter being replaced with by this attribute English name of n replaces with n+1, until in physical model already present all field English names all substituted for last alphabetical attribute English name from this different, obtain the field English name in physical model.
Based on technique scheme, the interpretation method for Data Mart that the embodiment of the present invention provides and system, be automatically translated into entity English name by the entity Chinese of acquisition, is considered as showing English name in physical model by described entity English name; The attribute Chinese of acquisition is automatically translated into attribute English name, described attribute English name is considered as field English name in physical model.The interpretation method that the embodiment of the present invention provides and system, full automatic mode is adopted to generate physical model, the attribute of identical Chinese can be translated as identical field English name, generating in physics model process by logical model, ensure that the consistance of attribute Chinese to field English name, thus ensure that the standardization that physical model is named; Whole Data Mart project team only needs the personnel of one or one group specialty to carry out root translation, ensures the accurate rationality of root translation, thus improves the quality of physical model name; Adopt completely and in an automated fashion Chinese is translated, compared with former manual generating mode, greatly reduce the workload that physical model generates, improve the formation speed of physical model, shorten the generative process of logical model to physical model, and then improve whole Data Mart Project design development efficiency.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only embodiments of the invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to the accompanying drawing provided.
The process flow diagram of the interpretation method that Fig. 1 provides for the embodiment of the present invention;
The method flow diagram of the entity English name that automatic translation obtains is processed in the interpretation method that Fig. 2 provides for the embodiment of the present invention;
The method flow diagram of the attribute English name that automatic translation obtains is processed in the interpretation method that Fig. 3 provides for the embodiment of the present invention;
In the interpretation method that Fig. 4 provides for the embodiment of the present invention, the entity Chinese of acquisition is automatically translated into the method flow diagram of entity English name;
In the interpretation method that Fig. 5 provides for the embodiment of the present invention, the attribute Chinese of acquisition is automatically translated into the method flow diagram of attribute English name;
In the interpretation method that Fig. 6 provides for the embodiment of the present invention, the entity Chinese of acquisition is carried out the method flow diagram split;
In the interpretation method that Fig. 7 provides for the embodiment of the present invention, the attribute Chinese of acquisition is carried out the method flow diagram split;
The method flow diagram of root chart is expanded in the interpretation method that Fig. 8 provides for the embodiment of the present invention;
The method flow diagram whether the entity Chinese obtained has split is judged in the interpretation method that Fig. 9 provides for the embodiment of the present invention;
The method flow diagram whether the attribute Chinese obtained has split is judged in the interpretation method that Figure 10 provides for the embodiment of the present invention;
The method flow diagram of processing entities English name in the interpretation method that Figure 11 provides for the embodiment of the present invention;
The method flow diagram of processing attribute English name in the interpretation method that Figure 12 provides for the embodiment of the present invention;
The system chart of the translation system that Figure 13 provides for the embodiment of the present invention;
The structured flowchart of the first translation module in the translation system that Figure 14 provides for the embodiment of the present invention;
The structured flowchart of the second translation module in the translation system that Figure 15 provides for the embodiment of the present invention;
The structured flowchart of the first translation unit in the translation system that Figure 16 provides for the embodiment of the present invention;
The structured flowchart of the second translation unit in the translation system that Figure 17 provides for the embodiment of the present invention;
Another structured flowchart of first translation unit in the translation system that Figure 18 provides for the embodiment of the present invention;
Another structured flowchart of second translation unit in the translation system that Figure 19 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The process flow diagram of the interpretation method that Fig. 1 provides for the embodiment of the present invention, for Data Mart, full automatic mode is adopted to generate physical model, ensure that the standardization that physical model is named, improve the quality of physical model name, and shorten the generative process of logical model to physical model, and then improve whole Data Mart Project design development efficiency, with reference to Fig. 1, the method can comprise:
Step S100: obtain entity Chinese in logical model;
Logical model comprises all entities and relation, and determines each entity attributes, defines the major key of each entity, specifies the external key of each entity, and whether specify attribute is code etc.
Such as, as shown in table 1, the logical model of " organization unit " entity in financial accounting Data Mart:
The logical model of " organization unit " entity in financial accounting Data Mart
Table 1
Can find out, wherein, physical name is called the logical model of " organization unit " entity in financial accounting Data Mart " organization unit ", obtains entity Chinese in this logical model and namely obtains Chinese character " organization unit ".
Step S110: the entity Chinese of acquisition is automatically translated into entity English name, is considered as showing English name in physical model by described entity English name;
Optionally, can by after the entity Chinese of acquisition being split as the entity root that is present in one by one in root chart, according to root chart, all entity roots are translated again, obtain the entity English abbreviation that each entity root is corresponding, again entity English abbreviation corresponding for each entity root obtained is spliced according to the predetermined predetermined method that sequentially passes through, and before it, automatically add the English prefix representing described entity English name place theme, thus obtain the entity English name corresponding to entity Chinese of acquisition.
Optionally, can be split as the entity Chinese obtained from left to right according to longest match principle and be present in entity root in root chart one by one, longest match principle, namely the entity root being stored in root chart in the entity Chinese of acquisition and having maximum Chinese character number is found, such as, root chart as shown in table 2 is had:
Root chart
Table 2
When the entity Chinese obtained is " economic capital metric results ", existing root " economy " and root " capital " in root chart, also has root " economic capital ", adopt longest match principle to split the entity Chinese obtained from left to right, then should using " economic capital ", " metering " and " result " as the entity root split out.
Due to the English name length in general database design, namely the byte number that English name has all has certain restriction, longest match principle is used to split the entity Chinese obtained, use longest match principle to split the entity root obtained to translate, splice translating the entity English abbreviation obtained afterwards, obtain the method for entity English name, the length of the entity English name of gained can be reduced to greatest extent, namely the byte number that the entity English name reducing gained to greatest extent has
As entity Chinese " economic capital ", if " economic capital " to be split as entity root " economy " and entity root " capital ", method according to underscore connects each entity English abbreviation, then the last entity English name obtained is " ECO_CAP ", and the entity English name obtained is 7 bytes; And if by " economic capital " itself as entity root " economic capital ", then the last entity English name obtained is " ECAP ", the entity English name obtained is 4 bytes, shorten the length of the entity English name of acquisition to a great extent, reduce the probability of the entity English name length overlength of acquisition.
Simultaneously, due to some combination Chinese present combination together time there is the implication of oneself uniqueness, the implication of this uniqueness is not that it is split the simple combination of each root implication rear, therefore, maximum match principle is used to be split by the entity Chinese of acquisition, the full sense of these portmanteau words can be guaranteed well, as entity Chinese " economic capital ", " economic capital " this portmanteau word itself has oneself exclusive implication, and this implication is not the simple combination of the implication of vocabulary " economy " and the implication of vocabulary " capital ".
Optionally, the all entity English abbreviation obtained can be spliced according to the putting in order of entity root of its correspondence, such as, when obtaining " economic capital ", during " metering " and " result " three entity roots, the entity English abbreviation translating the correspondence obtained is respectively " ECAP ", " MESR " and " RST ", and according to entity root " economic capital " being arranged in high order end first in entity root, entity root " metering " is arranged in high order end second, entity root " result " be arranged in low order end primary put in order to arrange realize English abbreviation, then entity English abbreviation " ECAP " should be arranged in high order end first, entity English abbreviation " MESR " is arranged in high order end second, entity English abbreviation " RST " is arranged in low order end first.
Optionally, underlined characters can be used to be spliced by all entity English abbreviation obtained, entity English abbreviation as obtained from left to right is respectively " ECAP ", " MESR " and " RST ", then the entity English name finally obtained is " ECAP_MESR_RST ".
If the entity Chinese obtained fails to be split into merit, exist in the entity Chinese namely obtained and be not present in word in root chart or word, in declarer root table, there is the problem of root disappearance.
Optionally, when exist in the entity Chinese obtained be not present in word in root chart or word time, namely when there is the word or word that cannot find identical Chinese word in root chart in the entity Chinese obtained.Word in root chart or word be can not being present in by finding out in this entity Chinese of splitting of failing, Chinese word corresponding to this root, translator of English and English abbreviation being added in root standard.
Optionally, because the entity English name obtained may exceed predetermined length, therefore after translation obtains entity English name, the entity English name whether overlength of gained can be judged, namely judge whether byte number that the entity English name of gained has exceedes the byte number of reservation, if exceed, then the byte finally exceeded in the entity English name of this overlength is removed, using the English byte finally remained as translating the entity English name obtained; If do not exceed, the entity English name that so this translation obtains is found a great convenience as the entity English name finally obtained.
As, the most long word joint number that entity English name can have if arrange is 12, if the entity Chinese obtained is " economic capital metric results ", it is " ECAP_MESR_RST " that this entity Chinese translates the entity English name obtained, and this entity English name has 13 bytes, more than 12 bytes, so, just removed by the 13rd bit byte in the use English name obtained, retain and remove front 12 bit bytes, the entity English name finally obtained is " ECAP_MESR_RS "; If the entity Chinese obtained is " metric results ", it is " MESR_RST " that this entity Chinese translates the entity English name obtained, and this entity English name has 8 bytes, more than 12 bytes, so, the entity English name finally obtained is found a great convenience as " MESR_RST ".
Due to dividing of data set municipalization theme, identical entity Chinese may be there is in logical model under different themes, identical entity Chinese name will be split as identical entity root, then identical entity word velamen is translated as identical English abbreviation, after these identical English abbreviation are spliced according to predetermined method mutually according to predetermined order, the splicing entity English name obtained is also by identical, if directly using this splicing entity English name as the table English name in physical model, the table English name that there is same names in physical model will be caused, this for not being allowed in design of physical model, therefore, in order to distinguish the entity of identical Chinese under different themes in physical model aspect, after obtaining splicing entity English name, automatically add the English prefix representing its place theme to this splicing entity English name.
Such as, " organization unit satellite information " table is under " organization unit " theme, the splicing entity English name that entity Chinese " organization unit satellite information " is splitting, translates and obtaining after splicing is " OGU_ATCH_INFO ", the prefix of theme " organization unit " can be represented for " B_OU_ ", entity English name " OGU_ATCH_INFO " will be spliced and automatically add that prefix " B_OU_ " obtains entity English name for " B_OU_OGU_ATCH_INFO ".
Optionally, after adding the prefix representing theme or may there is the table English name identical with it in the entity English name of gained in physical model, this entity English name also will not be allowed to as table English name, therefore, can judge after obtaining entity English name that whether this entity English name is all not identical with all table English names already present in physical model, if all not identical, then using this entity English name as the table English name in physical model; If not all not identical, then last letter of this entity English name is replaced with a predetermined Integer n, as 1.
Wherein, it should be noted that, a letter in English name only takies a byte, and a numeral also takies a byte, when last of entity English name replacing gained by a predetermined Integer n is alphabetical, owing to only substituted for a byte in gained entity English name, therefore, the Integer n of this reservation also only should take a byte, namely, this Integer n of subscribing be figure place one by one, i.e. the scope of the Integer n of this reservation is 0 to 9, i.e. 0≤n≤9.
Optionally, for the entity English name last letter being replaced with n, still the table English name identical with its title may have been there is in physical model, therefore, also need to judge that whether the entity English name that last letter is replaced with n by this is all different from all table English names already present in physical model after obtaining last letter to replace with the entity English name of n, if so, then this last letter is replaced with the entity English name of n as the table English name in physical model; If not, last letter then last letter being replaced with by this entity English name of n replaces with n+1, until in physical model already present all table English names all substituted for last alphabetical entity English name from this different, obtain the table English name in physical model.
Optionally, when the value of n is 9, and there is the table English name identical with its title in the entity English name last letter being replaced with n in physical model, when needing last letter of the entity English name last letter being replaced with by this n to replace with n+1, the value mathematically of n+1 is now 10, and numeral 10 has two bytes, therefore, can set, when the value of n is 9, the value of n+1 is 1.
The design of Data Mart comprises: Conceptual Model Design, logical model design and on the basis of logical model, generate physical model three step, wherein, the target of conceptual data model is uniform traffic concept, as the bridge of linking up between business personnel and technician, determine the relation of the highest level between different entities; Logical model, then according to the data structure of each upstream business system, according to the principle of point theme, designs multiple entity under each theme, containing multiple attribute in entity, and the main external key, storage policy etc. of designated entities; The basis of logical model generates physical model, groundwork is exactly the table English name translated into by the entity Chinese in logical model used by database design, simultaneously, attribute Chinese in logical model is translated into the field English name used by database design, and the physico key element such as data type, whether major key, whether subregion of determining field.
Can find out, the basis of logical model generate in this process of physical model, mainly comprise two parts, a part is the table English name translated into by the entity Chinese in logical model used by database design, and another part is the field English name translated into by the attribute Chinese in logical model used by database design.Step S100 to step S110 is for wherein translating into the concrete implementation step of the table English name used by database design by the entity Chinese in logical model.
Step S120: obtain attribute Chinese in logical model;
Such as, as shown in table 1, in the logical model of " organization unit " entity in financial accounting Data Mart, the attribute Chinese of 5 attributes comprised in entity " organization unit " is respectively: " organization unit numbering ", " source tissue's element number ", " Chinese ", " organization unit type code " and " mechanism's level ", the attribute Chinese obtained in this logical model is and obtains Chinese character " organization unit numbering ", " source tissue's element number ", " Chinese ", " organization unit type code " and " mechanism's level ", optionally, only obtain one of them attribute Chinese when can obtain at every turn, after having been translated by this attribute Chinese, word obtains next attribute Chinese.
Step S130: the attribute Chinese of acquisition is automatically translated into attribute English name, is considered as field English name in physical model by described attribute English name.
Optionally, can by after the attribute Chinese of acquisition being split as the attribute root that is present in one by one in root chart, according to root chart, all properties root is translated again, obtain the attribute English abbreviation that each attribute root is corresponding, again attribute English abbreviation corresponding for each attribute root obtained is spliced according to the predetermined predetermined method that sequentially passes through, thus obtain the attribute English name corresponding to attribute Chinese of acquisition.
Optionally, can be split as the attribute Chinese obtained from left to right according to longest match principle and be present in attribute root in root chart one by one, make the length of the attribute English name that can reduce gained to greatest extent, namely the byte number that the attribute English name reducing gained to greatest extent has, is no more than the byte number of reservation with the byte number of the attribute English name making acquisition; Meanwhile, make not destroy its distinctive implication of portmanteau word.
Optionally, the putting in order of entity root of all properties English abbreviation obtained according to its correspondence can be spliced, so that the attribute Chinese of its correspondence can be found rapidly after seeing attribute English abbreviation, improve readable.Optionally, underlined characters or space symbol can also be used to be spliced by all properties English abbreviation obtained, improve readability further.
When the attribute Chinese obtained fails to be split into merit, exist in the attribute Chinese namely obtained and be not present in word in root chart or word, now, in declarer root table, there is the problem of root disappearance.
Optionally, when exist in the attribute Chinese obtained be not present in word in root chart or word time, namely when there is the word or word that cannot find identical Chinese word in root chart in the attribute Chinese obtained.Can not be present in word in root chart or word by finding out in this attribute Chinese of splitting of failing, root standard add this root corresponding in word word, translator of English and English abbreviation.
Optionally, because the attribute English name obtained may exceed predetermined length, therefore after translation obtains attribute English name, the attribute English name whether overlength of gained can be judged, namely judge whether byte number that the attribute English name of gained has exceedes the byte number of reservation, if exceed, then the byte finally exceeded in the attribute English name of this overlength is removed, using the English byte finally remained as translating the attribute English name obtained; If do not exceed, the attribute English name that so this translation obtains is found a great convenience as the attribute English name finally obtained.
Optionally, because the attribute English name obtained or may exist the field English name identical with it in physical model, if this attribute English name also will not be allowed to as field English name, therefore, can judge after obtaining attribute English name that whether this attribute English name is all not identical with all field English names already present in physical model, if all not identical, then using this attribute English name as the field English name in physical model; If not all not identical, then last letter of this attribute English name is replaced with a predetermined positive integer n, as 1.
Optionally, for the attribute English name last letter being replaced with n, still the field English name identical with its title may have been there is in physical model, therefore, also need to judge that whether the attribute English name that last letter is replaced with n by this is all different from all field English names already present in physical model after obtaining last letter to replace with the attribute English name of n, if so, then this last letter is replaced with the attribute English name of n as the field English name in physical model; If not, last letter then last letter being replaced with by this attribute English name of n replaces with n+1, until in physical model already present all field English names all substituted for last alphabetical attribute English name from this different, obtain the field English name in physical model.
Based on technique scheme, the interpretation method for Data Mart that the embodiment of the present invention provides and system, be automatically translated into entity English name by the entity Chinese of acquisition, is considered as showing English name in physical model by described entity English name; The attribute Chinese of acquisition is automatically translated into attribute English name, described attribute English name is considered as field English name in physical model.The interpretation method that the embodiment of the present invention provides and system, full automatic mode is adopted to generate physical model, the attribute of identical Chinese can be translated as identical field English name, generating in physics model process by logical model, ensure that the consistance of attribute Chinese to field English name, thus ensure that the standardization that physical model is named; Whole Data Mart project team only needs the personnel of one or one group specialty to carry out root translation, ensures the accurate rationality of root translation, thus improves the quality of physical model name; Adopt completely and in an automated fashion Chinese is translated, compared with former manual generating mode, greatly reduce the workload that physical model generates, improve the formation speed of physical model, shorten the generative process of logical model to physical model, and then improve whole Data Mart Project design development efficiency.
Optionally, Fig. 2 shows the method flow diagram processing the entity English name that automatic translation obtains in the interpretation method that the embodiment of the present invention provides, and with reference to Fig. 2, the method for the entity Chinese that process automatic translation obtains can comprise:
Step S200: judge that whether the entity English name obtained is all different from all table English names already present in physical model, if so, then enter step S230, if not, then enter step S210;
The table English name identical with it may be there is in the entity English name obtained in physical model, if using the entity English name that there is the table English name identical with it in physical model of gained as table English name, can not be allowed to, therefore, need to determine whether the process all not identical with all table English names already present in physical model to it after obtaining entity English name.
If the entity English name obtained is all different from all table English names already present in physical model, table English name not identical with the entity English name obtained in physical model is then described, can using this entity English name as the table English name in physical model.
Step S210: last letter of the entity English name of gained is replaced with a predetermined Integer n;
Wherein, the span of n is 0 to 9, i.e. 0≤n≤9.
Wherein, character in the entity English name of gained is according to arranging from left to right, then last letter described refers to a letter of low order end, and the character in described entity English name is according to arranging from top to bottom, then last letter described refers to a letter bottom.
Optionally, can arrange this positive integer n is 1, even obtains an entity English name " B_0U_OGU ", and there is the table English name of " B_0U_OGU " by name in physical model, so, then the entity English name this obtained changes into " B_0U_OG1 ".
Step S220: judge that whether this entity English name last letter being replaced with n is all different from all table English names already present in physical model, if so, then enter step S230, if not, then enter step S240;
For the entity English name last letter being replaced with n, still the table English name identical with its title may have been there is in physical model, therefore, also need to judge that whether the entity English name that last letter is replaced with n by this is all different from all table English names already present in physical model after obtaining last letter to replace with the entity English name of n.
Step S230: obtain the table English name in physical model;
Step S240: be n+1, i.e. n=n+1 by n assignment;
Optionally, if before the value of n is set to 1, be so that after n+1, the value of the n obtained will become 2 by n assignment.
Optionally, if when the value of n is 9, the value of the n+1 obtained is 1.
Step S250: last letter of the entity English name of gained is replaced with n, enters step S220.
The entity English name that last letter is identical is substituted for if be present in always, then the value of n is replaced always, until in physical model already present all table English names all substituted for last alphabetical entity English name from this different, obtain the table English name in physical model.
Optionally, Fig. 3 shows the method flow diagram processing the attribute English name that automatic translation obtains in the interpretation method that the embodiment of the present invention provides, and with reference to Fig. 3, the method for the moral property Chinese of process automatic translation can comprise:
Step S300: judge that whether the attribute English name obtained is all different from all field English names already present in physical model; If so, then step S330 is entered, if not, then enter step S310
The field English name identical with it may be there is in the attribute English name of gained in physical model, if the attribute English name of gained also will not be allowed to as field English name, therefore, need to determine whether the process all not identical with all field English names already present in physical model to it after obtaining attribute English name.
If the attribute English name obtained is all different from all field English names already present in physical model, field English name not identical with the attribute English name obtained in physical model is then described, can using this attribute English name as the field English name in physical model.
Step S310: last letter of the attribute English name of gained is replaced with 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 arranging from left to right, then last letter described refers to a letter of low order end, and when the character in attribute English name is according to arranging from top to bottom, then last letter described refers to a letter bottom.
Step S320: judge that whether this attribute English name last letter being replaced with n is all different from all field English names already present in physical model, if so, then enter step S330, if not, then enter step S340;
For the attribute English name last letter being replaced with n, still the field English name identical with its title may have been there is in physical model, therefore, also need to judge that whether the attribute English name that last letter is replaced with n by this is all different from all field English names already present in physical model after obtaining last letter to replace with the attribute English name of n.
Step S330: obtain the field English name in physical model;
Step S340: be n+1, i.e. n=n+1 by n assignment by this;
Optionally, if before the value of n is set to 1, be so that after n+1, the value of the n obtained will become 2 by n assignment.
Optionally, if when the value of n is 9, the value of the n+1 obtained is 1.
Step S350: last letter of the attribute English name of gained is replaced with n, enter step S320.
The attribute English name that last letter is identical is substituted for if be present in always, then the value of n is replaced always, until in physical model already present all field English names all substituted for last alphabetical attribute English name from this different, obtain the field English name in physical model.
Optionally, Fig. 4 shows the method flow diagram in the interpretation method that the embodiment of the present invention provides, the entity Chinese of acquisition being automatically translated into entity English name, with reference to Fig. 4, the method that the entity Chinese of acquisition is automatically translated into entity English name can be comprised:
Step S400: the entity Chinese of acquisition is split, obtains entity root;
Optionally, can be split as be present in entity root in root chart one by one to the entity Chinese obtained from left to right according to longest match principle.
Step S410: all entity roots are translated as corresponding entity English abbreviation according to root chart;
There is in root chart Chinese word, translator of English and English abbreviation three, optionally, can according to the entity root obtained, find Chinese word identical with this entity root in root chart, and then find the English abbreviation corresponding with this Chinese word by the Chinese word found, the entity English abbreviation obtained needed for this English abbreviation is.
Step S420: all entity English abbreviation are spliced by preordering method in a predetermined order, and automatically add the English prefix representing described entity English name place theme, obtain the entity English name that entity Chinese is corresponding.
Optionally, all entity English abbreviation obtained can be spliced according to the putting in order of entity root of its correspondence.
Optionally, underlined characters can be used to be spliced by all entity English abbreviation obtained.
Optionally, Fig. 5 shows the method flow diagram in the interpretation method that the embodiment of the present invention provides, the attribute Chinese of acquisition being automatically translated into attribute English name, with reference to Fig. 5, the method that the attribute Chinese of acquisition is automatically translated into attribute English name can be comprised:
Step S500: the attribute Chinese of acquisition is split, obtains attribute root;
Optionally, can be split as be present in entity root in root chart one by one to the attribute Chinese obtained from left to right according to longest match principle.
Step S510: all properties root is translated as corresponding attribute English abbreviation according to root chart;
There is in root chart Chinese word, translator of English and English abbreviation three, optionally, can according to the attribute root obtained, find Chinese word identical with this attribute root in root chart, and then find the English abbreviation corresponding with this Chinese word by the Chinese word found, the attribute English abbreviation obtained needed for this English abbreviation is.
Step S520: spliced by preordering method in a predetermined order by all properties English abbreviation, obtains the attribute English name that attribute Chinese is corresponding.
Optionally, the putting in order of attribute root of all properties English abbreviation obtained according to its correspondence can be spliced.
Optionally, underlined characters can be used to be spliced by all properties English abbreviation obtained.
Optionally, Fig. 6 shows the method flow diagram being carried out by the entity Chinese of acquisition in the interpretation method that the embodiment of the present invention provides splitting, and with reference to Fig. 6, the method that the entity Chinese of acquisition carries out splitting can be comprised:
Step S600: judge that the entity Chinese obtained is whether in root chart;
Step S610: if do not exist, then remove rearmost end Chinese character in this entity Chinese, obtain the entity Chinese that this removes a rearmost end Chinese character;
Step S620: if, then using this entity Chinese as an entity root, and this entity root to be removed from this entity Chinese, obtains the entity Chinese that this eliminates described entity root.
Wherein, the entity Chinese obtained in step S600 to step S620 is left and right directions arrangement, and step S600 to step S620 uses longest match principle from left to right to the method that the entity Chinese obtained splits.Rearmost end wherein in step S620 refers to low order end.If use longest match principle turn left from the right side to obtain entity Chinese split, then the rearmost end in step S620 refers to high order end.
Accordingly, the method using longest match principle to split the attribute Chinese obtained from left to right is corresponding with the method using longest match principle to split the attribute Chinese obtained from left to right.
Optionally, Fig. 7 shows the method flow diagram being carried out by the attribute Chinese of acquisition in the interpretation method that the embodiment of the present invention provides splitting, and with reference to Fig. 7, the method that the attribute Chinese of acquisition carries out splitting can be comprised:
Step S700: judge that the attribute Chinese obtained is whether in root chart;
Step S710: if do not exist, then remove rearmost end Chinese character in this attribute Chinese, obtain the attribute Chinese that this removes a rearmost end Chinese character;
Step S720: if, then using this attribute Chinese as an attribute root, and this attribute root to be removed from this attribute Chinese, obtains the attribute Chinese that this eliminates described attribute root.
Wherein, the attribute Chinese page obtained in step S700 to step S720 is left and right directions arrangement, and step S700 to step S720 uses longest match principle from left to right to the method that the attribute Chinese obtained splits.Rearmost end wherein in step S720 refers to low order end.If use longest match principle turn left from the right side to obtain attribute Chinese split, then the rearmost end in step S720 refers to high order end wherein.
Wherein, in removal entity Chinese after rearmost end Chinese character, or to remove in entity Chinese after last Chinese character, Chinese character is not had in the entity Chinese obtained, that is, the Chinese character eliminating rearmost end is last Chinese character in the entity Chinese obtained, then illustrate to there are non-existent neologisms in root chart, need to add root in root chart, namely root chart is expanded.
Optionally, Fig. 8 shows the method flow diagram expanding root chart in the interpretation method that the embodiment of the present invention provides, and with reference to Fig. 8, the method for adding root chart can comprise:
Step S800: determine the entity Chinese removing a rearmost end Chinese character;
Step S810: judge in this entity Chinese, whether all Chinese characters are all removed;
Step S820: if so, then find out the Chinese character not being split as entity root in primary entities Chinese corresponding to this entity Chinese;
Wherein, primary entities Chinese refers to, is stored in the original Chinese in logical model.
Corresponding primary entities Chinese, is wherein present in the word in root chart, will be all split non-entity root, and not exist and the word in root chart, and can not be split.
Step S830: add all translator of English and the abbreviation that are not split as the Chinese character of entity root in root chart;
The Chinese character not being split as entity root may that be a word or a word, or multiple word, and the word that these do not split by needs respectively and word all add in root chart.
Step S840: determine the attribute Chinese removing a rearmost end Chinese character;
Step S850: judge in this attribute Chinese, whether all Chinese characters are all removed;
Step S860: if so, then find out the Chinese character not being split as attribute root in primitive attribute Chinese corresponding to this attribute Chinese;
Wherein, primitive attribute Chinese refers to, is stored in the attribute Chinese in logical model.
Corresponding primitive attribute Chinese, is wherein present in the word in root chart, will be all split non-attribute root, and not exist and the word in root chart, and can not be split.
Step S870: add all translator of English and the abbreviation that are not split as the Chinese character of attribute root in root chart.
The Chinese character not being split as attribute root may that be a word or a word, or multiple word, and the word that these do not split by needs respectively and word all add in root chart.
Optionally, whether after splitting the entity Chinese obtained, can split this entity Chinese and judge, the entity root having split out to each again after having split carries out translation and obtains entity English abbreviation.
Optionally, Fig. 9 shows in the interpretation method that the embodiment of the present invention provides and judges the method flow diagram whether the entity Chinese obtained has split, and with reference to Fig. 9, judges that the method whether the entity Chinese of acquisition has split can comprise:
Step S900: determine the entity Chinese eliminating entity root;
Step S910: what judge acquisition eliminates in the entity Chinese of entity root whether comprise Chinese character;
Step S920: if do not comprise, then illustrate that the entity Chinese of acquisition has split, according to root chart, all entity roots is translated as corresponding entity English abbreviation;
Step S930: if comprise, then illustrate that the entity Chinese of acquisition has not split, and obtains the entity Chinese also do not split.
To the entity Chinese also not completing fractionation, continuation will be carried out to this entity Chinese and split, until split.
Optionally, Figure 10 shows in the interpretation method that the embodiment of the present invention provides and judges the method flow diagram whether the attribute Chinese obtained has split, and with reference to Figure 10, judges that the method whether the attribute Chinese of acquisition has split can comprise:
Step S1000: determine the attribute Chinese except attribute root;
Step S1010: what judge acquisition eliminates in the attribute Chinese of attribute root whether comprise Chinese character;
Step S1020: if do not comprise, then illustrate that the attribute Chinese of acquisition has split, according to root chart, all properties root is translated as corresponding attribute English abbreviation;
Step S1030: if comprise, then illustrate that the attribute Chinese of acquisition has not split, and obtains the attribute Chinese also do not split.
To the attribute Chinese also not completing fractionation, continuation will be carried out to this attribute Chinese and split, until split.
For the entity English name obtained, and the attribute English name obtained, all there is the possibility exceeding and subscribe byte number in both, therefore, can judge whether the process of overlength to the entity English name obtained and attribute English name.
Optionally, Figure 11 shows the method flow diagram of processing entities English name in the interpretation method that the embodiment of the present invention provides, and with reference to Figure 11, the method for processing entities English name can comprise:
Step S1100: determine the entity English name that the entity Chinese that obtains is corresponding;
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 the entity English name byte number that is allowed to have is then more.
Step S1120: if exceed, then remove the byte that this entity English name rearmost end exceeds.
Optionally, Figure 12 shows the method flow diagram of processing attribute English name in the interpretation method that the embodiment of the present invention provides, and with reference to Figure 12, the method for processing attribute English name can comprise:
Step S1200: determine the attribute English name that the attribute Chinese that obtains is corresponding;
Step S1210: judge whether the byte number of gained attribute English name exceedes predetermined byte number;
Step S1220: if exceed, then remove the byte that this attribute English name finally exceeds.
The interpretation method that the embodiment of the present invention provides, for Data Mart, full automatic mode is adopted to generate physical model, ensure that the standardization that physical model is named, improve the quality of physical model name, and shorten the generative process of logical model to physical model, and then improve whole Data Mart Project design development efficiency.
Be introduced the translation system that the embodiment of the present invention provides below, translation system described below can mutual corresponding reference with above-described interpretation method.
Figure 13 shows the system chart of the translation system that the invention process provides, and with reference to Figure 13, this translation system can comprise: the first translation module 100 and the second translation module 200; Wherein,
First translation module 100, shows English name for being translated as in physical model by entity Chinese in logical model;
Second translation module 200, for being translated as field English name in physical model by attribute Chinese in logical model.
Optionally, Figure 14 shows the structured flowchart of the first translation module 100 in the translation system that the invention process provides, and with reference to Figure 14, this first translation module 100 can comprise: the first acquiring unit 110 and the first translation unit 120, wherein,
First acquiring unit 110, for obtaining entity Chinese in logical model;
First translation unit 120, for the entity Chinese of acquisition is automatically translated into entity English name, is considered as showing English name in physical model by described entity English name.
Optionally, Figure 15 shows the structured flowchart of the second translation module 200 in the translation system that the invention process provides, and with reference to Figure 15, this second translation module 200 can comprise: second acquisition unit 210 and the second translation unit 220, wherein,
Second acquisition unit 210, for obtaining attribute Chinese in logical model;
Second translation unit 220, for the attribute Chinese of acquisition is automatically translated into attribute English name, is considered as field English name in physical model by described attribute English name.
Optionally, Figure 16 shows the structured flowchart of the first translation unit 120 in the translation system that the embodiment of the present invention provides, and with reference to Figure 16, this first translation unit 120 can comprise: first splits subelement 121, first translates subelement 122 and the first splicing subelement 123, wherein
First splits subelement 121, for being split by the entity Chinese of acquisition, obtains entity root;
First translation subelement 122, for being translated as corresponding entity English abbreviation according to root chart by all entity roots;
First splicing subelement 123, for being spliced by preordering method in a predetermined order by all entity English abbreviation, and automatically being added the English prefix representing described entity English name place theme, obtaining the entity English name that entity Chinese is corresponding.
Optionally, Figure 17 shows the structured flowchart of the second translation unit 220 in the translation system that the embodiment of the present invention provides, and with reference to Figure 17, this second translation unit 220 can comprise: second splits subelement 221, second translates subelement 222 and the second splicing subelement 223, wherein
Second splits subelement 221, for being split by the attribute Chinese of acquisition, obtains attribute root;
Second translation subelement 222, for being translated as corresponding attribute English abbreviation according to root chart by all properties root;
Second splicing subelement 223, for being spliced by preordering method in a predetermined order by all properties English abbreviation, obtains the attribute English name that attribute Chinese is corresponding.
Optionally, Figure 18 shows another structured flowchart of the first translation unit 120 in the translation system that the embodiment of the present invention provides, and with reference to Figure 18, this first translation unit 120 can also comprise: the first judgment sub-unit 124,
First judgment sub-unit 124, whether the byte number for the entity English name judging gained exceedes predetermined byte number, if exceed, then removes the byte that this entity English name rearmost end exceeds;
First is considered as subelement 125, whether all different from all table English names already present in physical model for judging the entity English name of gained, if, obtain the table English name in physical model, if not, last letter of the entity English name of gained is replaced with a predetermined Integer n, 0≤n≤9; Judge that whether this entity English name last letter being replaced with n is all different from all table English names already present in physical model, if not, last letter then last letter being replaced with by this entity English name of n replaces with n+1, until in physical model already present all table English names all substituted for last alphabetical entity English name from this different, obtain the table English name in physical model;
Optionally, Figure 19 shows another structured flowchart of the second translation unit 220 in the translation system that the embodiment of the present invention provides, and with reference to Figure 19, this second translation unit 220 can also comprise: the second judgment sub-unit 224,
Second judgment sub-unit 224, whether the byte number for the attribute English name judging gained exceedes predetermined byte number, if exceed, then removes the byte that this attribute English name rearmost end exceeds;
Second is considered as subelement 225, judges that whether the attribute English name of gained is all different from all field English names already present in physical model, if not, last letter of the attribute English name of gained is replaced with a predetermined Integer n, 0≤n≤9; Judge whether already present all field English names in physical model all replace with the attribute English name of n by last letter from this different, if not, last letter then last letter being replaced with by this attribute English name of n replaces with n+1, until in physical model already present all field English names all substituted for last alphabetical attribute English name from this different, obtain the field English name in physical model.
The translation system that the embodiment of the present invention provides, for Data Mart, full automatic mode is adopted to generate physical model, ensure that the standardization that physical model is named, improve the quality of physical model name, and shorten the generative process of logical model to physical model, and then improve whole Data Mart Project design development efficiency.
In this instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar portion mutually see.For device disclosed in embodiment, because it corresponds to the method disclosed in Example, so description is fairly simple, relevant part illustrates see method part.
To the above-mentioned explanation of the disclosed embodiments, professional and technical personnel in the field are realized or uses the present invention.To be apparent for those skilled in the art to the multiple amendment of these embodiments, General Principle as defined herein can without departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention can not be restricted to these embodiments shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (10)

1. an interpretation method, for Data Mart, is characterized in that, comprising:
Obtain entity Chinese in logical model; The entity Chinese of acquisition is automatically translated into entity English name, described entity English name is considered as showing English name in physical model;
Obtain attribute Chinese in logical model; The attribute Chinese of acquisition is automatically translated into attribute English name, described attribute English name is considered as field English name in physical model.
2. method according to claim 1, is characterized in that,
Describedly described entity English name is considered as showing English name in physical model comprises: judge that whether the entity English name of gained is all different from all table English names already present in physical model, if, obtain the table English name in physical model, if not, last letter of the entity English name of gained is replaced with a predetermined Integer n, 0≤n≤9; Judge that whether this entity English name last letter being replaced with n is all different from all table English names already present in physical model, if not, last letter then last letter being replaced with by this entity English name of n replaces with n+1, until in physical model already present all table English names all substituted for last alphabetical entity English name from this different, obtain the table English name in physical model;
Describedly described attribute English name is considered as field English name in physical model comprises: judge that whether the attribute English name of gained is all different from all field English names already present in physical model, if not, last letter of the attribute English name of gained is replaced with a predetermined Integer n, 0≤n≤9; Judge whether already present all field English names in physical model all replace with the attribute English name of n by last letter from this different, if not, last letter then last letter being replaced with by this attribute English name of n replaces with n+1, until in physical model already present all field English names all substituted for last alphabetical attribute English name from this different, obtain the field English name in physical model.
3. method according to claim 1, is characterized in that,
The described entity Chinese by acquisition is automatically translated into entity English name and comprises: split by the entity Chinese of acquisition, obtain entity root; According to root chart, all entity roots are translated as corresponding entity English abbreviation; All entity English abbreviation are spliced by preordering method in a predetermined order, and automatically adds the English prefix representing described entity English name place theme, obtain the entity English name that entity Chinese is corresponding;
The described attribute Chinese by acquisition is automatically translated into attribute English name and comprises: split by the attribute Chinese of acquisition, obtain attribute root; According to root chart, all properties root is translated as corresponding attribute English abbreviation; All properties English abbreviation is spliced by preordering method in a predetermined order, obtains the attribute English name that attribute Chinese is corresponding.
4. method according to claim 3, is characterized in that,
The described entity Chinese by acquisition splits, and comprising: judge that the entity Chinese obtained is whether in root chart; If do not exist, then remove last Chinese character in this entity Chinese, obtain the entity Chinese that this removes a rearmost end Chinese character; If, then using this entity Chinese as an entity root, and this entity root to be removed from this entity Chinese, obtains the entity Chinese that this eliminates described entity root;
The described attribute Chinese by acquisition splits, and comprising: judge that the attribute Chinese obtained is whether in root chart; If do not exist, then remove last Chinese character in this attribute Chinese, obtain the attribute Chinese that this removes a rearmost end Chinese character; If, then using this attribute Chinese as an attribute root, and this attribute root to be removed from this entity Chinese, obtains the attribute Chinese that this eliminates described attribute root.
5. method according to claim 4, is characterized in that,
Described removing in this entity Chinese also comprises after last Chinese character: judge whether that all Chinese characters are all removed, if, then find out the Chinese character not being split as entity root in primary entities Chinese corresponding to this entity Chinese, in root chart, add all translator of English and the abbreviation that are not split as the Chinese character of entity root;
Described removing in this attribute Chinese also comprises after last Chinese character: judge whether that all Chinese characters are all removed, if, then find out the Chinese character not being split as attribute root in primitive attribute Chinese corresponding to this attribute Chinese, in root chart, add all translator of English and the abbreviation that are not split as the Chinese character of attribute root.
6. method according to claim 4, is characterized in that,
Described acquisition this eliminate the entity Chinese of described entity root after also comprise: judge obtain eliminate in the entity Chinese of described entity root whether comprise Chinese character, if do not comprise, then illustrate that the entity Chinese of acquisition has split, according to root chart, all entity roots are translated as corresponding entity English abbreviation;
Described acquisition this eliminate the attribute Chinese of described attribute root after also comprise: judge obtain eliminate in the entity Chinese of described attribute root whether comprise Chinese character, if do not comprise, then illustrate that the attribute Chinese of acquisition has split, according to root chart, all entity roots are translated as corresponding entity English abbreviation.
7. method according to claim 3, is characterized in that,
Described obtain entity English name corresponding to entity Chinese after also comprise: judge whether the byte number of the entity English name of gained exceedes predetermined byte number, if exceed, then remove the byte that this entity English name rearmost end exceeds;
Described obtain attribute English name corresponding to attribute Chinese after also comprise: judge whether the byte number of the attribute English name of gained exceedes predetermined byte number, if exceed, then remove the byte that this attribute English name rearmost end exceeds.
8. a translation system, for Data Mart, is characterized in that, comprising: the first translation module and the second translation module; Wherein,
Described first translation module, shows English name for being translated as in physical model by entity Chinese in logical model;
Described second translation module, for being translated as field English name in physical model by attribute Chinese in logical model;
Described first translation module comprises: the first acquiring unit and the first translation unit, and wherein, described first acquiring unit is for obtaining entity Chinese in logical model; Described first translation unit is used for the entity Chinese of acquisition to be automatically translated into entity English name, is considered as showing English name in physical model by described entity English name;
Described second translation module comprises: second acquisition unit and the second translation unit, and wherein, described second acquisition unit is for obtaining attribute Chinese in logical model; Described second translation unit is used for the attribute Chinese of acquisition to be automatically translated into attribute English name, and described attribute English name is considered as field English name in physical model.
9. translation system according to claim 8, is characterized in that,
Described first translation unit comprises: first splits subelement, the first translation subelement and the first splicing subelement, and wherein, described first splits subelement is used for the entity Chinese of acquisition to split, and obtains entity root; Described first translation subelement is used for, according to root chart, all entity roots are translated as corresponding entity English abbreviation; Described first splicing subelement is used for all entity English abbreviation to be spliced by preordering method in a predetermined order, and automatically adds the English prefix representing described entity English name place theme, obtains the entity English name that entity Chinese is corresponding;
Described second translation unit comprises: second splits subelement, the second translation subelement and the second splicing subelement, and wherein, described second splits subelement is used for the attribute Chinese of acquisition to split, and obtains attribute root; Described second translation subelement is used for, according to root chart, all properties root is translated as corresponding attribute English abbreviation; Described second splicing subelement is used for all properties English abbreviation to be spliced by preordering method in a predetermined order, obtains the attribute English name that attribute Chinese is corresponding.
10. translation system according to claim 9, is characterized in that,
Described first translation unit also comprises: the first judgment sub-unit, and whether the byte number for the entity English name judging gained exceedes predetermined byte number, if exceed, then removes the byte that this entity English name rearmost end exceeds;
First is considered as subelement, whether all different from all table English names already present in physical model for judging the entity English name of gained, if, obtain the table English name in physical model, if not, last letter of the entity English name of gained is replaced with a predetermined Integer n, 0≤n≤9; Judge that whether this entity English name last letter being replaced with n is all different from all table English names already present in physical model, if not, last letter then last letter being replaced with by this entity English name of n replaces with n+1, until in physical model already present all table English names all substituted for last alphabetical entity English name from this different, obtain the table English name in physical model;
Described second translation unit also comprises: the second judgment sub-unit, and whether the byte number for the attribute English name judging gained exceedes predetermined byte number, if exceed, then removes the byte that this attribute English name rearmost end exceeds;
Second is considered as subelement, whether all different from all field English names already present in physical model for judging the attribute English name of gained, if not, last letter of the attribute English name of gained is replaced with a predetermined Integer n, 0≤n≤9; Judge whether already present all field English names in physical model all replace with the attribute English name of n by last letter from this different, if not, last letter then last letter being replaced with by this attribute English name of n replaces with n+1, until in physical model already present all field English names all substituted for last alphabetical attribute English name from this different, obtain the field English name in physical model.
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 true CN104331401A (en) 2015-02-04
CN104331401B 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)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930317A (en) * 2015-02-27 2016-09-07 三星电子株式会社 Apparatus And Method For Processing Text
CN108563645A (en) * 2018-04-24 2018-09-21 成都智信电子技术有限公司 The metadata interpretation method and device of HIS systems
CN111144111A (en) * 2019-12-30 2020-05-12 北京世纪好未来教育科技有限公司 Translation method, device, equipment and storage medium
WO2022057116A1 (en) * 2020-09-15 2022-03-24 南京文图景信息科技有限公司 Transformer deep learning model-based method for translating multilingual place name root into chinese

Citations (6)

* 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
US20110295792A1 (en) * 2010-05-27 2011-12-01 Oracle International Corporation Data mart automation
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

Patent Citations (6)

* 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
US20110295792A1 (en) * 2010-05-27 2011-12-01 Oracle International Corporation Data mart automation
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
李兴: "数据仓库建模技术的研究及其在银行客户管理系统中的应用", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930317A (en) * 2015-02-27 2016-09-07 三星电子株式会社 Apparatus And Method For Processing Text
CN108563645A (en) * 2018-04-24 2018-09-21 成都智信电子技术有限公司 The metadata interpretation method and device of HIS systems
CN111144111A (en) * 2019-12-30 2020-05-12 北京世纪好未来教育科技有限公司 Translation method, device, equipment and storage medium
WO2022057116A1 (en) * 2020-09-15 2022-03-24 南京文图景信息科技有限公司 Transformer deep learning model-based method for translating multilingual place name root into chinese

Also Published As

Publication number Publication date
CN104331401B (en) 2017-05-31

Similar Documents

Publication Publication Date Title
US9195738B2 (en) Tokenization platform
US7620538B2 (en) Constructing a translation lexicon from comparable, non-parallel corpora
CN105528372B (en) A kind of address search method and equipment
CN101131706A (en) Query amending method and system thereof
CN105975625A (en) Chinglish inquiring correcting method and system oriented to English search engine
CN103123624B (en) Determine method and device, searching method and the device of centre word
US20100161655A1 (en) System for string matching based on segmentation method and method thereof
TWI557580B (en) The application interface provides methods and devices
CN105159949A (en) Chinese address word segmentation method and system
CN104331401A (en) Translation method and translation system
CN103514236A (en) Retrieval condition error correction prompt processing method based on Pinyin in retrieval application
US20100228538A1 (en) Computational linguistic systems and methods
JP2019512127A (en) String distance calculation method and apparatus
CN107608981B (en) Character matching method and system based on regular expression
KR102015454B1 (en) Method for automatically editing pattern of document
CN101021851A (en) Text search device, text search method, recording medium for recording text search program
CN109800412A (en) A kind of Chinese word segmentation and big data information retrieval method and device
JP2016167123A (en) Common operation column extraction program, common operation column extraction method, and common operation column extraction apparatus
JP4646328B2 (en) Related information extraction apparatus and method
JP4783563B2 (en) Index generation program, search program, index generation method, search method, index generation device, and search device
CN113420219A (en) Method and device for correcting query information, electronic equipment and readable storage medium
CN112183074A (en) Data enhancement method, device, equipment and medium
CN107967303B (en) Corpus display method and apparatus
CN110795617A (en) Error correction method and related device for search terms
JP6076285B2 (en) Translation apparatus, translation method, and translation program

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