Information processing method, device, equipment and storage medium based on distributed network
By encrypting and verifying transaction information across distributed network nodes without a central node, the system enhances stability and security, addressing the central node's limitations in existing systems.
Patent Information
- Application Number
- CN202211206088.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2042-09-30
AI Technical Summary
The central node in existing distributed network systems is a performance and security bottleneck, leading to instability and potential information loss or tampering if it fails, affecting the entire system's stability and security.
A distributed network architecture where each network node encrypts transaction information, determines a target node periodically, verifies the encrypted information, and packages it for broadcasting, eliminating the need for a central node and enhancing stability and security.
This approach improves network stability by distributing the processing load and ensures information security through encryption and verification, preventing tampering and maintaining accuracy and efficiency.
Smart Images

Figure CN115529187B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to distributed network technology, and in particular to an information processing method, device, equipment and storage medium based on a distributed network. Background Art
[0002] As transaction processes become more and more complex, information needs to be transmitted between multiple nodes when conducting transactions. For example, transaction information such as customer information and guarantee information can be transmitted between nodes.
[0003] In the prior art, a central node and multiple subsidiary nodes are set in a node network, and distributed interaction is performed based on the architecture of a central node and multiple subsidiary nodes. Each subsidiary node sends transaction information to the central node, and the central node broadcasts the information.
[0004] However, the performance pressure and security of the central node have a great impact on the stable operation of the entire system. If the central node fails, the entire system will be paralyzed and lose service capabilities, resulting in information loss and affecting the security of information processing. Summary of the invention
[0005] The present application provides a distributed network-based information processing method, apparatus, device and storage medium to improve the security of information processing.
[0006] In a first aspect, the present application provides an information processing method based on a distributed network, wherein at least two network nodes are deployed in the distributed network, and the method is applied to an electronic device of the network node, and the method includes:
[0007] Receiving encrypted information broadcasted by each network node; wherein the encrypted information is used to represent information generated by each network node encrypting the transaction information sent by itself;
[0008] According to a preset data packaging cycle, determining a target node from each network node of the distributed network;
[0009] If it is determined that it is the target node, it sends the encrypted information obtained by itself during the data packaging period to the network node that broadcasts the encrypted information, so that the network node that broadcasts the encrypted information verifies the broadcasted encrypted information and feeds back the verification result to the target node;
[0010] If the verification result fed back by each network node that broadcasts the encrypted information is that the verification is passed, the encrypted information that has passed the verification within the data packaging cycle is packaged, and the packaged encrypted information is sent to each network node of the distributed network.
[0011] In a second aspect, the present application provides an information processing device based on a distributed network, wherein at least two network nodes are deployed in the distributed network, and the device is applied to an electronic device of the network node, and the device includes:
[0012] An encrypted information receiving module, used to receive encrypted information broadcast by each network node; wherein the encrypted information is used to represent information generated by each network node by encrypting the transaction information sent by itself;
[0013] A target node determination module, used to determine a target node from each network node of the distributed network according to a preset data packaging period;
[0014] An encrypted information verification module, for sending the encrypted information obtained by itself during the data packaging period to the network node broadcasting the encrypted information if it is determined that it is the target node, so that the network node broadcasting the encrypted information verifies the broadcasted encrypted information and feeds back the verification result to the target node;
[0015] The encrypted information packaging module is used to package the encrypted information that has passed the verification within the data packaging cycle if the verification result fed back by the network nodes that broadcast the encrypted information is verification passed, and send the packaged encrypted information to each network node of the distributed network.
[0016] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0017] The memory stores computer-executable instructions;
[0018] The processor executes the computer-executable instructions stored in the memory to implement the information processing method based on a distributed network as described in the first aspect of the present application.
[0019] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the information processing method based on a distributed network as described in the first aspect of the present application.
[0020] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the information processing method based on a distributed network as described in the first aspect of the present application.
[0021] The present application provides a distributed network-based information processing method, device, equipment and storage medium, which receives encrypted information broadcast by each network node through the network node in the distributed network, and the encrypted information is obtained by each network node encrypting the transaction information to be sent by itself. That is, each network node can encrypt the sent transaction information and broadcast the encrypted information to other network nodes, and can also receive the encrypted information broadcast by each network node. The network node determines a target node at a fixed time, and the target node sends the encrypted information within a period of time to the corresponding network node respectively, and the corresponding network node is the network node that broadcasts the encrypted information to the target node. The network node verifies the corresponding encrypted information. If the verification is passed, the target node packages the encrypted information and broadcasts it to each network node after packaging. The problem of network instability caused by information broadcasting by a preset central node in the prior art is solved. By flexibly determining the target node, the stability of the network during information processing is improved. By encrypting and verifying the information, the security of the information can be ensured, the information can be prevented from being maliciously tampered with during the information transmission process, and the accuracy and efficiency of information processing can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0023] Figure 1 A schematic diagram of a distributed interactive architecture provided in an embodiment of the present application;
[0024] Figure 2 A schematic diagram of a flow chart of an information processing method based on a distributed network provided in an embodiment of the present application;
[0025] Figure 3 A schematic diagram of a flow chart of an information processing method based on a distributed network provided in an embodiment of the present application;
[0026] Figure 4 A structural block diagram of an information processing device based on a distributed network provided in an embodiment of the present application;
[0027] Figure 5 A structural block diagram of an information processing device based on a distributed network provided in an embodiment of the present application;
[0028] Figure 6 A structural block diagram of an electronic device provided in an embodiment of the present application;
[0029] Figure 7 A structural block diagram of an electronic device provided in an embodiment of the present application.
[0030] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0031] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0032] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0033] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0034] In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0035] It should be noted that due to space limitations, this application specification does not list all optional implementation methods. After reading this application specification, those skilled in the art should be able to think that as long as the technical features do not contradict each other, any combination of technical features can constitute an optional implementation method. Each embodiment is described in detail below.
[0036] The distributed interactive architecture can include a central node and multiple subsidiary nodes. With this distributed interactive architecture, information can be transmitted between multiple nodes. For example, transaction information such as customer information and guarantee information can be transmitted. The central node can be used to broadcast and share the transaction information of each subsidiary node. Therefore, the performance pressure and security of the central node have a great impact on the stable operation of the entire system. Once the central node goes down, the entire system will be paralyzed, lose service capabilities, and affect the efficiency of information processing.
[0037] Figure 1 A schematic diagram of a distributed interaction architecture. Figure 1 It includes a central node and multiple subsidiary nodes. The central node is connected to each subsidiary node and can transmit the transaction information of each subsidiary node.
[0038] If a central node fails, it will not only cause the system to crash, but also cause information leakage or tampering, reduce the accuracy of information processing, and affect the user's information security.
[0039] The present application provides a distributed network-based information processing method, device, equipment and storage medium, which are intended to solve the above technical problems in the prior art.
[0040] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0041] Figure 2 This is a flow chart of a distributed network-based information processing method provided in accordance with an embodiment of the present application. At least two network nodes are deployed in the distributed network. The method is applied to electronic devices of the network nodes. The method can be executed by an information processing device based on a distributed network. Figure 2 As shown, the method comprises the following steps:
[0042] S201. Receive encrypted information broadcasted by each network node; wherein the encrypted information is used to represent information generated by each network node by encrypting transaction information sent by itself.
[0043] Exemplarily, a distributed network is constructed by various network nodes involved in a transaction. A network node is a node that sends or receives information during a transaction. Each network node can be represented by an electronic device, and a preset client can be installed in the electronic device to send and receive information. The nodes that interact with information in the distributed network are connected. For example, if transaction information is sent from node A to node B, there is a connection between node A and node B in the distributed network.
[0044] Each network node may receive transaction information. For example, transaction information may include account name, account number, transaction time and amount, etc. Users can enter transaction information through the client to apply for transactions. After receiving the transaction information, the network node on the user side can send the transaction information to the next network node, or process the transaction information and send the processed transaction information to the next network node. The network node link is pre-set during the transaction. The network node link can be used to indicate the node order of information transmission between each network node during the transaction, that is, the next network node of each network node can be determined based on the network node link.
[0045] The first network node that receives the transaction information is determined as the first network node, and the next network node of the first network node is the second network node. After the second network node successfully receives the transaction information or the processed transaction information, the first network node can broadcast the transaction information sent by itself to each network node in the distributed network. The first network node can encrypt the transaction information sent by itself to the second network node to obtain the encrypted information of the transaction information. That is, the encrypted information is the information obtained by each network node encrypting the transaction information sent by itself, and the encrypted information generated by each network node can be different. Each network node broadcasts the encrypted information generated by itself to other network nodes to make the information between each network node consistent. After receiving the transaction information, the second network node processes the transaction information it receives and sends the processed information to its next network node. The next network node of the second network node can be determined as the third network node. After the third network node successfully receives the information, the second network node also encrypts the transaction information sent by itself and broadcasts it to all network nodes. That is, each network node can broadcast encrypted information to other network nodes, and can also receive encrypted information sent by other network nodes. Each network node can also receive transaction information from the previous network node. If the network node is the first network node, the transaction information of the network node is not sent by the previous network node, but is input by the user.
[0046] The network node broadcasts the encrypted information it generates to other network nodes, and the network node itself will also store the generated encrypted information. The network node can receive the encrypted information broadcasted by each network node, and store the received encrypted information in the order in which it is received, thereby determining the transaction process according to the storage order of the encrypted information.
[0047] In this embodiment, the method also includes: receiving transaction information, determining its own next network node based on a preset network node link; sending the transaction information to its own next network node; if feedback information of reception completion is received from the next network node, encrypting the transaction information to obtain encrypted information of the transaction information; broadcasting the encrypted information to each network node of the distributed network.
[0048] Specifically, each network node can send transaction information to its next network node while receiving encrypted information. In this embodiment, the order of steps between each network node receiving encrypted information and sending transaction information is not limited. Each network node receives information sent by the previous network node as its own transaction information. According to the preset network node link, its next network node is determined. Each network node can send the received transaction information to the next network node, or process the received transaction information and send the processed transaction information to the next network node. For example, a preset part of the transaction information can be sent to the next network node. The network node that sends the transaction information can be determined as the current network node.
[0049] After receiving the transaction information, the next network node may provide feedback to the current network node. For example, it may send feedback information of reception completion or transaction completion to the current network node. After receiving the feedback information from the next network node, the current network node encrypts the transaction information, which may be the transaction information sent by itself. In this embodiment, the transaction information received by a network node may be different from the transaction information sent. For example, the transaction information sent is the information processed from the received transaction information. After encrypting the sent transaction information, the current network node obtains the encrypted information corresponding to the sent transaction information, broadcasts the encrypted information to all network nodes in the distributed network, and stores the generated encrypted information itself.
[0050] The beneficial effect of such a setting is that when each network node receives encrypted information broadcast by other network nodes, each network node can also receive transaction information and send the transaction information to the next network node. If the next network node successfully receives or processes the transaction information, the network node can encrypt the transaction information and broadcast the encrypted information, thereby avoiding malicious interception and tampering of transaction information during broadcast, thereby improving the security of information interaction.
[0051] In this embodiment, the transaction information is encrypted to obtain the encrypted information of the transaction information, including: performing hash calculation on at least one transaction information according to a preset hash algorithm to obtain the hash value of each transaction information; sorting the hash values corresponding to each transaction information according to the field arrangement order of the transaction information to obtain a hash string; performing hash calculation on the hash string to obtain the encrypted information corresponding to the transaction information.
[0052] Specifically, when a network node sends a transaction message, it may send multiple transaction messages to the next network node, that is, multiple transaction messages may be sent each time. For example, transaction information such as account name, account number, transaction time and amount may be sent. An encryption algorithm is preset, for example, the encryption algorithm may be a hash algorithm. According to the preset encryption algorithm, each transaction message sent is encrypted. For example, each transaction message may be hashed to obtain a hash value corresponding to each transaction message.
[0053] When a network node sends out transaction information, each piece of transaction information is arranged in order. For example, the field arrangement order of the transaction information can be preset, and the field can represent the name of each transaction information. For example, the preset field arrangement order can be account name, account number, transaction time, and amount. After obtaining the hash value of each transaction information, the hash value of each transaction information is arranged into a string according to the preset field arrangement order to obtain a hash string. For example, taking a 32-bit hash value as an example, four hash values of length 32 are obtained according to the four fields of account name, account number, transaction time, and amount, and a hash string of length 128 is obtained by splicing according to the field order. After obtaining the hash string, the hash string is hashed again to obtain the hash value of the hash string, which is used as the encrypted information corresponding to the transaction information sent by the network node, and the encrypted information is broadcast to each network node.
[0054] The beneficial effect of this arrangement is that encryption is performed according to the hash algorithm, which makes the encryption irreversible and prevents the encrypted information from being cracked. Performing two hash calculations further prevents the encrypted information from being tampered with, effectively improving the security of the information.
[0055] S202: According to a preset data packaging cycle, determine a target node from each network node of the distributed network.
[0056] Exemplarily, a data packaging cycle is pre-set, for example, the data packaging cycle can be five minutes. Every other data packaging cycle, a network node can be determined from each network node of the distributed network as a target node, and the target node can package the encrypted information generated or received during the data packaging cycle.
[0057] The target node determination rule may be pre-set, and the target node may be determined according to the target node determination rule. For example, the target node determination rule may be that each network node serves as a target node in turn. Every other data packaging cycle, each network node may determine whether it is its turn to serve as a target node. If it is not a network node, it does not need to package the encrypted data.
[0058] By determining the target node, there is no need to set up a central node, and the target node is not fixed, which reduces the performance pressure and security impact of the central node on the stable operation of the entire system. It avoids data loss or downtime at the central node, which may cause the entire system to be paralyzed and lose service capabilities, and effectively improves the stability of transactions.
[0059] S203: If it is determined that it is the target node, the encrypted information obtained by itself during the data packaging cycle is sent to the network node that broadcasts the encrypted information, so that the network node that broadcasts the encrypted information verifies the broadcasted encrypted information and feeds back the verification result to the target node.
[0060] For example, if it is a target node, it will send the encrypted information received by itself in the data packaging cycle to the network nodes that broadcast the encrypted information at that time. The encrypted information obtained in the data packaging cycle closest to the current time can be sent to the corresponding network node. Not all network nodes need to receive the encrypted information in the data packaging cycle, and each encrypted information in the data packaging cycle is sent to a corresponding network node.
[0061] The network node that receives the encrypted information sent by the target node is the network node that sends the encrypted information to the target node during the data packaging cycle. For example, the target node is node A, and there are nodes A, B, C, and D in the distributed network. During the data packaging cycle, node A receives the encrypted information broadcast by node B as encrypted information 1, and also receives the encrypted information broadcast by node C as encrypted information 2. When node A sends the encrypted information to the corresponding network node, it sends encrypted information 1 to node B and encrypted information 2 to node C, and does not need to send encrypted information to node D.
[0062] After receiving the encrypted information sent by the target node, each network node obtains the information stored when sending the encrypted information to the target node. The stored information is the information generated by encrypting the transaction information. If there is no data loss or tampering when each network node sends the encrypted information to the target node, the stored information should be consistent with the encrypted information sent by the target node; if there is data loss or tampering when each network node sends the encrypted information to the target node, the stored information is inconsistent with the encrypted information sent by the target node. Therefore, after receiving the encrypted information, each network node can verify the received encrypted information. For example, the received encrypted information can be compared with the corresponding stored information. If the two are consistent, the verification result of the encrypted information is determined to be passed; if the two are inconsistent, the verification result of the encrypted information is determined to be failed. After obtaining the verification result of the encrypted information, each network node can feedback the verification result to the target node.
[0063] S204: If the verification result fed back by the network node receiving each broadcast encrypted information is verification passed, the encrypted information that has passed the verification within the data packaging cycle is packaged, and the packaged encrypted information is sent to each network node of the distributed network.
[0064] Exemplarily, the target node receives the verification results of each network node. If each verification result is verified, it is determined that the encrypted information has not been tampered with during the broadcast, and the transaction information represented by the encrypted information is correct transaction information. The target node can package all the encrypted information that has passed the verification within the data packaging cycle, and send the packaged encrypted information to each network node of the distributed network. All encrypted information within the data packaging cycle includes the encrypted information received from each network node within the data packaging cycle, and may also include the encrypted information generated by the target node itself. After receiving the data packet of the encrypted information, each network node deletes each piece of encrypted information within the data packaging cycle, that is, each network node can replace the encrypted information within the data packaging cycle with a data packet.
[0065] If the verification result is that the verification fails, or there is a network node that does not feedback the verification result within the preset time period after receiving the encrypted information sent by the target node, the encrypted information that fails the verification will be discarded, or the encrypted information corresponding to the verification result that is not fed back will be discarded. The encrypted information that passes the verification will be packaged into a data packet and sent to each network node. After receiving the data packet, each network node discards all encrypted information within the data collection cycle.
[0066] The embodiment of the present application provides an information processing method based on a distributed network, in which the network nodes in the distributed network receive the encrypted information broadcast by each network node, and the encrypted information is obtained by each network node encrypting the transaction information to be sent by itself. That is, each network node can encrypt the transaction information sent and broadcast the encrypted information to other network nodes, and can also receive the encrypted information broadcast by each network node. The network node determines a target node at a fixed time, and the target node sends the encrypted information within a period of time to the corresponding network node respectively, and the corresponding network node is the network node that broadcasts the encrypted information to the target node. The network node verifies the corresponding encrypted information. If the verification is passed, the target node packages the encrypted information and broadcasts it to each network node after packaging. The problem of network instability caused by information broadcasting by a preset central node in the prior art is solved. By flexibly determining the target node, the stability of the network during information processing is improved. By encrypting and verifying the information, the security of the information can be ensured, the information can be prevented from being maliciously tampered with during the information transmission process, and the accuracy and efficiency of information processing can be improved.
[0067] Figure 3 A flow chart of a distributed network-based information processing method provided in an embodiment of the present application is an optional embodiment based on the above-mentioned embodiment.
[0068] In this embodiment, according to a preset data packaging cycle, a target node is determined from each network node of the distributed network, which can be further refined as follows: according to the preset data packaging cycle, the network nodes in the distributed network are voted to determine the number of votes of each network node; according to the number of votes of each network node, based on a preset target node determination rule, a target node is determined from each network node.
[0069] like Figure 3 The method comprises the following steps:
[0070] S301. Receive encrypted information broadcasted by each network node; wherein the encrypted information is used to represent information generated by each network node by encrypting transaction information sent by itself.
[0071] Exemplarily, this step may refer to the above-mentioned step S201 and will not be described in detail.
[0072] S302: Voting is performed on the network nodes in the distributed network according to a preset data packaging cycle to determine the number of votes obtained by each network node.
[0073] For example, the target node can be determined by voting by each network node. Each network node votes once every data packaging rule. Each network node can be preset with an election counter, which is used to count its own votes. Voting rules can be preset, for example, each network node can vote for three network nodes or only one network node at a time.
[0074] In this embodiment, voting on the network nodes in the distributed network includes: selecting a network node from the network nodes of the distributed network according to a preset random selection algorithm, and voting on the selected network node.
[0075] Specifically, a random selection algorithm is pre-set, and each network node selects a network node based on the random selection algorithm and votes for the selected network node. Each network node in the distributed network selects a network node based on the random selection algorithm, and each network node records its own number of votes. For example, there are nodes A, B, C, D, and E in the distributed network. After a data packaging cycle, each network node randomly selects a network node, node A selects node B, node B selects node E, node C selects node B, node D selects node A, and node E selects node B, that is, node A has one vote, node B has three votes, node C has zero votes, node D has zero votes, and node E has one vote.
[0076] The beneficial effect of this setting is that through the random selection algorithm, network nodes can be quickly selected for voting, and the voting efficiency is high. In addition, the random selection algorithm has fewer calculation processes, which greatly saves the overall system resource consumption of the distributed network.
[0077] S303: Determine a target node from the network nodes according to the number of votes obtained by each network node and based on a preset target node determination rule.
[0078] Exemplarily, after obtaining the number of votes of each network node, the target node is determined from each network node, that is, each network node can determine whether it is a target node according to the number of votes. Each network node can share its own number of votes, and sort the number of votes of all network nodes. According to the preset target node determination rule, a target node is selected. For example, the target node determination rule can be to sort the number of votes from large to small, and determine the first network node, that is, the network node with the highest number of votes, as the target node.
[0079] In this embodiment, after determining a target node from each network node of the distributed network according to a preset data packaging cycle, it also includes: if it is determined that itself is not the target node, receiving encrypted information sent by the target node; determining the transaction information corresponding to the encrypted information, and obtaining the pre-stored information generated by encrypting the transaction information; comparing the encrypted information with the information generated by encrypting the transaction information, if the encrypted information is consistent with the information generated by encrypting the transaction information, determining that the verification result of the encrypted information is verified, and feeding back the verification result to the target node.
[0080] Specifically, if it is determined that its own network node is not the target node, then the target node is determined to be another network node, and the target node sends the encrypted information obtained during the data packaging cycle to the network node that broadcasts the encrypted information.
[0081] A network node that is not a target node can receive encrypted information sent by a target node. The encrypted information sent by the target node is the encrypted information broadcasted to the target node. When broadcasting, the network node encrypts the transaction information and broadcasts the encrypted information to each network node.
[0082] After receiving the encrypted information sent by the target node, the information corresponding to the encrypted information is searched. The information corresponding to the encrypted information can be the corresponding transaction information, or it can be the information generated by encrypting the received transaction information before broadcasting the encrypted information. The transaction information and the information generated by the encrypted transaction information can be stored in association. The transaction information corresponding to the encrypted information is determined, and then the information generated by encrypting the transaction information is obtained. The encrypted information sent by the target node and the information generated by encrypting the corresponding transaction information are compared. If the two are consistent, it is determined that the encrypted information has not been destroyed during the broadcast process, and the verification result of the encrypted information is verification passed; if the two are inconsistent, it is determined that the encrypted information has been lost or tampered with during the broadcast process, and the verification result of the encrypted information is verification failed. Regardless of whether the verification result is verification passed or verification failed, the network node that receives the encrypted information sent by the target node can feed back the verification result to the target node.
[0083] The beneficial effect of this setting is that the encrypted information is a string of hash characters. Hash encryption is an irreversible process that can prevent information leakage, and by comparing the character strings, the verification efficiency can be improved. Through the hash information anti-counterfeiting verification technology, the authenticity and accuracy of the information can be ensured, tampering can be prevented, and security can be improved.
[0084] S304: If it is determined that it is the target node, the encrypted information obtained by itself during the data packaging cycle is sent to the network node that broadcasts the encrypted information, so that the network node that broadcasts the encrypted information verifies the broadcasted encrypted information and feeds back the verification result to the target node.
[0085] Exemplarily, this step may refer to the above-mentioned step S203 and will not be described in detail.
[0086] S305: If the verification result fed back by the network node receiving each broadcast encrypted information is verification passed, the encrypted information that has passed the verification within the data packaging cycle is packaged, and the packaged encrypted information is sent to each network node of the distributed network.
[0087] Exemplarily, this step may refer to the above-mentioned step S204 and will not be described in detail.
[0088] The embodiment of the present application provides an information processing method based on a distributed network, in which the network nodes in the distributed network receive the encrypted information broadcast by each network node, and the encrypted information is obtained by each network node encrypting the transaction information to be sent by itself. That is, each network node can encrypt the transaction information sent and broadcast the encrypted information to other network nodes, and can also receive the encrypted information broadcast by each network node. The network node determines a target node at a fixed time, and the target node sends the encrypted information within a period of time to the corresponding network node respectively, and the corresponding network node is the network node that broadcasts the encrypted information to the target node. The network node verifies the corresponding encrypted information. If the verification is passed, the target node packages the encrypted information and broadcasts it to each network node after packaging. The problem of network instability caused by information broadcasting by a preset central node in the prior art is solved. By flexibly determining the target node, the stability of the network during information processing is improved. By encrypting and verifying the information, the security of the information can be ensured, the information can be prevented from being maliciously tampered with during the information transmission process, and the accuracy and efficiency of information processing can be improved.
[0089] Figure 4 The present invention provides a block diagram of a distributed network-based information processing device. For ease of explanation, only the parts related to the present invention are shown. At least two network nodes are deployed in the distributed network. The device is applied to the electronic device of the network node. Figure 4 The device includes: an encrypted information receiving module 401, a target node determining module 402, an encrypted information verifying module 403 and an encrypted information packaging module 404.
[0090] The encrypted information receiving module 401 is used to receive the encrypted information broadcasted by each network node; wherein the encrypted information is used to represent the information generated by each network node by encrypting the transaction information sent by itself;
[0091] The target node determination module 402 is used to determine a target node from each network node of the distributed network according to a preset data packaging period;
[0092] The encryption information verification module 403 is used to send the encryption information obtained by itself during the data packaging period to the network node broadcasting the encryption information if it is determined that it is the target node, so that the network node broadcasting the encryption information verifies the broadcast encryption information and feeds back the verification result to the target node;
[0093] The encrypted information packaging module 404 is used to package the encrypted information that has passed the verification within the data packaging cycle if the verification result fed back by the network nodes that broadcast the encrypted information is verification passed, and send the packaged encrypted information to each network node of the distributed network.
[0094] Figure 5 A structural block diagram of an information processing device based on a distributed network provided in an embodiment of the present application, Figure 4 Based on the embodiment shown, Figure 5 As shown, the target node determination module 402 includes a vote count determination unit 4021 and a target node selection unit 4022 .
[0095] The vote number determination unit 4021 is used to vote the network nodes in the distributed network according to a preset data packaging cycle to determine the number of votes of each network node;
[0096] The target node selection unit 4022 is used to determine a target node from each network node according to the number of votes of each network node and based on a preset target node determination rule.
[0097] In one example, the vote number determination unit 4021 is specifically used to:
[0098] According to a preset random selection algorithm, a network node is selected from each network node of the distributed network, and voting is performed on the selected network node.
[0099] In one example, the device further includes:
[0100] An information receiving module, configured to, after determining a target node from each network node of the distributed network according to a preset data packaging cycle, receive encrypted information sent by the target node if it is determined that the target node itself is not the target node;
[0101] An information determination module, used to determine the transaction information corresponding to the encrypted information, and obtain pre-stored information generated by encrypting the transaction information;
[0102] An information comparison module is used to compare the encrypted information with the information generated by encrypting the transaction information. If the encrypted information is consistent with the information generated by encrypting the transaction information, it is determined that the verification result of the encrypted information is passed, and the verification result is fed back to the target node.
[0103] In one example, the device further includes:
[0104] A node determination module is used to receive transaction information and determine its own next network node according to a preset network node link;
[0105] A transaction information sending module, used to send the transaction information to its next network node;
[0106] An information encryption module, configured to encrypt the transaction information if receiving the feedback information of reception completion sent by the next network node, so as to obtain the encrypted information of the transaction information;
[0107] The encrypted information broadcasting module is used to broadcast the encrypted information to each network node of the distributed network.
[0108] In one example, the information encryption module is specifically used to:
[0109] Performing hash calculation on at least one transaction information according to a preset hash algorithm to obtain a hash value of each transaction information;
[0110] According to the order of the transaction information fields, the hash values corresponding to each transaction information are sorted to obtain a hash string;
[0111] Perform a hash calculation on the hash string to obtain encrypted information corresponding to the transaction information.
[0112] Figure 6 A structural block diagram of an electronic device provided in an embodiment of the present application, such as Figure 6 As shown, the electronic device includes: a memory 61, a processor 62; the memory 61; and a memory for storing instructions executable by the processor 62.
[0113] The processor 62 is configured to execute the method provided in the above embodiment.
[0114] The electronic device further includes a receiver 63 and a transmitter 64. The receiver 63 is used to receive instructions and data sent by other devices, and the transmitter 64 is used to send instructions and data to external devices.
[0115] Figure 7It is a block diagram of an electronic device according to an exemplary embodiment, which device may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, a vehicle, etc.
[0116] Device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .
[0117] The processing component 702 generally controls the overall operation of the device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.
[0118] The memory 704 is configured to store various types of data to support operations on the device 700. Examples of such data include instructions for any application or method operating on the device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0119] The power supply component 706 provides power to the various components of the device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 700.
[0120] The multimedia component 708 includes a screen that provides an output interface between the device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0121] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the device 700 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.
[0122] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0123] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the device 700. For example, the sensor assembly 714 can detect the open / closed state of the device 700, the relative positioning of components, such as the display and keypad of the device 700, and the sensor assembly 714 can also detect the position change of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, the orientation or acceleration / deceleration of the device 700, and the temperature change of the device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0124] The communication component 716 is configured to facilitate wired or wireless communication between the device 700 and other devices. The device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0125] In an exemplary embodiment, the device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0126] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by the processor 720 of the device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0127] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a terminal device, enables the terminal device to execute the above-mentioned terminal device's information processing method based on a distributed network.
[0128] The present application also discloses a computer program product, including a computer program, which implements the method described in this embodiment when executed by a processor.
[0129] Various embodiments of the systems and techniques described above in the present application can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor, which can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0130] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or electronic device.
[0131] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0132] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0133] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data electronic device), or a computing system that includes middleware components (e.g., an application electronic device), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0134] The computer system may include a client and an electronic device. The client and the electronic device are generally far away from each other and usually interact through a communication network. The relationship between the client and the electronic device is generated by computer programs running on corresponding computers and having a client-electronic device relationship with each other. The electronic device may be a cloud electronic device, also known as a cloud computing electronic device or a cloud host, which is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The electronic device may also be an electronic device of a distributed system, or an electronic device combined with a blockchain. It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0135] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0136] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A distributed network-based information processing method, characterized in that: At least two network nodes are deployed in the distributed network, and the method is applied to electronic devices of the network nodes, and the method includes: Receiving encrypted information broadcasted by each network node; wherein the encrypted information is used to represent information generated by each network node encrypting the transaction information sent by itself; According to a preset data packaging cycle, determining a target node from each network node of the distributed network; If it is determined that it is the target node, it sends the encrypted information obtained by itself during the data packaging period to the network node that broadcasts the encrypted information, so that the network node that broadcasts the encrypted information verifies the broadcasted encrypted information and feeds back the verification result to the target node; If it is determined that it is not the target node, then receiving the encrypted information sent by the target node; determining the transaction information corresponding to the encrypted information, and obtaining the pre-stored information generated by encrypting the transaction information; comparing the encrypted information with the information generated by encrypting the transaction information, if the encrypted information and the information generated by encrypting the transaction information are consistent, then determining that the verification result of the encrypted information is passed, and feeding back the verification result to the target node; If the verification result fed back by each network node that broadcasts the encrypted information is that the verification is passed, the encrypted information that has passed the verification within the data packaging cycle is packaged, and the packaged encrypted information is sent to each network node of the distributed network.
2. The method according to claim 1, characterized in that According to a preset data packaging cycle, determining a target node from each network node of the distributed network includes: Voting the network nodes in the distributed network according to a preset data packaging cycle to determine the number of votes for each network node; According to the number of votes of each network node and based on the preset target node determination rule, a target node is determined from each network node.
3. The method according to claim 2, characterized in that Voting on network nodes in the distributed network includes: According to a preset random selection algorithm, a network node is selected from each network node of the distributed network, and voting is performed on the selected network node.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Receive transaction information and determine its next network node based on the preset network node link; Send the transaction information to its next network node; If the feedback information of receiving completion sent by the next network node is received, the transaction information is encrypted to obtain the encrypted information of the transaction information; The encrypted information is broadcasted to each network node of the distributed network.
5. The method according to claim 4, characterized in that The transaction information is encrypted to obtain encrypted information of the transaction information, including: Performing hash calculation on at least one transaction information according to a preset hash algorithm to obtain a hash value of each transaction information; According to the order of the transaction information fields, the hash values corresponding to each transaction information are sorted to obtain a hash string; Perform a hash calculation on the hash string to obtain encrypted information corresponding to the transaction information.
6. An information processing device based on a distributed network, characterized in that: At least two network nodes are deployed in the distributed network, and the device is applied to the electronic device of the network node, and the device includes: An encrypted information receiving module, used to receive encrypted information broadcast by each network node; wherein the encrypted information is used to represent information generated by each network node by encrypting the transaction information sent by itself; A target node determination module, used to determine a target node from each network node of the distributed network according to a preset data packaging period; An encrypted information verification module is used to, if it is determined that it is the target node, send the encrypted information obtained by itself during the data packaging cycle to the network node broadcasting the encrypted information, so that the network node broadcasting the encrypted information can verify the broadcasted encrypted information and feed back the verification result to the target node; if it is determined that it is not the target node, receive the encrypted information sent by the target node; determine the transaction information corresponding to the encrypted information, and obtain the pre-stored information generated by encrypting the transaction information; compare the encrypted information with the information generated by encrypting the transaction information, and if the encrypted information and the information generated by encrypting the transaction information are consistent, determine that the verification result of the encrypted information is passed, and feed back the verification result to the target node; The encrypted information packaging module is used to package the encrypted information that has passed the verification within the data packaging cycle if the verification result fed back by the network nodes that broadcast the encrypted information is verification passed, and send the packaged encrypted information to each network node of the distributed network.
7. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the information processing method based on a distributed network as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the information processing method based on a distributed network as described in any one of claims 1 to 5.
9. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the information processing method based on a distributed network as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Block packaging method based on blockchain transaction and electronic device using the same
US20220198449A1
