WO2022048409A1 - Performance measurement method, broadcast performance adjustment method, device, and storage medium - Google Patents

Performance measurement method, broadcast performance adjustment method, device, and storage medium Download PDF

Info

Publication number
WO2022048409A1
WO2022048409A1 PCT/CN2021/111857 CN2021111857W WO2022048409A1 WO 2022048409 A1 WO2022048409 A1 WO 2022048409A1 CN 2021111857 W CN2021111857 W CN 2021111857W WO 2022048409 A1 WO2022048409 A1 WO 2022048409A1
Authority
WO
WIPO (PCT)
Prior art keywords
broadcast
data set
value
performance
blockchain
Prior art date
Application number
PCT/CN2021/111857
Other languages
French (fr)
Chinese (zh)
Inventor
李邦柱
王志文
吴思进
Original Assignee
杭州复杂美科技有限公司
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 杭州复杂美科技有限公司 filed Critical 杭州复杂美科技有限公司
Publication of WO2022048409A1 publication Critical patent/WO2022048409A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast

Definitions

  • the present application relates to the field of blockchain technology, and in particular to a performance measurement method, a broadcast performance adjustment method, equipment and storage medium.
  • the performance of the blockchain network directly determines the robustness of the blockchain. To optimize the performance of a blockchain network, it is the first choice to measure its performance.
  • the present invention provides a performance measurement method suitable for blockchain nodes, the method comprising:
  • Receive the first summary request information sent by the scanner server and send the stored first data set to the scanner server, so as to determine the data broadcasting performance of the blockchain network according to each first serial number sent by each blockchain node.
  • the present invention provides a performance measurement method suitable for a scanner server, the method comprising:
  • the data broadcasting performance of the blockchain network is determined according to each first sequence number sent by each blockchain node.
  • the present invention provides a broadcast performance adjustment method suitable for a scanner server, the method comprising:
  • the first formula is: (1+n1+n2+...+nx) ⁇ M*C
  • the second formula is: (1+n1+n2+.. .+n(x-1)) ⁇ M*C
  • the number of , the number of first serial numbers with a value of 2, ... the number of first serial numbers with a value of x-1, the number of first serial numbers with a value of x, M is according to any one of the weights 3-5
  • the total amount of the received first serial numbers counted by the performance measurement method of C is plus one, C is a pre-configured first constant, and the first value is the value corresponding to x;
  • the first value is broadcast to each blockchain node for adjusting the broadcast performance according to the first value.
  • the present invention provides a broadcast performance adjustment method suitable for blockchain nodes, the method comprising:
  • the broadcast performance is adjusted according to the first value.
  • the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform various functions according to the present invention.
  • the present invention further provides a storage medium storing a computer program, the computer program causing a computer to execute the performance measurement method and the broadcast performance adjustment method provided according to the embodiments of the present invention.
  • the performance measurement method, broadcast performance adjustment method, device, and storage medium provided by various embodiments of the present invention receive a first data set including a first message and a first sequence number; determine whether there is a second data set including the first message locally : No, save the first data set, add one to the first serial number to update the first data set, and broadcast the updated first data set to other blockchain nodes; receive the first summary sent by the scanner server Request information, send the saved first data set to the scanner server, and measure the performance of the blockchain network by determining the data broadcasting performance of the blockchain network according to the first serial numbers sent by the blockchain nodes. .
  • FIG. 1 is a schematic diagram of a scenario of a performance measurement method provided by an embodiment of the present invention.
  • FIG. 2 is a flowchart of a performance measurement method provided by an embodiment of the present invention.
  • FIG. 3 is a flowchart of another performance measurement method provided by an embodiment of the present invention.
  • FIG. 4 is a flowchart of a method for adjusting broadcast performance according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of another broadcast performance adjustment method provided by an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • FIG. 1 is a schematic diagram of a scenario of a performance measurement method provided by an embodiment of the present invention.
  • A receives the scan request information sent by the scanner server, and generates a message including a message and a
  • FIG. 2 is a flowchart of a performance measurement method provided by an embodiment of the present invention. As shown in FIG. 2, in this embodiment, the present invention provides a performance measurement method suitable for blockchain nodes, and the above method includes:
  • S12 Receive the first data set including the first message and the first sequence number
  • step S142 save the first data set, add one to the first sequence number to update the first data set, and broadcast the updated first data set to other blockchain nodes;
  • S16 Receive the first summary request information sent by the scanner server, and send the stored first data set to the scanner server, so as to determine the data broadcast of the blockchain network according to the first serial numbers sent by the blockchain nodes respectively performance.
  • the scanner server sends scan request information to A, and A generates message m and a data set ⁇ m,1 ⁇ with sequence number 1 according to the scan request information;
  • A sends ⁇ m,1 ⁇ to other blockchain nodes
  • step S141 to determine whether there is a data set including m locally;
  • step S142 Since there is no data set including m locally stored in B, C, and D, step S142 is executed, ⁇ m, 1 ⁇ is saved, and the sequence number is updated to update the data set.
  • the updated data set is ⁇ m, 2 ⁇ , B, C and D broadcast ⁇ m,2 ⁇ to other blockchain nodes.
  • the scanner server sends the summary request information to each block chain node, and each block chain node executes step S16 to send the saved data set to the scanner server.
  • the stored data set includes serial numbers, and the scanner server determines the data broadcasting performance of the blockchain network according to the serial numbers sent by each blockchain node.
  • the above embodiments can measure the performance of the blockchain network.
  • the scanner server can also be a blockchain node.
  • the scanner server is configured as a blockchain node
  • the blockchain node where the scanner server is located does not need to be determined.
  • Blockchain node A sends scan request information to the blockchain node, but directly generates a data set and sends it to other blockchain nodes.
  • the method before receiving the first data set including the first message and the first sequence number, the method further includes:
  • FIG. 3 is a flowchart of another performance measurement method provided by an embodiment of the present invention.
  • the present invention provides a performance measurement method suitable for a scanner server, and the above method includes:
  • S22 Send the first scan request information to the first blockchain node, so that the first blockchain node can generate a first data set including a first message and a first sequence number according to the first scan request information, and convert the first data
  • the set is broadcast to other blockchain nodes for:
  • S26 Determine the data broadcasting performance of the blockchain network according to each first sequence number sent by each blockchain node.
  • sending the first scan request information to the first blockchain node includes:
  • the method for determining the first blockchain node may also be configured according to actual requirements, for example, configured to find a blockchain node that is geographically close to the scanner server according to the node ID of the blockchain node , and determine the found blockchain node as the first blockchain node, which can achieve the same technical effect.
  • generating the first message includes:
  • the first message is generated.
  • the mechanism for triggering the performance measurement method can also be configured according to actual requirements, for example, when the current block height is a preconfigured block height, the same technical effect can be achieved.
  • FIG. 4 is a flowchart of a method for adjusting broadcast performance according to an embodiment of the present invention.
  • the present invention provides a broadcast performance adjustment method suitable for a scanning program server.
  • the above method includes:
  • S32 Calculate the first value according to the first formula and the second formula; wherein, the first formula is: (1+n1+n2+...+nx) ⁇ M*C, and the second formula is: (1+n1+n2+ ...+n(x-1)) ⁇ M*C; n1, n2, ..., n(x-1), nx are the first counts whose value is 1 according to the performance measurement method shown in Fig. 2 The number of a serial number, the number of first serial numbers with a value of 2, ...
  • S34 Broadcast the first value to each blockchain node for adjusting the broadcast performance according to the first value.
  • the number (that is, the nodes that received the dataset in the third batch) is 13, the number of sequence numbers with a value of 4 (that is, the nodes that received the dataset in the fourth batch) is 7, and the number of sequence numbers with a value of 5 (that is, the number of sequence numbers with a value of 5).
  • the number of nodes that received the dataset in five batches) is 4, and the number of serial numbers with a value of 6 (that is, the nodes that received the dataset in the sixth batch) is 1; according to (1+3+7+...+nx) ⁇ 27 and (1+3+7+...+n(x-1)) ⁇ 27, the corresponding value of x is calculated to be 4;
  • the scanner server executes step S34, and broadcasts 4 to each block chain node, and each block chain node adjusts the broadcast performance according to 4.
  • C can also be configured according to actual requirements, for example, it is configured to be 0.8, which can achieve the same technical effect.
  • the above-described embodiments enable the broadcast performance of the blockchain network to be dynamically adjusted.
  • the first value can also be obtained by the blockchain node through other methods, for example, the scanner server generates a transaction including the first value, and sends the transaction to the blockchain
  • the node is used for recording on the blockchain, and the blockchain node obtains the first value from the blockchain.
  • FIG. 5 is a flowchart of another broadcast performance adjustment method provided by an embodiment of the present invention.
  • the present invention provides a broadcast performance adjustment method suitable for blockchain nodes, and the above method includes:
  • S42 Receive the first numerical value broadcast by the scanning program server; wherein, the first numerical value is calculated by the scanning program server according to the broadcast performance adjustment method shown in FIG. 4;
  • adjusting the broadcast performance according to the first value includes:
  • the blockchain node uses 4 as the critical value of the transaction broadcast round
  • the blockchain node receives the transaction tx1. If the round of tx1 is less than 4, the round is incremented by one to update the round, and tx1 is broadcast to other blockchain nodes; if tx1 is not less than 4, the hash( tx1) broadcast to other blockchain nodes.
  • the above critical value is usually a fixed value, but in the above embodiment, the critical value can be adjusted according to the actual situation of the blockchain network to better adapt to the blockchain network, so that the block The performance of the chain network becomes better.
  • FIG. 6 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • the present application also provides a device 600 , comprising one or more central processing units (CPUs) 601 , which can operate according to a program stored in a read only memory (ROM) 602 or Various appropriate actions and processes are executed from the program loaded into the random access memory (RAM) 603 from the storage section 608 .
  • ROM read only memory
  • RAM random access memory
  • various programs and data necessary for the operation of the device 600 are also stored.
  • the CPU 601 , the ROM 602 and the RAM 603 are connected to each other through a bus 604 .
  • An input/output (I/O) interface 605 is also connected to bus 604 .
  • the following components are connected to the I/O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc. ; and a communication section 609 including a network interface card such as a LAN card, a modem, and the like. The communication section 609 performs communication processing via a network such as the Internet.
  • a drive 610 is also connected to the I/O interface 605 as needed.
  • a removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 610 as needed so that a computer program read therefrom is installed into the storage section 608 as needed.
  • the method described in any of the above embodiments may be implemented as a computer software program.
  • embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for performing any of the methods described above.
  • the computer program may be downloaded and installed from the network via the communication portion 609 and/or installed from the removable medium 611 .
  • the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be a computer-readable storage medium included in the apparatus of the foregoing embodiment; A computer-readable storage medium in a device.
  • the computer-readable storage medium stores one or more programs that are used by one or more processors to perform the methods described in the present application.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks 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.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by dedicated hardware-based systems that perform the specified functions or operations , or can be implemented by a combination of dedicated hardware and computer instructions.
  • the units or modules involved in the embodiments of the present application may be implemented in a software manner, and may also be implemented in a hardware manner.
  • the described units or modules may also be provided in the processor, for example, each of the units may be a software program provided in a computer or a mobile smart device, or may be a separately configured hardware device. Wherein, the names of these units or modules do not constitute limitations on the units or modules themselves under certain circumstances.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Accounting & Taxation (AREA)
  • General Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Tourism & Hospitality (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Game Theory and Decision Science (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Finance (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present invention relates to technical fields such as blockchains. Provided are a performance measurement method, a broadcast performance adjustment method, a device, and a storage medium. The method comprises: receiving a first dataset comprising a first message and a first sequence number; determining whether there is a locally stored second dataset comprising the first message; if not, saving the first dataset, incrementing the first sequence number by one to update the first dataset, and broadcasting the updated first dataset to other blockchain nodes; and receiving first aggregated request information sent by a scanning program server, and sending the saved first dataset to the scanning program server to determine data broadcasting performance of a blockchain network according to the first sequence numbers sent by respective blockchain nodes. The present invention is used to measure the performance of a blockchain network.

Description

性能度量方法、广播性能调节方法、设备和存储介质Performance measurement method, broadcast performance adjustment method, apparatus and storage medium 技术领域technical field
本申请涉及区块链技术领域,具体涉及一种性能度量方法、广播性能调节方法、设备和存储介质。The present application relates to the field of blockchain technology, and in particular to a performance measurement method, a broadcast performance adjustment method, equipment and storage medium.
背景技术Background technique
区块链网络的性能的好坏直接决定了这个区块链的健壮性,优化好一个区块链网络的性能,首选要度量它的性能。The performance of the blockchain network directly determines the robustness of the blockchain. To optimize the performance of a blockchain network, it is the first choice to measure its performance.
发明内容SUMMARY OF THE INVENTION
鉴于现有技术中的上述缺陷或不足,期望提供一种度量区块链网络性能的性能度量方法、广播性能调节方法、设备和存储介质。In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a performance measurement method, a broadcast performance adjustment method, a device and a storage medium for measuring the performance of a blockchain network.
第一方面,本发明提供一种适用于区块链节点的性能度量方法,上述方法包括:In a first aspect, the present invention provides a performance measurement method suitable for blockchain nodes, the method comprising:
接收包括第一消息和第一序号的第一数据集;receiving a first data set including a first message and a first sequence number;
判断本地是否存有包括第一消息的第二数据集:Determine whether there is a second data set including the first message locally:
否,则保存第一数据集,并将第一序号加一以更新第一数据集,并将更新后的第一数据集广播至其它区块链节点;If not, save the first data set, add one to the first serial number to update the first data set, and broadcast the updated first data set to other blockchain nodes;
接收扫描程序服务器发送的第一汇总请求信息,将所保存的第一数据集发送至扫描程序服务器,以供根据各区块链节点分别发送的各第一序号确定区块链网络的数据广播性能。Receive the first summary request information sent by the scanner server, and send the stored first data set to the scanner server, so as to determine the data broadcasting performance of the blockchain network according to each first serial number sent by each blockchain node.
第二方面,本发明提供一种适用于扫描程序服务器的性能度量方法,上述方法包括:In a second aspect, the present invention provides a performance measurement method suitable for a scanner server, the method comprising:
向第一区块链节点发送第一扫描请求信息,以供第一区块链节点根据第一扫描请求信息生成包括第一消息和第一序号的第一数据集,并将第一数据集广播至其它区块链节点,以供:Send the first scan request information to the first block chain node, so that the first block chain node can generate the first data set including the first message and the first sequence number according to the first scan request information, and broadcast the first data set to other blockchain nodes for:
接收第一数据集;receive a first data set;
判断本地是否存有包括第一消息的第二数据集:Determine whether there is a second data set including the first message locally:
否,则保存第一数据集,将第一序号加一以更新第一数据集,并将更新后的第一数据集广播至其它区块链节点,以供其它区块链节点返回接收第一数据集;If not, save the first data set, add one to the first serial number to update the first data set, and broadcast the updated first data set to other blockchain nodes for other blockchain nodes to return to receive the first data set data set;
向各区块链节点发送第一汇总请求信息,以供返回所保存的第一数据集;Send the first summary request information to each blockchain node for returning the saved first data set;
根据各区块链节点分别发送的各第一序号确定区块链网络的数据广播性能。The data broadcasting performance of the blockchain network is determined according to each first sequence number sent by each blockchain node.
第三方面,本发明提供一种适用于扫描程序服务器的广播性能调节方法,上述方法包括:In a third aspect, the present invention provides a broadcast performance adjustment method suitable for a scanner server, the method comprising:
根据第一公式和第二公式计算第一数值;其中,第一公式为:(1+n1+n2+...+nx)≥M*C,第二公式为:(1+n1+n2+...+n(x-1))<M*C;n1、n2、...、n(x-1)、nx为根据上述第二方面的性能度量方法所统计的值为1的第一序号的数量、值为2的第一序号的数量、...值为x-1的第一序号的数量、值为x的第一序号的数量,M为根据如权3-权5任一项的性能度量方法所统计的所接收到的第一序号的总量加一,C为预配置的第一常数,第一数值为x对应的值;Calculate the first value according to the first formula and the second formula; wherein, the first formula is: (1+n1+n2+...+nx)≥M*C, and the second formula is: (1+n1+n2+.. .+n(x-1))<M*C; n1, n2, . The number of , the number of first serial numbers with a value of 2, ... the number of first serial numbers with a value of x-1, the number of first serial numbers with a value of x, M is according to any one of the weights 3-5 The total amount of the received first serial numbers counted by the performance measurement method of C is plus one, C is a pre-configured first constant, and the first value is the value corresponding to x;
将第一数值广播给各区块链节点以供根据第一数值调节广播性能。The first value is broadcast to each blockchain node for adjusting the broadcast performance according to the first value.
第四方面,本发明提供一种适用于区块链节点的广播性能调节方法,上述方法包括:In a fourth aspect, the present invention provides a broadcast performance adjustment method suitable for blockchain nodes, the method comprising:
接收扫描程序服务器广播的第一数值;其中,第一数值由扫描程序服务器根据上述第三方面的广播性能调节方法所计算得到;Receive the first value broadcast by the scanner server; wherein, the first value is calculated by the scanner server according to the broadcast performance adjustment method of the third aspect;
根据第一数值调节广播性能。The broadcast performance is adjusted according to the first value.
第五方面,本发明还提供一种设备,包括一个或多个处理器和存储器,其中存储器包含可由该一个或多个处理器执行的指令以使得该一个或多个处理器执行根据本发明各实施例提供的性能度量方法和广播性能调节方法。In a fifth aspect, the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform various functions according to the present invention. The performance measurement method and the broadcast performance adjustment method provided by the embodiment.
第六方面,本发明还提供一种存储有计算机程序的存储介质,该计算机程序使计算机执行根据本发明各实施例提供的性能度量方法和 广播性能调节方法。In a sixth aspect, the present invention further provides a storage medium storing a computer program, the computer program causing a computer to execute the performance measurement method and the broadcast performance adjustment method provided according to the embodiments of the present invention.
本发明诸多实施例提供的性能度量方法、广播性能调节方法、设备和存储介质通过接收包括第一消息和第一序号的第一数据集;判断本地是否存有包括第一消息的第二数据集:否,则保存第一数据集,并将第一序号加一以更新第一数据集,并将更新后的第一数据集广播至其它区块链节点;接收扫描程序服务器发送的第一汇总请求信息,将所保存的第一数据集发送至扫描程序服务器,以供根据各区块链节点分别发送的各第一序号确定区块链网络的数据广播性能的方法,度量区块链网络的性能。The performance measurement method, broadcast performance adjustment method, device, and storage medium provided by various embodiments of the present invention receive a first data set including a first message and a first sequence number; determine whether there is a second data set including the first message locally : No, save the first data set, add one to the first serial number to update the first data set, and broadcast the updated first data set to other blockchain nodes; receive the first summary sent by the scanner server Request information, send the saved first data set to the scanner server, and measure the performance of the blockchain network by determining the data broadcasting performance of the blockchain network according to the first serial numbers sent by the blockchain nodes. .
附图说明Description of drawings
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
图1为本发明一实施例提供的一种性能度量方法的场景示意图。FIG. 1 is a schematic diagram of a scenario of a performance measurement method provided by an embodiment of the present invention.
图2为本发明一实施例提供的一种性能度量方法的流程图。FIG. 2 is a flowchart of a performance measurement method provided by an embodiment of the present invention.
图3为本发明一实施例提供的另一种性能度量方法的流程图。FIG. 3 is a flowchart of another performance measurement method provided by an embodiment of the present invention.
图4为本发明一实施例提供的一种广播性能调节方法的流程图。FIG. 4 is a flowchart of a method for adjusting broadcast performance according to an embodiment of the present invention.
图5为本发明一实施例提供的另一种广播性能调节方法的流程图。FIG. 5 is a flowchart of another broadcast performance adjustment method provided by an embodiment of the present invention.
图6为本发明一实施例提供的一种设备的结构示意图。FIG. 6 is a schematic structural diagram of a device according to an embodiment of the present invention.
具体实施方式detailed description
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与发明相关的部分。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the related invention, but not to limit the invention. In addition, it should be noted that, for the convenience of description, only the parts related to the invention are shown in the drawings.
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict. The present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
图1为本发明一实施例提供的一种性能度量方法的场景示意图。 如图1所示,在本实施例中,以区块链网络中共有36个节点(A,B,C,D…),A接收到扫描程序服务器发送的扫描请求信息,并生成包括消息和序号的数据集{m,1};第一批次收到数据集的节点有n1=3个(B、C、D),第二批次收到数据集的节点数n2=7个(E、F、G…K),第三批次收到数据集的节点数n3=13个,第四批次收到数据集的节点数n4=7个,第五批次收到数据集的节点数n5=4个,第六批次收到数据集的节点数n6=1个为例,对本发明的平行链共识方案进行详细阐述。FIG. 1 is a schematic diagram of a scenario of a performance measurement method provided by an embodiment of the present invention. As shown in Figure 1, in this embodiment, there are a total of 36 nodes (A, B, C, D...) in the blockchain network, A receives the scan request information sent by the scanner server, and generates a message including a message and a The data set {m,1} of the serial number; the first batch of nodes receiving the data set has n1=3 (B, C, D), and the number of nodes receiving the data set in the second batch is n2=7 (E , F, G...K), the number of nodes that receive the dataset in the third batch is n3=13, the number of nodes that receive the dataset in the fourth batch is n4=7, and the number of nodes that receive the dataset in the fifth batch Taking the number n5=4 and the number of nodes n6=1 in the sixth batch of received data sets as an example, the parachain consensus scheme of the present invention will be described in detail.
图2为本发明一实施例提供的一种性能度量方法的流程图。如图2所示,在本实施例中,本发明提供一种适用于区块链节点的性能度量方法,上述方法包括:FIG. 2 is a flowchart of a performance measurement method provided by an embodiment of the present invention. As shown in FIG. 2, in this embodiment, the present invention provides a performance measurement method suitable for blockchain nodes, and the above method includes:
S12:接收包括第一消息和第一序号的第一数据集;S12: Receive the first data set including the first message and the first sequence number;
S141:判断本地是否存有包括第一消息的第二数据集:S141: Determine whether there is a second data set including the first message locally:
否,则执行步骤S142:保存第一数据集,并将第一序号加一以更新第一数据集,并将更新后的第一数据集广播至其它区块链节点;If not, go to step S142: save the first data set, add one to the first sequence number to update the first data set, and broadcast the updated first data set to other blockchain nodes;
S16:接收扫描程序服务器发送的第一汇总请求信息,将所保存的第一数据集发送至扫描程序服务器,以供根据各区块链节点分别发送的各第一序号确定区块链网络的数据广播性能。S16: Receive the first summary request information sent by the scanner server, and send the stored first data set to the scanner server, so as to determine the data broadcast of the blockchain network according to the first serial numbers sent by the blockchain nodes respectively performance.
以图1所示场景图为例;假设所有节点执行S141时所得到的判断都为否;Take the scene graph shown in Figure 1 as an example; it is assumed that the judgments obtained when all nodes execute S141 are no;
扫描程序服务器向A发送扫描请求信息,A根据该扫描请求信息生成消息m和序号为1的数据集{m,1};The scanner server sends scan request information to A, and A generates message m and a data set {m,1} with sequence number 1 according to the scan request information;
A向其它区块链节点发送{m,1};A sends {m,1} to other blockchain nodes;
B、C、D执行步骤S12,接收{m,1};B, C, D execute step S12, receive {m, 1};
B、C、D执行步骤S141,判断本地是否存有包括m的数据集;B, C, and D perform step S141 to determine whether there is a data set including m locally;
由于B、C、D本地未存有包括m的数据集,则执行步骤S142,保存{m,1},将序号更新以更新数据集,更新后的数据集为{m,2},B、C、D将{m,2}广播至其它区块链节点。Since there is no data set including m locally stored in B, C, and D, step S142 is executed, {m, 1} is saved, and the sequence number is updated to update the data set. The updated data set is {m, 2}, B, C and D broadcast {m,2} to other blockchain nodes.
其它节点执行步骤S12~S142的方法与B、C、D相同,不再赘述。The methods for other nodes to perform steps S12 to S142 are the same as B, C, and D, and are not repeated here.
扫描程序服务器向各区块链节点发送汇总请求信息,各区块链节 点执行步骤S16,将所保存的数据集发送至扫描程序服务器。The scanner server sends the summary request information to each block chain node, and each block chain node executes step S16 to send the saved data set to the scanner server.
所保存的数据集中包括序号,扫描程序服务器根据各区块链节点分别发送的序号确定区块链网络的数据广播性能。The stored data set includes serial numbers, and the scanner server determines the data broadcasting performance of the blockchain network according to the serial numbers sent by each blockchain node.
上述实施例可以度量区块链网络的性能。The above embodiments can measure the performance of the blockchain network.
需要说明的是,本领域技术人员应当可以联想到,扫描程序服务器也可以是一个区块链节点,当扫描程序服务器配置为区块链节点时,扫描程序服务器所在的区块链节点无需再确定区块链节点A,向区块链节点发送扫描请求信息,而是直接生成数据集并发送至其它区块链节点。It should be noted that those skilled in the art should be able to imagine that the scanner server can also be a blockchain node. When the scanner server is configured as a blockchain node, the blockchain node where the scanner server is located does not need to be determined. Blockchain node A sends scan request information to the blockchain node, but directly generates a data set and sends it to other blockchain nodes.
优选地,接收包括第一消息和第一序号的第一数据集前,还包括:Preferably, before receiving the first data set including the first message and the first sequence number, the method further includes:
接收扫描程序服务器发送的第一扫描请求信息,根据第一扫描请求信息生成包括第二消息和第二序号的第三数据集;其中,第二序号为1;receiving the first scan request information sent by the scanner server, and generating a third data set including the second message and the second sequence number according to the first scan request information; wherein the second sequence number is 1;
将第三数据集广播至其它区块链节点。Broadcast the third dataset to other blockchain nodes.
上述实施例的性能度量原理可参考图2所示的方法,此处不再赘述。For the performance measurement principle of the foregoing embodiment, reference may be made to the method shown in FIG. 2 , which will not be repeated here.
图3为本发明一实施例提供的另一种性能度量方法的流程图。如图3所示,在本实施例中,本发明提供一种适用于扫描程序服务器的性能度量方法,上述方法包括:FIG. 3 is a flowchart of another performance measurement method provided by an embodiment of the present invention. As shown in FIG. 3, in this embodiment, the present invention provides a performance measurement method suitable for a scanner server, and the above method includes:
S22:向第一区块链节点发送第一扫描请求信息,以供第一区块链节点根据第一扫描请求信息生成包括第一消息和第一序号的第一数据集,并将第一数据集广播至其它区块链节点,以供:S22: Send the first scan request information to the first blockchain node, so that the first blockchain node can generate a first data set including a first message and a first sequence number according to the first scan request information, and convert the first data The set is broadcast to other blockchain nodes for:
接收第一数据集;receive a first data set;
判断本地是否存有包括第一消息的第二数据集:Determine whether there is a second data set including the first message locally:
否,则保存第一数据集,将第一序号加一以更新第一数据集,并将更新后的第一数据集广播至其它区块链节点,以供其它区块链节点返回接收第一数据集;If not, save the first data set, add one to the first serial number to update the first data set, and broadcast the updated first data set to other blockchain nodes for other blockchain nodes to return to receive the first data set data set;
S24:向各区块链节点发送第一汇总请求信息,以供返回所保存的第一数据集;S24: Send the first summary request information to each blockchain node for returning the saved first data set;
S26:根据各区块链节点分别发送的各第一序号确定区块链网络的 数据广播性能。S26: Determine the data broadcasting performance of the blockchain network according to each first sequence number sent by each blockchain node.
上述实施例的性能度量原理可参考图2所示的方法,此处不再赘述。For the performance measurement principle of the foregoing embodiment, reference may be made to the method shown in FIG. 2 , which will not be repeated here.
优选地,向第一区块链节点发送第一扫描请求信息包括:Preferably, sending the first scan request information to the first blockchain node includes:
生成第一消息,根据第一消息和区块链节点的节点ID确定第一区块链节点;generating a first message, and determining the first blockchain node according to the first message and the node ID of the blockchain node;
向第一区块链节点发送包括第一消息的第一扫描请求信息。Send first scan request information including the first message to the first blockchain node.
在更多实施例中,确定第一区块链节点的方法还可以根据实际需求进行配置,例如配置为,根据区块链节点的节点ID找到与扫描程序服务器地理位置较近的区块链节点,并将所找到的区块链节点确定为第一区块链节点,可实现相同的技术效果。In more embodiments, the method for determining the first blockchain node may also be configured according to actual requirements, for example, configured to find a blockchain node that is geographically close to the scanner server according to the node ID of the blockchain node , and determine the found blockchain node as the first blockchain node, which can achieve the same technical effect.
优选地,生成第一消息包括:Preferably, generating the first message includes:
在当前时刻为预配置的时刻时,生成第一消息。When the current time is the preconfigured time, the first message is generated.
在更多实施例中,触发性能度量方法的机制还可以根据实际需求进行配置,例如配置为,在当前区块高度为预配置的区块高度时,可实现相同的技术效果。In more embodiments, the mechanism for triggering the performance measurement method can also be configured according to actual requirements, for example, when the current block height is a preconfigured block height, the same technical effect can be achieved.
图4为本发明一实施例提供的一种广播性能调节方法的流程图。如图4所示,在本实施例中,本发明提供一种适用于扫描程序服务器的广播性能调节方法,上述方法包括:FIG. 4 is a flowchart of a method for adjusting broadcast performance according to an embodiment of the present invention. As shown in FIG. 4 , in this embodiment, the present invention provides a broadcast performance adjustment method suitable for a scanning program server. The above method includes:
S32:根据第一公式和第二公式计算第一数值;其中,第一公式为:(1+n1+n2+...+nx)≥M*C,第二公式为:(1+n1+n2+...+n(x-1))<M*C;n1、n2、...、n(x-1)、nx为根据图2所示的性能度量方法所统计的值为1的第一序号的数量、值为2的第一序号的数量、...值为x-1的第一序号的数量、值为x的第一序号的数量,M为根据如权3-权5任一项的性能度量方法所统计的所接收到的第一序号的总量加一,C为预配置的第一常数,第一数值为x对应的值;S32: Calculate the first value according to the first formula and the second formula; wherein, the first formula is: (1+n1+n2+...+nx)≥M*C, and the second formula is: (1+n1+n2+ ...+n(x-1))<M*C; n1, n2, ..., n(x-1), nx are the first counts whose value is 1 according to the performance measurement method shown in Fig. 2 The number of a serial number, the number of first serial numbers with a value of 2, ... the number of first serial numbers with a value of x-1, the number of first serial numbers with a value of x, M is according to weight 3-weight 5 Add one to the total amount of the received first serial numbers counted by the performance measurement method of one item, C is a preconfigured first constant, and the first value is the value corresponding to x;
S34:将第一数值广播给各区块链节点以供根据第一数值调节广播性能。S34: Broadcast the first value to each blockchain node for adjusting the broadcast performance according to the first value.
具体地,假设C=0.75;Specifically, assume that C=0.75;
扫描程序服务器执行步骤S32,扫描程序服务器所接收到的序号 的总量为35,因此M=35+1=36;M*C=27;根据图2所示的性能度量方法所统计的值为1的序号的数量(即第一批次收到数据集的节点)为3,值为2的序号的数量(即第二批次收到数据集的节点)为7,值为3的序号的数量(即第三批次收到数据集的节点)为13,值为4的序号的数量(即第四批次收到数据集的节点)为7,值为5的序号的数量(即第五批次收到数据集的节点)为4,值为6的序号的数量(即第六批次收到数据集的节点)为1;根据(1+3+7+...+nx)≥27和(1+3+7+...+n(x-1))<27,计算出x对应的值为4;The scanner server executes step S32, and the total number of serial numbers received by the scanner server is 35, so M=35+1=36; M*C=27; according to the performance measurement method shown in FIG. 2, the calculated value is The number of serial numbers of 1 (that is, the nodes that received the dataset in the first batch) is 3, the number of serial numbers of 2 (that is, the nodes that received the dataset in the second batch) is 7, and the number of serial numbers of the value of 3 is 7. The number (that is, the nodes that received the dataset in the third batch) is 13, the number of sequence numbers with a value of 4 (that is, the nodes that received the dataset in the fourth batch) is 7, and the number of sequence numbers with a value of 5 (that is, the number of sequence numbers with a value of 5). The number of nodes that received the dataset in five batches) is 4, and the number of serial numbers with a value of 6 (that is, the nodes that received the dataset in the sixth batch) is 1; according to (1+3+7+...+nx) ≥27 and (1+3+7+...+n(x-1))<27, the corresponding value of x is calculated to be 4;
扫描程序服务器执行步骤S34,将4广播给各区块链节点,各区块链节点根据4调节广播性能。The scanner server executes step S34, and broadcasts 4 to each block chain node, and each block chain node adjusts the broadcast performance according to 4.
在更多实施例中,C还可以根据实际需求进行配置,例如配置为0.8,可实现相同的技术效果。In more embodiments, C can also be configured according to actual requirements, for example, it is configured to be 0.8, which can achieve the same technical effect.
上述实施例使得区块链网络的广播性能可动态调整。The above-described embodiments enable the broadcast performance of the blockchain network to be dynamically adjusted.
需要说明的是,本领域技术人员应当可以联想,第一数值还可以通过其它方法让区块链节点获取,例如,扫描程序服务器生成包括第一数值的交易,并将该交易发送至区块链节点以供记录到区块链上,区块链节点从区块链上获取第一数值。It should be noted that those skilled in the art should be able to associate that the first value can also be obtained by the blockchain node through other methods, for example, the scanner server generates a transaction including the first value, and sends the transaction to the blockchain The node is used for recording on the blockchain, and the blockchain node obtains the first value from the blockchain.
图5为本发明一实施例提供的另一种广播性能调节方法的流程图。如图5所示,在本实施例中,本发明提供一种适用于区块链节点的广播性能调节方法,上述方法包括:FIG. 5 is a flowchart of another broadcast performance adjustment method provided by an embodiment of the present invention. As shown in FIG. 5 , in this embodiment, the present invention provides a broadcast performance adjustment method suitable for blockchain nodes, and the above method includes:
S42:接收扫描程序服务器广播的第一数值;其中,第一数值由扫描程序服务器根据图4所示的广播性能调节方法所计算得到;S42: Receive the first numerical value broadcast by the scanning program server; wherein, the first numerical value is calculated by the scanning program server according to the broadcast performance adjustment method shown in FIG. 4;
S44:根据第一数值调节广播性能。S44: Adjust the broadcast performance according to the first value.
上述实施例的性能度量原理可参考图4所示的方法,此处不再赘述。For the performance measurement principle of the foregoing embodiment, reference may be made to the method shown in FIG. 4 , which will not be repeated here.
优选地,根据第一数值调节广播性能包括:Preferably, adjusting the broadcast performance according to the first value includes:
根据第一数值确定交易广播轮次的第一临界值;Determine the first critical value of the transaction broadcast round according to the first value;
接收第一交易,判断第一交易的第一轮次是否小于第一临界值:Receive the first transaction, and determine whether the first round of the first transaction is less than the first threshold:
是,则将第一轮次加一以更新第一轮次,并将第二交易广播至其它区块链节点;If yes, add one to the first round to update the first round, and broadcast the second transaction to other blockchain nodes;
否,则将第二交易的交易哈希广播至其它区块链节点。If not, broadcast the transaction hash of the second transaction to other blockchain nodes.
具体地,区块链节点将4作为交易广播轮次的临界值;Specifically, the blockchain node uses 4 as the critical value of the transaction broadcast round;
区块链节点接收交易tx1,如果tx1的轮次小于4,则将该轮次加一以更新该轮次,并将tx1广播至其它区块链节点;如果tx1不小于4,则将hash(tx1)广播至其它区块链节点。The blockchain node receives the transaction tx1. If the round of tx1 is less than 4, the round is incremented by one to update the round, and tx1 is broadcast to other blockchain nodes; if tx1 is not less than 4, the hash( tx1) broadcast to other blockchain nodes.
在现有技术中,上述临界值通常是一个固定的数值,而在上述实施例中,临界值可以根据区块链网络的实际情况进行调整,更好的适配区块链网络,使得区块链网络的性能变得更优良。In the prior art, the above critical value is usually a fixed value, but in the above embodiment, the critical value can be adjusted according to the actual situation of the blockchain network to better adapt to the blockchain network, so that the block The performance of the chain network becomes better.
图6为本发明一实施例提供的一种设备的结构示意图。FIG. 6 is a schematic structural diagram of a device according to an embodiment of the present invention.
如图6所示,作为另一方面,本申请还提供了一种设备600,包括一个或多个中央处理单元(CPU)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储部分608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM603中,还存储有设备600操作所需的各种程序和数据。CPU601、ROM602以及RAM603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。As shown in FIG. 6 , as another aspect, the present application also provides a device 600 , comprising one or more central processing units (CPUs) 601 , which can operate according to a program stored in a read only memory (ROM) 602 or Various appropriate actions and processes are executed from the program loaded into the random access memory (RAM) 603 from the storage section 608 . In the RAM 603, various programs and data necessary for the operation of the device 600 are also stored. The CPU 601 , the ROM 602 and the RAM 603 are connected to each other through a bus 604 . An input/output (I/O) interface 605 is also connected to bus 604 .
以下部件连接至I/O接口605:包括键盘、鼠标等的输入部分606;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分607;包括硬盘等的存储部分608;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分609。通信部分609经由诸如因特网的网络执行通信处理。驱动器610也根据需要连接至I/O接口605。可拆卸介质611,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器610上,以便于从其上读出的计算机程序根据需要被安装入存储部分608。The following components are connected to the I/O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc. ; and a communication section 609 including a network interface card such as a LAN card, a modem, and the like. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I/O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 610 as needed so that a computer program read therefrom is installed into the storage section 608 as needed.
特别地,根据本公开的实施例,上述任一实施例描述的方法可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,所述计算机程序包含用于执行上述任一方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分609从网络上被下载和安装,和/或从可拆卸介质611被安装。In particular, according to an embodiment of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 609 and/or installed from the removable medium 611 .
作为又一方面,本申请还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例的装置中所包含的计算机可读存储介质;也可以是单独存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,该程序被一个或者一个以上的处理器用来执行描述于本申请提供的方法。As yet another aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium may be a computer-readable storage medium included in the apparatus of the foregoing embodiment; A computer-readable storage medium in a device. The computer-readable storage medium stores one or more programs that are used by one or more processors to perform the methods described in the present application.
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这根据所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以通过执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以通过专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks 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 is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by dedicated hardware-based systems that perform the specified functions or operations , or can be implemented by a combination of dedicated hardware and computer instructions.
描述于本申请实施例中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,例如,各所述单元可以是设置在计算机或移动智能设备中的软件程序,也可以是单独配置的硬件装置。其中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。The units or modules involved in the embodiments of the present application may be implemented in a software manner, and may also be implemented in a hardware manner. The described units or modules may also be provided in the processor, for example, each of the units may be a software program provided in a computer or a mobile smart device, or may be a separately configured hardware device. Wherein, the names of these units or modules do not constitute limitations on the units or modules themselves under certain circumstances.
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离本申请构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present application and an illustration of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, and should also cover, without departing from the concept of the present application, the above-mentioned technical features or Other technical solutions formed by any combination of its equivalent features. For example, a technical solution is formed by replacing the above-mentioned features with the technical features disclosed in this application (but not limited to) with similar functions.

Claims (10)

  1. 一种性能度量方法,其特征在于,适用于区块链节点,所述方法包括:A performance measurement method, characterized in that it is suitable for blockchain nodes, the method comprising:
    接收包括第一消息和第一序号的第一数据集;receiving a first data set including a first message and a first sequence number;
    判断本地是否存有包括所述第一消息的第二数据集:Determine whether there is a second data set including the first message locally:
    否,则保存所述第一数据集,并将所述第一序号加一以更新所述第一数据集,并将更新后的所述第一数据集广播至其它区块链节点;If not, save the first data set, add one to the first serial number to update the first data set, and broadcast the updated first data set to other blockchain nodes;
    接收扫描程序服务器发送的第一汇总请求信息,将所保存的第一数据集发送至所述扫描程序服务器,以供根据各区块链节点分别发送的各第一序号确定区块链网络的数据广播性能。Receive the first summary request information sent by the scanner server, and send the saved first data set to the scanner server, so as to determine the data broadcast of the blockchain network according to each first serial number sent by each blockchain node. performance.
  2. 根据权利要求1所述的方法,其特征在于,所述接收包括第一消息和第一序号的第一数据集前,还包括:The method according to claim 1, wherein before the receiving the first data set including the first message and the first sequence number, the method further comprises:
    接收所述扫描程序服务器发送的第一扫描请求信息,根据所述第一扫描请求信息生成包括第二消息和第二序号的第三数据集;其中,所述第二序号为1;receiving the first scan request information sent by the scanning program server, and generating a third data set including a second message and a second sequence number according to the first scan request information; wherein the second sequence number is 1;
    将所述第三数据集广播至其它区块链节点。The third dataset is broadcast to other blockchain nodes.
  3. 一种性能度量方法,其特征在于,所述方法适用于扫描程序服务器,所述方法包括:A performance measurement method, characterized in that the method is applicable to a scanner server, and the method comprises:
    向第一区块链节点发送第一扫描请求信息,以供所述第一区块链节点根据所述第一扫描请求信息生成包括第一消息和第一序号的第一数据集,并将所述第一数据集广播至其它区块链节点,以供:Send the first scan request information to the first block chain node, so that the first block chain node can generate the first data set including the first message and the first sequence number according to the first scan request information, and store all the data sets. The first dataset is broadcast to other blockchain nodes for:
    接收所述第一数据集;receiving the first data set;
    判断本地是否存有包括所述第一消息的第二数据集:Determine whether there is a second data set including the first message locally:
    否,则保存所述第一数据集,将所述第一序号加一以更新所述第一数据集,并将更新后的所述第一数据集广播至其它区块链节点,以供其它区块链节点返回所述接收所述第一数据集;If not, save the first data set, add one to the first serial number to update the first data set, and broadcast the updated first data set to other blockchain nodes for other The blockchain node returns the received first data set;
    向各区块链节点发送第一汇总请求信息,以供返回所保存的第一 数据集;Send the first summary request information to each block chain node for returning the saved first data set;
    根据各区块链节点分别发送的各第一序号确定区块链网络的数据广播性能。The data broadcasting performance of the blockchain network is determined according to each first sequence number sent by each blockchain node.
  4. 根据权利要求3所述的方法,其特征在于,所述向第一区块链节点发送第一扫描请求信息包括:The method according to claim 3, wherein the sending the first scan request information to the first blockchain node comprises:
    生成第一消息,根据所述第一消息和区块链节点的节点ID确定第一区块链节点;generating a first message, and determining the first blockchain node according to the first message and the node ID of the blockchain node;
    向所述第一区块链节点发送包括所述第一消息的第一扫描请求信息。Send first scan request information including the first message to the first blockchain node.
  5. 根据权利要求4所述的方法,其特征在于,所述生成第一消息包括:The method according to claim 4, wherein the generating the first message comprises:
    在当前时刻为预配置的时刻时,生成第一消息。When the current time is the preconfigured time, the first message is generated.
  6. 一种广播性能调节方法,其特征在于,适用于扫描程序服务器,所述方法包括:A broadcast performance adjustment method, characterized in that it is applicable to a scanner server, the method comprising:
    根据第一公式和第二公式计算第一数值;其中,所述第一公式为:(1+n1+n2+...+nx)≥M*C,所述第二公式为:(1+n1+n2+...+n(x-1))<M*C;n1、n2、...、n(x-1)、nx为根据如权3-权5任一项所述的性能度量方法所统计的值为1的第一序号的数量、值为2的第一序号的数量、...值为x-1的第一序号的数量、值为x的第一序号的数量,M为根据如权3-权5任一项所述的性能度量方法所统计的所接收到的第一序号的总量加一,C为预配置的第一常数,所述第一数值为x对应的值;The first value is calculated according to the first formula and the second formula; wherein, the first formula is: (1+n1+n2+...+nx)≥M*C, and the second formula is: (1+n1 +n2+...+n(x-1))<M*C; n1, n2,..., n(x-1), nx are performance metrics according to any one of weights 3-5 The method counts the number of first serial numbers with a value of 1, the number of first serial numbers with a value of 2, ... the number of first serial numbers with a value of x-1, the number of first serial numbers with a value of x, M Add one to the total amount of the received first serial numbers counted according to the performance measurement method according to any one of weights 3 to 5, C is a pre-configured first constant, and the first value is the corresponding value of x. the value of;
    将所述第一数值广播给各区块链节点以供根据所述第一数值调节广播性能。The first value is broadcast to each blockchain node for adjusting broadcast performance according to the first value.
  7. 一种广播性能调节方法,其特征在于,适用于区块链节点,所述方法包括:A broadcast performance adjustment method, characterized in that it is suitable for blockchain nodes, the method comprising:
    接收扫描程序服务器广播的第一数值;其中,所述第一数值由所 述扫描程序服务器根据如权利要求6所述的广播性能调节方法所计算得到;Receive the first numerical value broadcast by the scanning program server; wherein, the first numerical value is calculated by the scanning program server according to the broadcast performance adjustment method as claimed in claim 6;
    根据所述第一数值调节广播性能。The broadcast performance is adjusted according to the first value.
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述第一数值调节广播性能包括:The method according to claim 7, wherein the adjusting broadcast performance according to the first value comprises:
    根据所述第一数值确定交易广播轮次的第一临界值;Determine the first critical value of the transaction broadcast round according to the first value;
    接收第一交易,判断所述第一交易的第一轮次是否小于所述第一临界值:Receive the first transaction, and determine whether the first round of the first transaction is less than the first threshold:
    是,则将所述第一轮次加一以更新所述第一轮次,并将所述第二交易广播至其它区块链节点;If yes, add one to the first round to update the first round, and broadcast the second transaction to other blockchain nodes;
    否,则将所述第二交易的交易哈希广播至其它区块链节点。If not, broadcast the transaction hash of the second transaction to other blockchain nodes.
  9. 一种计算机设备,其特征在于,所述设备包括:A computer device, characterized in that the device comprises:
    一个或多个处理器;one or more processors;
    存储器,用于存储一个或多个程序,memory for storing one or more programs,
    当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1-8中任一项所述的方法。The one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-8.
  10. 一种存储有计算机程序的存储介质,其特征在于,该程序被处理器执行时实现如权利要求1-8中任一项所述的方法。A storage medium storing a computer program, characterized in that, when the program is executed by a processor, the method according to any one of claims 1-8 is implemented.
PCT/CN2021/111857 2020-09-02 2021-08-10 Performance measurement method, broadcast performance adjustment method, device, and storage medium WO2022048409A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010910702.9A CN112052250A (en) 2020-09-02 2020-09-02 Performance measurement method, broadcast performance adjustment method, device and storage medium
CN202010910702.9 2020-09-02

Publications (1)

Publication Number Publication Date
WO2022048409A1 true WO2022048409A1 (en) 2022-03-10

Family

ID=73608419

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/111857 WO2022048409A1 (en) 2020-09-02 2021-08-10 Performance measurement method, broadcast performance adjustment method, device, and storage medium

Country Status (2)

Country Link
CN (1) CN112052250A (en)
WO (1) WO2022048409A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112052250A (en) * 2020-09-02 2020-12-08 杭州复杂美科技有限公司 Performance measurement method, broadcast performance adjustment method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108667614A (en) * 2018-04-19 2018-10-16 上海分布信息科技有限公司 A kind of Byzantine failure tolerance method and its realize system
EP3388994A1 (en) * 2017-04-12 2018-10-17 Siemens Aktiengesellschaft Method and apparatus for computer-assisted testing of a blockchain
CN110336676A (en) * 2019-07-15 2019-10-15 杭州复杂美科技有限公司 A kind of block chain transaction broadcasting method and system, equipment and storage medium
CN111181803A (en) * 2019-12-16 2020-05-19 杭州复杂美科技有限公司 Block chain performance measurement method, system, equipment and storage medium
CN112052250A (en) * 2020-09-02 2020-12-08 杭州复杂美科技有限公司 Performance measurement method, broadcast performance adjustment method, device and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108491266B (en) * 2018-03-09 2021-11-16 联想(北京)有限公司 Data processing method and device based on block chain and electronic equipment
CN109450659B (en) * 2018-12-25 2020-10-23 杭州复杂美科技有限公司 Block delay broadcasting method, equipment and storage medium
CN110659903B (en) * 2019-09-04 2023-09-05 华东江苏大数据交易中心股份有限公司 Block chain-based data transaction method
CN111355630B (en) * 2020-02-18 2021-07-06 杭州复杂美科技有限公司 Block chain performance quantitative analysis method, system, equipment and storage medium
CN111371801B (en) * 2020-03-13 2022-05-24 杭州复杂美科技有限公司 Block chain node scanning method, equipment and storage medium
CN111464630B (en) * 2020-03-31 2021-07-06 杭州复杂美科技有限公司 Transaction broadcasting method, apparatus and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3388994A1 (en) * 2017-04-12 2018-10-17 Siemens Aktiengesellschaft Method and apparatus for computer-assisted testing of a blockchain
CN108667614A (en) * 2018-04-19 2018-10-16 上海分布信息科技有限公司 A kind of Byzantine failure tolerance method and its realize system
CN110336676A (en) * 2019-07-15 2019-10-15 杭州复杂美科技有限公司 A kind of block chain transaction broadcasting method and system, equipment and storage medium
CN111181803A (en) * 2019-12-16 2020-05-19 杭州复杂美科技有限公司 Block chain performance measurement method, system, equipment and storage medium
CN112052250A (en) * 2020-09-02 2020-12-08 杭州复杂美科技有限公司 Performance measurement method, broadcast performance adjustment method, device and storage medium

Also Published As

Publication number Publication date
CN112052250A (en) 2020-12-08

Similar Documents

Publication Publication Date Title
US9229832B2 (en) Time monitor
US20090157905A1 (en) System and Method for Standardizing Clocks in a Heterogeneous Networked Environment
US7630960B2 (en) Data processing systems and methods for data retrieval
WO2017142647A1 (en) Efficient quantum key management
US10129111B2 (en) Subscription watch lists for event handling
WO2022048409A1 (en) Performance measurement method, broadcast performance adjustment method, device, and storage medium
CN113194146B (en) Leader node determination method, computer device, and storage medium
CN108965951B (en) Advertisement playing method and device
CN111798238A (en) Parallel chain consensus method, device and storage medium
US11360684B2 (en) Data storage method and apparatus, storage medium and computer device
WO2023024827A1 (en) Color space switching method and apparatus, electronic device and readable storage medium
TW202004592A (en) Method and apparatus for correcting transaction causal sequence, and electronic device
US10599629B2 (en) Reduced locking in a distributed data store
CN113703715B (en) Regular expression matching method and device, FPGA and medium
US11704168B2 (en) Templates for mapping data events to API calls
US20140181174A1 (en) Distributed processing of stream data on an event protocol
CN112883041B (en) Data updating method and device, electronic equipment and storage medium
CN111783005B (en) Method, device and system for displaying web page, computer system and medium
US10891292B2 (en) Database management system and database management method
CN112053154B (en) Transaction broadcasting method, apparatus and storage medium
US8825441B2 (en) Information processing apparatus and time measurement method
CN110209851B (en) Model training method and device, electronic equipment and storage medium
CN113436003A (en) Duration determination method, duration determination device, electronic device, medium, and program product
US11609894B2 (en) Data storage system conflict management
US12026141B2 (en) Data storage system conflict management

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21863476

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21863476

Country of ref document: EP

Kind code of ref document: A1