CN108319636A - 电子发票数据查询方法 - Google Patents

电子发票数据查询方法 Download PDF

Info

Publication number
CN108319636A
CN108319636A CN201711369700.8A CN201711369700A CN108319636A CN 108319636 A CN108319636 A CN 108319636A CN 201711369700 A CN201711369700 A CN 201711369700A CN 108319636 A CN108319636 A CN 108319636A
Authority
CN
China
Prior art keywords
data
invoice data
electronic invoice
invoice
hbase
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
CN201711369700.8A
Other languages
English (en)
Inventor
陈懿
尤培海
李泽然
王春波
张泽
白光佩
张北南
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Elephant Hui Yun Information Technology Co Ltd
Original Assignee
Elephant Hui Yun Information 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 Elephant Hui Yun Information Technology Co Ltd filed Critical Elephant Hui Yun Information Technology Co Ltd
Publication of CN108319636A publication Critical patent/CN108319636A/zh
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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/273Asynchronous replication or reconciliation
    • 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
    • G06Q30/00Commerce
    • G06Q30/04Billing or invoicing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Storage Device Security (AREA)

Abstract

本发明实施例提供一种电子发票数据查询方法,能够提高电子发票数据查询速度。该方法包括:获取电子发票数据查询条件;根据所述电子发票数据查询条件,从分布式集群的Solr中索引到要查询数据的主键,从存取发票数据的HBase中查询相应的数据,实现电子发票数据查询。

Description

电子发票数据查询方法
技术领域
本发明涉及金融领域,尤其涉及一种电子发票数据查询方法。
背景技术
目前,电子发票数据的存储和查询都是基于传统的关系型数据库,虽然能满足一般的开具发票、查询发票的业务需求,但是由于传统关系型数据库单表存储海量数据时,查询响应速度慢,高并发查询条件下很容易造成服务宕机。
发明内容
本发明实施例提供一种电子发票数据查询方法,能够提高电子发票数据查询速度。
本发明实施例采用如下技术方案:
一种电子发票数据查询方法,包括:
获取电子发票数据查询条件;
根据所述电子发票数据查询条件,从分布式集群的全文检索引擎Solr中索引到要查询数据的主键,从存取发票数据的开源数据库HBase中查询相应的数据,实现电子发票数据查询。
可选的,所述获取电子发票数据查询条件之前包括:
一条发票数据保存到HBase后,生成所述该条发票数据对应的索引;
将该索引保存到分布式集群的Solr中。
可选的,还包括:
采用了分布式数据库HBase,存储该条发票数据。
可选的,还包括:
该条发票数据时根据数据主键的哈希值将数据保存到对应节点的分片上,如果发票数据重复保存,则替换原来保存的数据。
本发明实施例的电子发票数据查询方法,获取电子发票数据查询条件,根据所述电子发票数据查询条件,从分布式集群的Solr中索引到要查询数据的主键,从存取发票数据的HBase中查询相应的数据,实现电子发票数据查询,从而能够提高电子发票数据查询速度。
附图说明
图1示意性示出了本发明一实施例的电子发票数据查询方法的流程图。
具体实施方式
以下对本发明的实施例进行详细说明,但是本发明可以由权利要求限定和覆盖的多种不同方式实施。
如图1所示,本发明实施例提供一种电子发票数据查询方法,包括:
11、获取电子发票数据查询条件;
12、根据所述电子发票数据查询条件,从分布式集群的Solr(一种全文检索引擎)中索引到要查询数据的主键,从存取发票数据的HBase(一种分布式的、面向列的开源数据库)中查询相应的数据,实现电子发票数据查询。
在一个实施例中,所述获取电子发票数据查询条件之前包括:
一条发票数据保存到HBase后,生成所述该条发票数据对应的索引;
将该索引保存到分布式集群的Solr中。
在一个实施例中,该方法还包括:
采用了分布式数据库HBase,存储该条发票数据。
在一个实施例中,该方法还包括:
该条发票数据时根据数据主键的哈希值将数据保存到对应节点的分片上,如果发票数据重复保存,则替换原来保存的数据。
本发明实施例,针对海量电子发票数据,显然单节点已经不能满足数据的存储要求,因此采用了分布式数据库HBase,实现了数据的分布式存储,及数据的容灾,保存数据时根据数据主键的哈希值将数据保存到对应节点的分片上,如果发票数据重复保存,会替换原来保存的数据,解决了海量发票数据重复保存问题。
本发明实施例,当发票数据保存到HBase成功后,再为这条发票数据保存索引,将发票的索引数据保存到分布式集群的Solr中。多条件查询时,从Solr集群中快速索引到要查询数据的主键,从HBase中查询相应的数据,实现海量发票数据多条件查询秒级返回。
本发明实施例的电子发票数据查询方法,获取电子发票数据查询条件,根据所述电子发票数据查询条件,从分布式集群的Solr中索引到要查询数据的主键,从存取发票数据的HBase中查询相应的数据,实现电子发票查询,从而能够提高电子发票查询速度。
本发明实施例可以在高并发条件下实现电子发票数据存储入数据库的时间缩短至毫秒级,并使基于海量电子发票数据多条件查询的秒级返回,同时确保高可用,支持资源的线性扩展,为后期业务的扩展提供支撑。本发明实施例采用分布式数据库存储数据,并对存储的电子发票数据进行索引,不仅实现了海量电子发票数据的存储,而且解决了发票数据快速查询的难题。
以上仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (4)

1.一种电子发票数据查询方法,其特征在于,包括:
获取电子发票数据查询条件;
根据所述电子发票数据查询条件,从分布式集群的全文检索引擎Solr中索引到要查询数据的主键,从存取发票数据的开源数据库HBase中查询相应的数据,实现电子发票数据查询。
2.根据权利要求1所述的方法,其特征在于,所述获取电子发票数据查询条件之前包括:
一条发票数据保存到HBase后,生成所述该条发票数据对应的索引;
将该索引保存到分布式集群的Solr中。
3.根据权利要求2所述的方法,其特征在于,还包括:
采用了分布式数据库HBase,存储该条发票数据。
4.根据权利要求2或3所述的方法,其特征在于,还包括:
该条发票数据时根据数据主键的哈希值将数据保存到对应节点的分片上,如果发票数据重复保存,则替换原来保存的数据。
CN201711369700.8A 2017-11-27 2017-12-18 电子发票数据查询方法 Pending CN108319636A (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711210270 2017-11-27
CN2017112102705 2017-11-27

Publications (1)

Publication Number Publication Date
CN108319636A true CN108319636A (zh) 2018-07-24

Family

ID=62892461

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711369700.8A Pending CN108319636A (zh) 2017-11-27 2017-12-18 电子发票数据查询方法

Country Status (1)

Country Link
CN (1) CN108319636A (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120254917A1 (en) * 2011-04-01 2012-10-04 Mixaroo, Inc. System and method for real-time processing, storage, indexing, and delivery of segmented video
CN104102710A (zh) * 2014-07-15 2014-10-15 浪潮(北京)电子信息产业有限公司 一种海量数据查询方法
CN104503985A (zh) * 2014-12-03 2015-04-08 浪潮电子信息产业股份有限公司 一种Hbase数据自动化创建Solr索引文件的方法
CN104731945A (zh) * 2015-03-31 2015-06-24 浪潮集团有限公司 一种基于HBase的全文检索方法及装置
CN106777397A (zh) * 2017-03-02 2017-05-31 百望电子发票数据服务有限公司 一种电子发票数据组织查询方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120254917A1 (en) * 2011-04-01 2012-10-04 Mixaroo, Inc. System and method for real-time processing, storage, indexing, and delivery of segmented video
CN104102710A (zh) * 2014-07-15 2014-10-15 浪潮(北京)电子信息产业有限公司 一种海量数据查询方法
CN104503985A (zh) * 2014-12-03 2015-04-08 浪潮电子信息产业股份有限公司 一种Hbase数据自动化创建Solr索引文件的方法
CN104731945A (zh) * 2015-03-31 2015-06-24 浪潮集团有限公司 一种基于HBase的全文检索方法及装置
CN106777397A (zh) * 2017-03-02 2017-05-31 百望电子发票数据服务有限公司 一种电子发票数据组织查询方法及系统

Similar Documents

Publication Publication Date Title
US10860561B2 (en) Method and apparatus for providing efficient indexing and computer program included in computer readable medium therefor
CN108197296B (zh) 基于Elasticsearch索引的数据存储方法
US20150199433A1 (en) Method and system for search engine indexing and searching using the index
CN105117417A (zh) 一种读优化的内存数据库Trie树索引方法
CN106156070B (zh) 一种查询方法、文件合并方法与相关装置
CN105718455A (zh) 一种数据查询方法及装置
CN102402602A (zh) 一种实时数据库的b+树索引方法及装置
CN102971732A (zh) 键/值存储器的集成分级查询处理的系统结构
JP5499825B2 (ja) データベース管理方法、データベースシステム、プログラム及びデータベースのデータ構造
CN105516284B (zh) 一种集群数据库分布式存储的方法和装置
CN109144413A (zh) 一种元数据管理方法及装置
CN105912696A (zh) 一种基于对数归并的dns索引创建方法及查询方法
CN105302869A (zh) 一种HBase二级索引查询和存储系统及其查询方法
CN109460404A (zh) 一种基于redis的高效Hbase分页查询方法
CN104834650A (zh) 一种有效查询任务生成方法及系统
CN105468644B (zh) 一种用于在数据库中进行查询的方法与设备
CN106155934A (zh) 一种云环境下基于重复数据的缓存方法
CN110109874A (zh) 一种基于区块链的无中心分布式文件检索方法
CN110427364A (zh) 一种数据处理方法、装置、电子设备及存储介质
CN104239337B (zh) 基于tcam的查表处理方法及装置
CN108416016A (zh) 一种cdn按前缀缓存清除方法和系统
CN101963993B (zh) 一种数据库单表记录快速查找的方法
CN116756253B (zh) 关系型数据库的数据存储、查询方法、装置、设备和介质
CN105205162A (zh) HBase二级索引存储和查询系统及其查询方法
CN108319636A (zh) 电子发票数据查询方法

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180724