





技术领域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 a
用户终端110可以与区块链120中的一个或多个节点进行通信,区块链120中的区块链节点设备130、140、150、160、170、180以及190也可以彼此通信。计算机系统100中的各个设备之间的通信可以基于任何有线和/或无线网络,包括但不限于因特网、广域网、城域网、局域网、虚拟专用网络(VPN)网络、无线通信网络,等等。The
用户终端110、区块链节点设备130、140、150、160、170、180以及190中的每个区块链节点设备可以为电子设备,例如固定设备(诸如服务器或台式计算机),移动设备(诸如智能手机、平板电脑、便携式计算机等)。本领域技术人员应当理解,虽然图1中示出了计算机系统100的架构中的一些用户终端和区块链节点设备,但是计算机系统100也可以包括更多或更少的用户终端和区块链节点设备。Each of the
根据本公开的实施例,区块链节点设备130、140、150、160、170、180以及190上运行的智能合约包括区块链节点设备的访问质量数据,因而智能合约也被称为“访问质量控制智能合约”。智能合约能够收集并且同步区块链节点设备的网络质量数据,使得用户终端能够动态选择访问高质量的区块链节点设备。智能合约提供应用程序接口(API)供用户查询各个区块链节点设备的网络质量数据,以这种方式,能够提高区块链的网络服务质量。According to the embodiment of the present disclosure, the smart contracts running on the
应当理解,由于区块链的对等性,区块链节点设备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 the
图2图示了根据本公开的实施例的用于访问区块链的过程200的示意图。在202,用户终端110通过本地配置文件或者通过线下配置来获得可访问区块链节点设备的本地列表。本地列表可以是初始配置或最新更新的区块链节点设备列表。例如,可以从本地列表中随机地或者顺序地选择一个区块链节点设备(诸如区块链节点设备130)。FIG. 2 illustrates a schematic diagram of a
在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 , the
可选地,在210,用户终端110可以基于节点列表确定要访问的区块链节点设备,以下参考图5进一步描述了确定要访问的区块链节点设备的示例实施例的细节;备选地,也可以由用户从节点列表中人工选择要访问的区块链节点设备。应当理解,当节点列表中仅包括一个最优区块链节点设备的标识时,用户终端110无需执行确定要访问的区块链节点设备的动作,而是直接访问最优区块链节点设备。在212,在基于节点列表确定要访问区块链节点设备140之后,用户终端110访问区块链节点设备140,并且在214,用户终端110从区块链节点设备140获得区块链业务数据。Optionally, at 210, the
为了使得区块链节点设备的网络质量数据实时更新,在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, the
在一些实施例中,可以基于来自用户终端的参数集合中的访问延时或状态,对区块链节点设备进行评分和排名,例如,如果用户终端正常访问区块链节点设备则可以计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 the
图3图示了根据本公开的实施例的用于访问区块链的方法300的流程图。应当理解,方法300例如可以由以上参考图1所描述的区块链节点设备中任何一个或多个区块链节点设备来执行。3 illustrates a flow diagram of a
在302,区块链节点设备130从用户终端110接收对于访问区块链的请求。在304,由区块链节点设备130上运行的智能合约来确定包括一个或多个优选区块链节点设备标识的节点列表,其中智能合约能够在区块链中同步区块链节点设备的网络质量数据。在306,区块链节点设备130向用户终端110发送节点列表。可选地,节点列表可以包括一个或多个优选区块链节点设备以及一个或多个非优选区块链节点设备的标识,或者也可以仅包括最优区块链节点设备的标识。At 302, the
图4图示了根据本公开的实施例的用于访问区块链的另一方法400的流程图。应当理解,方法400例如可以由以上参考图1所描述的用户终端110执行。FIG. 4 illustrates a flow diagram of another
在402,在用户终端110处向区块链节点设备130发送对于访问区块链的请求。在404,用户终端110从区块链节点设备130接收包括一个或多个优选区块链节点设备标识的节点列表,其中区块链节点设备120上运行的智能合约能够在区块链中同步区块链节点设备的网络质量数据。在406,用户终端基于节点列表来访问优选区块链节点设备(例如区块链节点设备120或130)以获得区块链业务数据。可选地,节点列表可以包括一个或多个优选区块链节点设备以及一个或多个非优选区块链节点设备的标识,或者也可以仅包括最优区块链节点设备的标识。At 402, a request to access the blockchain is sent at the
图5图示了用于确定要被访问的区块链节点设备的方法500的流程图。应当理解,方法500例如可以由以上参考图1所描述的用户终端110执行,此外,方法500可以为以上参考图2所描述的过程中的动作210的子动作。5 illustrates a flowchart of a
在502,用户终端110获得包括一个或多个优选区块链节点设备和一个或多个非优选区块链节点设备的标识的节点列表,用户终端110具有其初始可访问的区块链节点设备的本地列表。应当理解,本地列表可以随着新增加的可访问区块链节点设备而被动态更新。在接收到一个或多个优选区块链节点设备和一个或多个非优选区块链节点设备的标识之后,在504,确定本地列表中是否包括优选区块链节点设备,如果是,则在506,选择其中的一个优选区块链节点设备进行访问(例如随机地选择)以获得区块链业务数据。At 502,
如果本地列表不包括任何优选区块链节点设备,则逐个尝试连接节点列表中的所有优选区块链节点设备,并且在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 a
设备600中的多个部件连接至I/O接口605,包括:输入单元606,例如键盘、鼠标等;输出单元607,例如各种类型的显示器、扬声器等;存储单元608,例如磁盘、光盘等;以及通信单元609,例如网卡、调制解调器、无线通信收发机等。通信单元609允许设备600通过诸如因特网的计算机网络和/或各种通信网络与其他设备交换信息/数据。Various components in the
上文所描述的各种方法,例如方法300或400,可由处理单元601执行。例如,在一些实施例中,方法300和400可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元608。在一些实施例中,计算机程序的部分或者全部可以经由ROM 602和/或通信单元609而被载入和/或安装到设备600上。当计算机程序被加载到RAM 603并由CPU 601执行时,可以执行上文描述的方法300和400中的一个或多个动作或步骤。The various methods described above, such as
计算机程序产品可以包括计算机可读存储介质,其上载有用于执行本公开的各个方面的计算机可读程序指令。计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(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.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710964911.XACN107819829B (en) | 2017-10-17 | 2017-10-17 | Method, system, blockchain node device and user terminal for accessing blockchain |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710964911.XACN107819829B (en) | 2017-10-17 | 2017-10-17 | Method, system, blockchain node device and user terminal for accessing blockchain |
| Publication Number | Publication Date |
|---|---|
| CN107819829A CN107819829A (en) | 2018-03-20 |
| CN107819829Btrue CN107819829B (en) | 2020-07-07 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710964911.XAExpired - Fee RelatedCN107819829B (en) | 2017-10-17 | 2017-10-17 | Method, system, blockchain node device and user terminal for accessing blockchain |
| Country | Link |
|---|---|
| CN (1) | CN107819829B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| ES2914510T3 (en)* | 2018-04-16 | 2022-06-13 | Bc Dev Labs Gmbh | Trustless Stateless Incentivized Remote Node Network Using Minimal Verification Clients |
| CN108615189A (en)* | 2018-04-24 | 2018-10-02 | 北京罗格数据科技有限公司 | A method of based on the processing of block chain data collaborative |
| CN108615180A (en)* | 2018-04-25 | 2018-10-02 | 众安信息技术服务有限公司 | Information processing method, device and readable storage medium storing program for executing for vehicle transaction |
| CN110417567B (en)* | 2018-04-27 | 2021-12-14 | 华为技术有限公司 | A configuration method and device for an Internet of Things device |
| CN108848156B (en)* | 2018-06-08 | 2021-06-29 | 中国联合网络通信集团有限公司 | Access gateway processing method, device and storage medium |
| CN108961643A (en)* | 2018-06-12 | 2018-12-07 | 深圳市中电数通智慧安全科技股份有限公司 | A kind of parameter management method based on block chain, device and terminal device |
| CN108810157A (en)* | 2018-06-20 | 2018-11-13 | 泰链(厦门)科技有限公司 | The connection method of block chain network, medium, apparatus and system |
| CN108848184B (en)* | 2018-06-29 | 2020-08-28 | 北京金山安全软件有限公司 | Block link point synchronization method and device based on trust mechanism |
| CN108833610B (en)* | 2018-07-19 | 2021-08-31 | 网宿科技股份有限公司 | An information update method, device and system |
| CN109067863B (en)* | 2018-07-25 | 2021-03-05 | 上海点融信息科技有限责任公司 | Method, apparatus and storage medium for managing node identification of blockchain node |
| CN109325370A (en)* | 2018-08-09 | 2019-02-12 | 上海常仁信息科技有限公司 | A kind of block chain access robot node device |
| US11038950B2 (en)* | 2018-08-14 | 2021-06-15 | Microsoft Technology Licensing, Llc | Blockchain digital twin for transactions on behalf of limited capability devices |
| CN109243548A (en)* | 2018-08-22 | 2019-01-18 | 广东工业大学 | A kind of medical data platform based on block chain technology |
| WO2020042926A1 (en)* | 2018-08-28 | 2020-03-05 | 白杰 | Blockchain public chain maintenance method, device, node and blockchain public chain |
| CN109493211A (en)* | 2018-09-27 | 2019-03-19 | 深圳壹账通智能科技有限公司 | Credit date storage method, device, equipment and storage medium based on block chain |
| CN109492053B (en)* | 2018-11-08 | 2023-07-18 | 北京百度网讯科技有限公司 | Method and apparatus for accessing data |
| TWI683590B (en)* | 2018-11-28 | 2020-01-21 | 財團法人資訊工業策進會 | Control method and control system for internet of things device |
| CN111356102B (en)* | 2018-12-21 | 2022-07-19 | 西安佰才邦网络技术有限公司 | Method and equipment for purchasing service based on block chain |
| CN111355754B (en)* | 2018-12-21 | 2023-06-27 | 西安佰才邦网络技术有限公司 | Block chain-based business purchasing method and equipment |
| CN110046036A (en)* | 2018-12-25 | 2019-07-23 | 阿里巴巴集团控股有限公司 | A kind of operation requests distribution method, device and equipment |
| CN110011972B (en)* | 2019-03-05 | 2023-03-31 | 未鲲(上海)科技服务有限公司 | Block chain-based dynamic password request and response method and device |
| CN110365768B (en)* | 2019-07-15 | 2021-07-06 | 腾讯科技(深圳)有限公司 | Data synchronization method, device, medium and electronic device for distributed system |
| CN111683134A (en)* | 2020-06-04 | 2020-09-18 | 勇鸿(重庆)信息科技有限公司 | Distributed Internet of vehicles data transmission system and method based on block chain technology |
| CN112055077B (en)* | 2020-09-02 | 2023-04-18 | 杭州复杂美科技有限公司 | Block link access method, device and storage medium |
| CN112565448A (en)* | 2020-12-16 | 2021-03-26 | 宁波云麟信息科技有限公司 | Block chain-based electronic evidence storage node selection method and electronic equipment |
| CN112688996A (en)* | 2020-12-16 | 2021-04-20 | 宁波云麟信息科技有限公司 | Electronic certificate storage data storage method based on block chain and electronic equipment |
| CN112291117B (en)* | 2020-12-24 | 2021-04-20 | 江苏荣泽信息科技股份有限公司 | Block chain network construction system based on customized OS |
| CN113596134B (en)* | 2021-07-23 | 2022-09-02 | 中国联合网络通信集团有限公司 | Block chain-based network quality evaluation method, node and block chain |
| CN114022136A (en)* | 2021-10-26 | 2022-02-08 | 上海焜耀网络科技有限公司 | Method, equipment and system for computing power transaction |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106251216A (en)* | 2016-07-18 | 2016-12-21 | 恒宝股份有限公司 | A kind of method and system for alleviating node storage pressure |
| CN106411774A (en)* | 2016-09-06 | 2017-02-15 | 联动优势科技有限公司 | Method and device for controlling transaction data volume |
| CN106598490A (en)* | 2016-11-25 | 2017-04-26 | 深圳前海微众银行股份有限公司 | Access method for block chain data and block chain management system |
| CN107079059A (en)* | 2016-12-21 | 2017-08-18 | 深圳前海达闼云端智能科技有限公司 | Block chain storage method and device and node equipment |
| CN107105041A (en)* | 2017-04-27 | 2017-08-29 | 电子科技大学 | One medical big data management system and framework based on block chain |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106251216A (en)* | 2016-07-18 | 2016-12-21 | 恒宝股份有限公司 | A kind of method and system for alleviating node storage pressure |
| CN106411774A (en)* | 2016-09-06 | 2017-02-15 | 联动优势科技有限公司 | Method and device for controlling transaction data volume |
| CN106598490A (en)* | 2016-11-25 | 2017-04-26 | 深圳前海微众银行股份有限公司 | Access method for block chain data and block chain management system |
| CN107079059A (en)* | 2016-12-21 | 2017-08-18 | 深圳前海达闼云端智能科技有限公司 | Block chain storage method and device and node equipment |
| CN107105041A (en)* | 2017-04-27 | 2017-08-29 | 电子科技大学 | One medical big data management system and framework based on block chain |
| Publication number | Publication date |
|---|---|
| CN107819829A (en) | 2018-03-20 |
| Publication | Publication Date | Title |
|---|---|---|
| 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 |
| 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 | ||
| REG | Reference to a national code | Ref country code:HK Ref legal event code:DE Ref document number:1250554 Country of ref document:HK | |
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20200707 Termination date:20211017 | |
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| REG | Reference to a national code | Ref country code:HK Ref legal event code:WD Ref document number:1250554 Country of ref document:HK |