CN114329375A - A block chain-based data access method, device and computer equipment - Google Patents
A block chain-based data access method, device and computer equipment Download PDFInfo
- Publication number
- CN114329375A CN114329375A CN202111442363.7A CN202111442363A CN114329375A CN 114329375 A CN114329375 A CN 114329375A CN 202111442363 A CN202111442363 A CN 202111442363A CN 114329375 A CN114329375 A CN 114329375A
- Authority
- CN
- China
- Prior art keywords
- collector
- user
- preset
- dimensional code
- information
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000012795 verification Methods 0.000 claims description 20
- 238000012986 modification Methods 0.000 claims description 15
- 230000004048 modification Effects 0.000 claims description 15
- 230000001360 synchronised effect Effects 0.000 claims description 2
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 11
- 238000007726 management method Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 241000699670 Mus sp. Species 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Landscapes
- Storage Device Security (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
Description
技术领域technical field
本申请涉及区块链技术领域,尤其涉及一种基于区块链的数据访问方法、装置及计算机设备This application relates to the field of blockchain technology, and in particular to a method, device and computer equipment for data access based on blockchain
背景技术Background technique
在动力环境监控系统中,在访问查询数据时,采集器是否可以信任访问者一直是个待解决的问题。目前已有的解决方案是通过CA认证获得访问权限,然而CA认证的问题在于需要一个第三方信任机构单独判断是否可以信任,数据存储中心化,数据容易被篡改。且目前的查询数据步骤繁琐,需要通过电脑端登陆界面访问。可见现有的数据访问方法存在安全性低以及便捷性低的问题。In the power environment monitoring system, whether the collector can trust the visitor when accessing the query data has always been a problem to be solved. The existing solution is to obtain access rights through CA certification. However, the problem of CA certification is that it requires a third-party trust agency to independently judge whether it can be trusted, data storage is centralized, and data is easily tampered with. In addition, the current data query steps are cumbersome and need to be accessed through the computer terminal login interface. It can be seen that the existing data access methods have problems of low security and low convenience.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的在于提出一种基于区块链的数据访问方法、装置及计算机设备,以解决现有的数据访问方法存在安全性低以及便捷性低的问题。The purpose of the embodiments of the present application is to propose a blockchain-based data access method, device, and computer equipment, so as to solve the problems of low security and low convenience in the existing data access method.
为了解决上述技术问题,本申请实施例提供一种基于区块链的数据访问方法,采用了如下技术方案:In order to solve the above technical problems, the embodiments of the present application provide a blockchain-based data access method, which adopts the following technical solutions:
获取数据访问权限查询请求,所述数据访问权限查询请求是被访问采集器,基于访问用户扫描目标二维码得到的二维码信息后,所述访问者验证所述被访问采集器为合法采集器时发出的;所述数据访问查询请求包括被访问采集器编号、被访问采集器签名以及所述二维码信息;所述二维码信息包括二维码权限链块编号、采集器编号、二维码生成用户的用户名以及二维码生成用户的用户签名;Obtain a data access right query request, the data access right query request is the accessed collector, based on the two-dimensional code information obtained by the visiting user scanning the target two-dimensional code, the visitor verifies that the accessed collector is a legal collector The data access query request includes the number of the collector being accessed, the signature of the collector being accessed, and the two-dimensional code information; the two-dimensional code information includes the two-dimensional code authority chain block number, collector number, The QR code generates the user's username and the QR code generates the user's user signature;
基于预设采集器区块链表,根据所述被访问采集器编号以及所述被访问采集器签名,判断所述被访问采集器是否为合法采集器;Based on the preset collector block chain list, according to the accessed collector number and the accessed collector signature, determine whether the accessed collector is a legal collector;
若所述被访问采集器为合法采集器,则根据所述二维码生成用户的用户名以及所述二维码生成用户的用户签名,判断所述二维码生成用户是否为预设管理员;If the accessed collector is a legitimate collector, then according to the user name of the user generated by the two-dimensional code and the user signature of the user of the two-dimensional code generation, it is determined whether the user of the two-dimensional code generation is a preset administrator ;
若所述二维码生成用户是预设管理员,则根据所述二维码权限链块编号在预设二维码权限区块链表中查找与所述二维码权限链块编号对应的二维码权限信息;If the user who generates the QR code is a preset administrator, search for the two-dimensional code corresponding to the QR code permission chain block number in the preset QR code permission block chain table according to the QR code permission chain block number. QR code permission information;
根据所述二维码权限信息以及预设用户信息区块链表,判断所述访问用户是否为可访问的合法用户;According to the two-dimensional code permission information and the preset user information block chain table, determine whether the accessing user is an accessible legal user;
若所述访问用户为可访问的合法用户,则返回允许访问信息给所述被访问采集器;If the accessing user is an accessible legal user, returning access permission information to the accessed collector;
所述预设采集器区块链表、所述预设用户信息区块链表以及所述预设二维码权限区块链表均存储在预设联盟区块链中。The preset collector blockchain list, the preset user information blockchain list, and the preset two-dimensional code permission blockchain list are all stored in the preset alliance blockchain.
为了解决上述技术问题,本申请实施例还提供一种基于区块链的数据访问装置,包括:In order to solve the above technical problems, the embodiments of the present application also provide a data access device based on blockchain, including:
第一获取模块,用于获取数据访问权限查询请求;所述数据访问权限查询请求是被访问采集器,基于访问用户扫描目标二维码得到的二维码信息后,所述访问者验证所述被访问采集器为合法采集器时发出的;所述数据访问查询请求包括被访问采集器编号、被访问采集器签名以及所述二维码信息;所述二维码信息包括二维码权限链块编号、采集器编号、二维码生成用户的用户名以及二维码生成用户的用户签名;The first obtaining module is used to obtain a query request for data access rights; the data access rights query request is an accessed collector, and based on the two-dimensional code information obtained by the visiting user scanning the target two-dimensional code, the visitor verifies the Sent when the accessed collector is a legal collector; the data access query request includes the accessed collector number, the accessed collector signature, and the two-dimensional code information; the two-dimensional code information includes the two-dimensional code authority chain Block number, collector number, user name of the QR code generating user, and user signature of the QR code generating user;
第一判断模块,用于基于预设采集器区块链表,根据所述被访问采集器编号以及所述被访问采集器签名,判断所述被访问采集器是否为合法采集器;a first judging module, configured to judge whether the visited collector is a legal collector based on the preset collector block chain list and according to the accessed collector number and the accessed collector signature;
第二判断模块,用于若所述被访问采集器为合法采集器,则根据所述二维码生成用户的用户名以及所述二维码生成用户的用户签名,判断所述二维码生成用户是否为预设管理员;The second judging module is configured to, if the accessed collector is a legitimate collector, generate the user name of the user according to the two-dimensional code and the user signature of the user from the two-dimensional code, and judge that the two-dimensional code is generated. Whether the user is the default administrator;
查找模块,用于若所述二维码生成用户是预设管理员,则根据所述二维码权限链块编号在预设二维码权限区块链表中查找与所述二维码权限链块编号对应的二维码权限信息;The search module is configured to search for the two-dimensional code authority chain in the preset two-dimensional code authority block chain list according to the two-dimensional code authority chain block number if the two-dimensional code generation user is a preset administrator QR code permission information corresponding to the block number;
第三判断模块,用于根据所述二维码权限信息以及预设用户信息区块链表,判断所述访问用户是否为可访问的合法用户;A third judging module, configured to judge whether the accessing user is an accessible legal user according to the two-dimensional code permission information and the preset user information block chain table;
第一返回模块,用于若所述访问用户为可访问的合法用户,则返回允许访问信息给所述被访问采集器;a first return module, configured to return access permission information to the accessed collector if the accessing user is an accessible legal user;
所述预设采集器区块链表、所述预设用户信息区块链表以及所述预设二维码权限区块链表均存储在预设联盟区块链中。The preset collector blockchain list, the preset user information blockchain list, and the preset two-dimensional code permission blockchain list are all stored in the preset alliance blockchain.
为了解决上述技术问题,本申请实施例还提供一种计算机设备,所述存储器中存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现基于区块链的数据访问方法的步骤。In order to solve the above technical problem, an embodiment of the present application further provides a computer device, in which computer-readable instructions are stored in the memory, and when the processor executes the computer-readable instructions, a method for accessing data based on blockchain is implemented. step.
为了解决上述技术问题,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述实施例基于区块链的数据访问方法的步骤。In order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, where computer-readable instructions are stored on the computer-readable storage medium, and when the computer-readable instructions are executed by a processor, the above embodiments are implemented Steps of a blockchain-based data access method.
与现有技术相比,本申请实施例主要有以下有益效果:获取数据访问权限查询请求,所述数据访问权限查询请求是被访问采集器,基于访问用户扫描目标二维码得到的二维码信息后,所述访问者验证所述被访问采集器为合法采集器时发出的;所述数据访问查询请求包括被访问采集器编号、被访问采集器签名以及所述二维码信息;所述二维码信息包括二维码权限链块编号、采集器编号、二维码生成用户的用户名以及二维码生成用户的用户签名;基于预设采集器区块链表,根据所述被访问采集器编号以及所述被访问采集器签名,判断所述被访问采集器是否为合法采集器;若所述被访问采集器为合法采集器,则根据所述二维码生成用户的用户名以及所述二维码生成用户的用户签名,判断所述二维码生成用户是否为预设管理员;若所述二维码生成用户是预设管理员,则根据所述二维码权限链块编号在预设二维码权限区块链表中查找与所述二维码权限链块编号对应的二维码权限信息;根据所述二维码权限信息以及预设用户信息区块链表,判断所述访问用户是否为可访问的合法用户;若所述访问用户为可访问的合法用户,则返回允许访问信息给所述被访问采集器;所述预设采集器区块链表、所述预设用户信息区块链表以及所述预设二维码权限区块链表均存储在预设联盟区块链中。Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: obtaining a data access authority query request, where the data access authority query request is an access collector based on a two-dimensional code obtained by an access user scanning a target two-dimensional code After the information, the visitor verifies that the accessed collector is a legitimate collector; the data access query request includes the accessed collector number, the accessed collector signature and the QR code information; the The two-dimensional code information includes the two-dimensional code authority chain block number, the collector number, the user name of the two-dimensional code generating user, and the user signature of the two-dimensional code generating user; The number of the visited collector and the signature of the visited collector are used to determine whether the visited collector is a legal collector; The user signature of the two-dimensional code generation user is used to determine whether the two-dimensional code generation user is a preset administrator; if the two-dimensional code generation user is a preset administrator, the authority chain block number is based on the two-dimensional code. Find the two-dimensional code authority information corresponding to the two-dimensional code authority block number in the preset two-dimensional code authority block chain table; according to the two-dimensional code authority information and the preset user information block chain table, determine the Whether the accessing user is an accessible legal user; if the accessing user is an accessible legal user, return access permission information to the accessed collector; the preset collector blockchain list, the preset user Both the information block chain list and the preset QR code permission block chain list are stored in the preset alliance block chain.
这样可以基于区块链对用户信息、采集器信息以及二维码权限信息进行存储与判断,使得用户信息、采集器信息和二维码权限信息有不可篡改的性质,并且实现数据去中心化,提高了数据访问的安全性,同时,采用二维码方式实现数据访问查看,提高数据访问的便捷性。In this way, user information, collector information and QR code authority information can be stored and judged based on the blockchain, so that user information, collector information and QR code authority information can not be tampered with, and data decentralization can be achieved. The security of data access is improved, and at the same time, the QR code is used to realize data access and viewing, which improves the convenience of data access.
附图说明Description of drawings
为了更清楚地说明本申请中的方案,下面将对本申请实施例描述中所需要使用的附图作一个简单介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the solutions in the present application more clearly, the following will briefly introduce the accompanying drawings used in the description of the embodiments of the present application. For those of ordinary skill, other drawings can also be obtained from these drawings without any creative effort.
图1是本申请可以应用于其中的示例性系统架构图;FIG. 1 is an exemplary system architecture diagram to which the present application can be applied;
图2根据本申请的基于区块链的数据访问方法的一个实施例的流程图;2 is a flowchart of an embodiment of a blockchain-based data access method according to the present application;
图3是本申请提供的一种预设采集器区块链表的结构示意图;3 is a schematic structural diagram of a preset collector block chain list provided by the present application;
图4是本申请提供的一种预设二维码权限区块链表的结构示意图;4 is a schematic structural diagram of a preset two-dimensional code permission block chain table provided by the present application;
图5是本申请提供的一种预设用户信息区块链表的结构示意图;5 is a schematic structural diagram of a preset user information block chain table provided by the present application;
图6是图2中步骤S201之前的一个实施例的流程图;Fig. 6 is a flowchart of an embodiment before step S201 in Fig. 2;
图7是图2中步骤204之前的一个实施例的流程图;Figure 7 is a flow chart of an embodiment prior to step 204 in Figure 2;
图8是图3中步骤303之后的一个实施例的流程图;FIG. 8 is a flowchart of an embodiment after step 303 in FIG. 3;
图9是图3中步骤306之后的一个实施例的流程图;Figure 9 is a flowchart of an embodiment after step 306 in Figure 3;
图10是根据本申请的基于区块链的数据访问装置的一个实施例的结构示意图;10 is a schematic structural diagram of an embodiment of a blockchain-based data access device according to the present application;
图11是图10中第一获取模块之前的一个实施例的结构示意图;11 is a schematic structural diagram of an embodiment before the first acquisition module in FIG. 10;
图12是图10中查找模块之前的一个实施例的结构示意图;Figure 12 is a schematic structural diagram of an embodiment before the search module in Figure 10;
图13是图11中第一生成模块之后的一个实施例的结构示意图;13 is a schematic structural diagram of an embodiment after the first generation module in FIG. 11;
图14是图11中链表生成模块之后的一个实施例的结构示意图;14 is a schematic structural diagram of an embodiment after the linked list generation module in FIG. 11;
图15是根据本申请的计算机设备的一个实施例的结构示意图。FIG. 15 is a schematic structural diagram of an embodiment of a computer device according to the present application.
具体实施方式Detailed ways
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同;本文中在申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请;本申请的说明书和权利要求书及上述附图说明中的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。本申请的说明书和权利要求书或上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field of this application; the terms used herein in the specification of the application are for the purpose of describing specific embodiments only It is not intended to limit the application; the terms "comprising" and "having" and any variations thereof in the description and claims of this application and the above description of the drawings are intended to cover non-exclusive inclusion. The terms "first", "second" and the like in the description and claims of the present application or the above drawings are used to distinguish different objects, rather than to describe a specific order.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
为了使本技术领域的人员更好地理解本申请方案,下面将结合附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to make those skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings.
如图1所示,系统架构100可以包括预设联盟区块链101,管理服务器102、二维码103、终端设备104以及采集器105。管理服务器102、终端设备104以及采集器105可以通过网络与预设联盟区块链101进行通信。终端设备104以及采集器105之间也可以通过网络进行通信。管理服务器102能够生成二维码103。终端设备104通过扫描二维码103可以获得二维码信息,二维码信息包括:二维码权限链块编号、采集器编号、二维码生成用户的用户名以及二维码生成用户的用户签名。网络可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , the
管理员可以通过管理服务器102和网络与预设联盟区块链101交互,以接收或发送消息等。普通用户可以通过终端设备104和网络与预设联盟区块链101交互,以接收或发送消息等。终端设备104可以安装有各种通讯客户端应用,例如网页浏览器应用、购物类应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等。The administrator can interact with the
终端设备104可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、MP3播放器(Moving Picture Experts Group AudioLayer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts GroupAudio Layer IV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机和台式计算机等等。The
预设联盟区块链101包括多个节点,具体可以是基于5个或以上的节点,使预设联盟区块链101上的节点可以实现拜占庭容错共识机制。The
管理服务器102用于修改采集器信息和用户信息,同时用于生成二维码103。The
采集器105可以是用于采集各种数据的设备。
需要说明的是,本申请实施例所提供的基于区块链的数据访问方法一般由预设联盟区块链101执行,相应地,基于区块链的数据访问装置一般设置于预设联盟区块链101中。It should be noted that the blockchain-based data access method provided by the embodiments of the present application is generally executed by the
应该理解,图1中的预设联盟区块链101、管理服务器102、二维码103、终端设备104以及采集器105的数目仅仅是示意性的。根据实现需要,可以具有任意数目的预设联盟区块链101、管理服务器102、二维码103、终端设备104以及采集器105。It should be understood that the numbers of the
继续参考图2,示出了根据本申请的基于区块链的数据访问方法的一个实施例的流程图。基于区块链的数据访问方法,包括以下步骤:Continuing to refer to FIG. 2 , a flowchart of one embodiment of a blockchain-based data access method according to the present application is shown. Blockchain-based data access method, including the following steps:
步骤S201,获取数据访问权限查询请求,数据访问权限查询请求是被访问采集器,基于访问用户扫描目标二维码得到的二维码信息后,访问者验证被访问采集器为合法采集器时发出的;数据访问查询请求包括被访问采集器编号、被访问采集器签名以及二维码信息;二维码信息包括二维码权限链块编号、采集器编号、二维码生成用户的用户名以及二维码生成用户的用户签名。Step S201, obtaining a data access authority query request, the data access authority query request is the accessed collector, based on the two-dimensional code information obtained by the visiting user scanning the target two-dimensional code, the visitor verifies that the accessed collector is a legitimate collector and sends it out. The data access query request includes the number of the accessed collector, the signature of the accessed collector, and QR code information; the QR code information includes the QR code permission chain block number, collector number, the user name of the user who generated the QR code, and The QR code generates the user's user signature.
在本实施例中,基于区块链的数据访问方法运行于其上的电子设备(例如图1所示的预设联盟区块链)可以通过有线连接方式或者无线连接方式接收数据访问权限查询请求。需要指出的是,上述无线连接方式可以包括但不限于3G/4G连接、WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultra wideband)连接、以及其他现在已知或将来开发的无线连接方式。In this embodiment, the electronic device on which the blockchain-based data access method runs (for example, the default alliance blockchain shown in FIG. 1 ) can receive a data access permission query request through a wired connection or a wireless connection . It should be pointed out that the above wireless connection methods may include but are not limited to 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or developed in the future .
其中,上述采集器为用于采集数据或提供数据的设备。上述被访问采集器为访问用户需要访问的采集器。上述被访问采集器签名包括被访问采集器的私钥,其中,该被访问采集器的私钥与该被访问采集器的公钥存在映射关系。其中,每个采集器的公钥和私钥均是唯一的。上述二维码生成用户为生成二维码的用户,该二维码生成用户正常情况下为特定的管理用户,上述二维码生成用户的用户名为生成二维码的用户的用户名,上述二维码生成用户的用户签名也对应为生成二维码的用户的签名。当然,二维码生成用户也是有自己的公钥和私钥的,二维码生成用户的用户签名包括其对应的私钥。Wherein, the above collector is a device for collecting data or providing data. The above-mentioned visited collectors are collectors that the visiting user needs to access. The signature of the visited collector includes the private key of the visited collector, wherein there is a mapping relationship between the private key of the visited collector and the public key of the visited collector. The public and private keys of each collector are unique. The above-mentioned two-dimensional code generation user is the user who generates the two-dimensional code, the two-dimensional code generation user is normally a specific management user, the user name of the above-mentioned two-dimensional code generation user is the username of the user who generates the two-dimensional code, the above The user signature of the user who generates the two-dimensional code also corresponds to the signature of the user who generates the two-dimensional code. Of course, the QR code generation user also has his own public key and private key, and the user signature of the QR code generation user includes its corresponding private key.
具体地,当有用户需要访问某个采集器的数据时,用户可以通过扫描设备扫描该采集器对应的目标二维码得到对应的二维码信息(二维码权限链块编号、采集器编号、二维码生成用户的用户名以及二维码生成用户的用户签名)。用户首先验证该采集器编号是否合法,若采集器编号合法,则用户基于该二维码信息向该采集器发送数据访问请求。若采集器编号不合法则停止访问。Specifically, when a user needs to access the data of a certain collector, the user can scan the target QR code corresponding to the collector through a scanning device to obtain the corresponding QR code information (QR code permission chain number, collector number , the user name of the user generated by the QR code, and the user signature of the user generated by the QR code). The user first verifies whether the collector number is legal. If the collector number is legal, the user sends a data access request to the collector based on the two-dimensional code information. If the collector number is invalid, stop the access.
若采集器编号合法,则用户使用扫码获得的二维码信息,并附上自己的用户名和签名打包生成用户的数据访问请求,根据合法的采集器编号向采集器发送数据访问请求。采集器收到数据访问请求后首先验证用户是否合法,若用户合法,再向预设联盟区块链发送查询数据访问权限的请求(附上采集器自身的编号和签名)。If the collector number is legal, the user uses the QR code information obtained by scanning the code, and attaches his user name and signature to package and generate the user's data access request, and sends the data access request to the collector according to the legal collector number. After the collector receives the data access request, it first verifies whether the user is legal. If the user is legal, it sends a request to query the data access permission to the preset alliance blockchain (attach the collector's own number and signature).
步骤S202,基于预设采集器区块链表,根据被访问采集器编号以及被访问采集器签名,判断被访问采集器是否为合法采集器。Step S202, based on the preset collector block chain list, according to the number of the accessed collector and the signature of the accessed collector, determine whether the accessed collector is a legal collector.
在本实施例中,如图3所示,上述预设采集器区块链表遵循预设联盟区块链的存储方式且存储在预设联盟区块链中。预设采集器区块链表包括多个采集器链块,每个采集器链块记录一组采集器信息。每个采集器链块均包括采集器链块头以及采集器链块信息。该采集器链块头包括上一采集器链块的哈希值、当前时间戳、本采集器链块的哈希值,这样可以保证了预设采集器区块链表前面的数据被篡改后,后续哈希值全部会随之变更,能够很快速地发现预设采集器区块链表被篡改并报警。该采集器链块信息包括采集器编号、采集器的公钥以及采集器状态。预设采集器区块链表包括所有采集器信息(可设置采集器状态:正在使用和停止使用)。In this embodiment, as shown in FIG. 3 , the above-mentioned preset collector block chain list follows the storage method of the preset consortium block chain and is stored in the preset consortium block chain. The preset collector block chain list includes multiple collector chain blocks, and each collector chain block records a set of collector information. Each collector chain block includes a collector chain block header and collector chain block information. The collector chain block header includes the hash value of the previous collector chain block, the current timestamp, and the hash value of the current collector chain block. All the hash values will be changed accordingly, which can quickly find out that the preset collector blockchain list has been tampered with and report to the police. The collector chain block information includes the collector number, the collector's public key, and the collector status. The preset collector blockchain list includes all collector information (collector status can be set: in use and out of use).
上述合法采集器是指在预设采集器区块链表中有记录且是正常使用状态的采集器。若在预设采集器区块链表中没有记录且采集器状态为异常状态或停止状态,则采集器为非法采集器。The above-mentioned legal collectors refer to collectors that have records in the preset collector blockchain list and are in normal use. If there is no record in the preset collector block chain table and the collector status is abnormal or stopped, the collector is an illegal collector.
具体的,预设联盟区块链在接收到被访问采集器的数据访问权限查询请求后,首先判断发送请求的采集器是否是合法的采集器(根据被访问采集器编号以及被访问采集器签名与预设采集器区块链表中记录的采集器编号和公钥进行判断)。若在预设采集器区块链表中找到与数据访问权限查询请求中的被访问采集器编号相同的采集器编号,且在相同的采集器编号下的公钥与私钥存在映射关系,则可以判断被访问采集器为合法采集器。若在预设采集器区块链表中没有找到与数据访问权限查询请求中的被访问采集器编号相同的采集器编号,则可以直接判断被访问采集器不是合法采集器(非法采集器)。Specifically, after receiving the data access permission query request from the accessed collector, the default alliance blockchain first determines whether the collector sending the request is a legal collector (according to the accessed collector number and the accessed collector signature) Judging with the collector number and public key recorded in the preset collector blockchain table). If the collector number that is the same as the collector number being accessed in the data access permission query request is found in the preset collector block chain table, and the public key and private key under the same collector number have a mapping relationship, you can It is judged that the accessed collector is a legitimate collector. If the collector number that is the same as the accessed collector number in the data access permission query request is not found in the preset collector blockchain list, it can be directly determined that the accessed collector is not a legal collector (illegal collector).
步骤S203,若被访问采集器为合法采集器,则根据二维码生成用户的用户名以及二维码生成用户的用户签名,判断二维码生成用户是否为预设管理员。Step S203, if the accessed collector is a legitimate collector, the user name of the user generated by the two-dimensional code and the user signature of the two-dimensional code-generating user are generated to determine whether the two-dimensional code-generating user is a preset administrator.
在本实施例中,上述预设管理员可以是系统内置的主管理员用户,该主管理员用户可以修改采集器使用情况(把错误的采集器状态设置为停止使用,采集器不再为合法采集器)、修改其他用户的权限(可以将普通用户设置为副管理员;也可以撤销副管理员的权限,将其重新变为普通用户;亦可将用户设置为非法用户,禁止用户再访问系统)。In this embodiment, the above-mentioned preset administrator may be a built-in main administrator user in the system, and the main administrator user can modify the usage of the collector (the status of the wrong collector is set to be out of use, and the collector is no longer valid). Collector), modify the permissions of other users (you can set ordinary users as sub-administrators; you can also revoke the permissions of sub-administrators and turn them back into ordinary users; you can also set users as illegal users, prohibiting users from accessing again system).
具体地,若被访问采集器为合法采集器,则可以将扫描目标二维码得到的二维码生成用户的用户名与预设用户信息区块链表中记录的管理员的用户名进行比较,若两者的用户名相同,则判断两者的签名是否相同,若两者的签名也相同,在可以判断二维码生成用户为预设管理员;若两者的用户名不同且签名也不同,则判断二维码生成用户不是预设管理员(可能是恶意用户)。若两者的用户名或签名只有一种相同,也判断二维码生成用户不是预设管理员(可能是恶意用户)Specifically, if the accessed collector is a legitimate collector, the user name of the QR code generated user obtained by scanning the target QR code can be compared with the user name of the administrator recorded in the preset user information block chain table, If the user names of the two are the same, it is judged whether the signatures of the two are the same. If the signatures of the two are also the same, it can be judged that the user who generated the QR code is the default administrator; if the user names of the two are different and the signatures are also different , then it is judged that the user who generated the QR code is not the default administrator (may be a malicious user). If only one of the user names or signatures is the same, it is also judged that the user who generated the QR code is not the default administrator (may be a malicious user)
步骤S204,若二维码生成用户是预设管理员,则根据二维码权限链块编号在预设二维码权限区块链表中查找与二维码权限链块编号对应的二维码权限信息。Step S204, if the user who generates the two-dimensional code is the default administrator, search for the two-dimensional code authority corresponding to the two-dimensional code authority block number in the default two-dimensional code authority block chain table according to the two-dimensional code authority block number information.
在本实施例中,如图4所示,上述预设二维码权限区块链表遵循预设联盟区块链的存储方式且存储在预设联盟区块链中。预设二维码权限区块链表包括多个二维码权限链块,每个二维码权限链块代表一组二维码权限信息。每个二维码权限链块均包括二维码权限链块头以及二维码权限链块信息。每个二维码权限链块均包括上一二维码权限链块的哈希值、当前时间戳、本二维码权限链块的哈希值,这样可以保证了预设二维码权限区块链表前面的数据被篡改后,后续哈希值全部会随之变更,能够很快速地发现预设二维码权限区块链表被篡改并报警。二维码权限链块信息包括管理员用户名、采集器编号、二维码权限链块编号以及可以通过该二维码访问采集器数据的普通用户列表。In this embodiment, as shown in FIG. 4 , the above-mentioned preset two-dimensional code permission block chain list follows the storage method of the preset alliance block chain and is stored in the preset alliance block chain. The preset QR code permission block chain list includes multiple QR code permission chain blocks, and each QR code permission chain block represents a group of QR code permission information. Each QR code authority chain block includes a QR code authority chain block header and QR code authority chain block information. Each QR code authority chain block includes the hash value of the previous QR code authority chain block, the current timestamp, and the hash value of this QR code authority chain block, which can ensure the preset QR code authority area. After the data in front of the block chain list is tampered with, all subsequent hash values will be changed accordingly, which can quickly find that the preset QR code permission block chain list has been tampered with and alarm. The QR code permission chain block information includes the administrator user name, collector number, QR code permission chain block number, and a list of common users who can access collector data through the QR code.
上述二维码权限信息是预设二维码权限区块链表中记录在二维码权限链块编号下的二维码权限链块的二维码权限信息。二维码权限信息包括预设管理员用户名、预设管理员签名、二维码对应的可查看的合法采集器编号以及可访问的合法用户名列表。The above two-dimensional code authority information is the two-dimensional code authority information of the two-dimensional code authority chain block recorded under the two-dimensional code authority chain block number in the preset two-dimensional code authority block chain table. The two-dimensional code authority information includes the preset administrator user name, the preset administrator signature, the viewable legal collector number corresponding to the two-dimensional code, and the list of accessible legal user names.
具体地,在确定二维码生成用户是预设管理员后,将二维码权限链块编号与预设二维码权限区块链表中记录的二维码权限链块编号及逆行比较,若在预设二维码权限区块链表中找到相同的二维码权限链块编号,则获取该相同的二维码权限链块编号下的二维码权限信息。Specifically, after it is determined that the user who generates the two-dimensional code is the default administrator, the two-dimensional code authority chain block number is compared with the two-dimensional code authority chain block number and reverse direction recorded in the default two-dimensional code authority block chain table. Find the same QR code permission chain block number in the preset QR code permission block chain table, then obtain the QR code permission information under the same QR code permission chain block number.
步骤S205,根据二维码权限信息以及预设用户信息区块链表,判断访问用户是否为可访问的合法用户。Step S205, according to the two-dimensional code permission information and the preset user information block chain table, determine whether the accessing user is an accessible legal user.
在本实施例中,如图5所示,上述预设用户信息区块链表遵循预设联盟区块链的存储方式且存储到预设联盟区块链中。预设用户信息区块链表包括多个用户信息链块,每个用户信息链块均记录一个用户的信息。预设用户信息区块链表包含所有用户,即用户权限(管理员用户、普通用户、非法用户)的信息。每个用户信息链块均包括用户信息链块头以及用户信息链块信息。每个用户信息链块均包括上一用户信息链块的哈希值、当前时间戳、本用户信息链块的哈希值,这样可以保证了预设用户信息区块链表前面的数据被篡改后,后续哈希值全部会随之变更,能够很快速地发现预设用户信息区块链表被篡改并报警。用户信息链块信息包括用户名、用户的公钥以及用户权限。In this embodiment, as shown in FIG. 5 , the above-mentioned preset user information block chain list follows the storage method of the preset alliance block chain and is stored in the preset alliance block chain. The preset user information block chain list includes a plurality of user information chain blocks, and each user information chain block records information of one user. The preset user information block chain list contains all users, that is, the information of user rights (administrator users, ordinary users, illegal users). Each user information chain block includes a user information chain block header and user information chain block information. Each user information chain block includes the hash value of the previous user information chain block, the current timestamp, and the hash value of this user information chain block, which can ensure that the data in front of the preset user information block chain list is tampered with. , all subsequent hash values will be changed accordingly, which can quickly find out that the preset user information blockchain list has been tampered with and report to the police. User information chain block information includes user name, user's public key, and user authority.
具体地,将访问用户的用户名以及签名与二维码权限信息的可访问的合法用户名列表中的用户名以及签名进行比较,若在可访问的合法用户名列表中查找到一致的合法用户名以及对应签名,且在预设用户信息区块链表中也能找到对应的用户名和签名,则认为该访问用户为可访问的合法用户。否则,认为该访问用户为不可访问的非法用户。Specifically, compare the user name and signature of the accessing user with the user name and signature in the accessible legal user name list of the QR code permission information. If a consistent legal user is found in the accessible legal user name list Name and corresponding signature, and the corresponding user name and signature can also be found in the preset user information block chain table, the accessing user is considered to be an accessible legal user. Otherwise, the access user is considered to be an inaccessible illegal user.
步骤S206,若访问用户为可访问的合法用户,则返回允许访问信息给被访问采集器。Step S206, if the accessing user is an accessible legal user, return access permission information to the accessed collector.
在本实施例中,上述允许访问信息可以包括允许访问的确定信息,比如是、同意或允许等信息。若访问用户为不可访问的非法用户,则返回不允许访问信息,例如否、不同意或不允许等信息。In this embodiment, the above-mentioned access permission information may include access permission determination information, such as information such as yes, consent, or permission. If the access user is an inaccessible illegal user, the information about access is not allowed, such as No, Disagree or Not Allowed, is returned.
本申请通过获取数据访问权限查询请求,数据访问权限查询请求是被访问采集器,基于访问用户扫描目标二维码得到的二维码信息后,访问者验证被访问采集器为合法采集器时发出的;数据访问查询请求包括被访问采集器编号、被访问采集器签名以及二维码信息;二维码信息包括二维码权限链块编号、采集器编号、二维码生成用户的用户名以及二维码生成用户的用户签名;基于预设采集器区块链表,根据被访问采集器编号以及被访问采集器签名,判断被访问采集器是否为合法采集器;若被访问采集器为合法采集器,则根据二维码生成用户的用户名以及二维码生成用户的用户签名判断二维码生成用户是否为预设管理员;若二维码生成用户是预设管理员,则根据二维码权限链块编号在预设二维码权限区块链表中查找与二维码权限链块编号对应的二维码权限信息;根据二维码权限信息以及预设用户信息区块链表判断访问用户是否为可访问的合法用户;若访问用户为可访问的合法用户,则返回允许访问信息给被访问采集器;预设采集器区块链表、预设用户信息区块链表以及预设二维码权限区块链表均存储在预设联盟区块链中。This application obtains a query request for data access rights. The query request for data access rights is sent by the accessed collector. Based on the QR code information obtained by the visiting user by scanning the target QR code, the visitor verifies that the accessed collector is a legitimate collector. The data access query request includes the number of the accessed collector, the signature of the accessed collector, and QR code information; the QR code information includes the QR code permission chain block number, collector number, the user name of the user who generated the QR code, and The QR code generates the user's user signature; based on the preset collector blockchain list, according to the accessed collector number and the accessed collector signature, it is judged whether the accessed collector is a legal collector; if the accessed collector is a legal collector If the QR code generation user is a preset administrator, then according to the user name of the QR code generation user and the user signature of the QR code generation user to determine whether the QR code generation user is the default administrator; The QR code permission information corresponding to the QR code permission chain block number is searched in the preset QR code permission block chain table; the access user is determined according to the QR code permission information and the preset user information block chain table. Whether it is an accessible legal user; if the accessing user is an accessible legal user, the access permission information is returned to the accessed collector; the preset collector blockchain list, the preset user information blockchain list and the preset QR code The permission blockchain list is stored in the default alliance blockchain.
这样可以基于区块链对用户信息、采集器信息以及二维码权限信息进行存储与判断,使得用户信息、采集器信息和二维码权限信息有不可篡改的性质,并且实现数据去中心化,提高了在动力环境监控系统中数据的安全性和可靠性,同时,采用二维码方式实现数据访问查看,使访问数据便捷。In this way, user information, collector information and QR code authority information can be stored and judged based on the blockchain, so that user information, collector information and QR code authority information can not be tampered with, and data decentralization can be achieved. The security and reliability of data in the power environment monitoring system are improved, and at the same time, the two-dimensional code is used to realize data access and viewing, which makes data access convenient.
在本实施例的一些可选的实现方式中,如图6所示,在步骤201获取数据访问权限查询请求之前,上述电子设备还可以执行以下步骤:In some optional implementations of this embodiment, as shown in FIG. 6 , before acquiring the data access permission query request in step 201, the above electronic device may further perform the following steps:
步骤S301,获取注册采集器发出的第一注册请求和注册用户发出的第二注册请求,第一注册请求包括注册采集器编号,第二注册请求包括注册用户名;Step S301, obtaining the first registration request sent by the registration collector and the second registration request sent by the registered user, where the first registration request includes the registration collector number, and the second registration request includes the registered user name;
步骤S302,根据第一注册请求和第二注册请求在预设联盟区块链进行注册,分别生成与注册采集器对应的采集器公钥和采集器私钥返回给注册采集器,以及与注册用户对应的用户公钥和用户私钥返回给注册用户。Step S302, perform registration on the preset alliance blockchain according to the first registration request and the second registration request, respectively generate the collector public key and collector private key corresponding to the registered collector and return them to the registered collector, and communicate with the registered user. The corresponding user public key and user private key are returned to the registered user.
步骤S303,基于注册采集器编号以及采集器公钥生成采集器区块链表,以得到预设采集器区块链表,以及基于注册用户名以及用户公钥生成用户信息区块链表,以得到预设用户信息区块链表。Step S303, generating a collector block chain table based on the registered collector number and the collector public key to obtain a preset collector block chain table, and generating a user information block chain table based on the registered user name and the user public key, so as to obtain a preset collector block chain table. User information blockchain list.
在本实施例中,上述采集器公钥用于生成采集器区块链表,上述采集器私钥用于进行采集器签名验证。上述用户公钥用于生成用户信息区块链表,上述用户私钥用于进行用户签名验证。In this embodiment, the collector's public key is used to generate the collector block chain table, and the collector's private key is used to verify the collector's signature. The above-mentioned user public key is used to generate the user information block chain table, and the above-mentioned user private key is used to perform user signature verification.
当采集器需要注册时,可以使用自身的编号生成注册请求向预设联盟区块链进行注册。预设联盟区块链会生成一个独有的采集器公钥和采集器私钥,然后再将对应的采集器公钥和采集器私钥返回给对应的采集器。预设联盟区块链通过注册采集器编号以及采集器公钥生成采集器区块链表,进而得到预设采集器区块链表。When the collector needs to register, it can use its own number to generate a registration request to register with the preset alliance blockchain. The default consortium blockchain will generate a unique collector public key and collector private key, and then return the corresponding collector public key and collector private key to the corresponding collector. The preset consortium blockchain generates the collector blockchain list by registering the collector number and the collector public key, and then obtains the preset collector blockchain list.
当用户需要注册时,可以使用自身的用户名生成注册请求向预设联盟区块链进行注册。预设联盟区块链会生成一个独有的用户公钥和用户私钥,然后再将对应的用户公钥和用户私钥返回给对应的用户。预设联盟区块链通过注册用户名以及用户公钥生成用户信息区块链表,进而得到预设用户信息器区块链表。When users need to register, they can use their own username to generate a registration request to register with the preset alliance blockchain. The default alliance blockchain will generate a unique user public key and user private key, and then return the corresponding user public key and user private key to the corresponding user. The preset alliance block chain generates a user information block chain table by registering the user name and the user public key, and then obtains the preset user information device block chain table.
这样采集器以及用户都可以向预设联盟区块链进行注册得到属于自己的区块链表存储在区块链中,提高采集器和用户的信息安全性。In this way, both collectors and users can register with the preset alliance blockchain to obtain their own blockchain list and store them in the blockchain, improving the information security of collectors and users.
在本申请一实施例方式中,当新增采集器或用户时,将采集器编号或用户名发送给预设联盟区块链,预设联盟区块链在验证采集器编号或用户名没有重复后返回属于该采集器编号或用户名独有的公钥和私钥,并将采集器编号和采集器公钥或用户名和用户公钥到相应链表中。在新增采集器时,采集器状态初始化为正在使用。在新增用户时,用户权限初始化为普通用户。In an embodiment of the present application, when a collector or user is added, the collector number or user name is sent to the default alliance blockchain, and the default alliance blockchain verifies that the collector number or user name is not repeated Then return the public and private keys unique to the collector number or user name, and add the collector number and collector public key or user name and user public key to the corresponding linked list. When adding a collector, the collector state is initialized to being in use. When a new user is added, the user authority is initialized as a common user.
本申请通过注册得到的预设采集器区块链表以及预设用户信息区块链表对采集器以及用户的身份信息进行认证,进而提高了采集器和用户之间数据访问的安全性。This application authenticates the identity information of the collector and the user through the preset collector block chain table and the preset user information block chain table obtained by registration, thereby improving the security of data access between the collector and the user.
在一些可选的实现方式中,如图7所示,在步骤204为若二维码生成用户是预设管理员,则根据二维码权限链块编号在预设二维码权限区块链表中查找与二维码权限链块编号对应的二维码权限信息之前,上述电子设备可以执行以下步骤:In some optional implementation manners, as shown in FIG. 7 , in step 204, if the user who generates the two-dimensional code is a preset administrator, then according to the two-dimensional code permission chain block number, the default two-dimensional code permission block chain table is stored. Before searching for the QR code permission information corresponding to the QR code permission chain block number in the QR code, the above electronic device can perform the following steps:
步骤S401,获取预设管理员发出的二维码权限信息,二维码权限信息包括预设管理员用户名、预设管理员签名、二维码对应的可查看的合法采集器编号以及可访问的合法用户名列表。Step S401, obtaining the two-dimensional code authority information issued by the preset administrator, the two-dimensional code authority information includes the preset administrator user name, the preset administrator signature, the viewable legal collector number corresponding to the two-dimensional code, and the accessible list of valid usernames.
步骤S402,根据预设管理员用户名以及预设管理员签名验证预设管理员是否为合法管理员。Step S402, verifying whether the preset administrator is a legal administrator according to the preset administrator user name and the preset administrator signature.
步骤S403,若预设管理员为合法管理员,则根据二维码权限信息中的二维码对应的可查看的合法采集器编号以及可访问的合法用户名列表,生成二维码权限链块,并根据二维码权限链块生成二维码权限区块链表,以得到预设二维码权限区块链表,二维码权限链块包括与二维码对应的可查看的合法采集器编号对应的二维码权限链块编号。Step S403, if the preset administrator is a legal administrator, generate a two-dimensional code authority chain block according to the viewable legal collector number and the list of accessible legal user names corresponding to the two-dimensional code in the two-dimensional code authority information , and generate a QR code permission block list according to the QR code permission block to obtain a preset QR code permission block list. The QR code permission block includes the viewable legal collector number corresponding to the QR code. The corresponding QR code permission chain block number.
在本实施例中,上述二维码对应的可查看的合法采集器编号为可以通过该二维码进行查看的采集器的编号。上述可访问的合法用户名列表可以是通过二维码访问被访问采集器的合法用户的用户名对应的列表。该可访问的合法用户名列表包括多个合法用户的用户名。例如,可访问的合法用户名列表中包括用户名A、用户名B以及用户名C,那么可以说明用户名A、用户名B以及用户名C均为可访问的合法用户,此时,用户名A、用户名B以及用户名C均可以访问被访问采集器中的数据。In this embodiment, the number of the legal collector that can be viewed corresponding to the two-dimensional code is the number of the collector that can be viewed through the two-dimensional code. The above-mentioned list of accessible legal user names may be a list corresponding to the user names of legal users who access the accessed collector through a two-dimensional code. The list of accessible legitimate usernames includes usernames of multiple legitimate users. For example, the list of accessible legal user names includes user name A, user name B and user name C, then it can be shown that user name A, user name B and user name C are all accessible legal users. A, user name B and user name C can all access the data in the accessed collector.
具体地,管理员在生成二维码时,只能选择系统中的合法采集器(即在预设采集器区块链表中设备状态为正在使用的采集器),同时也只能选择系统中的合法用户(管理员用户和普通用户,非法用户不能被选择)。管理员预设联盟区块链发布二维码权限信息:预设管理员用户名、预设管理员签名、二维码对应的可查看的合法采集器编号以及可访问的合法用户名列表。当接收到管理员的请求后,在验证管理员身份和签名并确定管理员为合法管理员后,将二维码权限信息中的可查看的合法采集器编号以及可访问的合法用户名列表生成二维码权限链块,并将二维码权限链块发布到二维码权限区块链表上得到预设二维码权限区块链表。这样可以生成预设二维码权限区块链表用于判断二维码权限、本访问采集器以及访问用户的权限,提高用户通过二维码访问采集器的数据的可靠性。Specifically, when generating a QR code, the administrator can only select the legal collectors in the system (that is, the collectors whose device status is in use in the preset collector blockchain list), and can only select the collectors in the system. Legal users (admin users and ordinary users, illegal users cannot be selected). The administrator presets the permission information of the alliance blockchain to publish the QR code: the preset administrator username, the preset administrator signature, the viewable legal collector number corresponding to the QR code, and the list of accessible legal user names. After receiving the administrator's request, after verifying the administrator's identity and signature and confirming that the administrator is a legal administrator, generate a list of viewable legal collector numbers and accessible legal user names in the QR code permission information QR code authority chain block, and publish the QR code authority chain block to the QR code authority block chain table to obtain the preset QR code authority block chain table. In this way, a preset QR code permission block list can be generated to determine the QR code permission, the permission to access the collector and the access user, and improve the reliability of the user accessing the collector data through the QR code.
在一些可选的实现方式中,在步骤403根据二维码权限信息生成预设二维码权限区块链表之后,上述电子设备可以执行以下步骤:In some optional implementations, after generating a preset two-dimensional code permission block chain list according to the two-dimensional code permission information in step 403, the above electronic device may perform the following steps:
将二维码链块编号返回给预设管理员,以与预设管理员用户名、预设管理员签名以及二维码对应的可查看的合法采集器编号生成目标二维码。Return the QR code chain block number to the preset administrator, and generate the target QR code with the viewable legal collector number corresponding to the preset administrator user name, the preset administrator signature and the QR code.
在本实施例中,在生成预设二维码权限区块链表之后,返回生成的二维码权限链块的编号。管理员在收到返回的二维码权限链块编号后,可以使用该二维码链表块编号、二维码对应的可查看的合法采集器编号、自己的用户名和签名生成二维码,得到目标二维码。这样用户可以通过该目标二维码编号访问采集器。提高用户访问采集器数据的便捷性。In this embodiment, after the preset two-dimensional code authority block chain list is generated, the generated number of the two-dimensional code authority chain block is returned. After receiving the returned QR code permission chain block number, the administrator can use the QR code chain block number, the viewable legal collector number corresponding to the QR code, his own user name and signature to generate a QR code, and get Target QR code. In this way, the user can access the collector through the target QR code number. Improve the convenience for users to access the collector data.
在一些可选的实现方式中,如图8所示,在步骤303基于注册采集器编号以及采集器公钥生成采集器区块链表,以得到预设预设采集器区块链表之后,上述电子设备可以执行以下步骤:In some optional implementations, as shown in FIG. 8 , in step 303, a collector block chain table is generated based on the registered collector number and the collector public key, so as to obtain a preset preset collector block chain table, the electronic The device can perform the following steps:
步骤S501,获取预设管理员的信息修改请求,信息修改请求包括预设管理员签名、预设管理员用户名、待修改采集器对应的待修改采集器编号以及采集器目标状态。Step S501: Obtain an information modification request of a preset administrator, where the information modification request includes a preset administrator signature, a preset administrator user name, the number of the collector to be modified corresponding to the collector to be modified, and the target state of the collector.
步骤S502,根据预设管理员签名以及预设管理员用户名对预设管理员的管理员身份信息进行验证。Step S502, verifying the administrator identity information of the preset administrator according to the preset administrator signature and the preset administrator user name.
步骤S503,若管理员身份信息验证成功,则根据待修改采集器编号以及预设采集器区块链表对待修改采集器的身份信息进行验证。Step S503, if the verification of the identity information of the administrator is successful, the identity information of the collector to be modified is verified according to the number of the collector to be modified and the preset collector block chain list.
步骤S504,若待修改采集器的身份信息验证成功,则基于采集器目标状态修改预设采集器区块链表中待修改采集器对应的采集器链块信息。Step S504, if the verification of the identity information of the collector to be modified is successful, the collector chain block information corresponding to the collector to be modified in the preset collector block chain list is modified based on the target state of the collector.
步骤S505,若待修改采集器的身份信息验证失败,则返回失败信息。Step S505, if the authentication of the identity information of the collector to be modified fails, return failure information.
在本实施例中,上述信息修改请求可以包括采集器状态修改请求。上述待修改采集器使用情况需要被修改的采集器。采集器目标状态可以是修改后的采集器状态情况。例如把错误的采集器状态设置为停止使用,采集器不再为合法采集器。In this embodiment, the above information modification request may include a collector state modification request. The collector whose usage condition of the collector to be modified above needs to be modified. The collector target state may be a modified collector state condition. For example, if the status of an incorrect collector is set to be out of use, the collector is no longer a valid collector.
具体地,当管理员需要更改采集器状态时,管理员可以向预设联盟区块链发送修改采集器状态请求(含采集器编号、采集器目标状态、管理员用户名、管理员签名),预设联盟区块链核实管理员身份和签名且确定该管理员是合法管理员(身份信息验证成功的管理员)后,并确认预设采集器区块链表中已有该采集器编号,根据管理员设置的新状态生成一个新的采集器链块,更新采集器的状态。这样合法管理员可以修改采集器状态,即在发现采集器错误后将之状态设置为停止使用,用户将不再访问该采集器,或者将采集器停止使用状态修改为正在使用状态,用户可以继续访问该采集器。不合法管理员(身份信息验证失败的管理员)不能对采集器状体进行修改,并返回失败信息(否)。使得用户可以访问到有效的采集器数据,进一步提高采集器数据的安全性。Specifically, when the administrator needs to change the collector status, the administrator can send a request to modify the collector status (including collector number, collector target status, administrator user name, and administrator signature) to the preset alliance blockchain, After the default alliance blockchain verifies the administrator's identity and signature and confirms that the administrator is a legitimate administrator (an administrator whose identity information has been successfully verified), and confirms that the collector number already exists in the default collector blockchain list, according to The new state set by the administrator generates a new collector chain block, updating the state of the collector. In this way, the legal administrator can modify the status of the collector, that is, set the status of the collector to be out of use after discovering an error of the collector, and the user will no longer access the collector, or change the status of the collector to be in use, and the user can continue access the collector. Illegal administrators (administrators whose identity information verification fails) cannot modify the collector body and return a failure message (No). It enables users to access valid collector data, further improving the security of collector data.
在一些可选的实现方式中,如图9所示,信息修改请求还包括待修改用户的用户名以及目标身份状态,在步骤502根据预设管理员签名以及预设管理员用户名对预设管理员的管理员身份信息进行验证之后,上述电子设备可以执行以下步骤:In some optional implementations, as shown in FIG. 9 , the information modification request further includes the user name and target identity status of the user to be modified. After the administrator's administrator identity information is verified, the above electronic device can perform the following steps:
步骤S601,若管理员身份信息验证成功,则根据待修改用户的用户名以及预设用户信息区块链表对待修改用户的身份信息进行验证。Step S601, if the authentication of the administrator's identity information is successful, the identity information of the user to be modified is verified according to the user name of the user to be modified and the preset user information block chain table.
步骤S602,若待修改用户的身份信息验证成功,则基于目标身份状态修改待修改用户的用户名对应的用户信息链块信息。Step S602, if the authentication of the identity information of the user to be modified is successful, the user information chain block information corresponding to the user name of the user to be modified is modified based on the target identity state.
步骤S603,若待修改用户的身份信息验证失败,则返回失败信息。Step S603, if the verification of the identity information of the user to be modified fails, return failure information.
在本实施例中,上述信息修改请求可以包括用户身份状态修改请求。上述待修改用户是指身份状态需要被修改的用户。In this embodiment, the above information modification request may include a user identity state modification request. The above-mentioned user to be modified refers to a user whose identity status needs to be modified.
具体地,当管理员需要更改用户的身份状态时,若管理员可发送修改用户身份状态请求到预设联盟区块链上(需要修改的用户的用户名、目标身份状态、管理员用户名、管理员的签名),预设联盟区块链收到该请求后验证管理员是否为合法管理员。若管理员为合法管理员,则查询预设用户信息区块链表中是否有对应的用户。若有对应的用户,则重新生成一个新的用户信息链块,更新用户的身份状态。例如,管理员可以将普通用户设置为管理员用户,使其可以生成二维码;或将其他管理员用户设置为普通用户,停止其生成二维码访问采集器的权限;或将用户设置为非法用户,不再允许用户访问系统。这样合法管理员(身份信息验证成功的管理员)可以修改合法与用户(身份信息验证成功用户)的用户身份状态。不合法管理员(身份信息验证失败的管理员)不能对合法用户或不合法用户(身份信息验证失败的用户)的用户身份状态进行修改。使得采集器数据可以被合法用户访问,进一步提高采集器数据的安全性。Specifically, when the administrator needs to change the user's identity status, if the administrator can send a request to modify the user's identity status to the preset alliance blockchain (username of the user to be modified, target identity status, administrator username, Administrator's signature), the default alliance blockchain will verify whether the administrator is a legitimate administrator after receiving the request. If the administrator is a legal administrator, query whether there is a corresponding user in the preset user information blockchain list. If there is a corresponding user, a new user information chain block is regenerated to update the user's identity status. For example, administrators can set ordinary users as administrator users, so that they can generate QR codes; or set other administrator users as ordinary users to stop them from generating QR codes to access the collector; or set users as Illegal users, users are no longer allowed to access the system. In this way, the legal administrator (the administrator whose identity information is successfully verified) can modify the user identity status of the legal and user (the user whose identity information is verified successfully). An illegal administrator (an administrator whose identity information verification fails) cannot modify the user identity status of a legal user or an illegal user (a user whose identity information verification fails). The collector data can be accessed by legitimate users, and the security of the collector data is further improved.
在一些可选的实现方式中,在步骤303基于注册采集器编号以及采集器公钥生成采集器区块链表,以得到预设采集器区块链表;以及步骤306基于注册用户名以及用户公钥生成用户信息区块链表,以得到预设用户信息区块链表之后,上述电子设备可以执行以下步骤:In some optional implementations, in step 303, a collector block chain table is generated based on the registered collector number and the collector public key to obtain a preset collector block chain list; and step 306 is based on the registered user name and the user public key. After generating the user information block chain table to obtain the preset user information block chain table, the above electronic device can perform the following steps:
将预设用户信息区块链表同步到已注册采集器本地、将预设采集器区块链表同步到已注册用户本地以及将预设用户信息区块链表和预设采集器区块链表同步到预设管理员本地。Synchronize the preset user information block list to the registered collector, synchronize the preset collector block list to the registered user, and synchronize the preset user information block list and preset collector block list to the preset Set administrator local.
在本实施例中,当注册生成预设用户信息区块链表以及预设采集器区块链表后,所有已经注册过的采集器可以同步该预设用户信息区块链表,以便接收到来自用户的请求时验证请求以及验证身份信息是否由已注册的合法采集器发出。同时,所有已经注册过的用户可以同步该预设采集器区块链表,以便接收到来自采集器的请求时验证请求以及验证身份信息是否由已注册的合法用户发出。当然,预设管理员也需要通过预设用户信息区块链表和预设采集器区块链表用于对采集器和用户的请求以及身份信息进行验证,进而提高访问采集器数据的安全性。In this embodiment, after registering to generate a preset user information blockchain list and a preset collector blockchain list, all registered collectors can synchronize the preset user information blockchain list, so as to receive information from users. When requesting, verify the request and verify that the identity information is sent by a registered legal collector. At the same time, all registered users can synchronize the preset collector blockchain list, so as to verify the request and verify whether the identity information is sent by the registered legal user when receiving the request from the collector. Of course, the preset administrator also needs to use the preset user information blockchain list and the preset collector blockchain list to verify the request and identity information of the collector and the user, thereby improving the security of accessing the collector data.
本申请所指预设联盟区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。The preset alliance blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain, essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information to verify its Validity of information (anti-counterfeiting) and generation of the next block. The blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,该计算机可读指令可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. , when the program is executed, it may include the processes of the foregoing method embodiments. The aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM).
应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flowchart of the accompanying drawings are sequentially shown in the order indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order and may be performed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and the execution sequence is also It does not have to be performed sequentially, but may be performed alternately or alternately with other steps or at least a portion of sub-steps or stages of other steps.
进一步参考图10,作为对上述图2所示方法的实现,本申请提供了一种基于区块链的数据访问装置的一个实施例,该基于区块链的数据访问装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。Further referring to FIG. 10 , as an implementation of the method shown in FIG. 2 above, the present application provides an embodiment of a blockchain-based data access device, which is the same as that shown in FIG. 2 . Corresponding to the method embodiments shown, the apparatus can be specifically applied to various electronic devices.
如图10所示,本实施例基于区块链的数据访问装置700包括:第一获取模块701、第一判断模块702、第二判断模块703、查找模块704、第三判断模块705以及第一返回模块706。其中:As shown in FIG. 10 , the blockchain-based
第一获取模块701,用于获取数据访问权限查询请求;数据访问权限查询请求是被访问采集器,基于访问用户扫描目标二维码得到的二维码信息后,访问者验证被访问采集器为合法采集器时发出的;数据访问查询请求包括被访问采集器编号、被访问采集器签名以及二维码信息;二维码信息包括二维码权限链块编号、采集器编号、二维码生成用户的用户名以及二维码生成用户的用户签名;The first obtaining
第一判断模块702,用于基于预设采集器区块链表,根据被访问采集器编号以及被访问采集器签名,判断被访问采集器是否为合法采集器;The
第二判断模块703,用于若被访问采集器为合法采集器,则根据二维码生成用户的用户名以及二维码生成用户的用户签名判断二维码生成用户是否为预设管理员;The
查找模块704,用于若二维码生成用户是预设管理员,则根据二维码权限链块编号在预设二维码权限区块链表中查找与二维码权限链块编号对应的二维码权限信息;The
第三判断模块705,用于根据二维码权限信息以及预设用户信息区块链表判断访问用户是否为可访问的合法用户;The
第一返回模块706,用于若访问用户为可访问的合法用户,则返回允许访问信息给被访问采集器;The first returning
预设采集器区块链表、预设用户信息区块链表以及预设二维码权限区块链表均存储在预设联盟区块链中。The preset collector blockchain list, the preset user information blockchain list, and the preset QR code permission blockchain list are all stored in the preset alliance blockchain.
在本实施例的一些可选的实现方式中,如图11所示,在第一获取模块701之前还包括:In some optional implementation manners of this embodiment, as shown in FIG. 11 , before the
第二获取模块707,用于获取注册采集器发出的第一注册请求和注册用户发出的第二注册请求,第一注册请求包括注册采集器编号,第二注册请求包括注册用户名;The second obtaining
注册模块708,用于根据第一注册请求和第二注册请求在预设联盟区块链进行注册,分别生成与注册采集器对应的采集器公钥和采集器私钥返回给注册采集器,以及与注册用户对应的用户公钥和用户私钥返回给注册用户;A
第一生成模块709,用于基于注册采集器编号以及采集器公钥生成采集器区块链表,以得到预设采集器区块链表,以及基于注册用户名以及用户公钥生成用户信息区块链表,以得到预设用户信息区块链表。The
在本实施例的一些可选的实现方式中,如图12所示,在查找模块704之前还包括:In some optional implementation manners of this embodiment, as shown in FIG. 12 , before the
第三获取模块710,用于获取预设管理员发出的二维码权限信息,二维码权限信息包括预设管理员用户名、预设管理员签名、二维码对应的可查看的合法采集器编号以及可访问的合法用户名列表;The third obtaining
第一验证模块711,用于根据预设管理员用户名以及预设管理员签名验证预设管理员是否为合法管理员;The
第二生成模块712,用于若预设管理员为合法管理员,则根据二维码权限信息中的二维码对应的可查看的合法采集器编号以及可访问的合法用户名列表,生成二维码权限链块,并根据二维码权限链块生成二维码权限区块链表,以得到预设二维码权限区块链表,二维码权限链块包括与二维码对应的可查看的合法采集器编号对应的二维码权限链块编号。The
在本实施例的一些可选的实现方式中,在第二生成模块712之后还包括:In some optional implementation manners of this embodiment, after the
第二返回模块,用于将二维码链块编号返回给预设管理员,以与预设管理员用户名、预设管理员签名以及二维码对应的可查看的合法采集器编号生成目标二维码。The second return module is used to return the QR code chain block number to the preset administrator, and generate a target with the viewable legal collector number corresponding to the preset administrator username, the preset administrator signature and the QR code. QR code.
在本实施例的一些可选的实现方式中,如图13所示,在第一生成模块709之后还包括:In some optional implementations of this embodiment, as shown in FIG. 13 , after the
第四获取模块713,用于获取预设管理员的信息修改请求,信息修改请求包括预设管理员签名、预设管理员用户名、待修改采集器对应的待修改采集器编号以及采集器目标状态;The fourth obtaining
第二验证模块714,用于根据预设管理员签名以及预设管理员用户名对预设管理员的管理员身份信息进行验证;The
第三验证模块715,用于若管理员身份信息验证成功,则根据待修改采集器编号以及预设采集器区块链表对待修改采集器的身份信息进行验证;The
第一修改模块716,用于若待修改采集器的身份信息验证成功,则基于采集器目标状态修改预设采集器区块链表中待修改采集器对应的采集器链块信息;The
第一免修改模块717,用于若待修改采集器的身份信息验证失败,则返回失败信息。The first modification-
在本实施例的一些可选的实现方式中,如图14所示,信息修改请求还包括待修改用户的用户名以及目标身份状态,在第二验证模块714之后还包括:In some optional implementations of this embodiment, as shown in FIG. 14 , the information modification request further includes the user name and target identity status of the user to be modified, and further includes after the second verification module 714:
第四验证模块718,用于若管理员身份信息验证成功,则根据待修改用户的用户名以及预设用户信息区块链表对待修改用户的身份信息进行验证;The
第二修改模块719,用于若待修改用户的身份信息验证成功,则基于目标身份状态修改待修改用户的用户名对应的用户信息链块信息;The
第二免修改模块720,用于若待修改用户的身份信息验证失败,则返回失败信息。The second modification-
在本实施例的一些可选的实现方式中,在第一生成模块709之后还包括:In some optional implementation manners of this embodiment, after the
同步模块,用于将预设用户信息区块链表同步到已注册采集器本地、将预设采集器区块链表同步到已注册用户本地以及将预设用户信息区块链表和预设采集器区块链表同步到预设管理员本地。The synchronization module is used to synchronize the preset user information block list to the local registered collector, synchronize the preset collector block list to the registered user, and synchronize the preset user information block list and the preset collector area. The block list is synchronized to the default administrator's local.
本申请实施例提供的基于区块链的数据访问装置700能够实现上述方法实施例中基于区块链的数据访问方法实现的各个过程,且可以达到相同的有益效果。为避免重复,这里不再赘述。The blockchain-based
为解决上述技术问题,本申请实施例还提供计算机设备。具体请参阅图15,图15为本实施例计算机设备基本结构框图。To solve the above technical problems, the embodiments of the present application also provide computer equipment. Please refer to FIG. 15 for details. FIG. 15 is a block diagram of the basic structure of a computer device according to this embodiment.
计算机设备8包括通过系统总线相互通信连接存储器81、处理器82、网络接口83。需要指出的是,图中仅示出了具有组件81-83的计算机设备8,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。其中,本技术领域技术人员可以理解,这里的计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application SpecificIntegrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。The computer device 8 includes a
计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。The computer equipment may be a desktop computer, a notebook computer, a palmtop computer, and a cloud server and other computing equipment. Computer devices can interact with users through keyboards, mice, remote controls, touchpads, or voice-activated devices.
存储器81至少包括一种类型的可读存储介质,可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器81可以是计算机设备8的内部存储单元,例如该计算机设备8的硬盘或内存。在另一些实施例中,存储器81也可以是计算机设备8的外部存储设备,例如该计算机设备8上配备的插接式硬盘,智能存储卡(SmartMedia Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,存储器81还可以既包括计算机设备8的内部存储单元也包括其外部存储设备。本实施例中,存储器81通常用于存储安装于计算机设备8的操作系统和各类应用软件,例如基于区块链的数据访问方法的计算机可读指令等。此外,存储器81还可以用于暂时地存储已经输出或者将要输出的各类数据。The
处理器82在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器82通常用于控制计算机设备8的总体操作。本实施例中,处理器82用于运行存储器81中存储的计算机可读指令或者处理数据,例如运行基于区块链的数据访问方法的计算机可读指令。The
网络接口83可包括无线网络接口或有线网络接口,该网络接口83通常用于在计算机设备8与其他电子设备之间建立通信连接。The
本申请实施例提供的计算机设备800能够实现上述方法实施例中基于区块链的数据访问方法实现的各个过程,且可以达到相同的有益效果。为避免重复,这里不再赘述。The computer device 800 provided by the embodiments of the present application can implement each process implemented by the blockchain-based data access method in the above method embodiments, and can achieve the same beneficial effects. In order to avoid repetition, details are not repeated here.
本申请还提供了另一种实施方式,即提供一种计算机可读存储介质,计算机可读存储介质存储有计算机可读指令,计算机可读指令可被至少一个处理器执行,以使至少一个处理器执行如上述的基于区块链的数据访问方法的步骤。The present application also provides another embodiment, which is to provide a computer-readable storage medium, where computer-readable instructions are stored in the computer-readable storage medium, and the computer-readable instructions can be executed by at least one processor to cause at least one processing The server performs the steps of the blockchain-based data access method as described above.
在本实施例中,该计算机程序被处理器执行时实现本申请实施例提供的基于区块链的数据访问方法的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。In this embodiment, when the computer program is executed by the processor, each process of the blockchain-based data access method provided by the embodiment of the present application is implemented, and the same technical effect can be achieved. To avoid repetition, details are not described here.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods of the various embodiments of the present application.
显然,以上所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例,附图中给出了本申请的较佳实施例,但并不限制本申请的专利范围。本申请可以以许多不同的形式来实现,相反地,提供这些实施例的目的是使对本申请的公开内容的理解更加透彻全面。尽管参照前述实施例对本申请进行了详细的说明,对于本领域的技术人员来而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本申请说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本申请专利保护范围之内。Obviously, the above-described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The accompanying drawings show the preferred embodiments of the present application, but do not limit the scope of the patent of the present application. This application may be embodied in many different forms, rather these embodiments are provided so that a thorough and complete understanding of the disclosure of this application is provided. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or perform equivalent replacements for some of the technical features. . Any equivalent structures made by using the contents of the description and drawings of the present application, which are directly or indirectly used in other related technical fields, are all within the scope of the patent protection of the present application.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111442363.7A CN114329375B (en) | 2021-11-30 | 2021-11-30 | A data access method, device and computer equipment based on blockchain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111442363.7A CN114329375B (en) | 2021-11-30 | 2021-11-30 | A data access method, device and computer equipment based on blockchain |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114329375A true CN114329375A (en) | 2022-04-12 |
CN114329375B CN114329375B (en) | 2025-03-28 |
Family
ID=81048069
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111442363.7A Active CN114329375B (en) | 2021-11-30 | 2021-11-30 | A data access method, device and computer equipment based on blockchain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114329375B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110322219A (en) * | 2019-06-24 | 2019-10-11 | 烨链(上海)科技有限公司 | Data processing method and device based on block chain |
WO2020223918A1 (en) * | 2019-05-08 | 2020-11-12 | 云图有限公司 | Temporary identity authentication method, apparatus and system |
CN111931137A (en) * | 2020-06-03 | 2020-11-13 | 浪潮云信息技术股份公司 | Block chain-based electronic identity information management method, equipment and medium |
-
2021
- 2021-11-30 CN CN202111442363.7A patent/CN114329375B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020223918A1 (en) * | 2019-05-08 | 2020-11-12 | 云图有限公司 | Temporary identity authentication method, apparatus and system |
CN110322219A (en) * | 2019-06-24 | 2019-10-11 | 烨链(上海)科技有限公司 | Data processing method and device based on block chain |
CN111931137A (en) * | 2020-06-03 | 2020-11-13 | 浪潮云信息技术股份公司 | Block chain-based electronic identity information management method, equipment and medium |
Non-Patent Citations (2)
Title |
---|
王乃洲;金连文;高兵;金晓峰;: "基于区块链技术的身份认证与存储方法研究", 现代信息科技, no. 08, 25 April 2020 (2020-04-25) * |
王贝: ""基于区块链的虚拟校园卡及安全机制的研究与实现"", 中国优秀硕士论文全文数据库 信息科技辑, no. 03, 15 March 2021 (2021-03-15) * |
Also Published As
Publication number | Publication date |
---|---|
CN114329375B (en) | 2025-03-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109862041B (en) | A digital identity authentication method, device, device, system and storage medium | |
US9961053B2 (en) | Detecting compromised credentials | |
EP3455996B1 (en) | Block chain based resource management | |
CN102823195B (en) | System and method for remotely maintaining a client system in an electronic network using software testing performed by a virtual machine | |
US9432358B2 (en) | System and method of authenticating user account login request messages | |
US20240022571A1 (en) | Blockchain folding | |
CN110177124B (en) | Identity authentication method based on block chain and related equipment | |
US11824850B2 (en) | Systems and methods for securing login access | |
CN111475841A (en) | Access control method, related device, equipment, system and storage medium | |
CN108259438A (en) | A kind of method and apparatus of the certification based on block chain technology | |
CN108335105B (en) | Data processing method and related equipment | |
CN114444134A (en) | Data use authorization method, system and device | |
US20240104229A1 (en) | Verifiable attribute maps | |
EP3598333B1 (en) | Electronic device update management | |
CN102882933B (en) | A kind of encryption cloud storage system | |
CA3217688A1 (en) | Multi-factor authentication using blockchain | |
US9135460B2 (en) | Techniques to store secret information for global data centers | |
Wang et al. | A lightweight data integrity verification with data dynamics for mobile edge computing | |
CN115659378A (en) | Evidence storage method and related equipment for case record information | |
CN118673060A (en) | Blockchain data query method, device, electronic device and readable medium | |
CN115208561B (en) | Password-free login method, device, computer equipment, and storage medium | |
CN114329375B (en) | A data access method, device and computer equipment based on blockchain | |
CN114329419B (en) | A blockchain-based identity authentication method, device and computer equipment | |
CN112583606A (en) | Security verification method, server, terminal and storage medium | |
US12425229B2 (en) | Offline decentralized identity-based communication for applications |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |