Movatterモバイル変換


[0]ホーム

URL:


CN107819829B - Method, system, blockchain node device and user terminal for accessing blockchain - Google Patents

Method, system, blockchain node device and user terminal for accessing blockchain
Download PDF

Info

Publication number
CN107819829B
CN107819829BCN201710964911.XACN201710964911ACN107819829BCN 107819829 BCN107819829 BCN 107819829BCN 201710964911 ACN201710964911 ACN 201710964911ACN 107819829 BCN107819829 BCN 107819829B
Authority
CN
China
Prior art keywords
blockchain
node device
blockchain node
user terminal
preferred
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.)
Expired - Fee Related
Application number
CN201710964911.XA
Other languages
Chinese (zh)
Other versions
CN107819829A (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.)
Shanghai Dianrong Information Technology Co ltd
Original Assignee
Shanghai Dianrong 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 Shanghai Dianrong Information Technology Co ltdfiledCriticalShanghai Dianrong Information Technology Co ltd
Priority to CN201710964911.XApriorityCriticalpatent/CN107819829B/en
Publication of CN107819829ApublicationCriticalpatent/CN107819829A/en
Application grantedgrantedCritical
Publication of CN107819829BpublicationCriticalpatent/CN107819829B/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The disclosure relates to a method, a system, a block link point device and a user terminal for accessing a block chain. The method includes receiving a request from a user terminal for access to a blockchain. The method also includes determining, by an intelligent contract running on the blockchain link node device, a node list including one or more preferred blockchain node device identifications, wherein the intelligent contract is capable of synchronizing network quality data of blockchain node devices in the blockchain. Further, the method includes sending the node list to the user terminal. The embodiment of the disclosure collects and shares the network quality data of the blockchain node devices through the intelligent contract, so that the user terminal can dynamically select the preferred blockchain node device with high network quality, thereby improving the network access quality of the blockchain.

Description

Translated fromChinese
访问区块链的方法、系统、区块链节点设备及用户终端Method, system, blockchain node device and user terminal for accessing blockchain

技术领域technical field

本公开的实施例总体上涉及信息技术领域,更具体地涉及访问区块链的方法、系统、区块链节点设备以及用户终端。Embodiments of the present disclosure generally relate to the field of information technology, and more particularly, to a method, system, blockchain node device, and user terminal for accessing a blockchain.

版权申明Copyright notice

本专利文件披露的内容包含受版权保护的材料。该版权为版权所有人所有。版权所有人不反对任何人复制专利与商标局的官方记录和档案中所存在的该专利文件或者该专利披露。The disclosure of this patent document contains material that is subject to copyright protection. This copyright belongs to the copyright owner. The copyright owner has no objection to the reproduction by anyone of the patent document or the patent disclosure as it exists in the official records and archives of the Patent and Trademark Office.

背景技术Background technique

区块链是一种去中心化的存储和计算技术,其通过将加密数据块按照时间顺序叠加而生成的持久的不可修改的记录,并且将记录存储在区块链的各个区块链节点设备中,使得以去中心化的方式进行分布式数据存储。每个数据块中包含了一定时间内的系统数据,并且生成数据指纹用于验证其信息的有效性和链接下一个数据块。因此,区块链在数据防篡改、透明性以及去中心化方面具有技术优势,区块链技术已经应用到许多行业和领域。Blockchain is a decentralized storage and computing technology that generates persistent and unmodifiable records by superimposing encrypted data blocks in chronological order, and stores the records in each blockchain node device of the blockchain. , which enables distributed data storage in a decentralized manner. Each data block contains system data within a certain period of time, and a data fingerprint is generated to verify the validity of its information and link to the next data block. Therefore, blockchain has technical advantages in data tamper resistance, transparency and decentralization, and blockchain technology has been applied to many industries and fields.

智能合约是指一套以数字形式定义的承诺,包括合约参与方可以在上面执行这些承诺的协议,智能合约可以为区块链节点设备中执行特定功能的计算机程序。智能合约可以记录交易并且共享交易数据,使得被存储在区块链中任一节点的数据将被共享到区块链中的所有节点,因而其他节点均能够获得数据内容。以这种方式,能够有效保证区块链中的数据共享性和透明性。此外,由于存入区块链中的数据无法被篡改,因而区块链在数据防篡改方面也能够得到保证。由于区块链属于对等网络,因而在需要获得区块链中的数据时,用户可以访问区块链中的任一节点以获得交易数据。A smart contract refers to a set of commitments defined in digital form, including an agreement on which contract participants can execute these commitments. A smart contract can be a computer program that performs specific functions in a blockchain node device. Smart contracts can record transactions and share transaction data, so that the data stored in any node in the blockchain will be shared with all nodes in the blockchain, so other nodes can obtain the data content. In this way, data sharing and transparency in the blockchain can be effectively guaranteed. In addition, since the data stored in the blockchain cannot be tampered with, the blockchain can also be guaranteed in terms of data tamper resistance. Since the blockchain belongs to a peer-to-peer network, users can access any node in the blockchain to obtain transaction data when they need to obtain data in the blockchain.

发明内容SUMMARY OF THE INVENTION

本公开的实施例提出了一种用于访问区块链的方法、设备以及系统。本公开的实施例通过智能合约收集并且共享区块链节点设备的网络质量数据,使得用户终端能够动态选择访问高网络质量的区块链节点设备,从而提高区块链的网络服务质量。Embodiments of the present disclosure propose a method, device, and system for accessing a blockchain. The embodiments of the present disclosure collect and share network quality data of blockchain node devices through smart contracts, so that user terminals can dynamically select and access blockchain node devices with high network quality, thereby improving the network service quality of the blockchain.

根据本公开的第一方面,提供了一种用于访问区块链的方法。该方法包括:从用户终端接收对于访问区块链的请求;由区块链节点设备上运行的智能合约来确定包括一个或多个优选区块链节点设备标识的节点列表,其中智能合约能够在区块链中同步区块链节点设备的网络质量数据;以及向用户终端发送节点列表。According to a first aspect of the present disclosure, a method for accessing a blockchain is provided. The method includes: receiving a request for accessing a blockchain from a user terminal; determining a node list including one or more preferred blockchain node device identifiers by a smart contract running on the blockchain node device, wherein the smart contract can Synchronize the network quality data of the blockchain node equipment in the blockchain; and send the node list to the user terminal.

根据本公开的第二方面,提供了一种用于区块链节点设备。该区块链节点设备包括处理器和耦合至处理器并且存储有指令的存储器。所述指令在由处理器执行时使得区块链节点设备执行以下动作:从用户终端接收对于访问区块链的请求;由区块链节点设备上运行的智能合约来确定包括一个或多个优选区块链节点设备标识的节点列表,其中智能合约能够在区块链中同步区块链节点设备的网络质量数据;以及向用户终端发送节点列表。According to a second aspect of the present disclosure, a device for a blockchain node is provided. The blockchain node device includes a processor and a memory coupled to the processor and storing instructions. The instructions, when executed by the processor, cause the blockchain node device to perform the following actions: receive a request for accessing the blockchain from the user terminal; determine by the smart contract running on the blockchain node device to include one or more preferences; The list of nodes identified by the blockchain node device, where the smart contract is able to synchronize network quality data of the blockchain node device in the blockchain; and the node list is sent to the user terminal.

根据本公开的第三方面,提供了一种用于访问区块链的方法,该方法包括:在用户终端处向区块链节点设备发送对于访问区块链的请求;从区块链节点设备接收包括一个或多个优选区块链节点设备标识的节点列表,区块链节点设备上运行的智能合约能够在区块链中同步区块链节点设备的网络质量数据;基于节点列表来访问优选区块链节点设备以获得区块链业务数据。According to a third aspect of the present disclosure, there is provided a method for accessing a blockchain, the method comprising: sending a request for accessing the blockchain to a blockchain node device at a user terminal; from the blockchain node device Receive a node list including one or more preferred blockchain node device identifiers, and the smart contract running on the blockchain node device can synchronize the network quality data of the blockchain node device in the blockchain; based on the node list to access preferred Blockchain node equipment to obtain blockchain business data.

根据本公开的第四方面,提供了一种用户终端。用户终端设备包括:处理器以及耦合至处理器并且存储有指令的存储器。所述指令在由处理器执行时使得用户终端执行以下动作:在用户终端处向区块链节点设备发送对于访问区块链的请求;从区块链节点设备接收包括一个或多个优选区块链节点设备标识的节点列表,区块链节点设备上运行的智能合约能够在区块链中同步区块链节点设备的网络质量数据;基于节点列表来访问优选区块链节点设备以获得区块链业务数据。According to a fourth aspect of the present disclosure, a user terminal is provided. The user terminal device includes a processor and a memory coupled to the processor and storing instructions. The instructions, when executed by the processor, cause the user terminal to perform the following actions: send a request to the blockchain node device to access the blockchain at the user terminal; receive from the blockchain node device a request including one or more preferred blocks The list of nodes identified by the chain node device. The smart contract running on the blockchain node device can synchronize the network quality data of the blockchain node device in the blockchain; based on the node list, the preferred blockchain node device is accessed to obtain blocks. chain business data.

根据本公开的第五方面,提供了一种计算机可读存储介质。该计算机可读存储介质具有存储在其上的计算机可读程序指令。这些计算机可执行指令在设备中运行时使得该设备执行根据本公开的实施例所描述的方法或过程。According to a fifth aspect of the present disclosure, there is provided a computer-readable storage medium. The computer-readable storage medium has computer-readable program instructions stored thereon. These computer-executable instructions, when executed in a device, cause the device to perform the methods or processes described in accordance with embodiments of the present disclosure.

根据本公开的第六方面,提供了一种用于访问区块链的系统。该系统包括根据本公开的实施例所描述的用户终端以及本公开的实施例所描述的区块链节点设备。According to a sixth aspect of the present disclosure, there is provided a system for accessing a blockchain. The system includes the user terminal described in the embodiment of the present disclosure and the blockchain node device described in the embodiment of the present disclosure.

附图说明Description of drawings

结合附图并参考以下详细说明,本公开的各实施例的特征、优点及其他方面将变得更加明显,在此以示例性而非限制性的方式示出了本公开的若干实施例,在附图中:The features, advantages and other aspects of various embodiments of the present disclosure will become more apparent when taken in conjunction with the accompanying drawings and with reference to the following detailed description, In the attached picture:

图1图示了根据本公开的实施例的计算机系统的架构的示意图;1 illustrates a schematic diagram of the architecture of a computer system according to an embodiment of the present disclosure;

图2图示了根据本公开的实施例的用于访问区块链的过程的示意图;2 illustrates a schematic diagram of a process for accessing a blockchain according to an embodiment of the present disclosure;

图3图示了根据本公开的实施例的用于访问区块链的方法的流程图;3 illustrates a flowchart of a method for accessing a blockchain according to an embodiment of the present disclosure;

图4图示了根据本公开的实施例的用于访问区块链的另一方法的流程图;4 illustrates a flowchart of another method for accessing a blockchain according to an embodiment of the present disclosure;

图5图示了用于确定要被访问的区块链节点设备的方法的流程图;以及Figure 5 illustrates a flowchart of a method for determining a blockchain node device to be accessed; and

图6图示了可以用来实施本公开的实施例的设备的示意性框图。6 illustrates a schematic block diagram of an apparatus that may be used to implement embodiments of the present disclosure.

具体实施方式Detailed ways

以下参考附图详细描述本公开的各个示例性实施例。附图中的流程图和框图示出了根据本公开的各种实施例的方法和系统的可能实现的体系架构、功能和操作。应当注意,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,所述模块、程序段、或代码的一部分可以包括一个或多个用于实现各个实施例中所规定的逻辑功能的可执行指令。也应当注意,在有些作为备选的实现中,方框中所标注的功能也可以按照不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,或者它们有时也可以按照相反的顺序执行,这取决于所涉及的功能。同样应当注意的是,流程图和/或框图中的每个方框、以及流程图和/或框图中的方框的组合,可以使用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以使用专用硬件与计算机指令的组合来实现。Various exemplary embodiments of the present disclosure are described in detail below with reference to the accompanying drawings. The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and systems according to various embodiments of the present disclosure. It should be noted that each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which may include one or more components used in implementing various embodiments Executable instructions for the specified logical function. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may in fact be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented using dedicated hardware-based systems that perform the specified functions or operations , or can be implemented using a combination of dedicated hardware and computer instructions.

本文所使用的术语“包括”、“包含”及类似术语应该被理解为是开放性的术语,即“包括/包含但不限于”,表示还可以包括其他内容。在本公开内容中,术语“基于”是“至少部分地基于”;术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”。The terms "including", "comprising" and similar terms used herein should be understood as open-ended terms, ie "including/including but not limited to", meaning that other content may also be included. In this disclosure, the term "based on" is "based at least in part on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment".

应当理解,给出这些示例性实施例仅是为了使本领域技术人员能够更好地理解进而实现本公开的实施例,而并非以任何方式限制发明的范围。It should be understood that these exemplary embodiments are given only to enable those skilled in the art to better understand and implement the embodiments of the present disclosure, and not to limit the scope of the invention in any way.

传统地,在需要获得区块链中的数据时,用户可以访问区块链中的任一区块链节点设备以获得业务数据。然而,由于区块链中各个区块链节点设备的网络质量情况不一致,因而会导致访问某些区块链节点设备速度缓慢(例如,某些区块链节点设备由于过多访问而非常缓慢),甚至根本无法访问(例如,某些区块链节点设备由于硬件故障而宕机)。此外,用户仅能够获得有限数量的可访问区块链节点设备(例如公有链中的节点),并且区块链本身的网络拓扑结构也在动态变化。因此,用户通常随机地或者轮询地选择一个区块链节点设备进行访问,往往不能获得较高质量的区块链访问服务。由此可见,对于如何从区块链中选择要访问的区块链节点设备,现有技术中缺少可靠的数据作为参考,造成用户无法获取高网络质量的区块链访问服务。Traditionally, when the data in the blockchain needs to be obtained, users can access any blockchain node device in the blockchain to obtain business data. However, due to the inconsistent network quality of each blockchain node device in the blockchain, access to some blockchain node devices is slow (for example, some blockchain node devices are very slow due to excessive access) , or even inaccessible at all (for example, some blockchain node devices are down due to hardware failures). In addition, users can only obtain a limited number of accessible blockchain node devices (such as nodes in public chains), and the network topology of the blockchain itself is also dynamically changing. Therefore, users usually select a blockchain node device for access randomly or in a polling manner, and often cannot obtain high-quality blockchain access services. It can be seen that there is a lack of reliable data in the existing technology as a reference for how to select the blockchain node device to be accessed from the blockchain, which makes it impossible for users to obtain high-quality blockchain access services.

本公开的实施例提出了一种用于访问区块链的方法、设备以及系统。本公开的实施例通过智能合约收集并且共享区块链节点设备的网络质量数据,并通过智能合约维护包括优选和/或非优选区块链节点设备的节点列表,使得用户终端能够动态选择访问高质量的区块链节点设备。因此,根据本公开的实施例,用户能够实时、动态地选择高质量的区块链节点设备,因而能够提高区块链的网络服务质量,并且提升用户体验。Embodiments of the present disclosure propose a method, device, and system for accessing a blockchain. The embodiments of the present disclosure collect and share network quality data of blockchain node devices through smart contracts, and maintain a node list including preferred and/or non-preferred blockchain node devices through smart contracts, so that user terminals can dynamically choose to access high Quality blockchain node equipment. Therefore, according to the embodiments of the present disclosure, the user can select high-quality blockchain node devices in real time and dynamically, thereby improving the network service quality of the blockchain and improving the user experience.

应当理解,本公开的实施例可以应用于区块链相关的各种应用场景,例如供应链金融场景、银行支付场景、学术交流场景、物联网场景、在线音乐共享场景、共享单车场景、股票交易场景、房地产交易场景,等等,本公开的实施例对于区块链的应用场景没有限制。以下参考图1-6描述了本公开的实施例的一些示例实现。It should be understood that the embodiments of the present disclosure can be applied to various application scenarios related to blockchain, such as supply chain finance scenarios, bank payment scenarios, academic communication scenarios, Internet of Things scenarios, online music sharing scenarios, bicycle sharing scenarios, and stock trading scenarios Scenarios, real estate transaction scenarios, etc., the embodiments of the present disclosure do not limit the application scenarios of the blockchain. Some example implementations of embodiments of the present disclosure are described below with reference to FIGS. 1-6 .

图1图示了根据本公开的实施例的计算机系统100的架构的示意图。如图1所示,计算机系统100包括用户终端110和区块链120,用户终端110在需要时可以从区块链120读取数据或者向区块链120存储数据。如图1所示,区块链120是由多个区块链节点设备(也被称为“区块链节点”)组成,例如区块链节点设备130、140、150、160、170、180以及190,这些区块链节点设备上各自运行着智能合约,智能合约可以用于记录业务并且共享业务数据。例如,可以将某个电子合同的文本存储到区块链中的一个区块链节点设备中,然后该电子合同的文本将被同步到区块链中的其他每个区块链节点设备中。由于区块链的去中心化和透明性,在需要时能够从区块链中获取该电子合同的原始且真实的文本。1 illustrates a schematic diagram of the architecture of acomputer system 100 according to an embodiment of the present disclosure. As shown in FIG. 1 , thecomputer system 100 includes auser terminal 110 and ablockchain 120 , and theuser terminal 110 can read data from theblockchain 120 or store data in theblockchain 120 when needed. As shown in FIG. 1 , theblockchain 120 is composed of a plurality of blockchain node devices (also referred to as “blockchain nodes”), such asblockchain node devices 130 , 140 , 150 , 160 , 170 , 180 And 190, these blockchain node devices each run smart contracts, which can be used to record business and share business data. For example, the text of an electronic contract can be stored in a blockchain node device in the blockchain, and then the text of the electronic contract will be synchronized to every other blockchain node device in the blockchain. Due to the decentralization and transparency of the blockchain, the original and true text of this electronic contract can be obtained from the blockchain when needed.

用户终端110可以与区块链120中的一个或多个节点进行通信,区块链120中的区块链节点设备130、140、150、160、170、180以及190也可以彼此通信。计算机系统100中的各个设备之间的通信可以基于任何有线和/或无线网络,包括但不限于因特网、广域网、城域网、局域网、虚拟专用网络(VPN)网络、无线通信网络,等等。Theuser terminal 110 can communicate with one or more nodes in theblockchain 120, and theblockchain node devices 130, 140, 150, 160, 170, 180, and 190 in theblockchain 120 can also communicate with each other. Communication between the various devices incomputer system 100 may be based on any wired and/or wireless network, including but not limited to the Internet, wide area networks, metropolitan area networks, local area networks, virtual private network (VPN) networks, wireless communication networks, and the like.

用户终端110、区块链节点设备130、140、150、160、170、180以及190中的每个区块链节点设备可以为电子设备,例如固定设备(诸如服务器或台式计算机),移动设备(诸如智能手机、平板电脑、便携式计算机等)。本领域技术人员应当理解,虽然图1中示出了计算机系统100的架构中的一些用户终端和区块链节点设备,但是计算机系统100也可以包括更多或更少的用户终端和区块链节点设备。Each of theuser terminal 110, theblockchain node devices 130, 140, 150, 160, 170, 180, and 190 may be an electronic device, such as a stationary device (such as a server or a desktop computer), a mobile device ( such as smartphones, tablets, laptops, etc.). Those skilled in the art should understand that although some user terminals and blockchain node devices in the architecture of thecomputer system 100 are shown in FIG. 1 , thecomputer system 100 may also include more or less user terminals and blockchains node device.

根据本公开的实施例,区块链节点设备130、140、150、160、170、180以及190上运行的智能合约包括区块链节点设备的访问质量数据,因而智能合约也被称为“访问质量控制智能合约”。智能合约能够收集并且同步区块链节点设备的网络质量数据,使得用户终端能够动态选择访问高质量的区块链节点设备。智能合约提供应用程序接口(API)供用户查询各个区块链节点设备的网络质量数据,以这种方式,能够提高区块链的网络服务质量。According to the embodiment of the present disclosure, the smart contracts running on theblockchain node devices 130, 140, 150, 160, 170, 180, and 190 include access quality data of the blockchain node devices, so the smart contracts are also referred to as "access" Quality Control Smart Contracts". Smart contracts can collect and synchronize network quality data of blockchain node devices, enabling user terminals to dynamically choose to access high-quality blockchain node devices. The smart contract provides an application programming interface (API) for users to query the network quality data of each blockchain node device. In this way, the network service quality of the blockchain can be improved.

应当理解,由于区块链的对等性,区块链节点设备130、140、150、160、170、180以及190上的智能合约实质上具有相同的数据并且执行相同的功能。因此,虽然在某些地方以区块链节点设备作为执行主体执行一些动作或操作,但是其可以由相同的区块链节点设备执行,也可以由不同的区块链节点设备组合或者分别执行,本申请的保护范围不受区块链节点设备执行主体方面的限制。It should be understood that due to the peer-to-peer nature of the blockchain, the smart contracts on theblockchain node devices 130, 140, 150, 160, 170, 180 and 190 have substantially the same data and perform the same functions. Therefore, although some actions or operations are performed by the blockchain node device as the execution body in some places, it can be executed by the same blockchain node device, or it can be combined or executed by different blockchain node devices. The protection scope of this application is not limited by the execution subject of the blockchain node device.

图2图示了根据本公开的实施例的用于访问区块链的过程200的示意图。在202,用户终端110通过本地配置文件或者通过线下配置来获得可访问区块链节点设备的本地列表。本地列表可以是初始配置或最新更新的区块链节点设备列表。例如,可以从本地列表中随机地或者顺序地选择一个区块链节点设备(诸如区块链节点设备130)。FIG. 2 illustrates a schematic diagram of aprocess 200 for accessing a blockchain in accordance with an embodiment of the present disclosure. At 202, theuser terminal 110 obtains a local list of accessible blockchain node devices through a local configuration file or through offline configuration. The local list can be the initial configuration or the latest updated list of blockchain node devices. For example, a blockchain node device (such as blockchain node device 130) may be selected randomly or sequentially from a local list.

在204,用户终端110向区块链节点设备130发送对于访问区块链的请求,例如用户终端110向默认选择的区块链节点设备130发送查询请求,以用于查询区块链节点设备130上运行的智能合约(其包括每个区块链节点设备的访问质量数据)。可选地,在206,区块链节点设备130可以至少基于用户终端110的地理位置和/或访问时间,确定针对用户终端110的可访问的区块链节点设备的节点列表,其中地理位置和访问时间可以从用户终端110获得,也可以由区块链节点设备130根据用户终端110的因特网协议(IP)地址和当前本地时间进行确定。例如,假设用户终端处于上海市黄浦区,并且访问时间为3点,则可以查询智能合约以选择在下午2:00-4:00时间段适合于上海市的用户终端访问的一个或多个区块链节点设备,或者也可以直接确定一个针对用户终端110的最优区块链节点设备(例如区块链节点设备140),其中区块链节点设备中存储了每个区块链节点设备的历史收集的访问质量数据。在208,区块链节点设备130向用户终端110发送节点列表,其中节点列表可以包括一个或多个优选区块链节点设备以及一个或多个非优选区块链节点设备的标识,或者也可以仅包括最优区块链节点设备的标识。在节点列表仅包括最优区块链节点设备的标识的情况下,可以由区块链节点设备130为用户终端110自动确定要访问的区块链节点设备。At 204 , theuser terminal 110 sends a request for accessing the blockchain to theblockchain node device 130 , eg, theuser terminal 110 sends a query request to the default selectedblockchain node device 130 for querying theblockchain node device 130 Smart contracts (which include access quality data for each blockchain node device) running on it. Optionally, at 206, theblockchain node device 130 may determine a node list of accessible blockchain node devices for theuser terminal 110 based at least on the geographic location and/or access time of theuser terminal 110, wherein the geographic location and the The access time may be obtained from theuser terminal 110 or determined by theblockchain node device 130 according to the Internet Protocol (IP) address of theuser terminal 110 and the current local time. For example, assuming that the user terminal is in Huangpu District, Shanghai, and the access time is 3:00, the smart contract can be queried to select one or more districts suitable for the user terminal to visit in Shanghai during the 2:00-4:00 pm time period The blockchain node device, or it is also possible to directly determine an optimal blockchain node device (for example, the blockchain node device 140) for theuser terminal 110, wherein the blockchain node device stores the information of each blockchain node device. Historically collected access quality data. At 208, theblockchain node device 130 sends a node list to theuser terminal 110, where the node list may include the identification of one or more preferred blockchain node devices and one or more non-preferred blockchain node devices, or alternatively Only the identification of the optimal blockchain node device is included. In the case where the node list only includes the identification of the optimal blockchain node device, theblockchain node device 130 may automatically determine the blockchain node device to be accessed for theuser terminal 110 .

可选地,在210,用户终端110可以基于节点列表确定要访问的区块链节点设备,以下参考图5进一步描述了确定要访问的区块链节点设备的示例实施例的细节;备选地,也可以由用户从节点列表中人工选择要访问的区块链节点设备。应当理解,当节点列表中仅包括一个最优区块链节点设备的标识时,用户终端110无需执行确定要访问的区块链节点设备的动作,而是直接访问最优区块链节点设备。在212,在基于节点列表确定要访问区块链节点设备140之后,用户终端110访问区块链节点设备140,并且在214,用户终端110从区块链节点设备140获得区块链业务数据。Optionally, at 210, theuser terminal 110 may determine a blockchain node device to access based on the node list, details of an example embodiment of determining a blockchain node device to access are further described below with reference to FIG. 5; alternatively , or the user can manually select the blockchain node device to be accessed from the node list. It should be understood that when the node list only includes the identifier of one optimal blockchain node device, theuser terminal 110 does not need to perform the action of determining the blockchain node device to be accessed, but directly accesses the optimal blockchain node device. At 212 , after determining thatblockchain node device 140 is to be accessed based on the node list,user terminal 110 accessesblockchain node device 140 , and at 214 ,user terminal 110 obtains blockchain service data fromblockchain node device 140 .

为了使得区块链节点设备的网络质量数据实时更新,在216,用户终端110可以向区块链节点设备140提交与访问区块链节点设备140相关联的参数集合,其中参数集合包括所述区块链节点设备140的IP地址、访问区块链节点设备140的访问延时或状态、用户终端的地理位置以及访问时间。可选地,由于用户终端110查询区块链节点设备130而获得节点列表(也即,用户终端110也访问了区块链节点设备130),因而用户终端也可以向区块链节点设备130提交与访问区块链节点设备130相关联的网络质量参数集合。实际上,由于区块链网络的对等性,因而用户终端可以向任何区块链节点设备提交区块链节点设备的网络质量参数集合。在218,区块链节点设备140在获得参数集合之后,可以至少基于参数集合来更新可访问区块链节点设备的节点列表,例如,可以实时地更新,也可以周期性地批处理更新。接下来,在220,在区块链120中同步更新的区块链节点设备的网络质量数据,例如,可以同步已更新的节点列表。在一些实施例中,当用户终端120后续向区块链节点设备130或140发送访问区块链节点设备的另一请求时,区块链节点设备130或140可以向用户终端120发送更新的节点列表。In order for the network quality data of the blockchain node device to be updated in real time, at 216, theuser terminal 110 may submit to the blockchain node device 140 a set of parameters associated with accessing theblockchain node device 140, wherein the parameter set includes the zone The IP address of theblockchain node device 140, the access delay or state of accessing theblockchain node device 140, the geographic location of the user terminal, and the access time. Optionally, since theuser terminal 110 queries theblockchain node device 130 to obtain the node list (that is, theuser terminal 110 also accesses the blockchain node device 130 ), the user terminal can also submit to the blockchain node device 130 A set of network quality parameters associated with accessingblockchain node devices 130. In fact, due to the peer-to-peer nature of the blockchain network, the user terminal can submit the network quality parameter set of the blockchain node device to any blockchain node device. At 218, after obtaining the parameter set, theblockchain node device 140 may update the list of nodes accessible to the blockchain node device based on at least the parameter set, eg, may be updated in real time, or may be updated in batches periodically. Next, at 220, the updated network quality data of the blockchain node devices is synchronized in theblockchain 120, eg, the updated node list may be synchronized. In some embodiments, when theuser terminal 120 subsequently sends another request to theblockchain node device 130 or 140 to access the blockchain node device, theblockchain node device 130 or 140 may send the updated node to theuser terminal 120 list.

在一些实施例中,可以基于来自用户终端的参数集合中的访问延时或状态,对区块链节点设备进行评分和排名,例如,如果用户终端正常访问区块链节点设备则可以计3分,访问延时在30秒以上计2分,访问超时计1分,而访问失败或者无法连接时计0分。然后可以根据总累计访问次数和每次的得分,计算平均得分,并且以平均得分作为区块链节点设备的访问质量指标得分,其中排序的键值可以为访问区域和/或时间段的组合键值。也就是说,针对同一区域的不同时间段或同一时间段的不同区域,可以存在不同的区块链节点设备网络质量排名列表。本公开的实施例根据用户终端所处的区域和/或访问的时间段来确定要访问的区块链节点设备,因而可以提供更精准且更有针对性的节点列表。In some embodiments, the blockchain node devices may be scored and ranked based on the access delay or status in the set of parameters from the user terminal, for example, 3 points may be awarded if the user terminal normally accesses the blockchain node device , 2 points for access delay of more than 30 seconds, 1 point for access timeout, and 0 points for access failure or failure to connect. Then, the average score can be calculated according to the total cumulative number of visits and the score of each time, and the average score can be used as the access quality index score of the blockchain node device, where the key value of the sorting can be the combination key of the access area and/or time period value. That is to say, for different time periods in the same area or different areas in the same time period, there may be different network quality ranking lists of blockchain node equipment. The embodiments of the present disclosure determine the blockchain node device to be accessed according to the region where the user terminal is located and/or the time period of the visit, so that a more accurate and targeted node list can be provided.

在图2的参考示例过程200中,区块链节点设备130是用户终端110的初始可访问的区块链节点设备,但其并不是针对用户终端110的网络访问质量最优的区块链节点设备。相反,基于用户终端110的地理位置和访问时间,确定区块链节点设备140是针对用户终端110的高网络质量的优选区块链节点设备。因此,用户终端110从区块链节点设备140获得区块链业务数据,由此提高了用户终端访问区块链节点设备的效率和用户体验。备选地,不同于图2的示例过程,区块链节点设备130或者其他区块链节点设备也可以被确定为是针对用户终端110的最优网络访问质量的区块链节点设备。In thereference example process 200 of FIG. 2 , theblockchain node device 130 is the initially accessible blockchain node device for theuser terminal 110 , but it is not the blockchain node with the best network access quality for theuser terminal 110 equipment. Rather, based on the geographic location and access time of theuser terminal 110, theblockchain node device 140 is determined to be the preferred blockchain node device for the high network quality of theuser terminal 110. Therefore, theuser terminal 110 obtains the blockchain service data from theblockchain node device 140, thereby improving the efficiency and user experience of the user terminal accessing the blockchain node device. Alternatively, unlike the example process of FIG. 2 , theblockchain node device 130 or other blockchain node device may also be determined to be the blockchain node device for the optimal network access quality for theuser terminal 110 .

图3图示了根据本公开的实施例的用于访问区块链的方法300的流程图。应当理解,方法300例如可以由以上参考图1所描述的区块链节点设备中任何一个或多个区块链节点设备来执行。3 illustrates a flow diagram of amethod 300 for accessing a blockchain according to an embodiment of the present disclosure. It should be understood that themethod 300 may be performed by, for example, any one or more of the blockchain node devices described above with reference to FIG. 1 .

在302,区块链节点设备130从用户终端110接收对于访问区块链的请求。在304,由区块链节点设备130上运行的智能合约来确定包括一个或多个优选区块链节点设备标识的节点列表,其中智能合约能够在区块链中同步区块链节点设备的网络质量数据。在306,区块链节点设备130向用户终端110发送节点列表。可选地,节点列表可以包括一个或多个优选区块链节点设备以及一个或多个非优选区块链节点设备的标识,或者也可以仅包括最优区块链节点设备的标识。At 302, theblockchain node device 130 receives a request from theuser terminal 110 to access the blockchain. At 304, a node list including one or more preferred blockchain node device identities is determined by a smart contract running on theblockchain node device 130, wherein the smart contract is capable of synchronizing the network of blockchain node devices in the blockchain quality data. At 306 , theblockchain node device 130 sends the node list to theuser terminal 110 . Optionally, the node list may include the identifiers of one or more preferred blockchain node devices and one or more non-preferred blockchain node devices, or may only include the identifiers of the optimal blockchain node device.

图4图示了根据本公开的实施例的用于访问区块链的另一方法400的流程图。应当理解,方法400例如可以由以上参考图1所描述的用户终端110执行。FIG. 4 illustrates a flow diagram of anothermethod 400 for accessing a blockchain according to an embodiment of the present disclosure. It should be understood that themethod 400 may be performed, for example, by theuser terminal 110 described above with reference to FIG. 1 .

在402,在用户终端110处向区块链节点设备130发送对于访问区块链的请求。在404,用户终端110从区块链节点设备130接收包括一个或多个优选区块链节点设备标识的节点列表,其中区块链节点设备120上运行的智能合约能够在区块链中同步区块链节点设备的网络质量数据。在406,用户终端基于节点列表来访问优选区块链节点设备(例如区块链节点设备120或130)以获得区块链业务数据。可选地,节点列表可以包括一个或多个优选区块链节点设备以及一个或多个非优选区块链节点设备的标识,或者也可以仅包括最优区块链节点设备的标识。At 402, a request to access the blockchain is sent at theuser terminal 110 to theblockchain node device 130. At 404, theuser terminal 110 receives a node list including one or more preferred blockchain node device identities from theblockchain node device 130 on which the smart contract running on theblockchain node device 120 is capable of synchronizing zones in the blockchain Network quality data for blockchain node devices. At 406, the user terminal accesses a preferred blockchain node device (eg,blockchain node device 120 or 130) based on the node list to obtain blockchain service data. Optionally, the node list may include the identifiers of one or more preferred blockchain node devices and one or more non-preferred blockchain node devices, or may only include the identifiers of the optimal blockchain node device.

图5图示了用于确定要被访问的区块链节点设备的方法500的流程图。应当理解,方法500例如可以由以上参考图1所描述的用户终端110执行,此外,方法500可以为以上参考图2所描述的过程中的动作210的子动作。5 illustrates a flowchart of amethod 500 for determining a blockchain node device to be accessed. It should be understood that themethod 500 may be performed by, for example, theuser terminal 110 described above with reference to FIG. 1 , and further, themethod 500 may be a sub-action of act 210 in the process described above with reference to FIG. 2 .

在502,用户终端110获得包括一个或多个优选区块链节点设备和一个或多个非优选区块链节点设备的标识的节点列表,用户终端110具有其初始可访问的区块链节点设备的本地列表。应当理解,本地列表可以随着新增加的可访问区块链节点设备而被动态更新。在接收到一个或多个优选区块链节点设备和一个或多个非优选区块链节点设备的标识之后,在504,确定本地列表中是否包括优选区块链节点设备,如果是,则在506,选择其中的一个优选区块链节点设备进行访问(例如随机地选择)以获得区块链业务数据。At 502,user terminal 110 obtains a node list including the identification of one or more preferred blockchain node devices and one or more non-preferred blockchain node devices,user terminal 110 has initially accessible blockchain node devices local list. It should be understood that the local list may be dynamically updated with newly added accessible blockchain node devices. After receiving the identifications of the one or more preferred blockchain node devices and the one or more non-preferred blockchain node devices, at 504, it is determined whether the preferred blockchain node device is included in the local list, and if so, at 504 506. Select one of the preferred blockchain node devices for access (for example, randomly select) to obtain blockchain service data.

如果本地列表不包括任何优选区块链节点设备,则逐个尝试连接节点列表中的所有优选区块链节点设备,并且在508确定是否成功连接到某个优选区块链节点设备,如果是,则在510,选择已成功链接的优选区块链节点设备进行访问以获得区块链业务数据。If the local list does not include any preferred blockchain node device, then try to connect to all preferred blockchain node devices in the node list one by one, and determine at 508 whether the connection to a preferred blockchain node device is successful, and if so, then At 510, the successfully linked preferred blockchain node device is selected for access to obtain blockchain business data.

如果节点列表中的所有优选区块链节点设备都未能成功连接,则在512,确定本地列表是否包括非优选区块链节点设备。如果是,则在514,从本地列表中移除所有的非优选区块链节点设备,并且从剩余的区块链节点设备中随机选择一个区块链节点设备进行访问。如果本地列表也不包括任何非优选区块链节点设备,则在516从本地列表中随机选择一个区块链节点设备进行访问以获得区块链业务数据。由此可见,所选择的要访问的区块链节点设备有可能在所接收到的节点列表中,也有可能不在所接收的节点列表中。If all preferred blockchain node devices in the node list fail to connect successfully, at 512, it is determined whether the local list includes non-preferred blockchain node devices. If so, at 514, all non-preferred blockchain node devices are removed from the local list, and a blockchain node device is randomly selected for access from the remaining blockchain node devices. If the local list also does not include any non-preferred blockchain node devices, then at 516 a blockchain node device is randomly selected from the local list for access to obtain blockchain service data. It can be seen that the selected blockchain node device to be accessed may or may not be in the received node list.

应当理解,根据本公开的实施例的设备可以利用各种方式来实现。例如,在某些实施例中,该设备可以通过硬件、软件或者软件和硬件的结合来实现。其中,硬件部分可以利用专用逻辑来实现;软件部分则可以存储在存储器中,由适当的指令执行系统,例如微处理器或者专用设计硬件来执行。本领域的普通技术人员可以理解上述的方法和系统可以使用计算机可执行指令和/或包含在处理器控制代码中来实现,例如在诸如磁盘、光盘载体介质、诸如只读存储器的可编程的存储器或者诸如光学或电子信号载体的数据载体上提供了这样的代码。本公开的实施例的设备和装置不仅可以由诸如超大规模集成电路或门阵列、诸如逻辑芯片、晶体管等的半导体、或者诸如现场可编程门阵列、可编程逻辑设备等的可编程硬件设备的硬件电路实现,也可以用例如由各种类型的处理器所执行的软件实现,还可以由上述硬件电路和软件的结合来实现。It should be understood that a device according to an embodiment of the present disclosure may be implemented in various ways. For example, in some embodiments, the apparatus may be implemented in hardware, software, or a combination of software and hardware. Wherein, the hardware part can be realized by using dedicated logic; the software part can be stored in a memory and executed by a suitable instruction execution system, such as a microprocessor or specially designed hardware. Those of ordinary skill in the art will appreciate that the methods and systems described above may be implemented using computer-executable instructions and/or embodied in processor control code, for example in a carrier medium such as a magnetic disk, an optical disk, a programmable memory such as a read-only memory Alternatively such a code is provided on a data carrier such as an optical or electronic signal carrier. The devices and apparatuses of the embodiments of the present disclosure may not only consist of hardware such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc. The circuit implementation can also be implemented by, for example, software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software.

图6图示了可以用来实施本公开的实施例的设备600的示意性框图。应当理解,设备600可以被实现为图1所描述的用户终端或者任一区块链节点设备。如图6所示,设备600包括中央处理单元(CPU)601(例如处理器),其可以根据存储在只读存储器(ROM)602中的计算机程序指令或者从存储单元608加载到随机访问存储器(RAM)603中的计算机程序指令,来执行各种适当的动作和处理。在RAM 603中,还可存储设备600操作所需的各种程序和数据。CPU 601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。6 illustrates a schematic block diagram of adevice 600 that may be used to implement embodiments of the present disclosure. It should be understood that thedevice 600 may be implemented as a user terminal as described in FIG. 1 or as any blockchain node device. As shown in FIG. 6 ,device 600 includes a central processing unit (CPU) 601 (eg, a processor) that can be loaded into random access memory (ROM) according to computer program instructions stored in read only memory (ROM) 602 or from storage unit 608 ( computer program instructions in RAM) 603 to perform various appropriate actions and processes. In theRAM 603, various programs and data necessary for the operation of thedevice 600 can also be stored. TheCPU 601 , theROM 602 , and theRAM 603 are connected to each other through abus 604 . An input/output (I/O)interface 605 is also connected tobus 604 .

设备600中的多个部件连接至I/O接口605,包括:输入单元606,例如键盘、鼠标等;输出单元607,例如各种类型的显示器、扬声器等;存储单元608,例如磁盘、光盘等;以及通信单元609,例如网卡、调制解调器、无线通信收发机等。通信单元609允许设备600通过诸如因特网的计算机网络和/或各种通信网络与其他设备交换信息/数据。Various components in thedevice 600 are connected to the I/O interface 605, including: aninput unit 606, such as a keyboard, mouse, etc.; anoutput unit 607, such as various types of displays, speakers, etc.; astorage unit 608, such as a magnetic disk, an optical disk, etc. ; and acommunication unit 609, such as a network card, a modem, a wireless communication transceiver, and the like. Thecommunication unit 609 allows thedevice 600 to exchange information/data with other devices through a computer network such as the Internet and/or various communication networks.

上文所描述的各种方法,例如方法300或400,可由处理单元601执行。例如,在一些实施例中,方法300和400可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元608。在一些实施例中,计算机程序的部分或者全部可以经由ROM 602和/或通信单元609而被载入和/或安装到设备600上。当计算机程序被加载到RAM 603并由CPU 601执行时,可以执行上文描述的方法300和400中的一个或多个动作或步骤。The various methods described above, such asmethods 300 or 400 , may be performed by theprocessing unit 601 . For example, in some embodiments,methods 300 and 400 may be implemented as a computer software program tangibly embodied on a machine-readable medium, such asstorage unit 608 . In some embodiments, part or all of the computer program may be loaded and/or installed ondevice 600 viaROM 602 and/orcommunication unit 609 . When a computer program is loaded intoRAM 603 and executed byCPU 601, one or more of the actions or steps inmethods 300 and 400 described above may be performed.

计算机程序产品可以包括计算机可读存储介质,其上载有用于执行本公开的各个方面的计算机可读程序指令。计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for carrying out various aspects of the present disclosure. A computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above. Computer-readable storage media, as used herein, are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.

本文所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer readable program instructions described herein can be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network, eg, the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .

用于执行本公开内容操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Java、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开内容的各个方面。Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, or in one or more programming languages Source or object code written in any combination of programming languages, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect). In some embodiments, custom electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), can be personalized by utilizing state information of computer readable program instructions. Computer readable program instructions are executed to implement various aspects of the present disclosure.

应当注意,尽管在上文的详细描述中提及了设备的若干模块或子模块,但是这种划分仅仅是示例性而非强制性的。实际上,根据本公开的实施例,上文描述的两个或更多模块的特征和功能可以在一个模块中具体化。反之,上文描述的一个模块的特征和功能可以进一步划分为由多个模块来具体化。It should be noted that although several modules or sub-modules of the apparatus are mentioned in the detailed description above, this division is merely exemplary and not mandatory. Indeed, in accordance with embodiments of the present disclosure, the features and functions of two or more modules described above may be embodied in one module. Conversely, the features and functions of one module described above can be further divided into multiple modules to be embodied.

以上所述仅为本公开的实施例可选实施例,并不用于限制本公开的实施例,对于本领域的技术人员来说,本公开的实施例可以有各种更改和变化。凡在本公开的实施例的精神和原则之内,所作的任何修改、等效替换、改进等,均应包含在本公开的实施例的保护范围之内。The above descriptions are only optional embodiments of the embodiments of the present disclosure, and are not intended to limit the embodiments of the present disclosure. For those skilled in the art, various modifications and changes may be made to the embodiments of the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included within the protection scope of the embodiments of the present disclosure.

虽然已经参考若干具体实施例描述了本公开的实施例,但是应该理解,本公开的实施例并不限于所公开的具体实施例。本公开的实施例旨在涵盖在所附权利要求的精神和范围内所包括的各种修改和等同布置。所附的权利要求的范围符合最宽泛的解释,从而包含所有这样的修改及等同结构和功能。Although embodiments of the present disclosure have been described with reference to several specific embodiments, it should be understood that embodiments of the present disclosure are not limited to the specific embodiments disclosed. The embodiments of the present disclosure are intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.

Claims (22)

Translated fromChinese
1.一种用于访问区块链的方法,包括:1. A method for accessing a blockchain comprising:从用户终端接收对于访问区块链的请求;Receive a request to access the blockchain from the user terminal;由区块链节点设备上运行的智能合约来确定包括一个或多个优选区块链节点设备标识的节点列表,其中所述智能合约能够在所述区块链中同步区块链节点设备的网络质量数据;A node list including one or more preferred blockchain node device identities is determined by a smart contract running on a blockchain node device capable of synchronizing the network of blockchain node devices in the blockchain quality data;向所述用户终端发送所述节点列表;以及sending the list of nodes to the user terminal; and基于所述用户终端处的本地列表和所述节点列表来动态地选择优选区块链节点设备,从而访问所述优选区块链节点设备以获得区块链业务数据。A preferred blockchain node device is dynamically selected based on the local list at the user terminal and the node list to access the preferred blockchain node device to obtain blockchain service data.2.根据权利要求1所述的方法,还包括:2. The method of claim 1, further comprising:响应于所述区块链节点设备被确定为优选区块链节点设备,从所述用户终端接收对于区块链业务数据的请求;以及in response to the blockchain node device being determined to be the preferred blockchain node device, receiving a request for blockchain service data from the user terminal; and由所述智能合约向所述用户终端发送所述区块链业务数据。The blockchain service data is sent to the user terminal by the smart contract.3.根据权利要求2所述的方法,其中由区块链节点设备上运行的智能合约来确定包括一个或多个优选区块链节点设备标识的节点列表包括:3. The method of claim 2, wherein determining a node list including one or more preferred blockchain node device identities by a smart contract running on the blockchain node device comprises:至少部分地基于所述用户终端的地理位置和/或访问时间,确定所述节点列表。The node list is determined based at least in part on the geographic location and/or access time of the user terminal.4.根据权利要求3所述的方法,还包括:4. The method of claim 3, further comprising:从所述用户终端接收与所述区块链节点设备相关联的网络质量参数集合;receiving, from the user terminal, a set of network quality parameters associated with the blockchain node device;基于所述网络质量参数集合来更新所述节点列表以生成更新节点列表;以及updating the node list based on the set of network quality parameters to generate an updated node list; and由所述智能合约在所述区块链中同步所述更新节点列表。The updated node list is synchronized in the blockchain by the smart contract.5.根据权利要求4所述的方法,其中所述网络质量参数集合包括所述区块链节点设备的因特网协议(IP)地址、访问所述区块链节点设备的访问延时或状态、所述地理位置以及所述访问时间。5. The method of claim 4, wherein the set of network quality parameters includes an Internet Protocol (IP) address of the blockchain node device, an access delay or state for accessing the blockchain node device, a said geographic location and said access time.6.根据权利要求4所述的方法,还包括:6. The method of claim 4, further comprising:响应于从另一用户终端接收对于访问区块链的另一请求,由所述智能合约向所述另一用户终端发送所述更新节点列表。The updated node list is sent by the smart contract to the other user terminal in response to receiving another request to access the blockchain from the other user terminal.7.根据权利要求1所述的方法,其中所述节点列表还包括一个或多个非优选区块链节点设备的标识,或者仅包括最优区块链节点设备的标识。7. The method of claim 1, wherein the node list further includes the identification of one or more non-preferred blockchain node devices, or only the identification of optimal blockchain node devices.8.一种区块链节点设备,包括:8. A blockchain node device, comprising:处理器;processor;存储器,耦合至所述处理器并且存储有指令,所述指令在由所述处理器执行时使得所述区块链节点设备执行以下动作:a memory coupled to the processor and storing instructions that, when executed by the processor, cause the blockchain node device to perform the following actions:从用户终端接收对于访问区块链的请求;Receive a request to access the blockchain from the user terminal;由所述区块链节点设备上运行的智能合约来确定包括一个或多个优选区块链节点设备标识的节点列表,其中所述智能合约能够在所述区块链中同步区块链节点设备的网络质量数据;A node list including one or more preferred blockchain node device identities is determined by a smart contract running on said blockchain node device, wherein said smart contract is capable of synchronizing blockchain node devices in said blockchain network quality data;向所述用户终端发送所述节点列表;以及sending the list of nodes to the user terminal; and基于所述用户终端处的本地列表和所述节点列表来动态地选择优选区块链节点设备,从而访问所述优选区块链节点设备以获得区块链业务数据。A preferred blockchain node device is dynamically selected based on the local list at the user terminal and the node list to access the preferred blockchain node device to obtain blockchain service data.9.根据权利要求8所述的区块链节点设备,所述动作还包括:9. The blockchain node device of claim 8, the action further comprising:响应于所述区块链节点设备被确定为优选区块链节点设备,从所述用户终端接收对于区块链业务数据的请求;以及in response to the blockchain node device being determined to be the preferred blockchain node device, receiving a request for blockchain service data from the user terminal; and由所述智能合约向所述用户终端发送所述区块链业务数据。The blockchain service data is sent to the user terminal by the smart contract.10.根据权利要求9所述的区块链节点设备,其中由区块链节点设备上运行的智能合约来确定包括一个或多个优选区块链节点设备标识的节点列表包括:10. The blockchain node device according to claim 9, wherein determining a node list including one or more preferred blockchain node device identifiers by a smart contract running on the blockchain node device comprises:至少部分地基于所述用户终端的地理位置和/或访问时间,确定所述节点列表。The node list is determined based at least in part on the geographic location and/or access time of the user terminal.11.根据权利要求10所述的区块链节点设备,所述动作还包括:11. The blockchain node device of claim 10, the action further comprising:从所述用户终端接收与所述区块链节点设备相关联的网络质量参数集合;receiving, from the user terminal, a set of network quality parameters associated with the blockchain node device;基于所述网络质量参数集合来更新所述节点列表以生成更新节点列表;以及updating the node list based on the set of network quality parameters to generate an updated node list; and由所述智能合约在所述区块链中同步所述更新节点列表。The updated node list is synchronized in the blockchain by the smart contract.12.根据权利要求11所述的区块链节点设备,其中所述网络质量参数集合包括所述区块链节点设备的因特网协议(IP)地址、访问所述区块链节点设备的访问延时或状态、所述地理位置以及所述访问时间。12. The blockchain node device according to claim 11, wherein the set of network quality parameters comprises an Internet Protocol (IP) address of the blockchain node device, an access delay for accessing the blockchain node device or state, the geographic location, and the access time.13.根据权利要求11所述的区块链节点设备,所述动作还包括:13. The blockchain node device of claim 11, the action further comprising:响应于从另一用户终端接收对于访问区块链的另一请求,由所述智能合约向所述另一用户终端发送所述更新节点列表。The updated node list is sent by the smart contract to the other user terminal in response to receiving another request to access the blockchain from the other user terminal.14.根据权利要求8所述的区块链节点设备,其中所述节点列表还包括一个或多个非优选区块链节点设备的标识,或者仅包括最优区块链节点设备的标识。14. The blockchain node device of claim 8, wherein the node list further includes identifications of one or more non-preferred blockchain node devices, or only the identifications of optimal blockchain node devices.15.一种用于访问区块链的方法,包括:15. A method for accessing a blockchain comprising:在用户终端处向区块链节点设备发送对于访问区块链的请求;Send a request for accessing the blockchain to the blockchain node device at the user terminal;从所述区块链节点设备接收包括一个或多个优选区块链节点设备标识的节点列表,所述区块链节点设备上运行的智能合约能够在所述区块链中同步区块链节点设备的网络质量数据;A node list including one or more preferred blockchain node device identities is received from the blockchain node device on which a smart contract is capable of synchronizing blockchain nodes in the blockchain network quality data of the device;基于所述用户终端处的本地列表和所述节点列表来动态地选择优选区块链节点设备,从而访问所述优选区块链节点设备以获得区块链业务数据。A preferred blockchain node device is dynamically selected based on the local list at the user terminal and the node list to access the preferred blockchain node device to obtain blockchain service data.16.根据权利要求15所述的方法,其中所述节点列表至少基于所述用户终端的地理位置和/或访问时间而被确定,并且所述方法还包括:16. The method of claim 15, wherein the node list is determined based on at least a geographic location and/or access time of the user terminal, and the method further comprises:在从所述优选区块链节点设备获得所述区块链业务数据之后,向所述优选区块链节点设备提交与访问所述优选区块链节点设备相关联的网络质量参数集合,其中所述网络质量参数集合包括所述优选区块链节点设备的因特网协议(IP)地址、访问所述优选区块链节点设备的访问延时或状态、所述地理位置以及所述访问时间。After obtaining the blockchain service data from the preferred blockchain node device, submit to the preferred blockchain node device a set of network quality parameters associated with accessing the preferred blockchain node device, wherein all The set of network quality parameters includes the Internet Protocol (IP) address of the preferred blockchain node device, an access delay or state for accessing the preferred blockchain node device, the geographic location, and the access time.17.根据权利要求15所述的方法,其中所述节点列表还包括一个或多个非优选区块链节点设备的标识。17. The method of claim 15, wherein the node list further includes identifications of one or more non-preferred blockchain node devices.18.一种用户终端,包括:18. A user terminal, comprising:处理器;processor;存储器,耦合至所述处理器并且存储有指令,所述指令在由所述处理器执行时使得所述用户终端执行以下动作:a memory coupled to the processor and storing instructions that, when executed by the processor, cause the user terminal to perform the following actions:在所述用户终端处向区块链节点设备发送对于访问区块链的请求;sending a request for accessing the blockchain to the blockchain node device at the user terminal;从所述区块链节点设备接收包括一个或多个优选区块链节点设备标识的节点列表,所述区块链节点设备上运行的智能合约能够在所述区块链中同步区块链节点设备的网络质量数据;A node list including one or more preferred blockchain node device identities is received from the blockchain node device on which a smart contract is capable of synchronizing blockchain nodes in the blockchain network quality data of the device;基于所述用户终端处的本地列表和所述节点列表来动态地选择优选区块链节点设备,从而访问所述优选区块链节点设备以获得区块链业务数据。A preferred blockchain node device is dynamically selected based on the local list at the user terminal and the node list to access the preferred blockchain node device to obtain blockchain service data.19.根据权利要求18所述的用户终端,其中所述节点列表至少基于所述用户终端的地理位置和/或访问时间而被确定,并且所述动作还包括:19. The user terminal of claim 18, wherein the node list is determined based at least on a geographic location and/or access time of the user terminal, and the actions further comprise:在从所述优选区块链节点设备获得所述区块链业务数据之后,向所述优选区块链节点设备提交与访问所述优选区块链节点设备相关联的网络质量参数集合,其中所述网络质量参数集合包括所述优选区块链节点设备的因特网协议(IP)地址、访问所述优选区块链节点设备的访问延时或状态、所述地理位置以及所述访问时间。After obtaining the blockchain service data from the preferred blockchain node device, submit to the preferred blockchain node device a set of network quality parameters associated with accessing the preferred blockchain node device, wherein all The set of network quality parameters includes the Internet Protocol (IP) address of the preferred blockchain node device, an access delay or state for accessing the preferred blockchain node device, the geographic location, and the access time.20.根据权利要求18所述的用户终端,其中所述节点列表还包括一个或多个非优选区块链节点设备的标识。20. The user terminal of claim 18, wherein the node list further includes identifications of one or more non-preferred blockchain node devices.21.一种计算机可读存储介质,其具有存储在其上的计算机可执行指令,所述计算机可执行指令在设备中运行时使得所述设备执行根据权利要求1-7或15-17中任一项所述的方法。21. A computer-readable storage medium having computer-executable instructions stored thereon that, when executed in a device, cause the device to perform any of the methods according to claims 1-7 or 15-17. one of the methods described.22.一种用于访问区块链的系统,其至少包括根据权利要求8-14中任一项所述的区块链节点设备以及根据权利要求18-20中任一项所述的用户终端。22. A system for accessing a blockchain, comprising at least a blockchain node device according to any one of claims 8-14 and a user terminal according to any one of claims 18-20 .
CN201710964911.XA2017-10-172017-10-17 Method, system, blockchain node device and user terminal for accessing blockchainExpired - Fee RelatedCN107819829B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201710964911.XACN107819829B (en)2017-10-172017-10-17 Method, system, blockchain node device and user terminal for accessing blockchain

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201710964911.XACN107819829B (en)2017-10-172017-10-17 Method, system, blockchain node device and user terminal for accessing blockchain

Publications (2)

Publication NumberPublication Date
CN107819829A CN107819829A (en)2018-03-20
CN107819829Btrue CN107819829B (en)2020-07-07

Family

ID=61607336

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201710964911.XAExpired - Fee RelatedCN107819829B (en)2017-10-172017-10-17 Method, system, blockchain node device and user terminal for accessing blockchain

Country Status (1)

CountryLink
CN (1)CN107819829B (en)

Families Citing this family (29)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
ES2914510T3 (en)*2018-04-162022-06-13Bc Dev Labs Gmbh Trustless Stateless Incentivized Remote Node Network Using Minimal Verification Clients
CN108615189A (en)*2018-04-242018-10-02北京罗格数据科技有限公司A method of based on the processing of block chain data collaborative
CN108615180A (en)*2018-04-252018-10-02众安信息技术服务有限公司Information processing method, device and readable storage medium storing program for executing for vehicle transaction
CN110417567B (en)*2018-04-272021-12-14华为技术有限公司 A configuration method and device for an Internet of Things device
CN108848156B (en)*2018-06-082021-06-29中国联合网络通信集团有限公司 Access gateway processing method, device and storage medium
CN108961643A (en)*2018-06-122018-12-07深圳市中电数通智慧安全科技股份有限公司A kind of parameter management method based on block chain, device and terminal device
CN108810157A (en)*2018-06-202018-11-13泰链(厦门)科技有限公司The connection method of block chain network, medium, apparatus and system
CN108848184B (en)*2018-06-292020-08-28北京金山安全软件有限公司Block link point synchronization method and device based on trust mechanism
CN108833610B (en)*2018-07-192021-08-31网宿科技股份有限公司 An information update method, device and system
CN109067863B (en)*2018-07-252021-03-05上海点融信息科技有限责任公司Method, apparatus and storage medium for managing node identification of blockchain node
CN109325370A (en)*2018-08-092019-02-12上海常仁信息科技有限公司A kind of block chain access robot node device
US11038950B2 (en)*2018-08-142021-06-15Microsoft Technology Licensing, LlcBlockchain digital twin for transactions on behalf of limited capability devices
CN109243548A (en)*2018-08-222019-01-18广东工业大学A kind of medical data platform based on block chain technology
WO2020042926A1 (en)*2018-08-282020-03-05白杰Blockchain public chain maintenance method, device, node and blockchain public chain
CN109493211A (en)*2018-09-272019-03-19深圳壹账通智能科技有限公司Credit date storage method, device, equipment and storage medium based on block chain
CN109492053B (en)*2018-11-082023-07-18北京百度网讯科技有限公司 Method and apparatus for accessing data
TWI683590B (en)*2018-11-282020-01-21財團法人資訊工業策進會Control method and control system for internet of things device
CN111356102B (en)*2018-12-212022-07-19西安佰才邦网络技术有限公司Method and equipment for purchasing service based on block chain
CN111355754B (en)*2018-12-212023-06-27西安佰才邦网络技术有限公司Block chain-based business purchasing method and equipment
CN110046036A (en)*2018-12-252019-07-23阿里巴巴集团控股有限公司A kind of operation requests distribution method, device and equipment
CN110011972B (en)*2019-03-052023-03-31未鲲(上海)科技服务有限公司Block chain-based dynamic password request and response method and device
CN110365768B (en)*2019-07-152021-07-06腾讯科技(深圳)有限公司 Data synchronization method, device, medium and electronic device for distributed system
CN111683134A (en)*2020-06-042020-09-18勇鸿(重庆)信息科技有限公司Distributed Internet of vehicles data transmission system and method based on block chain technology
CN112055077B (en)*2020-09-022023-04-18杭州复杂美科技有限公司Block link access method, device and storage medium
CN112565448A (en)*2020-12-162021-03-26宁波云麟信息科技有限公司Block chain-based electronic evidence storage node selection method and electronic equipment
CN112688996A (en)*2020-12-162021-04-20宁波云麟信息科技有限公司Electronic certificate storage data storage method based on block chain and electronic equipment
CN112291117B (en)*2020-12-242021-04-20江苏荣泽信息科技股份有限公司Block chain network construction system based on customized OS
CN113596134B (en)*2021-07-232022-09-02中国联合网络通信集团有限公司Block chain-based network quality evaluation method, node and block chain
CN114022136A (en)*2021-10-262022-02-08上海焜耀网络科技有限公司Method, equipment and system for computing power transaction

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106251216A (en)*2016-07-182016-12-21恒宝股份有限公司A kind of method and system for alleviating node storage pressure
CN106411774A (en)*2016-09-062017-02-15联动优势科技有限公司Method and device for controlling transaction data volume
CN106598490A (en)*2016-11-252017-04-26深圳前海微众银行股份有限公司Access method for block chain data and block chain management system
CN107079059A (en)*2016-12-212017-08-18深圳前海达闼云端智能科技有限公司Block chain storage method and device and node equipment
CN107105041A (en)*2017-04-272017-08-29电子科技大学One medical big data management system and framework based on block chain

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106251216A (en)*2016-07-182016-12-21恒宝股份有限公司A kind of method and system for alleviating node storage pressure
CN106411774A (en)*2016-09-062017-02-15联动优势科技有限公司Method and device for controlling transaction data volume
CN106598490A (en)*2016-11-252017-04-26深圳前海微众银行股份有限公司Access method for block chain data and block chain management system
CN107079059A (en)*2016-12-212017-08-18深圳前海达闼云端智能科技有限公司Block chain storage method and device and node equipment
CN107105041A (en)*2017-04-272017-08-29电子科技大学One medical big data management system and framework based on block chain

Also Published As

Publication numberPublication date
CN107819829A (en)2018-03-20

Similar Documents

PublicationPublication DateTitle
CN107819829B (en) Method, system, blockchain node device and user terminal for accessing blockchain
US10015243B2 (en)Optimized content distribution based on metrics derived from the end user
WO2019165665A1 (en)Domain name resolution method, server and system
CN110780912B (en)Hierarchical spanning tree software patch with segment support
EP3060018B1 (en)Registration method and system for common service entity
CN113271311B (en) A digital identity management method and system in a cross-chain network
EP3043585A1 (en)Systems and methods for providing iot services
WO2022121538A1 (en)Data synchronization method and system based on blockchain, and related device
CN112150141A (en) A blockchain consensus method, device and system
RU2718480C2 (en)Method and system for authorizing website in web browser
WO2016127721A1 (en)Information acquiring method, intelligent terminal, and server
CN110771126A (en) Matching and attribution of user device events
CN110474964B (en) CDN scheduling method, device, equipment and computer storage medium
US10425475B2 (en)Distributed data management
CN111460458A (en)Data processing method, related device and computer storage medium
US10931630B2 (en)System and method for connecting using aliases
CN114510984B (en) IoT device provisioning
US20240106793A1 (en)Traffic scheduling method, apparatus and system, terminal device and readable storage medium
CN115080272A (en) A business data processing method, electronic device and storage medium
CN112200680B (en) Blockchain node management method, device, computer and readable storage medium
CN108173839A (en) Rights management method and system
US10924452B1 (en)Auditing IP address assignments
US10764399B2 (en)Customized web services gateway
WO2018214792A1 (en)Method and device for traffic control of user equipment
CN111787044A (en) IoT terminal platform

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
REGReference to a national code

Ref country code:HK

Ref legal event code:DE

Ref document number:1250554

Country of ref document:HK

GR01Patent grant
GR01Patent grant
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20200707

Termination date:20211017

CF01Termination of patent right due to non-payment of annual fee
REGReference to a national code

Ref country code:HK

Ref legal event code:WD

Ref document number:1250554

Country of ref document:HK


[8]ページ先頭

©2009-2025 Movatter.jp