CN109447638A - Data processing method, device and the currency conversion scheme of currency conversion - Google Patents

Data processing method, device and the currency conversion scheme of currency conversion Download PDF

Info

Publication number
CN109447638A
CN109447638A CN201811228365.4A CN201811228365A CN109447638A CN 109447638 A CN109447638 A CN 109447638A CN 201811228365 A CN201811228365 A CN 201811228365A CN 109447638 A CN109447638 A CN 109447638A
Authority
CN
China
Prior art keywords
currency
digit
fractional
type information
data value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811228365.4A
Other languages
Chinese (zh)
Inventor
潘树洪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN201811228365.4A priority Critical patent/CN109447638A/en
Publication of CN109447638A publication Critical patent/CN109447638A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/381Currency conversion

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The present invention provides data processing method, device and the currency conversion scheme of a kind of currency conversion, after this method receives the data value after currency conversion and currency type information, by obtaining fractional currency digit corresponding with currency type information in the currency fractional currency digit information table that pre-establishes, and the operation that rounds up is carried out to data value according to fractional currency digit, obtain the currency conversion data result for meeting the fractional currency digit for exchanging currency type.Not only increase the accuracy of currency conversion, and only need to pre-establish currency fractional currency digit information table, and call round-off-function function can be realized and round up according to precision corresponding with fractional currency digit to data value, it has quickly completed and has rounded up to data value.

Description

Data processing method, device and the currency conversion scheme of currency conversion
Technical field
The invention belongs to currency conversion technical field more particularly to a kind of data processing method of currency conversion, device and Currency conversion scheme.
Background technique
Currency conversion refer to a kind of currency conversion needing at another currency by a kind of amount of money value of currency according to Current list price or the exchange rate calculates and is converted to the amount of money value of another currency.The existing method for realizing currency conversion is according to defeated The amount of money value that enters, initial currency type and exchange currency type, obtain initial currency type and exchange the exchange rate between currency type, by amount of money value according to The exchange rate is converted to the amount of money value after exchanging and exports, and completes currency conversion.
But the fractional currency digit of different Currencies is not identical in the world, such as dollar, the RMB of two fractional currency digits Deng, Bahrain Dinar, Rial Omani(RO) of three fractional currency digits etc., the yen of zero-bit fractional currency digit, won etc..If exchanging coin Kind for won, amount of money value after exchange is two-decimal point, such as 15000.56, due to won fractional currency digit be zero-bit, Currency conversion can not be completed according to the amount of money value after exchange.
Therefore, currency conversion method there are problems that currency conversion cannot be accurately finished in the prior art.
Summary of the invention
In view of this, the purpose of the present invention is to provide a kind of data processing method of currency conversion, device and currency to convert System is changed, to solve the problems, such as that currency conversion cannot be accurately finished in the prior art.
Technical solution is as follows:
The present invention provides a kind of data processing method of currency conversion, comprising:
Data value and currency type information after receiving currency conversion;
By the currency fractional currency digit information table pre-established, fractional currency digit corresponding with the currency type information is obtained;
The operation that rounds up is carried out to the data value according to the fractional currency digit, obtains data result.
Preferably, the currency fractional currency digit information table includes: currency type information and fractional currency digit, wherein the currency type letter Breath is corresponded with the fractional currency digit;
The currency type information includes at least one of the following:
Currency code, monetary name, currency number.
Preferably, currency fractional currency digit information table is established in the following manner:
The currency type information and fractional currency digit corresponding with the currency type information are sequentially input, currency fractional currency digit letter is generated Cease table;
There are when newly-increased currency type, by the currency type information of the newly-increased currency type and corresponding auxiliary with the currency type information of newly-increased currency type Coin digit is added in the currency fractional currency digit information table, updates the currency fractional currency digit information table.
Preferably, described that the operation that rounds up is carried out to the data value according to the fractional currency digit, obtain data result Include:
By predefined data dictionary, inner parameter corresponding with the fractional currency digit is determined;
Using the inner parameter, the operation that rounds up is carried out to the data value of input, obtains data result.
Preferably, the data dictionary includes: function interface parameter and function inner parameter;
Wherein, the function interface parameter includes function input interface parameter and function output interface parameter, the function Inner parameter includes fractional currency digit parameter and fractional currency data value parameter, and the fractional currency data value parameter and the fractional currency digit are joined Several data values corresponds.
The present invention also provides a kind of data processing equipments of currency conversion characterized by comprising
Receiving unit, for receiving the data value after currency conversion and currency type information;
Acquiring unit obtains corresponding with the currency type information for the currency fractional currency digit information table by pre-establishing Fractional currency digit;
Operating unit obtains data knot for carrying out the operation that rounds up to the data value according to the fractional currency digit Fruit.
Preferably, the currency fractional currency digit information table includes: currency type information and fractional currency digit, wherein the currency type letter Breath is corresponded with the fractional currency digit;
The currency type information includes at least one of the following:
Currency code, monetary name, currency number.
It preferably, further include establishing unit, for establishing currency fractional currency digit information table in the following manner:
The currency type information and fractional currency digit corresponding with the currency type information are sequentially input, currency fractional currency digit letter is generated Cease table;
There are when newly-increased currency type, by the currency type information of the newly-increased currency type and corresponding auxiliary with the currency type information of newly-increased currency type Coin digit is added in the currency fractional currency digit information table, updates the currency fractional currency digit information table.
Preferably, the operating unit includes:
Subelement is determined, for determining inner parameter corresponding with the fractional currency digit by predefined data dictionary;
Subelement is operated, for utilizing the inner parameter, the operation that rounds up is carried out to the data value of input, is obtained To data result.
The present invention also provides a kind of currency conversion schemes, using data processing method as described above.
Compared with prior art, above-mentioned technical proposal provided by the invention has the advantages that
From above-mentioned technical proposal it is found that passing through after receiving the data value after currency conversion and currency type information in the application Fractional currency digit corresponding with currency type information is obtained in the currency fractional currency digit information table pre-established, and according to fractional currency digit logarithm The operation that rounds up is carried out according to value, obtains the currency conversion data result for meeting the fractional currency digit for exchanging currency type.It not only increases The accuracy of currency conversion, and only need to pre-establish currency fractional currency digit information table, and call round-off-function function It can be realized and round up according to precision corresponding with fractional currency digit to data value, quickly completed and given up five to the four of data value Enter.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.
Fig. 1 is a kind of flow chart of the data processing method of currency conversion provided in an embodiment of the present invention;
Fig. 2 is the flow chart of the data processing method of another currency conversion provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of the data processing equipment of currency conversion provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of the data processing equipment of another currency conversion provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
The data processing method for present embodiments providing a kind of currency conversion, the system applied to offer currency conversion In, such as banking system, referring to Fig. 1, the embodiment the following steps are included:
Data value and currency type information after S101, reception currency conversion;
System receives data value, initial currency type and the exchange currency type of input, and obtains initial currency type and exchange coin The current exchange rate between kind, is calculated the data value after currency conversion according to the current exchange rate.Such as, the data value of input is 150, Initial currency type is RMB, and exchange currency type is dollar, obtains the exchange rate of RMB and dollar are as follows: 1 RMB=0.1449 dollar, Data value after currency conversion is then calculated is 150 × 0.1449=21.735, i.e., converts to 21.735 dollars for 150 yuan.
Data value and currency type information after receiving currency conversion, that is, receive 21.735 this data value and dollar this Currency type information.Wherein, for currency type information for uniquely determining currency type, the form of currency type information can be currency type title, Currency Code Or currency type number.Monetary name refer to currency Chinese referred to as, such as RMB, dollar, won;Currency code refer to The currency symbol that three English alphabets indicate, such as CNY, USD, wherein what CNY was indicated is RMB, and what USD was indicated is dollar; Currency number refers to the currency symbol indicated with three bit digitals, such as 001,014;Wherein, 001 expression is RMB, 014 table What is shown is dollar.
By taking dollar as an example, the currency type information received can be compiled for currency type title " dollar ", Currency Code " USD ", currency type Number " 014 ".
S102, the currency fractional currency digit information table by pre-establishing obtain fractional currency position corresponding with the currency type information Number;
Currency fractional currency digit information table is pre-established, is stored with currency type information and and coin in currency fractional currency digit information table The corresponding fractional currency digit of kind information.Fractional currency is the abbreviation of fractional currency, refers to standard money unit money of small denominations below, such as people Coin member angle below is divided.Fractional currency digit is fractional currency type number, is effective decimal place of the data value as unit of standard money Number.If there are angles, point both fractional currencies for RMB, then the fractional currency digit of RMB is two, the RMB number as unit of member It is 2 according to effective decimal digits is worth.Usually the fractional currency digit of currency includes 0,2 and 3 these three situations in the world.
Fractional currency digit such as corresponding with currency type information " dollar " is 2;It is corresponding with currency type information " Bahrain Dinar " auxiliary Coin digit is 3;Fractional currency digit corresponding with currency type information " won " is 0.In the present embodiment, it is tieed up in the form of mapping table Protect currency fractional currency digit information table.
After receiving currency type information, fractional currency position corresponding with the currency type information is searched in currency fractional currency digit information table Number.If currency type information is " dollar ", getting fractional currency digit corresponding with dollar by searching for currency fractional currency digit information table is 2 Position.
S103, the operation that rounds up is carried out to the data value according to the fractional currency digit, obtains data result.
In the present embodiment, after the data value after exchanging being calculated according to the exchange rate, if the precision of data value has been more than this The fractional currency digit of currency exchange, then carry out the operation that rounds up.If the fractional currency digit of RMB is two, the essence of data value Degree should be two effective decimals, if the data value after currency conversion is three effective decimals, need to be implemented the behaviour that rounds up Make so that the precision of the data value after currency conversion meets the fractional currency digit of the currency exchange.Herein, precision refers to data The decimal digits of value, the precision of such as data value of 0 decimal are that the precision of the data value of 0,2 decimals is the number of 2,3 decimals Precision according to value is 3.
The precision for the data value that different fractional currency digits execution obtain after rounding up is different, and e.g., fractional currency digit is 2, holds The precision for the data value that row obtains after rounding up is 2, i.e. 2 effective decimals;Fractional currency digit is 3, after execution rounds up The precision of obtained data value is 3, i.e. 3 effective decimals;Fractional currency digit is 0, executes the data value obtained after rounding up Precision be 0, i.e. 0 effective decimal.
Illustrate to round up to same data value according to different fractional currency digits by taking a specific data value as an example below After operation, obtained data result.
Data value is 21.7356, and currency exchange is dollar, and fractional currency digit is 2, carries out the behaviour that rounds up to 21.7356 The data result obtained after work is 21.74;
Data value is 21.7356, and currency exchange is Bahrain Dinar, and fractional currency digit is 3, carries out four houses to 21.7356 Five enter operation after obtained data result be 21.736;
Data value is 21.7356, currency exchange be won, fractional currency digit be 0, carry out the behaviour that rounds up to 21.7356 The data result obtained after work is 22.
In practical applications, before executing and carrying out according to fractional currency digit rounding up operation to data value, further includes: sentence Whether effective decimal digits of disconnected data value is greater than the fractional currency digit, if judging, effective decimal digits of data value is greater than fractional currency Digit then triggers the operation to round up according to fractional currency digit to data value for executing step S103, obtains data result, Complete currency conversion;If judging, effective decimal digits of data value is less than or equal to fractional currency digit, using data value as currency The data result of exchange completes currency conversion.
By judging whether to need to be implemented the operation that rounds up, only need to be implemented round up operation in the case where Triggering executes the operation to round up according to fractional currency digit, not only increases currency conversion efficiency and reduces system power dissipation.
From above-mentioned technical proposal it is found that after receiving the data value after currency conversion and currency type information in the present embodiment, lead to It crosses and obtains fractional currency digit corresponding with currency type information in the currency fractional currency digit information table pre-established, and according to fractional currency digit pair Data value carries out the operation that rounds up, and obtains the currency conversion data result for meeting the fractional currency digit for exchanging currency type.Not only improve The accuracy of currency conversion, and only need to pre-establish currency fractional currency digit information table, and call round-off-function letter Number, which can be realized, rounds up to data value according to precision corresponding with fractional currency digit, has quickly completed four houses to data value Five enter.
The present embodiment also discloses the data processing method of another currency conversion, and referring to fig. 2, which includes following Step:
S201, the currency type information and fractional currency digit corresponding with the currency type information are sequentially input, generates currency fractional currency Digit information table;
Need to establish currency fractional currency digit information table in the present embodiment before execution rounds up.Currency fractional currency digit letter Cease table in include currency type information and with the one-to-one fractional currency digit of currency type information, by sequentially inputting currency type information and and currency type The corresponding fractional currency digit of information generates currency fractional currency digit information table.
Currency type information includes at least one of the following:
Currency code, monetary name, currency number.
Optionally, in the present embodiment in currency fractional currency digit information table currency type information include currency code, monetary name with And currency number.
Specifically, the first field is currency code in the structure of currency fractional currency digit information table, and such as USD, the second field is Monetary name, such as dollar, third field is currency number, such as 014, and the 4th field is fractional currency digit, such as 2;4th field The currency type information of fractional currency digit and first three field has one-to-one relationship.
S202, there are when newly-increased currency type, by the currency type information of the newly-increased currency type and with the currency type information pair of newly-increased currency type The fractional currency digit answered is added in the currency fractional currency digit information table, updates the currency fractional currency digit information table;
Wherein, in the currency fractional currency digit information table, according to the size of fractional currency digit, currency type information described in sequential storage With fractional currency digit corresponding with the currency type information;
It is subsequent to need to safeguard this currency fractional currency digit information table after establishing currency fractional currency digit information table.There are newly-increased coin Kind when, the currency type information of newly-increased currency type and fractional currency digit corresponding with the currency type information of newly-increased currency type is added to and is had built up In currency fractional currency digit information table, and the currency fractional currency digit information table is updated, so that constantly improve currency fractional currency digit letter Table is ceased, so that the currency conversion between compatible various variety classes currency, improves the compatibility of method.
A kind of implementation for safeguarding currency fractional currency digit information table is to safeguard according to fractional currency digit, i.e., by fractional currency digit phase Same currency type information is stored together, convenient for management.Such as according to the size of fractional currency digit, sequential storage currency type information and and currency type The corresponding relationship of the corresponding fractional currency digit of information.
For example, the currency type information and fractional currency digit corresponding with currency type information of 0 fractional currency digit of maintenance are as follows:
Insert into GWCURBITINFO values (' BIF', ' Burundi franc ', ' 051', ' 0', ", ", ", ");
Insert into GWCURBITINFO values (' DJF', Djibouti Franc ', ' 146', ' 0', ", ", ", ");
Insert into GWCURBITINFO values (' JPY', ' yen ', ' 027', ' 0', ", ", ", ");
Insert into GWCURBITINFO values (' KRW', ' won ', ' 088', ' 0', ", ", ", ");
Safeguard the currency type information and fractional currency digit corresponding with currency type information of 2 fractional currency digits are as follows:
Insert into GWCURBITINFO values (' AUD', ' Australia ', ' 029', ' 2', ", ", ", ");
Insert into GWCURBITINFO values (' AWG', ' Aruba's shield ', ' 127', ' 2', ", ", ", ");
Insert into GWCURBITINFO values (' CNY', ' RMB ', ' 001', ' 2', ", ", ", ");
Insert into GWCURBITINFO values (' USD', ' dollar ', ' 014', ' 2', ", ", ", ");
Safeguard the currency type information and fractional currency digit corresponding with currency type information of 3 fractional currency digits are as follows:
Insert into GWCURBITINFO values (' AUB', ' three nine-day periods after the winter solstice hardware ', ' 003', ' 3', ", ", ", ");
Insert into GWCURBITINFO values (' BHD', ' Bahrain Dinar ', ' 009', ' 3', ", ", ", ").
With insert into GWCURBITINFO values (' USD', ' dollar ', ' 014', ' 2', ", ", ", ") for Description, USD, dollar, 014,2 are added in table, wherein corresponding first field of USD is currency code, dollar corresponding second Field is monetary name, and 014 corresponding third field is numbered for currency, and 2 corresponding 4th fields, are fractional currency digit.
It should be noted that although the step S201-S202 for establishing currency fractional currency digit information table is put in the present embodiment Before currency conversion, but ability after requiring sequence execution step S201-S202 before executing currency conversion every time is not it Execute currency conversion.And be only to indicate that currency conversion is realized based on the currency fractional currency digit information table pre-established, After establishing currency fractional currency digit information table, only need to access this currency fractional currency digit letter during executing currency conversion every time Table is ceased, does not need to execute currency conversion every time and all establishes a currency fractional currency digit information table.Only establishing goods After coin fractional currency digit information table, discovery issued a kind of new currency in the world, then, need the currency type information by new money with And fractional currency digit is added in currency fractional currency digit.
Data value and currency type information after S203, reception currency conversion;
It should be noted that the currency type information received should be identical as currency type information in currency fractional currency digit information table. If currency type information is currency code in currency fractional currency digit information table, then received currency type information is also currency code;Currency is auxiliary Currency type information is monetary name in coin digit information table, then received currency type information is also monetary name, currency fractional currency digit letter Ceasing currency type information in table is currency number, then received currency type information is also currency number.Certainly, if currency fractional currency digit is believed Currency type information includes that currency code, monetary name and currency number, the then monetary information received can be currency generation in breath table Code, monetary name, currency number in it is any one or more.
S204, the currency fractional currency digit information table by pre-establishing obtain fractional currency position corresponding with the currency type information Number;
The realization side of the implementation of step S203-S204 and step S101-S102 in a upper embodiment in the present embodiment Formula is similar, and details are not described herein again.
S205, pass through predefined data dictionary, determining inner parameter corresponding with the fractional currency digit;
It include function interface parameter and function inner parameter in data dictionary, wherein function interface parameter includes function Input interface parameter and function output interface parameter, function inner parameter include fractional currency digit parameter and with fractional currency digit parameter The corresponding fractional currency numerical parameter of numerical value.
As shown in table 1 below, the data dictionary defined for the present embodiment:
Table 1
First is classified as parameter coding in data dictionary, and second is classified as parameter name, wherein parameter coding and parameter name one One is corresponding;Third is classified as data type, and data type is 2 expression amount of money real-coded GAs, and data type is 1 expression integer According to data type is 0 expression character type data;4th is classified as data maximum length, the maximum length of expression parameter data value;The Five are classified as precision, effective decimal digits of expression parameter data value;6th is classified as data attribute;7th is classified as description, for pair Parameter interpretation explanation, using and safeguarding convenient for subsequent technology personnel.
V_AMT, V_CURRCY are function interface parameter in data dictionary, wherein V_CURRCY is function input interface ginseng Number, V_AMT is both function input interface parameter and function output interface parameter.Pass through function interface parameter invoking performance function It is rounded up with executing.But different fractional currency digits execute the precision to round up and are different, therefore also fixed in data dictionary Justice fractional currency digit and fractional currency data value parameter corresponding with the numerical value of fractional currency digit.
F_BITNUM is fractional currency digit parameter, and the numerical value of F_BITNUM includes 0,2,3;When fractional currency digit is 0, F_ BITNUM=0, when fractional currency digit is 2, F_BITNUM=2, when fractional currency digit is 3, F_BITNUM=3.
F_AMT0, F_AMT2, F_AMT3 are fractional currency data value parameter, the corresponding fractional currency data value parameter of F_BITNUM=0 For F_AMT0, the corresponding fractional currency data value parameter of F_BITNUM=2 is F_AMT2, the corresponding fractional currency data value of F_BITNUM=3 Parameter is F_AMT3.
Receiving currency type information, and by getting fractional currency digit in currency fractional currency digit information table after, fractional currency digit The numerical value of parameter can determine, and fractional currency data value parameter corresponding with the numerical value of fractional currency digit parameter also can determine.
For example, receiving 21.735 dollars, determine that the fractional currency digit of dollar is 2 by currency fractional currency digit information table, Then F_BITNUM=2, determining inner parameter are F_AMT2.And V_CURRCY=014 or V_CURRCY=USD;V_AMT= 21.735。
S206, using the inner parameter, the operation that rounds up is carried out to the data value of input, obtains data knot Fruit.
The present embodiment execution, which rounds up, to be realized by invoking performance function.It is to receive 21.735 dollars below Example describes the operation that rounds up.
The fractional currency digit that dollar is determined by currency fractional currency digit information table is 2, then the input of power function is V_ CURRCY=014 or V_CURRCY=USD;V_AMT=21.735;After execution F_AMT2=V_AMT, V_AMT=F_AMT2, function The output of energy function is V_AMT=21.74.
F_AMT2=V_AMT refers to the data value that the data value of input is rounded to two effective decimals, at this time V_AMT is used as function input interface parameter, i.e., is rounded to 21.74 to 21.735;V_AMT=F_AMT2 refer to by Data value output after rounding up, V_AMT is used as function output interface parameter at this time, i.e., by 21.74 outputs to obtain Final data result after currency conversion.
From above-mentioned technical proposal it is found that after receiving the data value after currency conversion and currency type information in the present embodiment, lead to It crosses and obtains fractional currency digit corresponding with currency type information in the currency fractional currency digit information table pre-established, and according to fractional currency digit pair Data value carries out the operation that rounds up, and obtains the currency conversion data result for meeting the fractional currency digit for exchanging currency type.Not only improve The accuracy of currency conversion, and only need to pre-establish currency fractional currency digit information table, and call round-off-function letter Number, which can be realized, rounds up to data value according to precision corresponding with fractional currency digit, has quickly completed four houses to data value Five enter.Meanwhile the currency conversion between various variety classes currency can be compatible with by more new money fractional currency digit information table, it mentions High compatibility.
The data processing method of corresponding above-mentioned currency conversion, the present invention also provides a kind of data processing of currency conversion dresses It sets, the data processing equipment is desirably integrated into the arbitrary system for providing currency conversion, such as banking system.
The structural schematic diagram of the data processing equipment please refers to shown in Fig. 3, and data processing equipment includes: in the present embodiment
Receiving unit 301, acquiring unit 302 and operating unit 303;
Receiving unit 301, for receiving the data value after currency conversion and currency type information;
Acquiring unit 302 obtains and the currency type information pair for the currency fractional currency digit information table by pre-establishing The fractional currency digit answered;
The currency fractional currency digit information table includes: currency type information and fractional currency digit, wherein the currency type information with it is described Fractional currency digit corresponds;
The currency type information includes at least one of the following:
Currency code, monetary name, currency number.
Operating unit 303 obtains data for carrying out the operation that rounds up to the data value according to the fractional currency digit As a result.
From above-mentioned technical proposal it is found that after receiving the data value after currency conversion and currency type information in the present embodiment, lead to It crosses and obtains fractional currency digit corresponding with currency type information in the currency fractional currency digit information table pre-established, and according to fractional currency digit pair Data value carries out the operation that rounds up, and obtains the currency conversion data result for meeting the fractional currency digit for exchanging currency type.Not only improve The accuracy of currency conversion, and only need to pre-establish currency fractional currency digit information table, and call round-off-function letter Number, which can be realized, rounds up to data value according to precision corresponding with fractional currency digit, has quickly completed four houses to data value Five enter.
The present invention also provides the data processing equipment of another currency conversion, the data processing equipment is compared to Fig. 3 The data processing equipment further includes establishing unit 401;
Unit 401 is established, for establishing currency fractional currency digit information table in the following manner:
The currency type information and fractional currency digit corresponding with the currency type information are sequentially input, currency fractional currency digit letter is generated Cease table;
There are when newly-increased currency type, by the currency type information of the newly-increased currency type and corresponding auxiliary with the currency type information of newly-increased currency type Coin digit is added in the currency fractional currency digit information table, updates the currency fractional currency digit information table;Wherein, the currency In fractional currency digit information table, according to the size of fractional currency digit, currency type information described in sequential storage and corresponding with the currency type information Fractional currency digit.
In the present embodiment, operating unit 303 includes:
Determine subelement and operation subelement;
The determining subelement, for determining inside corresponding with the fractional currency digit by predefined data dictionary Parameter;
The operation subelement carries out the behaviour that rounds up to the data value of input for utilizing the inner parameter Make, obtains data result.
From above-mentioned technical proposal it is found that after receiving the data value after currency conversion and currency type information in the present embodiment, lead to It crosses and obtains fractional currency digit corresponding with currency type information in the currency fractional currency digit information table pre-established, and according to fractional currency digit pair Data value carries out the operation that rounds up, and obtains the currency conversion data result for meeting the fractional currency digit for exchanging currency type.Not only improve The accuracy of currency conversion, and only need to pre-establish currency fractional currency digit information table, and call round-off-function letter Number, which can be realized, rounds up to data value according to precision corresponding with fractional currency digit, has quickly completed four houses to data value Five enter.Meanwhile the currency conversion between various variety classes currency can be compatible with by more new money fractional currency digit information table, it mentions High compatibility.
The data processing method of corresponding above-mentioned currency conversion, the present invention also provides a kind of currency conversion scheme, this implementations The data processing method of currency conversion disclosed in above-described embodiment is applied in the currency conversion scheme of example, according to exchange rate reality After stock currency exchange, then rounding up for corresponding precision is carried out to the data after currency conversion, obtains accurately currency conversion knot Fruit.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.The device provided for embodiment For, since it is corresponding with the method that embodiment provides, so being described relatively simple, related place is said referring to method part It is bright.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or equipment for including a series of elements not only includes those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or equipment institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including institute State in the process, method, article or equipment of element that there is also other identical elements.
The foregoing description of the disclosed embodiments can be realized those skilled in the art or using the present invention.To this A variety of modifications of a little embodiments will be apparent for a person skilled in the art, and the general principles defined herein can Without departing from the spirit or scope of the present invention, to realize in other embodiments.Therefore, the present invention will not be limited It is formed on the embodiments shown herein, and is to fit to consistent with the principles and novel features disclosed in this article widest Range.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (10)

1. a kind of data processing method of currency conversion characterized by comprising
Data value and currency type information after receiving currency conversion;
By the currency fractional currency digit information table pre-established, fractional currency digit corresponding with the currency type information is obtained;
The operation that rounds up is carried out to the data value according to the fractional currency digit, obtains data result.
2. the method according to claim 1, wherein the currency fractional currency digit information table includes: currency type information With fractional currency digit, wherein the currency type information and the fractional currency digit correspond;
The currency type information includes at least one of the following:
Currency code, monetary name, currency number.
3. according to the method described in claim 2, it is characterized in that, establishing currency fractional currency digit information table in the following manner:
The currency type information and fractional currency digit corresponding with the currency type information are sequentially input, currency fractional currency digit information is generated Table;
There are when newly-increased currency type, by the currency type information of the newly-increased currency type and fractional currency position corresponding with the currency type information of newly-increased currency type Number is added in the currency fractional currency digit information table, updates the currency fractional currency digit information table.
4. method according to claim 1 to 3, which is characterized in that it is described according to the fractional currency digit to described Data value carries out the operation that rounds up, and obtains data result and includes:
By predefined data dictionary, inner parameter corresponding with the fractional currency digit is determined;
Using the inner parameter, the operation that rounds up is carried out to the data value of input, obtains data result.
5. according to the method described in claim 4, it is characterized in that, the data dictionary includes: function interface parameter and function Inner parameter;
Wherein, the function interface parameter includes function input interface parameter and function output interface parameter, inside the function Parameter includes fractional currency digit parameter and fractional currency data value parameter, the fractional currency data value parameter and the fractional currency digit parameter Data value corresponds.
6. a kind of data processing equipment of currency conversion characterized by comprising
Receiving unit, for receiving the data value after currency conversion and currency type information;
Acquiring unit obtains corresponding auxiliary with the currency type information for the currency fractional currency digit information table by pre-establishing Coin digit;
Operating unit obtains data result for carrying out the operation that rounds up to the data value according to the fractional currency digit.
7. data processing equipment according to claim 6, which is characterized in that the currency fractional currency digit information table includes: Currency type information and fractional currency digit, wherein the currency type information and the fractional currency digit correspond;
The currency type information includes at least one of the following:
Currency code, monetary name, currency number.
8. data processing equipment according to claim 7, which is characterized in that further include establishing unit, for by following Mode establishes currency fractional currency digit information table:
The currency type information and fractional currency digit corresponding with the currency type information are sequentially input, currency fractional currency digit information is generated Table;
There are when newly-increased currency type, by the currency type information of the newly-increased currency type and fractional currency position corresponding with the currency type information of newly-increased currency type Number is added in the currency fractional currency digit information table, updates the currency fractional currency digit information table.
9. according to data processing equipment described in claim 6-8 any one, which is characterized in that the operating unit includes:
Subelement is determined, for determining inner parameter corresponding with the fractional currency digit by predefined data dictionary;
Subelement is operated, for utilizing the inner parameter, the operation that rounds up is carried out to the data value of input, is counted According to result.
10. a kind of currency conversion scheme, which is characterized in that data processing side of the application as described in claim 1-5 any one Method.
CN201811228365.4A 2018-10-22 2018-10-22 Data processing method, device and the currency conversion scheme of currency conversion Pending CN109447638A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811228365.4A CN109447638A (en) 2018-10-22 2018-10-22 Data processing method, device and the currency conversion scheme of currency conversion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811228365.4A CN109447638A (en) 2018-10-22 2018-10-22 Data processing method, device and the currency conversion scheme of currency conversion

Publications (1)

Publication Number Publication Date
CN109447638A true CN109447638A (en) 2019-03-08

Family

ID=65547699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811228365.4A Pending CN109447638A (en) 2018-10-22 2018-10-22 Data processing method, device and the currency conversion scheme of currency conversion

Country Status (1)

Country Link
CN (1) CN109447638A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1304511A (en) * 1998-03-30 2001-07-18 马丁·A·内姆佐 Method and system for currency conversion
US6477510B1 (en) * 1999-03-15 2002-11-05 Andrew Johnson, Inc. Euro booking currency conversion method
CN107958251A (en) * 2017-11-16 2018-04-24 维沃移动通信有限公司 A kind of amount of currency conversion method, device and mobile terminal
CN108269353A (en) * 2018-01-17 2018-07-10 北京网信云服信息科技有限公司 Self-service machine and the self-service system of exchanging of exchanging
CN108304080A (en) * 2018-01-24 2018-07-20 北京百度网讯科技有限公司 Method, apparatus, equipment and the computer storage media of input method conversion currency

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1304511A (en) * 1998-03-30 2001-07-18 马丁·A·内姆佐 Method and system for currency conversion
US6477510B1 (en) * 1999-03-15 2002-11-05 Andrew Johnson, Inc. Euro booking currency conversion method
CN107958251A (en) * 2017-11-16 2018-04-24 维沃移动通信有限公司 A kind of amount of currency conversion method, device and mobile terminal
CN108269353A (en) * 2018-01-17 2018-07-10 北京网信云服信息科技有限公司 Self-service machine and the self-service system of exchanging of exchanging
CN108304080A (en) * 2018-01-24 2018-07-20 北京百度网讯科技有限公司 Method, apparatus, equipment and the computer storage media of input method conversion currency

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵笑声: "《Oracle数据库应用从入门到精通》", 31 January 2016, 北京:中国铁道出版社 *

Similar Documents

Publication Publication Date Title
CN106411506A (en) Key derivation method and device applicable to digital currency
EP2908295B1 (en) Cash replenishment method for financial self-service equipment
CN107682348A (en) DGA domain name Quick method and devices based on machine learning
CN109711801A (en) A kind of Internetbank account checking method and device
CN110019283A (en) Extreme value determines method and device, electronic equipment, storage medium
CN109815122A (en) Test data generating method, device, electronic equipment and storage medium
Benlic et al. Breakout local search for the vertex separator problem
CN109522402A (en) A kind of abstract extraction method and storage medium based on power industry characteristic key words
CN111159387A (en) Recommendation method based on multi-dimensional alarm information text similarity analysis
CN112990035B (en) Text recognition method, device, equipment and storage medium
CN108446968A (en) A kind of method, apparatus and terminal device of accounting entry
CN110489466A (en) Generation method, device, terminal device and the storage medium of invitation code
CN101470724B (en) Character conversion system and method
CN109800337A (en) A kind of multi-mode canonical matching algorithm suitable for big alphabet
CN109409401A (en) A kind of information checking method, device and system
CN109447638A (en) Data processing method, device and the currency conversion scheme of currency conversion
CN107223274B (en) Processing method, device and the financial terminal of financial terminal business
CN109146444A (en) Virtual account creation method and device, account information update method and device
CN108876592A (en) A kind of credit risk predictor method and system, storage medium
CN107342857A (en) Group technology and device
CN116306656A (en) Entity relation extraction method, device, equipment and storage medium
Reynolds Fiscal Adjustment and Growth Prospects in India
CN106056758B (en) Valuable document information encoding-decoding method, apparatus, processing system and financial self-service equipment
US20240303726A1 (en) An apparatus, method and computer program product for identifying a validation check for a set of numbers
CN109324963A (en) The method and terminal device of automatic test profitable result

Legal Events

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

Application publication date: 20190308

RJ01 Rejection of invention patent application after publication