Data interaction processing method, block construction node, terminal device and storage medium

By constructing a node relationship diagram and filtering nodes according to the number of node connections and values, optimizing the data interaction combination solves the problems of blockchain data interaction timeliness and conflict handling, reduces the requirements for smart contracts and underlying architecture, and improves data interaction. value.

CN118093613BActive Publication Date: 2024-08-30HANGZHOU JUNLIAN INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410325681.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-21
Publication Date
2024-08-30
Estimated Expiration
2044-03-21

AI Technical Summary

Technical Problem

As the blockchain network expands and the amount of data increases, data interaction combinations become complex. Existing technology cannot effectively handle data interaction combinations with conflicting relationships, resulting in the inability to meet the timeliness requirements of blockchain data interaction and increasing the number of Technical requirements for smart contracts and underlying architecture.

Method used

By setting each data interaction combination to correspond to a node, the conflict relationship between data interaction combinations is visualized through the node connection relationship, a node relationship diagram is constructed, the retained nodes are determined based on the number and value of node connections, and the data interaction combination is optimized and packaged Join the blockchain network in blocks.

Benefits of technology

It achieves the optimization of the value of data interaction while meeting the timeliness of blockchain data interaction, reduces the technical requirements for smart contracts and the underlying architecture of the blockchain, avoids a large number of calculation verifications, and improves the efficiency of data interaction processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118093613B
    Figure CN118093613B
Patent Text Reader

Abstract

The present application is applicable to the field of blockchain technology, and provides a data interaction processing method, a block construction node, a terminal device and a storage medium. The data interaction processing method includes: determining the node connection number of each node according to the node connection relationship in a preset node relationship diagram; each node corresponds to a data interaction combination in the blockchain network system; the data interaction combination includes multiple data to be interacted; each node connection relationship is used to represent the conflict relationship of the data interaction combination; determining the retained nodes according to the node connection number of each node and the value of the corresponding data interaction combination; packaging the data interaction combination corresponding to the retained node into a block, and adding the block to the blockchain network system. Through the above scheme, the value of blockchain data interaction processing is improved, the timeliness requirements of blockchain data interaction are met, and the technical requirements for the underlying architecture of smart contracts and blockchain are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of blockchain technology, and in particular relates to a data interaction processing method, a block construction node, a terminal device and a storage medium. Background Art

[0002] Blockchain is a distributed database technology characterized by decentralized storage and immutability of data, making data interaction more secure, transparent and trustworthy. Blockchain data interaction refers to the process of data transmission and sharing between nodes in the blockchain network. Packaging multiple interactive data forms a data interaction combination. The value of data interaction can be quantified by the degree of impact it can bring to the data interacting parties or the amount of information contained in the data itself.

[0003] However, with the continuous expansion of blockchain networks and the increase in data volume, data interaction combinations become increasingly complex, which may involve multiple on-chain and off-chain data sources, and there may be conflicting relationships between interaction data that cannot be executed simultaneously. At this time, the processing of interaction data in the data interaction combination generally selects some interaction data with higher value for processing, so as to ensure that the data value is maximized within limited processing resources. The current technology generally processes data interaction combinations with conflicting relationships by selecting the optimal multiple interaction data through a large number of simulation calculations. The selected interaction data do not conflict with each other. However, a large number of simulation calculations cannot meet the timeliness of blockchain data interaction on the one hand, and the data processing volume is too large on the other hand, which puts higher requirements on the design of blockchain smart contracts and the configuration of blockchain processing performance. In addition, it will make the underlying architecture of the blockchain too bloated and have many shortcomings. Summary of the invention

[0004] The purpose of this application is to provide a data interaction processing method, a block building node, a terminal device and a storage medium, which can improve the value of blockchain data interaction processing, meet the timeliness requirements of blockchain data interaction, and reduce the technical requirements for the underlying architecture of smart contracts and blockchain.

[0005] A first aspect of an embodiment of the present application provides a data interaction processing method, which is executed by a block construction node, and includes:

[0006] The node connection number of each node is determined according to the node connection relationship in a preset node relationship diagram; each node corresponds to a data interaction combination in the blockchain network system; the data interaction combination includes multiple pieces of data to be interacted; each node connection relationship is used to represent a conflict relationship of the data interaction combination;

[0007] Determine the nodes to be retained based on the number of node connections of each node and the value of the corresponding data interaction combination;

[0008] The data interactions corresponding to the retained nodes are combined and packaged into blocks, and the blocks are added to the blockchain network system.

[0009] In an optional embodiment, determining the retained nodes according to the number of node connections of each node and the value of the corresponding data interaction combination includes:

[0010] Executing a first determining step, the first determining step comprising determining at least one node with the largest number of currently connected nodes according to the number of node connections of each node;

[0011] Executing a second determination step, the second determination step comprising removing a node with the lowest value from the at least one determined node according to the value of the data interaction combination corresponding to each node, and updating the node relationship graph;

[0012] The first determining step and the second determining step are repeatedly performed until all nodes in the updated node relationship graph have no connection relationship, and the retained nodes are output.

[0013] In an optional embodiment, before determining the number of node connections of each node according to the node connection relationship in a preset node relationship graph, the data interaction processing method further includes:

[0014] The node relationship graph is constructed according to the conflict handling relationship and value of each data interaction combination.

[0015] In an optional embodiment, constructing the node relationship graph according to the conflict handling relationship and value of each data interaction combination includes:

[0016] Assign each data interaction combination and corresponding value to a node;

[0017] The nodes corresponding to the data interaction combinations having the conflict handling relationship are connected to form the node relationship graph.

[0018] In an optional embodiment, before determining the number of node connections of each node according to the node connection relationship in a preset node relationship graph, the data interaction processing method further includes:

[0019] Receiving data interaction requests input by multiple users, wherein the data interaction requests include the data interaction combination and a block time range;

[0020] Determine a current list of preliminary interaction requests and a list of currently processed running interaction requests according to the block time range corresponding to each data interaction request;

[0021] For each data interaction request in the preliminary interaction request list, if the current block time reaches the corresponding block time range, the data interaction request is transferred from the preliminary interaction request list to the running interaction request list; wherein each node corresponds to a data interaction combination in the blockchain network system, specifically: each node corresponds to one of the data interaction combinations included in the running interaction request list.

[0022] In an optional embodiment, determining the current list of prepared interaction requests and the list of currently processed running interaction requests according to the block time range corresponding to each data interaction request includes:

[0023] For each data interaction request, if the current block time in the blockchain network system has not yet reached the block time range, the data interaction request is placed in the preliminary interaction request list;

[0024] For each data interaction request, if the current block time in the blockchain network system is within the block time range, the data interaction request is placed in the running interaction request list;

[0025] For each data interaction request, if the current block time in the blockchain network system exceeds the block time range, the data interaction request is abandoned.

[0026] In an optional embodiment, after determining the current preliminary interaction request list and the currently processed running interaction request list according to the block time range corresponding to each data interaction request, the data interaction processing method further includes:

[0027] Each data interaction combination in the preliminary interaction request list and the running interaction request list is simulated and executed to obtain the value of each data interaction combination.

[0028] A second aspect of an embodiment of the present application provides a block construction node, the block construction node comprising:

[0029] A first execution module is used to determine the number of node connections of each node according to the node connection relationship in a preset node relationship graph; each node corresponds to a data interaction combination in the blockchain network system; the data interaction combination includes a plurality of data to be interacted; each node connection relationship is used to represent a conflict relationship of the data interaction combination;

[0030] A second execution module, used for determining the retained nodes according to the number of node connections of each node and the value of the corresponding data interaction combination;

[0031] The third execution module is used to package the data interaction combinations corresponding to the retained nodes into blocks, and add the blocks to the blockchain network system.

[0032] A third aspect of an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the computer program.

[0033] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0034] A fifth aspect of the embodiments of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the method described in the first aspect.

[0035] Beneficial effects of this application

[0036] The present application provides a data interaction processing method, a block construction node, a terminal device and a storage medium. The conflict relationship between each data interaction combination is concretely represented by a node connection relationship and reflected in a node relationship diagram. The conflict relationship between each data interaction combination and other data interaction combinations can be determined by determining the number of node connections of each node. The nodes that need to be retained are then determined in combination with the value of each data interaction combination. This achieves the goal of optimizing the data interaction value to the greatest extent while resolving the data interaction conflict, that is, obtaining a data interaction combination with a better data interaction value. Compared with the prior art, which requires a large number of comparative calculations to obtain a data interaction combination corresponding to a better data interaction value, the data interaction processing method of the present application eliminates a large number of calculations, and at the same time intuitively and effectively improves the blockchain data interaction processing value, meets the timeliness requirements of blockchain data interaction, and at the same time, because it does not involve a large amount of calculation verification, it reduces the technical requirements for the underlying architecture of smart contracts and blockchains. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0038] Figure 1 One of the flowcharts of a data interaction processing method provided in an embodiment of the present application;

[0039] Figure 2 A preset node relationship diagram provided for an embodiment of the present application;

[0040] Figure 3 A second flowchart of a data interaction processing method provided in an embodiment of the present application;

[0041] Figure 4 One of the node relationship diagrams provided in the embodiment of the present application;

[0042] Figure 5 The second node relationship diagram provided for the embodiment of the present application;

[0043] Figure 6 The third node relationship diagram provided for the embodiment of the present application;

[0044] Figure 7 A third flowchart of a data interaction processing method provided in an embodiment of the present application;

[0045] Figure 8 A fourth flowchart of a data interaction processing method provided in an embodiment of the present application;

[0046] Fig. 9 A schematic diagram of the structure of a blockchain construction node provided in an embodiment of the present application;

[0047] Fig.10 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0049] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0050] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0051] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0052] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0053] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0054] It should be understood that the size of the serial numbers of the steps in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0055] With the continuous expansion of blockchain networks and the increase in data volume, data interaction combinations are becoming more and more complex, and there may be conflicts between interaction data that cannot be executed simultaneously. The current technology generally handles data interaction combinations with conflicting relationships by selecting the optimal multiple interaction data through a large number of simulation calculations. The selected interaction data do not conflict with each other. However, a large number of simulation calculations cannot meet the timeliness of blockchain data interaction on the one hand, and the data processing volume is too large on the other hand, which puts higher requirements on the design of blockchain smart contracts and blockchain processing performance configuration. In addition, it will make the underlying architecture of the blockchain too bloated and have many shortcomings.

[0056] In this regard, the present application proposes a data interaction processing method, a block construction node, a terminal device and a storage medium. The inventor has discovered through demonstration that each data interaction combination can be set to correspond to a node, and the conflict relationship between the data interaction combinations can be concretely represented through the node connection relationship. By setting a node screening method and combining the value of each data interaction combination, the nodes with conflicting relationships are eliminated, and finally the nodes that need to be retained are determined. This achieves the goal of optimizing the data interaction value to the greatest extent while resolving data interaction conflicts, and meets the timeliness requirements of blockchain data interaction. At the same time, since it does not involve a large amount of computational verification, the requirements for the underlying architecture of smart contracts and blockchains are reduced.

[0057] The above data interaction processing method is executed by the block building node. It should be noted that the block building node refers to the node in the blockchain network system that is responsible for packaging and verifying the interaction data and generating new blocks. The main functions of the block building node include verifying the validity of the interaction data, ensuring that the data interaction complies with the preset rules and protocols, and then packaging the verified transactions into new blocks, participating in the consensus mechanism of the blockchain network, and adding the blocks to the blockchain network system.

[0058] In order to illustrate the technical solution of the present application, specific embodiments are provided below.

[0059] Figure 1 FIG. 1 shows a flow chart of a data interaction processing method provided in an embodiment of the present application. Figure 1 A data interaction processing method provided in an embodiment of the present application includes the following steps:

[0060] Step S101: Determine the node connection number of each node according to the node connection relationship in the preset node relationship diagram; each node corresponds to a data interaction combination in the blockchain network system; the data interaction combination includes multiple pieces of data to be interacted; each node connection relationship is used to represent the conflict relationship of the data interaction combination;

[0061] Step S102: determining the nodes to be retained according to the number of node connections of each node and the value of the corresponding data interaction combination;

[0062] Step S103: Pack the data interactions corresponding to the retained nodes into blocks, and add the blocks to the blockchain network system.

[0063] It can be seen that in step S101 of this embodiment of the present application, each node is set to correspond to a data interaction combination in the blockchain network system, and each node connection relationship is used to represent the conflict relationship of the data interaction combination. Therefore, by determining the number of node connections of each node in the preset node relationship diagram through step S101, the relationship between the nodes can be clearly understood, and the conflict relationship corresponding to each node can be determined, which provides a basis for subsequent node screening operations. Then, through step S102, the number of node connections and the value of the data interaction combination are combined to screen out nodes that are beneficial to the overall value, and nodes with more complex conflict relationships are eliminated, so as to optimize the efficiency and value of data interaction. Finally, through step S103, the screened and determined data interaction combinations are added to the blocks of the blockchain network to ensure that these data interaction combinations can be securely stored, executed and transmitted, thereby ensuring that data interaction processing is effective.

[0064] It should be noted that there are multiple data interaction combinations in the blockchain network system. A data interaction combination refers to a data combination that needs to be interacted in the blockchain network, including multiple pieces of data to be interacted. For example, there are two parties A and B interacting with each other. A transmits data x to B, and B transmits data y to A. Then a two-way data interaction is completed between A and B. In addition, one-way data interaction can also be carried out. For example, A transmits data x to B, but B does not transmit data. These data may involve information transmission, exchange or sharing between the two parties of data interaction.

[0065] It should be noted that the node relationship diagram is composed of nodes and connecting segments, where each node corresponds to a data interaction combination in the blockchain network system. If there is a conflict relationship between the data interaction combinations corresponding to the nodes, there is a connecting segment between the two nodes, and the connection relationship between the two nodes indicates that there is a conflict relationship.

[0066] It should be noted that the number of node connections refers to the number of connection relationships between each node and other nodes. If there is a conflict relationship between two data interaction combinations, there is a connection relationship between the nodes corresponding to the two data interaction combinations. By determining the number of node connections of a node, the number of nodes that have a conflict relationship with the node can be determined.

[0067] In addition, it should be further explained that the conflict relationship refers to the contradictory or competitive relationship that may exist between data interaction combinations, indicating the mutual exclusion or incompatibility between certain data interaction combinations in the blockchain network. For example, the conflict relationship includes the inability to atomically execute two or more data interaction combinations at the same time.

[0068] The prior art generally processes data interaction combinations with conflicting relationships by selecting the optimal multiple interaction data through a large number of simulation calculations. For example, there are interaction data a1, a2, a3, a4, a5 and a6 in data interaction group A. The prior art calculates the value of a1 to a6 through a large number of simulation verifications combined with empirical data verification, and then provides the most valuable part of a1 to a6 according to the required number of interaction data. For example, among a1 to a6, a2 and a5 have the highest value. At this time, it can be determined through simulation calculations that there is no conflict relationship between a2 and a5, so a2 and a5 are selected for processing. This process consumes a lot of computing power, and the calculation takes too long, which reduces the data processing efficiency of the blockchain. Compared with the prior art, this application meets the timeliness requirements of blockchain data interaction, and at the same time, because it does not involve a large amount of calculation verification, it reduces the requirements for the underlying architecture of smart contracts and blockchains.

[0069] Combine the following Figure 2 The core concept of this application is described in detail. Figure 2 A preset node relationship diagram is shown. Figure 2 Take this as an example to illustrate.

[0070] Reference Figure 2 , there are data interaction combinations A, B, and C, corresponding to nodes 1, node 2, and node 3 respectively, and step S101 is executed. Node 2 is connected to node 1 and node 3 respectively. It can be determined that the number of connections of node 1 is 1, the number of connections of node 2 is 2, and the number of connections of node 3 is 1. Step S102 is executed. Node 2 has the largest number of connections, indicating that it has the largest number of corresponding conflict relationships. Therefore, node 2 is eliminated, and node 1 and node 3 are retained. Step S103 is executed to add the data interaction combinations A and C corresponding to the retained nodes 1 and 3, respectively, to the blocks summarized by the blockchain network system.

[0071] As a possible embodiment, in order to achieve the maximum optimization of data interaction value while resolving data interaction conflicts, it is necessary to effectively determine the nodes that should be retained in the node connection graph. Figure 3 Step S102 may specifically adopt the following steps:

[0072] Step S201: executing a first determination step, wherein the first determination step includes determining at least one node with the largest number of currently connected nodes according to the number of node connections of each node;

[0073] Step S202: executing a second determination step, wherein the second determination step includes removing a node with the lowest value from the at least one node determined according to the value of the data interaction combination corresponding to each node, and updating the node relationship graph;

[0074] Step S203: Repeat the first determining step and the second determining step until all nodes in the updated node relationship graph have no connection relationship, and output the retained nodes.

[0075] Specifically, the first determination step in step S201 includes determining the node with the most connections based on the number of connections of each node. In this way, since each connection relationship of the node represents a conflict relationship, the node with the most node connections represents the node with the most conflicts with other nodes. Then in step S202, the second determination step is executed to find the node with the most node connections and eliminate the node with the lowest value. Finally, the first determination step and the second determination step are repeated to ensure that the node that is finally retained is a node combination with no conflict relationship between nodes and a relatively high node value.

[0076] It should be noted that the value of the data interaction of the present application is a reflection of the degree of influence of the data interaction on each party, or the data value can be reflected by the amount of information contained in the data. For example, in terms of the degree of influence, a sends data x to b, and because b receives data x, the priority and importance of b are significantly improved compared to b without data x. Therefore, the degree of influence can be quantified according to the preset degree of influence. Or, in an embodiment where the data value is a reflection of the amount of information, the amount of information contained in the data x is nMB, and its value is set to n, that is, the amount of information is directly proportional to the value.

[0077] by Figure 4 The node relationship diagram shown is used as an example for explanation.

[0078] Executing step S201 can obtain: Figure 3 There are nodes 1, 2, 3 and 4 in the network. The number of node connections corresponding to node 1 is 1 and the value is 1; the number of node connections corresponding to node 2 is 2 and the value is 2; the number of node connections corresponding to node 3 is 2 and the value is 3; the number of node connections corresponding to node 4 is 1 and the value is 4; nodes 2 and 3 have the most node connections;

[0079] By executing step S202, it can be found that the value of node 2 is lower than that of node 3, so node 2 is removed and the updated node relationship diagram is as follows: Figure 5 As shown;

[0080] Executing step S203 can obtain: Figure 5 There are nodes 1, 3 and 4 in the graph. The node connection number corresponding to node 1 is 0 and the value is 1; the node connection number corresponding to node 3 is 1 and the value is 3; the node connection number corresponding to node 4 is 1 and the value is 4; nodes 3 and 4 have the most node connections, and the value of node 3 is lower than that of node 4, so node 3 is removed and the node relationship diagram is updated as follows: Figure 6 For example. Figure 5 , it can be seen that Figure 5 There is no connection between node 1 and node 4 in , so node 1 and node 4 are retained.

[0081] The above-mentioned embodiments of the present application screen out the retained nodes according to the number of node connections and the value of the data interaction combination, thereby resolving data interaction conflicts and maximizing the data interaction value.

[0082] As a possible embodiment, before executing the above step S101, it is necessary to first construct a node relationship graph to ensure the smooth execution of the subsequent step S101. The corresponding construction steps include:

[0083] The node relationship graph is constructed according to the conflict relationship and value of each data interaction combination.

[0084] Specifically, each node corresponds to a data interaction combination in the blockchain network system. Each data interaction combination can obtain the corresponding value data after evaluation and corresponding calculation. The connection method between the nodes is used to intuitively represent the conflict relationship between the data interaction combinations. Each node is assigned the value of its corresponding data interaction combination, thereby constructing a node relationship diagram.

[0085] In an embodiment that can be implemented in the present application, the node relationship graph is constructed according to the conflict relationship and value of each data interaction combination, and the following operation steps can be specifically adopted:

[0086] Assign each data interaction combination and corresponding value to a node;

[0087] The nodes corresponding to the data interactive combinations with conflicting relationships are connected to form the node relationship graph.

[0088] For example, refer to Figure 4 , there are 4 data interaction combinations A, B, C, D, A's transaction set is {1, 2}, value is 1; B's transaction set is {2, 3}, value is 2; C's transaction set is {3, 4}, value is 3; D's transaction set is {4, 5}, value is 4; assign the 4 data interaction combinations A, B, C, D and their corresponding values ​​to a node respectively, and obtain A corresponding to node 1, B corresponding to node 2, C corresponding to node 3, and D corresponding to node 4; because there is a conflict relationship between A and B, between B and C, and between C and D, node 1 is connected to node 2, node 2 is connected to node 3, and node 3 is connected to node 4, and finally a node relationship graph is formed.

[0089] By establishing the connection relationship between the nodes, the conflict relationship between the nodes can be clearly understood, which is convenient for subsequent data interaction processing.

[0090] Reference Figure 7 In one embodiment that can be implemented in the present application, before determining the number of node connections of each node according to the node relationship graph, the data interaction processing method further includes:

[0091] Step S301: receiving data interaction requests input by multiple users, wherein the data interaction requests include the data interaction combination and the block time range;

[0092] Step S302: determining a current list of preliminary interaction requests and a list of currently processed running interaction requests according to the block time range corresponding to each data interaction request;

[0093] Step S303: For each data interaction request in the preliminary interaction request list, if the current block time reaches the corresponding block time range, the data interaction request is transferred from the preliminary interaction request list to the running interaction request list; wherein each node corresponds to a data interaction combination in the blockchain network system, specifically: each node corresponds to one of the data interaction combinations included in the running interaction request list.

[0094] Specifically, data interaction requests of multiple users are received through step S301, that is, corresponding data interaction combinations and block time ranges are received, so that it is convenient for subsequent operations to classify data according to the block time range; through step S302, the data interaction combinations are classified into a pre-interaction request list and an operation interaction request list according to the pre-received block time range, the pre-interaction request list contains data interaction requests for pre-processing, and the operation interaction request list contains data interaction requests for processing; through step S303, the data interaction requests in the pre-interaction request list are processed, and when the current block time reaches the preset block time range, the corresponding data transaction request is transferred from the pre-interaction request list to the operation interaction request list, so that the data interaction requests input by the user can be effectively managed and executed, and the execution of the requests can be dynamically scheduled according to the block time range, so as to realize the data interaction combination management and the automatic management of scheduling data interaction requests in the blockchain network system.

[0095] Exemplarily, step S301 is executed to receive data interaction requests input by multiple users, and the block construction node provides a data interface to receive the data interaction requests.

[0096] Then, step S302 is executed. After receiving data interaction requests input by multiple users, the block construction node divides the requests into two categories according to the block time range specified by each data interaction request: a preparation interaction request list and a running interaction request list.

[0097] Finally, step S303 is performed to transfer each data interaction request in the preliminary interaction request list from the preliminary interaction request list to the running interaction request list if the current block time reaches the corresponding block time range.

[0098] This embodiment of the present application can effectively manage and execute data interaction requests input by users, dynamically schedule the execution of requests according to the block time range, and realize the automated management of data interaction combination management and scheduling of data interaction requests in the blockchain network system.

[0099] Reference Figure 8 As a possible embodiment, the specific list determination steps include:

[0100] Step S401: For each data interaction request, if the current block time in the blockchain network system has not reached the block time range, the data interaction request is placed in the preliminary interaction request list;

[0101] Step S402: For each data interaction request, if the current block time in the blockchain network system is within the block time range, the data interaction request is placed in the running interaction request list;

[0102] Step S403: For each data interaction request, if the current block time in the blockchain network system exceeds the block time range, the data interaction request is abandoned.

[0103] Exemplarily, the block time range is between the earliest valid time minTimestamp and the latest valid time maxTimestamp, and bundle refers to a data interaction combination. Execute step S401 to determine whether the current block time is between minTimestamp and maxTimestamp. If the current block time is earlier than minTimestamp, put the bundle into the preparation interaction request list prepare_back_bundle until blocks are continuously generated and the current block time is greater than or equal to minTimestamp, then execute step S402 to move the bundle into the running interaction request list running_back_bundle; if the current time is later than maxTimestamp, execute step S403 to abandon the bundle and return the error reason to the user: bundle too late.

[0104] As a possible embodiment, after determining the current preliminary interaction request list and the currently processed running interaction request list, the data interaction processing method of the present application further includes:

[0105] Each data interaction combination in the preliminary interaction request list and the running interaction request list is simulated and executed to obtain the value of each data interaction combination.

[0106] Exemplarily, the block construction node first executes all data interaction combinations in order based on its own data interaction combination sorting algorithm, saves the current blockchain state, and then separately executes all data interaction combinations in the running interaction request list on the current blockchain state to obtain the value of each data interaction combination under the current block execution.

[0107] It should be noted that the value of the data interaction of the present application is a reflection of the degree of influence of the data interaction on each party, or can be reflected by the amount of information contained in the data.

[0108] This embodiment of the present application receives the value of each data interaction combination through a preliminary simulation execution to assist in subsequent node screening operations.

[0109] Fig. 9 A schematic diagram of the structure of a blockchain construction node provided in an embodiment of the present application. For ease of explanation, only the part related to the embodiment of the present application is shown.

[0110] The blockchain construction node can specifically include the following modules:

[0111] The first execution module M1 is used to determine the node connection number of each node according to the node connection relationship in a preset node relationship diagram; each node corresponds to a data interaction combination in the blockchain network system; the data interaction combination includes multiple data to be interacted; each node connection relationship is used to represent the conflict relationship of the data interaction combination;

[0112] A second execution module M2, used to determine the retained nodes according to the number of node connections of each node and the value of the corresponding data interaction combination;

[0113] The third execution module M3 is used to package the data interaction combinations corresponding to the retained nodes into blocks, and add the blocks to the blockchain network system.

[0114] In this embodiment of the present application, the first execution module M1 determines the number of node connections of each node according to the node connection relationship in a preset node relationship diagram, thereby being able to clearly understand the relationship between the nodes. The second execution module M2 combines the number of node connections of each node and the value of the data interaction combination to screen out nodes that are beneficial to the overall system, thereby optimizing the efficiency and value of data interaction. The third execution module M3 adds the screened and determined data interaction combinations to the blocks of the blockchain network to ensure that these data interaction combinations can be securely stored, executed and transmitted, thereby ensuring that data interaction processing is effective.

[0115] The present application uses the first execution module M1, the second execution module M2 and the third execution module M3 to visualize the conflict relationship between each data interaction combination through the node connection relationship, and embodies it in the node relationship diagram. By determining the number of node connections of each node, the conflict relationship between each data interaction combination and other data interaction combinations can be determined, and then the nodes that need to be retained are determined based on the value of each data interaction combination, thereby solving the data interaction conflict while optimizing the data interaction value to the greatest extent.

[0116] Based on the same inventive concept, the second execution module in the embodiment of the present application includes:

[0117] A first determining step execution module, the first determining step execution module is used to determine at least one node with the largest number of current node connections according to the number of node connections of each node;

[0118] a second determination step execution module, the second determination step execution module being used to remove the node with the lowest value from the at least one determined node according to the value of the data interaction combination corresponding to each node, and to update the node relationship graph;

[0119] A repeated execution module is used to repeatedly execute the first determination step and the second determination step until all nodes in the updated node relationship graph have no connection relationship, and output the retained nodes.

[0120] Based on the same inventive concept, the blockchain construction node in the embodiment of the present application also includes:

[0121] A construction module is used to construct the node relationship graph according to the conflict relationship and value of each data interaction combination.

[0122] Based on the same inventive concept, the building blocks in the embodiment of the present application also include:

[0123] A first construction submodule, the first construction submodule is used to assign each data interaction combination and the corresponding value to a node respectively;

[0124] The second construction submodule is used to connect the nodes corresponding to the data interaction combinations with conflict handling relationships to form the node relationship graph.

[0125] Based on the same inventive concept, the blockchain construction node in the embodiment of the present application also includes:

[0126] A receiving module, the receiving module is used to receive data interaction requests input by multiple users, the data interaction requests include the data interaction combination and the block time range;

[0127] A determination module, the determination module is used to determine a current list of preliminary interaction requests and a list of running interaction requests currently being processed according to the block time range corresponding to each data interaction request;

[0128] A judgment module, wherein for each data interaction request in the preliminary interaction request list, if the current block time reaches the corresponding block time range, the judgment module is used to transfer the data interaction request from the preliminary interaction request list to the running interaction request list; wherein each node corresponds to a data interaction combination in the blockchain network system, specifically: each node corresponds to one of the data interaction combinations included in the running interaction request list.

[0129] Based on the same inventive concept, the determination module in the embodiment of the present application includes:

[0130] A classification module, wherein the classification module is used for placing each data interaction request into the prepared interaction request list if the current block time in the blockchain network system has not yet reached the block time range; for placing each data interaction request into the running interaction request list if the current block time in the blockchain network system is within the block time range; and for abandoning each data interaction request if the current block time in the blockchain network system exceeds the block time range.

[0131] Based on the same inventive concept, the blockchain construction node in the embodiment of the present application also includes:

[0132] A simulation execution module is used to simulate the execution of each data interaction combination in the preliminary interaction request list and the running interaction request list to obtain the value of each data interaction combination.

[0133] Fig.10 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. The terminal device E1 includes: at least one processor E2 ( Fig.10 Only one is shown in the figure) a processor, a memory E3, and a computer program E4 stored in the memory E3 and executable on the at least one processor E2, and when the processor E2 executes the computer program E4, the steps in the above method embodiment are implemented.

[0134] The terminal device E1 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor E2 and a memory E3. Those skilled in the art will understand that Fig.10This is only an example of the terminal device E1 and does not constitute a limitation on the terminal device E1. The terminal device E1 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0135] The processor E2 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0136] In some embodiments, the memory E3 may be an internal storage unit of the terminal device E1, such as a hard disk or memory of the terminal device E1. In other embodiments, the memory E3 may also be an external storage device of the terminal device E1, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device E1. Further, the memory E3 may also include both an internal storage unit and an external storage device of the terminal device E1. The memory E3 is used to store an operating system, an application program, a boot loader, data, and other programs, such as the program code of the computer program. The memory E3 may also be used to temporarily store data that has been output or is to be output.

[0137] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0138] In the above embodiments, the description of each embodiment has its own emphasis. If a rated part is not described or recorded in detail in a certain embodiment, reference may be made to the relevant description of other embodiments.

[0139] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0140] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0141] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0142] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0143] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0144] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above units may be implemented in the form of hardware or software.

[0145] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0146] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A data interaction processing method, characterized in that: The data interaction processing method is executed by a block construction node, and the data interaction processing method includes: The node connection number of each node is determined according to the node connection relationship in the preset node relationship diagram; each node corresponds to a data interaction combination in the blockchain network system; the data interaction combination includes multiple pieces of data to be interacted; each node connection relationship is used to represent the conflict relationship of the data interaction combination; Determine the nodes to be retained according to the number of node connections of each node and the value of the corresponding data interaction combination; the value of the data interaction combination is reflected by the amount of information of the data within the data interaction combination; Packing the data interactions corresponding to the reserved nodes into blocks, and adding the blocks to the blockchain network system; Determining the nodes to be retained according to the number of node connections of each node and the value of the corresponding data interaction combination includes: Executing a first determination step, the first determination step comprising determining at least one node with the largest number of current node connections based on the number of node connections of each node; Executing a second determination step, the second determination step comprising removing a node with the lowest value from the at least one determined node according to the value of the data interaction combination corresponding to each node, and updating the node relationship graph; The first determining step and the second determining step are repeatedly performed until all nodes in the updated node relationship graph have no connection relationship, and the retained nodes are output.

2. The data interaction processing method according to claim 1, characterized in that: Before determining the number of node connections of each node according to the node connection relationship in the preset node relationship graph, the data interaction processing method further includes: The node relationship graph is constructed according to the conflict relationship and value of each data interaction combination.

3. The data interaction processing method according to claim 2, characterized in that: The step of constructing the node relationship graph according to the conflict relationship and value of each data interaction combination includes: Assign each data interaction combination and corresponding value to a node; The nodes corresponding to the data interactive combinations with conflicting relationships are connected to form the node relationship graph.

4. The data interaction processing method according to claim 1, characterized in that: Before determining the number of node connections of each node according to the node connection relationship in the preset node relationship graph, the data interaction processing method further includes: Receiving data interaction requests input by multiple users, wherein the data interaction requests include the data interaction combination and a block time range; Determine a current list of preliminary interaction requests and a list of currently processed running interaction requests according to the block time range corresponding to each data interaction request; For each data interaction request in the preliminary interaction request list, if the current block time reaches the corresponding block time range, the data interaction request is transferred from the preliminary interaction request list to the running interaction request list; wherein each node corresponds to a data interaction combination in the blockchain network system, specifically: each node corresponds to one of the data interaction combinations included in the running interaction request list.

5. The data interaction processing method according to claim 4, characterized in that: The determining, according to the block time range corresponding to each data interaction request, a current list of preliminary interaction requests and a list of currently processed running interaction requests comprises: For each data interaction request, if the current block time in the blockchain network system has not yet reached the block time range, the data interaction request is placed in the preliminary interaction request list; For each data interaction request, if the current block time in the blockchain network system is within the block time range, the data interaction request is placed in the running interaction request list; For each data interaction request, if the current block time in the blockchain network system exceeds the block time range, the data interaction request is abandoned.

6. The data interaction processing method according to claim 4, characterized in that: After determining the current preliminary interaction request list and the currently processed running interaction request list according to the block time range corresponding to each data interaction request, the data interaction processing method further includes: Each data interaction combination in the preliminary interaction request list and the running interaction request list is simulated and executed to obtain the value of each data interaction combination.

7. A block construction node, characterized in that: The block construction node includes: A first execution module is used to determine the number of node connections of each node according to the node connection relationship in the preset node relationship diagram; each node corresponds to a data interaction combination in the blockchain network system; the data interaction combination includes multiple pieces of data to be interacted; each node connection relationship is used to represent a conflict relationship of the data interaction combination; A second execution module is used to determine the retained nodes according to the number of node connections of each node and the value of the corresponding data interaction combination; the value of the data interaction combination is reflected by the amount of information of the data inside the data interaction combination; A third execution module is used to package the data interaction combinations corresponding to the reserved nodes into blocks, and add the blocks to the blockchain network system; The second execution module includes: A first determining step execution module, the first determining step execution module is used to determine at least one node with the largest number of current node connections according to the number of node connections of each node; a second determination step execution module, the second determination step execution module being used to remove the node with the lowest value from the at least one determined node according to the value of the data interaction combination corresponding to each node, and to update the node relationship graph; A repeated execution module is used to repeatedly execute the first determination step and the second determination step until all nodes in the updated node relationship graph have no connection relationship, and output the retained nodes.

8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method for grouping multiple transactions and block chain node

    CN114827165A

  • DAG based methods and systems of transaction processing in a distributed ledger

    IN202147001644A