WO2015067086A1 - 一种数据库数据核算方法和装置 - Google Patents

一种数据库数据核算方法和装置 Download PDF

Info

Publication number
WO2015067086A1
WO2015067086A1 PCT/CN2014/084619 CN2014084619W WO2015067086A1 WO 2015067086 A1 WO2015067086 A1 WO 2015067086A1 CN 2014084619 W CN2014084619 W CN 2014084619W WO 2015067086 A1 WO2015067086 A1 WO 2015067086A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
comparison
attribute
comparison value
database
Prior art date
Application number
PCT/CN2014/084619
Other languages
English (en)
French (fr)
Inventor
卢长烛
贾西贝
Original Assignee
深圳市华傲数据技术有限公司
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 深圳市华傲数据技术有限公司 filed Critical 深圳市华傲数据技术有限公司
Publication of WO2015067086A1 publication Critical patent/WO2015067086A1/zh

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

Definitions

  • the present application relates to the field of database technologies, and in particular, to a database data accounting method and apparatus.
  • the technical problem to be solved by the present application is to provide a database data accounting method and apparatus that can conveniently calculate database data.
  • a database data accounting method including:
  • the result of the comparison between the first control value and the second control value is output.
  • the method further includes:
  • comparing the output of the first comparison value with the second comparison value comprises:
  • the second comparison value does not correspond to the first comparison value, the second comparison value is outputted as an error.
  • comparing the first control value and the second control value comprises:
  • the application also provides a database data accounting device, comprising:
  • Obtaining a module configured to obtain a first attribute value; and obtain a second comparison value corresponding to the first attribute value in a database;
  • An operation module configured to calculate, according to the first attribute value, a first control value according to a preset rule expression
  • a comparison module configured to compare the first control value and the second control value
  • an output module configured to output a comparison result of the first comparison value and the second comparison value.
  • the obtaining module is further configured to:
  • the output module is further configured to:
  • the second comparison value does not correspond to the first comparison value, the second comparison value is outputted as an error.
  • operation module is further configured to:
  • comparison module is further configured to:
  • the present application includes the following advantages: pre-acquisition of a correspondence expression of two attribute values, in the calculation, the first comparison value is calculated according to the expression by the first attribute value, and the first in the database The comparison between the two control values determines whether the data is correct according to the comparison result, and the whole scheme has a high degree of automation, and is convenient for the user in the case of a large amount of data.
  • FIG. 1 is a flow chart of an embodiment of a database data accounting method according to the present invention.
  • FIG. 2 is a schematic structural diagram of an embodiment of a database data accounting device according to the present invention.
  • FIG. 1 a flow chart of an embodiment of a database data accounting method according to the present application is shown
  • Step S101 Acquire a first attribute value.
  • the method further includes:
  • the database can obtain the operation relationship between the pair of values according to a predetermined operation method as a regular expression.
  • the value that is manually determined to be correct is first obtained as the first attribute value, such as an attribute.
  • the corresponding value X of A is correct.
  • Step S102 Calculate and acquire a first comparison value according to the preset rule expression according to the first attribute value
  • Y1 can be a specific value or a specific range.
  • Step S103 Acquire a second comparison value corresponding to the first attribute value in the database
  • the value Y2 corresponding to the X value in the attribute B is obtained as the second comparison value.
  • Step S104 comparing the first control value and the second control value
  • comparing the first control value and the second control value comprises:
  • Y1 is a specific range
  • Step S105 Output a comparison result of the first comparison value and the second comparison value.
  • comparing the output of the first comparison value with the second comparison value comprises:
  • the second comparison value does not correspond to the first comparison value, the second comparison value is outputted as an error.
  • a correspondence expression of two attribute values is obtained in advance.
  • the first comparison value is calculated according to the expression by the first attribute value, and is compared with the second comparison value in the database, according to the comparison.
  • the whole scheme is highly automated, and it is convenient for the user to use when the amount of data is large.
  • 2 is a schematic structural diagram of an embodiment of a database data accounting device according to the present invention.
  • the obtaining module 21 is configured to obtain a first attribute value, and obtain a second control value corresponding to the first attribute value in the database;
  • the operation module 22 is configured to calculate, according to the first attribute value, a first control value according to a preset rule expression
  • the comparison module 23 is configured to compare the first control value and the second comparison value
  • the output module 24 is configured to output a comparison result of the first comparison value and the second comparison value.
  • the obtaining module 21 is further configured to:
  • the output module 24 is further configured to:
  • the second comparison value does not correspond to the first comparison value, the second comparison value is outputted as an error.
  • operation module 22 is further configured to:
  • comparison module 23 is further configured to:
  • the database can obtain the operation relationship between the pair of values according to a predetermined operation method as a regular expression.
  • the acquisition module 21 first obtains the value manually determined as the first attribute value. For example, the corresponding value X of the attribute A is correct.
  • Y1 can be a specific value or a specific range.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

提供了一种数据库数据核算方法,包括:获取第一属性值;根据第一属性值按照预置规则表达式计算获取第一对照值;获取第一属性值在数据库中对应的第二对照值;比对第一对照值和第二对照值;输出第一对照值与第二对照值的比对结果。预先获取到两个属性值的对应关系表达式,在核算时,通过第一属性值根据表达式计算得到第一对照值,与数据库中的第二对照值比对,根据比对结果判断数据是否正确,整个方案自动化程度较高,在数据量较大的情况下方便了用户使用。

Description

一种数据库数据核算方法和装置 技术领域
本申请涉及数据库技术领域,特别是涉及一种数据库数据核算方法和装置。
背景技术
在数据库的数据存储中,经常会存在某些关联数据,比如属性A和属性B的值,之间可能存在某种关联关系。比如属性A的值为X时,属性B的值必然为Y,且Y=f(X)。或者当属性A的值为X时,属性B的数值必须在某一个特定范围才正确。但是在管理员录入数据时很可能由于种种原因导致录入错误。
在数据库的使用过程中,如果需要对数据库中可能的错误数据进行梳理,目前只能通过人工识别,核算然后修正。对于数据库管理员来说工作量比较大,也较难识别出管理员不太熟悉的数据差错。
发明内容
本申请所要解决的技术问题是提供一种可以方便核算数据库数据的数据库数据核算方法和装置。
为了解决上述问题,本申请公开了一种数据库数据核算方法,包括:
获取第一属性值;
根据所述第一属性值按照预置规则表达式计算获取第一对照值;
获取所述第一属性值在数据库中对应的第二对照值;
比对所述第一对照值和第二对照值;
输出所述第一对照值与第二对照值的比对结果。
进一步,所述获取第一数值前还包括:
获取第一属性标准值与标准对照值的运算关系作为规则表达式。
进一步,所述输出所述第一对照值与第二对照值的比对结果包括:
当所述第二对照值与所述第一对照值对应时,输出所述第二对照值正确;
当所述第二对照值与所述第一对照值不对应时,输出所述第二对照值错误。
进一步,所述根据第一属性值按照预置规则表达式计算获取第一对照值:
根据所述第一属性值按照预置规则表达式计算获取表示特定数值范围的第一对照值。
进一步,所述比对第一对照值和第二对照值包括:
比对第二对照值是否属于第一对照值表示的数值范围。
本申请还提供了一种数据库数据核算装置,包括:
获取模块,用于获取第一属性值;获取所述第一属性值在数据库中对应的第二对照值;
运算模块,用于根据所述第一属性值按照预置规则表达式计算获取第一对照值;
比对模块,用于比对所述第一对照值和第二对照值;
输出模块,用于输出所述第一对照值与第二对照值的比对结果。
进一步,所述获取模块还用于:
获取第一属性标准值与标准对照值的运算关系作为规则表达式。
进一步,所述输出模块还用于:
当所述第二对照值与所述第一对照值对应时,输出所述第二对照值正确;
当所述第二对照值与所述第一对照值不对应时,输出所述第二对照值错误。
进一步,所述运算模块还用于:
根据所述第一属性值按照预置规则表达式计算获取表示特定数值范围的第一对照值。
进一步,所述比对模块还用于:
比对第二对照值是否属于第一对照值表示的数值范围。
与现有技术相比,本申请包括以下优点:预先获取到两个属性值的对应关系表达式,在核算时,通过第一属性值根据表达式计算得到第一对照值,与数据库中的第二对照值比对,根据比对结果判断数据是否正确,整个方案自动化程度较高,在数据量较大的情况下方便了用户使用。
附图说明
图1是本发明一种数据库数据核算方法一实施例的流程图;
图2是本发明一种数据库数据核算装置一实施例的结构示意图。
具体实施方式
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。
参照图1,示出了本申请一种数据库数据核算方法一实施例的流程图;
本发明实施例提供的一种数据库数据核算方法,包括:
步骤S101、获取第一属性值;
进一步,所述获取第一数值前还包括:
获取第一属性标准值与标准对照值的运算关系作为规则表达式。
在数据库的数据存储中,经常会存在某些关联数据,比如属性A和属性B的值,之间可能存在某种关联关系。比如属性A的值为X时,属性B的值必然为Y,且Y=f(X)。或者当属性A的值为X时,属性B的数值必须在某一个特定范围才正确。当数据库中录入第一对属性A和属性B的数值时,数据库可以根据预先的运算方法获取到这对值之间的运算关系,作为规则表达式。
后期,由于很多数据属于人工录入,在录入的过程中可能存在错误,此时需要针对数据库中的数据进行验算,则在验算过程中首先获取人工判断为正确的数值作为第一属性值,例如属性A的对应数值X为正确。
步骤S102、根据所述第一属性值按照预置规则表达式计算获取第一对照值;
进一步,所述根据第一属性值按照预置规则表达式计算获取第一对照值:
根据所述第一属性值按照预置规则表达式计算获取表示特定数值范围的第一对照值。
当获取到属性A的对应值X后,根据预先获取到的规则表达式,计算得到一个数值Y1=f(X)作为第一对照值。其中Y1可以为特定数值也可以是某一个特定范围。
步骤S103、获取所述第一属性值在数据库中对应的第二对照值;
根据数据库中属性关系,获取到属性B中与X值对应的数值Y2作为第二对照值。
步骤S104、比对所述第一对照值和第二对照值;
进一步,所述比对第一对照值和第二对照值包括:
比对第二对照值是否属于第一对照值表示的数值范围。
比对Y1和Y2,当Y1为一特定数值时,判断Y2是否等于Y1;当Y2=Y1时,判断Y2正确;否则判断Y2错误。
当Y1为一特定范围时,判断Y2是否在该范围内,是则判断Y2正确;否则判断Y2错误。
步骤S105、输出所述第一对照值与第二对照值的比对结果。
进一步,所述输出所述第一对照值与第二对照值的比对结果包括:
当所述第二对照值与所述第一对照值对应时,输出所述第二对照值正确;
当所述第二对照值与所述第一对照值不对应时,输出所述第二对照值错误。
本发明实施例预先获取到两个属性值的对应关系表达式,在核算时,通过第一属性值根据表达式计算得到第一对照值,与数据库中的第二对照值比对,根据比对结果判断数据是否正确,整个方案自动化程度较高,在数据量较大的情况下方便了用户使用。参照图2为本发明一种数据库数据核算装置一实施例的结构示意图。
本发明实施例提供的一种数据库数据核算装置,包括:
获取模块21,用于获取第一属性值;获取所述第一属性值在数据库中对应的第二对照值;
运算模块22,用于根据所述第一属性值按照预置规则表达式计算获取第一对照值;
比对模块23,用于比对所述第一对照值和第二对照值;
输出模块24,用于输出所述第一对照值与第二对照值的比对结果。
进一步,所述获取模块21还用于:
获取第一属性标准值与标准对照值的运算关系作为规则表达式。
进一步,所述输出模块24还用于:
当所述第二对照值与所述第一对照值对应时,输出所述第二对照值正确;
当所述第二对照值与所述第一对照值不对应时,输出所述第二对照值错误。
进一步,所述运算模块22还用于:
根据所述第一属性值按照预置规则表达式计算获取表示特定数值范围的第一对照值。
进一步,所述比对模块23还用于:
比对第二对照值是否属于第一对照值表示的数值范围。
在数据库的数据存储中,经常会存在某些关联数据,比如属性A和属性B的值,之间可能存在某种关联关系。比如属性A的值为X时,属性B的值必然为Y,且Y=f(X)。或者当属性A的值为X时,属性B的数值必须在某一个特定范围才正确。当数据库中录入第一对属性A和属性B的数值时,数据库可以根据预先的运算方法获取到这对值之间的运算关系,作为规则表达式。
后期,由于很多数据属于人工录入,在录入的过程中可能存在错误,此时需要针对数据库中的数据进行验算,则在验算过程中获取模块21首先获取人工判断为正确的数值作为第一属性值,例如属性A的对应数值X为正确。
当获取模块21获取到属性A的对应值X后,根据预先获取到的规则表达式,运算模块22计算得到一个数值Y1=f(X)作为第一对照值。其中Y1可以为特定数值也可以是某一个特定范围。
比对模块23比对Y1和Y2,当Y1为一特定数值时,判断Y2是否等于Y1;当Y2=Y1时,判断Y2正确;否则判断Y2错误。当Y1为一特定范围时,判断Y2是否在该范围内,是则判断Y2正确;否则判断Y2错误。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
以上内容是结合具体的优选实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换。

Claims (10)

  1. 一种数据库数据核算方法,其特征在于,包括:
    获取第一属性值;
    根据所述第一属性值按照预置规则表达式计算获取第一对照值;
    获取所述第一属性值在数据库中对应的第二对照值;
    比对所述第一对照值和第二对照值;
    输出所述第一对照值与第二对照值的比对结果。
  2. 根据权利要求1所述的方法,其特征在于,所述获取第一数值前还包括:
    获取第一属性标准值与标准对照值的运算关系作为规则表达式。
  3. 根据权利要求2所述的方法,其特征在于,所述输出所述第一对照值与第二对照值的比对结果包括:
    当所述第二对照值与所述第一对照值对应时,输出所述第二对照值正确;
    当所述第二对照值与所述第一对照值不对应时,输出所述第二对照值错误。
  4. 根据权利要求2所述的方法,其特征在于,所述根据第一属性值按照预置规则表达式计算获取第一对照值:
    根据所述第一属性值按照预置规则表达式计算获取表示特定数值范围的第一对照值。
  5. 根据权利要求4所述的方法,其特征在于,所述比对第一对照值和第二对照值包括:
    比对第二对照值是否属于第一对照值表示的数值范围。
  6. 一种数据库数据核算装置,其特征在于,包括:
    获取模块,用于获取第一属性值;获取所述第一属性值在数据库中对应的第二对照值;
    运算模块,用于根据所述第一属性值按照预置规则表达式计算获取第一对照值;
    比对模块,用于比对所述第一对照值和第二对照值;
    输出模块,用于输出所述第一对照值与第二对照值的比对结果。
  7. 根据权利要求6所述的装置,其特征在于,所述获取模块还用于:
    获取第一属性标准值与标准对照值的运算关系作为规则表达式。
  8. 根据权利要求7所述的装置,其特征在于,所述输出模块还用于:
    当所述第二对照值与所述第一对照值对应时,输出所述第二对照值正确;
    当所述第二对照值与所述第一对照值不对应时,输出所述第二对照值错误。
  9. 根据权利要求7所述的装置,其特征在于,所述运算模块还用于:
    根据所述第一属性值按照预置规则表达式计算获取表示特定数值范围的第一对照值。
  10. 根据权利要求9所述的装置,其特征在于,所述比对模块还用于:
    比对第二对照值是否属于第一对照值表示的数值范围。
PCT/CN2014/084619 2013-11-05 2014-08-18 一种数据库数据核算方法和装置 WO2015067086A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310538843.2A CN104252512A (zh) 2013-11-05 2013-11-05 一种数据库数据核算方法和装置
CN201310538843.2 2013-11-05

Publications (1)

Publication Number Publication Date
WO2015067086A1 true WO2015067086A1 (zh) 2015-05-14

Family

ID=52187405

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/084619 WO2015067086A1 (zh) 2013-11-05 2014-08-18 一种数据库数据核算方法和装置

Country Status (2)

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

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107341202B (zh) * 2017-06-21 2018-06-08 平安科技(深圳)有限公司 业务数据表修正危险度的评估方法、装置及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1695141A (zh) * 2002-09-03 2005-11-09 Sap股份公司 对数据的动态访问
US6973572B1 (en) * 1999-04-22 2005-12-06 International Business Machines Corporation Signature hash for checking versions of abstract data types
CN1716250A (zh) * 2004-06-28 2006-01-04 微软公司 将最佳实施集成进数据库设计
CN102445941A (zh) * 2011-11-18 2012-05-09 北京交通大学 列控系统车载设备互联互通测试结果自动判定及分析方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7668795B2 (en) * 2004-11-02 2010-02-23 Fuji Xerox Co., Ltd. Data analyzer utilizing the spreading activation theory for stemming processing
CN101639849B (zh) * 2009-06-01 2011-06-01 北京四维图新科技股份有限公司 处理数据的方法和装置
CN102411588A (zh) * 2010-09-26 2012-04-11 金蝶软件(中国)有限公司 数据表的对比检验方法及系统
CN103246574B (zh) * 2012-02-10 2015-11-11 阿里巴巴集团控股有限公司 数据准确性的校验方法及装置
CN103077304B (zh) * 2012-12-27 2016-01-13 中国建设银行股份有限公司 一种数据评分装置及方法

Patent Citations (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
CN1695141A (zh) * 2002-09-03 2005-11-09 Sap股份公司 对数据的动态访问
CN1716250A (zh) * 2004-06-28 2006-01-04 微软公司 将最佳实施集成进数据库设计
CN102445941A (zh) * 2011-11-18 2012-05-09 北京交通大学 列控系统车载设备互联互通测试结果自动判定及分析方法

Also Published As

Publication number Publication date
CN104252512A (zh) 2014-12-31

Similar Documents

Publication Publication Date Title
WO2015113344A1 (zh) 电池充电装置及电池充电保护控制方法
WO2016095551A1 (zh) 一种MySQL数据库监控选项脚本的实现方法及装置
WO2017045395A1 (zh) 一种虚拟sim卡实现方法及系统
WO2020224250A1 (zh) 智能合约的触发方法、装置、设备及存储介质
WO2018076800A1 (zh) 一种数据异步更新方法及其系统
WO2016011826A1 (zh) 云端虚拟服务器的调度方法及装置
WO2015058433A1 (zh) 面板检测装置及显示面板
WO2017015982A1 (zh) 一种液晶显示面板及装置
WO2015043333A1 (zh) 一种基于散点图的数据质量检测方法
WO2015103879A1 (zh) 一种基于规则优化的数据防火墙修复方法及系统
WO2016123898A1 (zh) 一种短信管理方法及其移动终端
WO2018218523A1 (zh) 一种数据刷新方法、装置及计算机可读存储介质
WO2014107940A1 (zh) 嵌入式存储器的管理方法、嵌入式存储器及电子设备
WO2015067086A1 (zh) 一种数据库数据核算方法和装置
WO2015165150A1 (zh) 一种移动设备之间信息转移和共享的方法及系统
WO2011065660A4 (ko) 계산 시뮬레이션 모사 시스템 및 그 방법
WO2017005023A1 (zh) 智能手表手势输入方法及智能手表
WO2020224251A1 (zh) 区块链事务的处理方法、装置、设备及存储介质
WO2016201738A1 (zh) 基于网络医院平台的快速挂号方法和网络医院平台
WO2018090759A1 (zh) 一种系统启动文件的校验及编译方法
WO2018218522A1 (zh) 一种ecu刷写失败后的数据刷新方法及数据刷新装置
WO2017197732A1 (zh) 一种数字电源提供电路及液晶驱动装置
WO2017092387A1 (zh) 一种可穿戴设备的通信实现方法及系统
WO2019085066A1 (zh) Amoled 显示器件
WO2018171570A1 (zh) 一种终端开机过程的驱动程序加载方法及终端设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14860157

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14860157

Country of ref document: EP

Kind code of ref document: A1