CN112328690A - 一种高效的区块链访问方法 - Google Patents

一种高效的区块链访问方法 Download PDF

Info

Publication number
CN112328690A
CN112328690A CN202011252235.1A CN202011252235A CN112328690A CN 112328690 A CN112328690 A CN 112328690A CN 202011252235 A CN202011252235 A CN 202011252235A CN 112328690 A CN112328690 A CN 112328690A
Authority
CN
China
Prior art keywords
uplink
user
command
control module
block chain
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
CN202011252235.1A
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.)
Xingkuang Technology Beijing Co ltd
Original Assignee
Xingkuang Technology Beijing 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 Xingkuang Technology Beijing Co ltd filed Critical Xingkuang Technology Beijing Co ltd
Priority to CN202011252235.1A priority Critical patent/CN112328690A/zh
Publication of CN112328690A publication Critical patent/CN112328690A/zh
Pending legal-status Critical Current

Links

Images

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/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

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)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种高效的区块链访问方法,其特征在于,通过管理模块、查询模块、控制模块和同步数据库进行区块链访问,所述访问方法包括以下步骤:步骤一:判断用户请求命令;管理模块接受用户访问请求,对请求命令进行处理和分析,根据请求命令的类型分别将查询命令和上链操作命令发送至查询模块和控制模块;步骤二:查询模块根据用户查询命令的请求连接同步数据库,并将查询结果直接反馈给用户;控制模块根据用户上链操作命令的请求连接区块链,并对区块链进行上链写操作,操作结束后返回上链结果至用户。

Description

一种高效的区块链访问方法
技术领域
本发明涉及数据处理技术领域,特别是涉及一种高效的区块链访问方法。
背景技术
区块链是一种分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。由于区块链具有去中心化、开放性、独立性、安全性和匿名性的特点,其逐步成为互联网数据存储系统中重要的发展领域。
现有常规的区块链访问是用户通过区块链的RPC接口连接区块链进行相关操作,用户直接访问区块链时需要进行繁琐的操作,现有的技术必须通过开放的通用接口进行调用,比如查询区块高度,部署协约,协约调用等,而却无法保证上链的成功,一旦访问失败,用户需要再次提交访问请求。
因此希望有一种高效的区块链访问方法能够解决现有技术中存在的问题。
发明内容
为了克服现有技术中存在的缺陷,本发明目的在于提供一种高效的区块链访问方法,减少区块链访问的繁琐步骤,提高区块链访问的成功率。
为了实现上述目的,本发明提供了如下技术方案:
一种高效的区块链访问通过管理模块、查询模块、控制模块和同步数据库进行,所述访问方法包括以下步骤:
步骤1:判断用户请求命令;管理模块接受用户访问请求,对请求命令进行处理和分析,根据请求命令的类型分别将查询命令和上链操作命令发送至查询模块和控制模块;
步骤2:查询模块根据用户查询命令的请求连接同步数据库,并将查询结果直接反馈给用户;控制模块根据用户上链操作命令的请求连接区块链,并对区块链进行上链写操作,操作结束后返回上链结果至用户。
优选地,所述区块链访问还包括上链队列,所述步骤1中的管理模块将上链操作命令发送至上链队列,所述步骤2中的控制模块连接上链队列,并根据上链队列中的排序依次执行上链写操作。
优选地,所述步骤2中的上链写操作包括以下步骤:
当所述控制模块执行上链写操作成功,所述控制模块结束上链写操作并将上链结果返回至用户,当所述控制模块执行上链写操作失败,所述控制模块将执行失败的上链操作返回至所述上链队列进行排序,等待再次执行该上链操作。
优选地,所述同步数据库定时与区块链进行数据同步处理。
本发明高效的区块链访问方法的有益效果为:
1.控制模块自动反复提交上链请求,直到上链操作成功,并能及时反馈结果给用户;
2.查询数据时不需要直接连接区块链,同步数据库会定时更新数据,保证同步数据库与区块链的数据一致,提高查询访问效率,并反馈结果给用户。
附图说明:
图1是本发明高效的区块链访问方法的流程图。
具体实施方式:
为使本发明实施的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行更加详细的描述。在附图中,自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。所描述的实施例是本发明一部分实施例,而不是全部的实施例。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。下面结合附图对本发明的实施例进行详细说明。
如图1所示,一种高效的区块链访问方法,管理模块1接受用户访问请求,并对请求进行处理分析,判定请求类型,对请求进行分类,当请求为上链操作时,管理模块1将上链操作命令发送至上链队列4,控制模块5连接上链队列4,并根据上链队列4中的排序依次执行上链写操作,当所述控制模块5执行上链写操作成功,所述控制模块5结束上链写操作并将上链结果返回至用户,当所述控制模块5执行上链写操作失败,所述控制模块5将执行失败的上链写操作返回至上链队列4进行排序,等待再次执行该上链操作,直至上链写操作成功;
当请求为数据查询时,管理模块1将查询请求交于查询模块2,查询模块2将对同步数据库3进行查询,同步数据库3会定时与区块链进行数据同步,以保证数据的完整性和准确性。所述查询模块2不需要对区块链进行查询,只需要查询数据库3,提高了查询的效率,查询模块2将查询结构反馈至用户。
显然,本发明的上述实施例仅是为清楚地说明本发明所作的举例,而并非是对本发明的实施方式的限定。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动。这里无需也无法对所有的实施方式予以穷举。而这些属于本发明的精神所引伸出的显而易见的变化或变动仍处于本发明的保护范围之中。

Claims (4)

1.一种高效的区块链访问方法,其特征在于,通过管理模块、查询模块、控制模块和同步数据库进行区块链访问,所述访问方法包括以下步骤:
步骤1:判断用户请求命令;管理模块接受用户访问请求,对请求命令进行处理和分析,根据请求命令的类型分别将查询命令和上链操作命令发送至查询模块和控制模块;
步骤2:查询模块根据用户查询命令的请求连接同步数据库,并将查询结果直接反馈给用户;控制模块根据用户上链操作命令的请求连接区块链,并对区块链进行上链写操作,操作结束后返回上链结果至用户。
2.根据权利要求1所述的高效的区块链访问方法,其特征在于:所述区块链访问还包括上链队列,所述步骤1中的管理模块将上链操作命令发送至上链队列,所述步骤2中的控制模块连接上链队列,并根据上链队列中的排序依次执行上链写操作。
3.根据权利要求2所述的高效的区块链访问方法,其特征在于:所述步骤2中的上链写操作包括以下步骤:
当所述控制模块执行上链写操作成功,所述控制模块结束上链写操作并将上链结果返回至用户,当所述控制模块执行上链写操作失败,所述控制模块将执行失败的上链操作返回至所述上链队列进行排序,等待再次执行该上链操作。
4.根据权利要求1所述的高效的区块链访问方法,其特征在于:所述同步数据库定时与区块链进行数据同步处理。
CN202011252235.1A 2020-11-12 2020-11-12 一种高效的区块链访问方法 Pending CN112328690A (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011252235.1A CN112328690A (zh) 2020-11-12 2020-11-12 一种高效的区块链访问方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011252235.1A CN112328690A (zh) 2020-11-12 2020-11-12 一种高效的区块链访问方法

Publications (1)

Publication Number Publication Date
CN112328690A true CN112328690A (zh) 2021-02-05

Family

ID=74318413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011252235.1A Pending CN112328690A (zh) 2020-11-12 2020-11-12 一种高效的区块链访问方法

Country Status (1)

Country Link
CN (1) CN112328690A (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107292181A (zh) * 2017-06-20 2017-10-24 无锡井通网络科技有限公司 基于区块链的数据库系统及使用该系统的使用方法
CN107391649A (zh) * 2017-07-14 2017-11-24 浙商银行股份有限公司 一种提升区块链查询效率的系统及方法
CN107657059A (zh) * 2017-10-20 2018-02-02 中国银行股份有限公司 基于区块链应用系统的数据同步方法、中间件及系统
US20180227118A1 (en) * 2017-02-09 2018-08-09 International Business Machines Corporation Managing a database management system using a blockchain database
WO2020001108A1 (zh) * 2018-06-29 2020-01-02 阿里巴巴集团控股有限公司 基于区块链的数据处理方法和装置
CN110753084A (zh) * 2019-09-06 2020-02-04 平安普惠企业管理有限公司 上链数据读取方法、缓存服务器及计算机可读存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180227118A1 (en) * 2017-02-09 2018-08-09 International Business Machines Corporation Managing a database management system using a blockchain database
CN107292181A (zh) * 2017-06-20 2017-10-24 无锡井通网络科技有限公司 基于区块链的数据库系统及使用该系统的使用方法
CN107391649A (zh) * 2017-07-14 2017-11-24 浙商银行股份有限公司 一种提升区块链查询效率的系统及方法
CN107657059A (zh) * 2017-10-20 2018-02-02 中国银行股份有限公司 基于区块链应用系统的数据同步方法、中间件及系统
WO2020001108A1 (zh) * 2018-06-29 2020-01-02 阿里巴巴集团控股有限公司 基于区块链的数据处理方法和装置
CN110753084A (zh) * 2019-09-06 2020-02-04 平安普惠企业管理有限公司 上链数据读取方法、缓存服务器及计算机可读存储介质

Similar Documents

Publication Publication Date Title
US5953719A (en) Heterogeneous database system with dynamic commit procedure control
WO2022116323A1 (zh) 一种联邦学习调度方法、装置及系统
US6339771B1 (en) Method and system for managing connections to a database management system
CN109542682B (zh) 一种数据备份方法、装置、设备和存储介质
JPS6170654A (ja) 分散処理システムにおける資源管理方式
JPS63138439A (ja) 分散データベースアクセス要求処理方法
CN110188114B (zh) 一种数据操作的优化方法、装置、系统、设备和存储介质
CN101510162B (zh) 一种基于延时策略的软件事务内存的实现方法
US11385796B2 (en) Method, device, and program product for reducing delay in I/O processing due to mirroring of cache data
CN115080128A (zh) 一种硬盘启动顺序管理方法、系统、装置及存储介质
CN112328690A (zh) 一种高效的区块链访问方法
CN112866339B (zh) 数据传输方法、装置、计算机设备和存储介质
US7080189B1 (en) USB device communication
CN113946628A (zh) 一种基于拦截器的数据同步方法及装置
CN103729391A (zh) 能够重新启动事务的客户端装置和数据库服务器及方法
CN110287187B (zh) 多个服务器中数据表同步更新方法、系统和存储介质
CN103995736A (zh) 一种传递共享内存的方法和装置
JPH0789334B2 (ja) データベース管理処理方式
CN114490106A (zh) 信息交换系统与方法
CN117290451B (zh) 一种保证数据库系统事务一致性的方法及系统
CN109062929B (zh) 一种查询任务通信方法及系统
CN113296895B (zh) 事务处理系统、事务处理方法及装置
CN112631975B (zh) 基于Linux的SPI传输方法
CN115941677B (zh) 一种数据库分表迁移的断点续传方法
CN117290451A (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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210205

RJ01 Rejection of invention patent application after publication