CN104252512A - Method and device for accounting data of database - Google Patents

Method and device for accounting data of database Download PDF

Info

Publication number
CN104252512A
CN104252512A CN201310538843.2A CN201310538843A CN104252512A CN 104252512 A CN104252512 A CN 104252512A CN 201310538843 A CN201310538843 A CN 201310538843A CN 104252512 A CN104252512 A CN 104252512A
Authority
CN
China
Prior art keywords
control value
value
database
property
attribute
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
CN201310538843.2A
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.)
Shenzhen Huaao Data Technology Co Ltd
Original Assignee
Shenzhen Huaao Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Huaao Data Technology Co Ltd filed Critical Shenzhen Huaao Data Technology Co Ltd
Priority to CN201310538843.2A priority Critical patent/CN104252512A/en
Priority to PCT/CN2014/084619 priority patent/WO2015067086A1/en
Publication of CN104252512A publication Critical patent/CN104252512A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing

Abstract

The invention provides a method for accounting data of a database. The method comprises the steps of obtaining a first attribute value; calculating and obtaining a first contrast value according to the first attribute value and a preset rule expression; obtaining a second contrast value corresponding to the first contrast value in the database; comparing the first contrast value with the second contrast value; outputting a comparison result of the first contrast value and the second contrast value. According to the method provided by the embodiment of the invention, a corresponding relation expression of two attribute values can be obtained in advance, during accounting, the first contrast value is obtained by the first attribute value according to the expression, the first contrast value is compared with the second contrast value in the database, whether the data are correct or not can be judged according to the comparison result, the automation degree of the whole scheme is higher, and convenience is provided for a user to use under the situation of larger data volume.

Description

A kind of database data accounting method and device
Technical field
The application relates to database technical field, particularly relates to a kind of database data accounting method and device.
Background technology
Database data store in, often can there is some associated data, such as the value of attribute A and attribute B, between may there is certain incidence relation.When the value of such as attribute A is X, the value of attribute B must be Y, and Y=f(X).Or when the value of attribute A is X, the numerical value of attribute B must be just correct at some particular ranges.But probably cause typing mistake for various reasons when keeper's logging data.
In the use procedure of database, if need to carry out combing to misdata possible in database, can only artificial cognition be passed through at present, adjust and then revise.Larger for workload data base administrator, the also data error be not familiar with of the more difficult keeper of identifying.
Summary of the invention
Technical problems to be solved in this application are to provide a kind of database data accounting method and the device that can facilitate accounting data database data.
In order to solve the problem, this application discloses a kind of database data accounting method, comprising:
Obtain the first property value;
Acquisition first control value is calculated according to presetting rule expression formula according to described first property value;
Obtain the second control value that described first property value is corresponding in a database;
First control value described in comparison and the second control value;
Export the comparison result of described first control value and the second control value.
Further, also comprise before described acquisition first numerical value:
Obtain the operation relation of the first attribute value and standard control value as regular expression.
Further, the comparison result of described first control value of described output and the second control value comprises:
When described second control value is correct to exporting described second control value time corresponding with described first control value;
When described second control value and described first control value are to exporting described second control value mistake time corresponding.
Further, describedly acquisition first control value is calculated according to the first property value according to presetting rule expression formula:
Calculate the first control value obtaining and represent special value scope according to presetting rule expression formula according to described first property value.
Further, described comparison first control value and the second control value comprise:
Whether comparison second control value belongs to the numerical range that the first control value represents.
Present invention also provides a kind of database data and adjust device, comprising:
Acquisition module, for obtaining the first property value; Obtain the second control value that described first property value is corresponding in a database;
Computing module, for calculating acquisition first control value according to described first property value according to presetting rule expression formula;
Comparing module, for the first control value described in comparison and the second control value;
Output module, for exporting the comparison result of described first control value and the second control value.
Further, described acquisition module also for:
Obtain the operation relation of the first attribute value and standard control value as regular expression.
Further, described output module also for:
When described second control value is correct to exporting described second control value time corresponding with described first control value;
When described second control value and described first control value are to exporting described second control value mistake time corresponding.
Further, described computing module also for:
Calculate the first control value obtaining and represent special value scope according to presetting rule expression formula according to described first property value.
Further, described comparing module also for:
Whether comparison second control value belongs to the numerical range that the first control value represents.
Compared with prior art, the application comprises following advantage: the corresponding relation getting two property values in advance expresses formula, when adjusting, the first control value is calculated according to expression formula by the first property value, with the second control value comparison in database, judge that whether data are correct according to comparison result, whole scheme automaticity is higher, convenient for users when data volume is larger.
accompanying drawing explanation
Fig. 1 is the process flow diagram of a kind of database data accounting method one of the present invention embodiment;
Fig. 2 is the structural representation that a kind of database data of the present invention adjusts device one embodiment.
Embodiment
For enabling above-mentioned purpose, the feature and advantage of the application more become apparent, below in conjunction with the drawings and specific embodiments, the application is described in further detail.
With reference to Fig. 1, show the process flow diagram of a kind of database data accounting method one of the application embodiment;
A kind of database data accounting method that the embodiment of the present invention provides, comprising:
Step S101, obtain the first property value;
Further, also comprise before described acquisition first numerical value:
Obtain the operation relation of the first attribute value and standard control value as regular expression.
Database data store in, often can there is some associated data, such as the value of attribute A and attribute B, between may there is certain incidence relation.When the value of such as attribute A is X, the value of attribute B must be Y, and Y=f(X).Or when the value of attribute A is X, the numerical value of attribute B must be just correct at some particular ranges.When the numerical value of the first couple of attribute A and attribute B of typing in database, database can get this to the operation relation between value, as regular expression according to operational method in advance.
Later stage, because a lot of data belong to manual entry, may mistake be there is in the process of typing, now need to check for the data in database, then first obtain in checking computations process artificial judgment be correct numerical value as the first property value, the corresponding numerical value X of such as attribute A is correct.
Step S102, calculate acquisition first control value according to described first property value according to presetting rule expression formula;
Further, describedly acquisition first control value is calculated according to the first property value according to presetting rule expression formula:
Calculate the first control value obtaining and represent special value scope according to presetting rule expression formula according to described first property value.
When after the respective value X getting attribute A, according to the regular expression got in advance, calculate a numerical value Y1=f (X) as the first control value.Wherein Y1 also can be able to be some particular ranges for special value.
Step S103, obtain the second corresponding in a database control value of described first property value;
According to relation on attributes in database, get numerical value Y2 corresponding with X value in attribute B as the second control value.
First control value described in step S104, comparison and the second control value;
Further, described comparison first control value and the second control value comprise:
Whether comparison second control value belongs to the numerical range that the first control value represents.
Comparison Y1 and Y2, when Y1 is a special value, judges whether Y2 equals Y1; As Y2=Y1, judge that Y2 is correct; Otherwise judge Y2 mistake.
When Y1 is a particular range, judging Y2 whether within the scope of this, is judge that Y2 is correct; Otherwise judge Y2 mistake.
Step S105, export the comparison result of described first control value and the second control value.
Further, the comparison result of described first control value of described output and the second control value comprises:
When described second control value is correct to exporting described second control value time corresponding with described first control value;
When described second control value and described first control value are to exporting described second control value mistake time corresponding.
The corresponding relation that the embodiment of the present invention gets two property values in advance expresses formula, when adjusting, the first control value is calculated according to expression formula by the first property value, with the second control value comparison in database, judge that whether data are correct according to comparison result, whole scheme automaticity is higher, convenient for users when data volume is larger.With reference to the structural representation that Fig. 2 is a kind of database data accounting of the present invention device one embodiment.
A kind of database data that the embodiment of the present invention provides adjusts device, comprising:
Acquisition module 21, for obtaining the first property value; Obtain the second control value that described first property value is corresponding in a database;
Computing module 22, for calculating acquisition first control value according to described first property value according to presetting rule expression formula;
Comparing module 23, for the first control value described in comparison and the second control value;
Output module 24, for exporting the comparison result of described first control value and the second control value.
Further, described acquisition module 21 also for:
Obtain the operation relation of the first attribute value and standard control value as regular expression.
Further, described output module 24 also for:
When described second control value is correct to exporting described second control value time corresponding with described first control value;
When described second control value and described first control value are to exporting described second control value mistake time corresponding.
Further, described computing module 22 also for:
Calculate the first control value obtaining and represent special value scope according to presetting rule expression formula according to described first property value.
Further, described comparing module 23 also for:
Whether comparison second control value belongs to the numerical range that the first control value represents.
Database data store in, often can there is some associated data, such as the value of attribute A and attribute B, between may there is certain incidence relation.When the value of such as attribute A is X, the value of attribute B must be Y, and Y=f(X).Or when the value of attribute A is X, the numerical value of attribute B must be just correct at some particular ranges.When the numerical value of the first couple of attribute A and attribute B of typing in database, database can get this to the operation relation between value, as regular expression according to operational method in advance.
Later stage, because a lot of data belong to manual entry, mistake may be there is in the process of typing, now need to check for the data in database, then in checking computations process acquisition module 21 first obtain artificial judgment be correct numerical value as the first property value, the corresponding numerical value X of such as attribute A is correct.
After acquisition module 21 gets the respective value X of attribute A, according to the regular expression got in advance, computing module 22 calculates a numerical value Y1=f (X) as the first control value.Wherein Y1 also can be able to be some particular ranges for special value.
Comparing module 23 comparison Y1 and Y2, when Y1 is a special value, judges whether Y2 equals Y1; As Y2=Y1, judge that Y2 is correct; Otherwise judge Y2 mistake.When Y1 is a particular range, judging Y2 whether within the scope of this, is judge that Y2 is correct; Otherwise judge Y2 mistake.
For device embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
Each embodiment in this instructions all 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 part mutually see.
A kind of database data accounting method above the application provided and device, be described in detail, apply specific case herein to set forth the principle of the application and embodiment, the explanation of above embodiment is just for helping method and the core concept thereof of understanding the application; Meanwhile, for one of ordinary skill in the art, according to the thought of the application, all will change in specific embodiments and applications, in sum, this description should not be construed as the restriction to the application.

Claims (10)

1. a database data accounting method, is characterized in that, comprising:
Obtain the first property value;
Acquisition first control value is calculated according to presetting rule expression formula according to described first property value;
Obtain the second control value that described first property value is corresponding in a database;
First control value described in comparison and the second control value;
Export the comparison result of described first control value and the second control value.
2. method according to claim 1, is characterized in that, also comprises before described acquisition first numerical value:
Obtain the operation relation of the first attribute value and standard control value as regular expression.
3. method according to claim 2, is characterized in that, the comparison result of described first control value of described output and the second control value comprises:
When described second control value is correct to exporting described second control value time corresponding with described first control value;
When described second control value and described first control value are to exporting described second control value mistake time corresponding.
4. method according to claim 2, is characterized in that, describedly calculates acquisition first control value according to the first property value according to presetting rule expression formula:
Calculate the first control value obtaining and represent special value scope according to presetting rule expression formula according to described first property value.
5. method according to claim 4, is characterized in that, described comparison first control value and the second control value comprise:
Whether comparison second control value belongs to the numerical range that the first control value represents.
6. database data adjusts a device, it is characterized in that, comprising:
Acquisition module, for obtaining the first property value; Obtain the second control value that described first property value is corresponding in a database;
Computing module, for calculating acquisition first control value according to described first property value according to presetting rule expression formula;
Comparing module, for the first control value described in comparison and the second control value;
Output module, for exporting the comparison result of described first control value and the second control value.
7. device according to claim 6, is characterized in that, described acquisition module also for:
Obtain the operation relation of the first attribute value and standard control value as regular expression.
8. device according to claim 7, is characterized in that, described output module also for:
When described second control value is correct to exporting described second control value time corresponding with described first control value;
When described second control value and described first control value are to exporting described second control value mistake time corresponding.
9. device according to claim 7, is characterized in that, described computing module also for:
Calculate the first control value obtaining and represent special value scope according to presetting rule expression formula according to described first property value.
10. device according to claim 9, is characterized in that, described comparing module also for:
Whether comparison second control value belongs to the numerical range that the first control value represents.
CN201310538843.2A 2013-11-05 2013-11-05 Method and device for accounting data of database Pending CN104252512A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201310538843.2A CN104252512A (en) 2013-11-05 2013-11-05 Method and device for accounting data of database
PCT/CN2014/084619 WO2015067086A1 (en) 2013-11-05 2014-08-18 Database data accounting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310538843.2A CN104252512A (en) 2013-11-05 2013-11-05 Method and device for accounting data of database

Publications (1)

Publication Number Publication Date
CN104252512A true CN104252512A (en) 2014-12-31

Family

ID=52187405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310538843.2A Pending CN104252512A (en) 2013-11-05 2013-11-05 Method and device for accounting data of database

Country Status (2)

Country Link
CN (1) CN104252512A (en)
WO (1) WO2015067086A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107341202A (en) * 2017-06-21 2017-11-10 平安科技(深圳)有限公司 Appraisal procedure, device and the storage medium of business datum table amendment risk factor

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060112027A1 (en) * 2004-11-02 2006-05-25 Fuji Xerox Co., Ltd. Data analyzer, data analyzing method and storage medium
CN101639849A (en) * 2009-06-01 2010-02-03 北京四维图新科技股份有限公司 Method for processing data and device therefor
CN102411588A (en) * 2010-09-26 2012-04-11 金蝶软件(中国)有限公司 Comparison checking method and system of data table
CN103077304A (en) * 2012-12-27 2013-05-01 中国建设银行股份有限公司 Data grading device and method
CN103246574A (en) * 2012-02-10 2013-08-14 阿里巴巴集团控股有限公司 Verification method and verification device for data accuracy

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6973572B1 (en) * 1999-04-22 2005-12-06 International Business Machines Corporation Signature hash for checking versions of abstract data types
CN101311933B (en) * 2002-09-03 2011-12-28 Sap股份公司 Method and system for receiving dynamic access data
US20050289115A1 (en) * 2004-06-28 2005-12-29 Microsoft Corporation Integrating best practices into database design
CN102445941B (en) * 2011-11-18 2013-12-18 北京交通大学 Method for automatically determining and analyzing interoperability test results of on-board equipment of train control system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060112027A1 (en) * 2004-11-02 2006-05-25 Fuji Xerox Co., Ltd. Data analyzer, data analyzing method and storage medium
CN101639849A (en) * 2009-06-01 2010-02-03 北京四维图新科技股份有限公司 Method for processing data and device therefor
CN102411588A (en) * 2010-09-26 2012-04-11 金蝶软件(中国)有限公司 Comparison checking method and system of data table
CN103246574A (en) * 2012-02-10 2013-08-14 阿里巴巴集团控股有限公司 Verification method and verification device for data accuracy
CN103077304A (en) * 2012-12-27 2013-05-01 中国建设银行股份有限公司 Data grading device and method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107341202A (en) * 2017-06-21 2017-11-10 平安科技(深圳)有限公司 Appraisal procedure, device and the storage medium of business datum table amendment risk factor
CN107341202B (en) * 2017-06-21 2018-06-08 平安科技(深圳)有限公司 Business datum table corrects appraisal procedure, device and the storage medium of danger level
WO2018233117A1 (en) * 2017-06-21 2018-12-27 平安科技(深圳)有限公司 Method and device for evaluating correction risk factors of business data tables, and storage medium

Also Published As

Publication number Publication date
WO2015067086A1 (en) 2015-05-14

Similar Documents

Publication Publication Date Title
CN103049431B (en) ICD (IED Capability Description) inspection method based on objectified module semantics
US20050114059A1 (en) Point cloud measuring system and method
US8448112B1 (en) System, method, and computer program product for automatic power management verification
CN103714004A (en) JVM online memory leak analysis method and system
CN105094852A (en) Tool for importing and exporting data EXCEL
CN102279816A (en) LCD (liquid crystal display) automatic identification method and device
CN102855350B (en) The automatic map delivery method and system of engineering drawing
CN104268291A (en) Data consistency processing method and system
CN107329849A (en) A kind of data verification method and system based on Java systems
Claeys et al. Asymptotics for the partition function in two-cut random matrix models
CN103530812A (en) Power grid state similarity quantitative analyzing method based on locality sensitive hashing
KR20160048806A (en) Automatically generating certification documents
CN104142861A (en) Processing method and processing device for configuration of server resources
CN104636241A (en) Automatic analysis method for log data of vehicle-mounted controller based on requirement modeling
CN102323198B (en) Method and system for correcting rock electricity experiment parameters m and n of core
CN103679484A (en) Novel method for analyzing E-commerce consistency based on behavior Petri network
US20100023922A1 (en) Linking uml activity diagram nodes to uml class diagram nodes by using properties from applied stereotypes
CN102968305B (en) Logical process method, device and evaluation system
CN104252512A (en) Method and device for accounting data of database
CN106357781A (en) Method and system for establishing resource service calling interface
CN104714203A (en) Calibration method for power quality monitoring device
CN101916305A (en) Method for verifying complex pin chip
CN106776275A (en) A kind of testing process automatic generation method based on Packet Multiplexing
CN101604336A (en) A kind of method and system that carries out data detection, correction from the source
CN103699682B (en) Method for verifying structural logics of databases

Legal Events

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

Application publication date: 20141231

RJ01 Rejection of invention patent application after publication