Block chain-based information transmission method and apparatus, and computer device
By using blockchain-based information transmission method in the official card reimbursement process to determine the global trust value and consensus nodes, the possibility of misstatement in the official card reimbursement process in the existing technology is solved, and higher security and accuracy are achieved and costs are reduced.
Patent Information
- Application Number
- CN202311373468.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-23
- Publication Date
- 2025-05-02
AI Technical Summary
There is a possibility of misstatement in the existing official card reimbursement process, resulting in waste of time and labor costs.
The blockchain-based information transmission method is adopted, and by determining the global trust value of each node, selecting consensus nodes and assigning different voting weights, the reliability and security of information instructions are ensured, and the information instructions uploaded by the client are finally written to the blockchain.
It improves the security and accuracy of the official card reimbursement process, reduces the possibility of misstatement, and saves time and labor costs.
Smart Images

Figure CN119921936A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of big data, and in particular to a blockchain-based information transmission method, device and computer equipment. Background Art
[0002] Business card reimbursement refers to the process of reimbursement services for customers who use business cards for official consumption. Currently, business card reimbursement requires customers to submit the required reimbursement materials online or offline, and the corresponding results will be returned after manual review and submission of the reimbursement application.
[0003] On the one hand, the authenticity of the reimbursement materials depends on the integrity of the submitter, and there are doubts as to whether they are consistent with the actual consumption; on the other hand, faced with scenarios where a lot of materials are submitted and the reimbursement is complex, there is the possibility that the reimbursement personnel may make mistakes or omissions but still successfully reimburse. If problems are discovered later, they need to be retrieved and modified, which wastes time and labor costs. Summary of the invention
[0004] In order to solve the problem of the possibility of misreporting in the business card reimbursement process in the above-mentioned prior art, the embodiments of this specification provide a blockchain-based information transmission method, device and computer equipment.
[0005] The embodiments of this specification provide a blockchain-based information transmission method, the method comprising: determining the global trust value of each node according to the direct trust value and recommended trust value of each node on the blockchain; determining the primary node and the secondary node from each node according to the size of the global trust value of each node, wherein the primary node and the secondary node together constitute a consensus node; assigning different voting weights to the primary node and the secondary node in the consensus node, respectively, and determining the sum of the voting scores of all consensus nodes; when the sum of the voting scores is greater than a preset value, writing the information instruction uploaded by the client into the blockchain.
[0006] According to one aspect of the embodiments of the present specification, the direct trust value of each node is obtained in the following manner, including: selecting any node from each node as the first node, and determining the nodes other than the first node in each node as the second node set; obtaining the number of times a node in the second node set transmits messages to the first node and the message score of the first node each time a message is transmitted based on historical transactions; determining the direct trust value of a node in the second node set to the first node based on the number of message transmissions, the message score of the first node each time a message is transmitted, and the transaction impact factor of a node in the second node; according to the above method, sequentially obtaining the direct trust values of other nodes in the second node set to the first node, and integrating the direct trust values of other nodes in the second node set to the first node into the direct trust value of the first node.
[0007] According to one aspect of the embodiments of the present specification, the recommendation trust value of each node is determined in the following manner: based on historical transactions between the recommendation node and the first node, the number of times the first node is satisfied with the recommendation node and the number of times the first node is dissatisfied with the recommendation node are determined, and the recommendation node is a node other than a certain node in the second node; based on the number of satisfactions and the number of dissatisfactions, the recommendation capability of the recommendation node is determined; based on the recommendation capability and the direct trust value of the recommendation node, the recommendation trust value of the first node is determined.
[0008] According to one aspect of the embodiments of this specification, determining the global trust value of each node based on the direct trust value and the recommended trust value of each node on the blockchain includes: determining the global trust value based on the sum of the direct trust value and the weight of the direct trust value, the recommended trust value and the weight of the recommended trust value.
[0009] According to one aspect of an embodiment of this specification, the method includes: determining the recommendation capability of the recommendation node by the following formula:
[0010] Among them, S(i,m) represents the number of times the first node is satisfied with the recommended node in the historical transactions between the recommending node and the first node; F(i,m) represents the number of times the first node is dissatisfied with the recommended node, and H(i,m) represents the recommendation capability value of the recommending node.
[0011] According to one aspect of an embodiment of this specification, when the sum of the voting scores is greater than a preset condition, writing the instructions uploaded by the client into the blockchain includes: when the voting score is greater than 2F+1, writing the instructions uploaded by the client into the blockchain, wherein: Where N is the total number of nodes.
[0012] According to one aspect of an embodiment of the present specification, assigning different voting weights to the master node and the slave node in the consensus node includes: the weight value set for the master node is greater than the weight value set for the slave node.
[0013] According to one aspect of the embodiments of the present specification, after determining the master node and before writing the information instruction uploaded by the client into the blockchain, the method includes: the master node receives the information instruction sent by the client, the information instruction including the reimbursement account information and the reimbursement amount; based on the reimbursement account information recorded in the history of the block, verify whether the reimbursement account information in the information instruction is legal; if so, verify whether the amount that has changed in the block is consistent with the reimbursement amount corresponding to the reimbursement account information; if so, allow the information instruction to be written into the blockchain; if not, prohibit the information instruction from being written into the blockchain.
[0014] The embodiments of this specification also disclose a blockchain-based information transmission device, which includes: a global trust value determination unit, which is used to determine the global trust value of each node on the blockchain according to the direct trust value and recommended trust value of each node; a consensus node determination unit, which is used to determine the main node and the secondary node from each node according to the size of the global trust value of each node, wherein the main node and the secondary node together constitute a consensus node; a voting score determination unit, which is used to assign different voting weights to the main node and the secondary node in the consensus node, respectively, and determine the sum of the voting scores of all consensus nodes; a writing unit, which is used to write the instructions uploaded by the client into the blockchain when the sum of the voting scores is greater than a preset condition.
[0015] The embodiments of the present specification also provide a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the method is implemented when the processor executes the computer program.
[0016] The embodiments of the present specification also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the method is implemented when the computer program is executed by a processor.
[0017] This manual uses blockchain technology in the bank-enterprise business card reimbursement scenario, selects nodes with high global trust values as consensus nodes, eliminates the defect that malicious nodes select low-security nodes to damage the system network, and improves system security. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, 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 this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 The flowchart of a method for information transmission based on blockchain according to an embodiment of this specification is shown;
[0020] Figure 2 The figure is a flow chart of a method for determining the direct trust value of each node according to an embodiment of the present specification;
[0021] Figure 3 The figure is a flow chart of a method for determining a recommended trust value of a first node according to an embodiment of the present specification;
[0022] Figure 4 The figure shows a flow chart of a method for writing information instructions into a blockchain according to an embodiment of the present specification;
[0023] Figure 5 The figure shows a schematic diagram of the structure of a blockchain-based information transmission device according to an embodiment of the present specification;
[0024] Figure 6 The figure shows a specific structural diagram of the information transmission device based on blockchain in the embodiment of this specification;
[0025] Figure 7 The figure shows a schematic diagram of the structure of a computer device according to an embodiment of the present specification.
[0026] Description of the accompanying symbols:
[0027] 501. Global trust value determination unit;
[0028] 5011, direct trust value determination module;
[0029] 5012. Recommended trust value determination module;
[0030] 502. Consensus node determination unit;
[0031] 503. voting score determination unit;
[0032] 504, write unit;
[0033] 702. Computer equipment;
[0034] 704, processor;
[0035] 706. Memory;
[0036] 708, driving mechanism;
[0037] 710, input / output module;
[0038] 712. Input devices;
[0039] 714. Output devices;
[0040] 716. Presentation equipment;
[0041] 718. Graphical user interface;
[0042] 720, network interface;
[0043] 722. Communication link;
[0044] 724. Communication bus. DETAILED DESCRIPTION
[0045] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0046] It should be noted that the terms "first", "second", etc. in the description and claims of this specification and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this specification described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0047] This specification provides method operation steps as described in the embodiments or flow charts, but more or fewer operation steps may be included based on routine or non-creative work. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the system or device product is executed in practice, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel.
[0048] It should be noted that the blockchain-based information transmission method of this specification can be used in the field of big data and in the field of financial technology. This specification does not limit the application field of the blockchain-based information transmission method and device.
[0049] Figure 1 The flowchart of a method for information transmission based on blockchain in an embodiment of this specification is shown, which specifically includes the following steps:
[0050] Step 101, according to the direct trust value and recommended trust value of each node on the blockchain, determine the global trust value of each node. In one aspect of the embodiment of this specification, the blockchain is a distributed shared account book that cannot be changed at will. In the blockchain, data is stored in each block node. Each node has a trust value, and the trust value includes: a direct trust value and a recommended trust value. According to the direct trust value and recommended trust value of each node, the global trust value of each node can be determined. In the embodiment of this specification, there may be no historical interaction between the node (e.g., node A) and other nodes (e.g., node B) whose global trust value is to be determined, so the direct trust value of node A cannot be calculated directly through node B, so it is necessary to calculate the recommended trust value of node A by the recommended node. Further integrate the direct trust value and the recommended trust value to determine the global trust value of node A.
[0051] Specifically, different weights are assigned to the direct trust value and the recommended trust value, respectively. According to the direct trust value and the corresponding weight, the recommended trust value and the corresponding weight, a score is calculated, and the score is the global trust value of the node.
[0052] Step 102, according to the size of the global trust value of each node, determine the main node and the secondary node from each node, wherein the main node and the secondary node together constitute a consensus node.
[0053] The global trust scores of each node calculated in step 101 are arranged in descending order, and a preset trust score threshold is set. Nodes with global trust values lower than the preset trust score threshold are determined as ordinary nodes and do not participate in consensus, but only participate in information synchronization, monitoring, and forwarding information; nodes with global trust values exceeding the preset trust score threshold are determined as consensus nodes to participate in consensus. This can reduce the probability of malicious nodes being selected as consensus nodes and reduce the probability of reaching unreliable and unreasonable consensus due to transmission of incorrect messages.
[0054] In the embodiment of this specification, the master node can be represented by a sequence X, where X={x1, x2, ..., x n}, where x n represents the nth primary node; the secondary node can be represented by a sequence Y, Y = {y1, y2, ..., y n},y n Indicates the nth secondary node.
[0055] Step 103, assign different voting weights to the master node and the slave node in the consensus node, and determine the sum of the voting scores of all consensus nodes. The division of node weights eliminates the defect that malicious nodes select nodes with low security to destroy the system network, improves the security of the consensus system, and grouping can reduce the latency of the consensus algorithm. The consensus algorithm is used to achieve consistency of multi-node data. In the blockchain, no block can modify or delete data information on its own, and new information needs to be synchronized with all blocks.
[0056] Step 104, when the sum of the voting scores is greater than a preset value, the information uploaded by the client is written into the blockchain. In this step, if the sum of the voting scores of all consensus nodes in the blockchain is greater than the preset threshold, it means that the consensus nodes in the blockchain transmit messages reliably and with high security. Therefore, the information uploaded by the client can be written into such a blockchain, and the bank-enterprise interconnection system will further transmit the information to the blockchain system.
[0057] In the embodiments of this specification, data is stored in each block node in the blockchain, and the consensus algorithm is used to achieve consistency of multi-node data. Any block in the blockchain cannot modify or delete data information on its own. The consistency and immutability of the data on the chain can meet the client's business card reimbursement requirements for data traceability, accuracy, and reliability.
[0058] Figure 2 The flowchart of a method for determining the direct trust value of each node in an embodiment of this specification is shown, which specifically includes the following steps:
[0059] Step 201, select any node from among the nodes as the first node, and determine the nodes other than the first node from among the nodes as the second node set. In the embodiment of this specification, any node from among the nodes in the blockchain is determined as the first node, and the other nodes in the blockchain except the first node are the second node set. For example, the first node is node i, and the second node set includes any node j.
[0060] Step 202: According to historical transactions, obtain the number of times a certain node in the second node set transmits messages to the first node and the message score of the first node each time the message is transmitted.
[0061] Specifically, each node evaluates and scores each other based on historical transactions. After a round of consensus, the first node i receives m messages sent by any node j in the second node set. The score of the message sent by any node j in the second node set for the pth time received by the first node i is recorded as S(j,p).
[0062] Step 203, determining the direct trust value of a node of the second node to the first node according to the number of message transmissions, the message score of the first node each time the message is transmitted, and the transaction impact factor of a node in the second node set.
[0063] The direct trust values of the other nodes in the second node set to the first node are integrated into the direct trust value of the first node.
[0064] In some embodiments of the present specification, each time a message is transmitted, the score of the pth message of any node j in the second node set to the first node i is represented by S(j,p), and the transaction impact factor of any node j in the second node set is represented by I f (j, p). The larger the transaction impact factor, the more important the event, and the greater the impact on the trust value of the node. In some embodiments of this specification, if a node is a master node, the transaction impact factor of the node can be 1, and the transaction impact factor of other nodes can be 0.5. This specification does not limit the specific values of the transaction impact factors of different types of nodes.
[0065] After calculating the direct trust value of any node in the second node set to the first node,
[0066] Step 204, according to the above method, the direct trust values of other nodes in the second node set to the first node are obtained in turn, and the direct trust values of other nodes in the second node set to the first node are integrated into the direct trust value of the first node. Specifically, the direct trust values of all nodes to the first node can be averaged, or the direct trust values of all nodes to the first node can be summed up to finally obtain the direct trust value of the first node.
[0067] Figure 3 The flowchart of a method for determining a recommended trust value of a first node in an embodiment of the present specification is shown. In some embodiments of the present specification, the first node obtains the recommended trust value of an arbitrary node in the second node set by calculating the recommended trust value of the arbitrary node by any recommended node in the second node set. Specifically, the steps include:
[0068] Step 301, based on historical transactions between the recommending node and the first node, determine the number of times the first node is satisfied with the recommended node and the number of times the first node is dissatisfied with the recommended node, wherein the recommended node is a node other than a certain node in the second node.
[0069] In one aspect of the embodiments of this specification, the first node i obtains the recommendation trust value of any node j in the second node set, and needs to calculate the trust value of any recommended node to any node j in the second node set. Furthermore, in order to prevent false recommendations from malicious nodes, it is necessary to introduce the recommendation capability of the recommended node. In the embodiments of this specification, the recommended node is recorded as node m, and the recommendation capability H of the recommended node needs to be determined. Therefore, it is necessary to determine in advance the number of times the first node i is satisfied with the recommended node m and the number of times the first node is dissatisfied with the recommended node m based on the historical transactions between the recommended node m and the first node i.
[0070] Step 302: Determine the recommendation capability of the recommendation node according to the number of satisfaction and the number of dissatisfaction. In the embodiment of this specification, the recommendation capability of the recommendation node is determined according to the following formula:
[0071] Among them, S(i,m) represents the number of times the first node i is satisfied with the recommended node m in the historical transactions between the recommended node m and the first node i, F(i,m) represents the number of times the first node i is dissatisfied with the recommended node m, and H(i,m) represents the recommendation ability of the recommending node to the first node i.
[0072] Step 303: Determine the recommendation trust value of the first node according to the recommendation capability and the direct trust value of the recommendation node.
[0073] In this step, the direct trust value of the recommended node m to a node j in the second node set is determined according to the previous step, and the direct trust value of the recommended node is recorded as D(m,j). Further, the recommended trust value of the first node is determined according to the following formula:
[0074] Among them, D(m,j) represents the direct trust value of the recommending node to a certain node j in the second node set, N represents the number of nodes in the second node set, H(i,m) represents the recommendation ability of the recommending node m to the first node i, and R(i,j) represents the recommendation trust value of a certain node j in the second node set to the first node i.
[0075] In some embodiments of the present specification, determining the global trust value of each node on the blockchain based on the direct trust value and the recommended trust value includes: determining the global trust value based on the sum of the direct trust value and the weight of the direct trust value, the recommended trust value and the weight of the recommended trust value.
[0076] Specifically, the global trust value of each node can be determined according to the following formula:
[0077] T i =αD i +βR i, α+β=1, where T is the global trust value, D is the direct trust value, R is the recommended trust value, α is the weight of the global trust value, β is the weight of the recommended trust value, and i is the i-th first node.
[0078] In some embodiments of the present specification, assigning different voting weights to the master node and the slave node in the consensus node includes: the weight value set for the master node is greater than the weight value set for the slave node.
[0079] Specifically, in the above steps, the consensus nodes are divided into a master node X sequence and a secondary node Y sequence, and a voting weight Q is set for each master node in the master node X sequence. x =2, set voting weight Q for each node in the secondary node Y sequence y =1. Different from the traditional PBFT algorithm, where the default node voting weight is 1, this specification defines the sum of the voting weights of all nodes as In this specification, the division of node weights eliminates the defect that malicious nodes select nodes with low security to damage the system network, thereby improving the security of the consensus system. In addition, grouping the main nodes and secondary nodes into different sequences can reduce the delay of the consensus algorithm.
[0080] In some embodiments of this specification, when the sum of the voting scores is greater than a preset condition, writing the instructions uploaded by the client into the blockchain includes: when the voting score is greater than 2F+1, writing the instructions uploaded by the client into the blockchain, wherein: Where N is the total number of nodes. The improved R-PBFT algorithm used in this specification can ensure the correctness and consistency of the data on the chain.
[0081] In combination with the recommendation capability of the recommendation node calculated in step 302, a recommendation capability threshold is set. When the recommendation capability of the recommendation node is less than the threshold, the recommendation trust value of the recommendation node is not adopted. Therefore, there is no need to calculate the recommendation trust value of the recommendation node whose recommendation capability is less than the threshold.
[0082] Figure 4 The flowchart of a method for writing information instructions into a blockchain according to an embodiment of this specification is shown, which specifically includes the following steps:
[0083] Step 401, the master node receives an information instruction sent by the client, the information instruction includes reimbursement account information and reimbursement amount. In this step, the business card reimbursement personnel initiate reimbursement using the information instruction of the bank-enterprise interconnection advanced business card repayment on the client, and the information instruction includes: the information instruction includes reimbursement account information and reimbursement amount. Among them, the reimbursement account information includes: business card number, cardholder name, card account number, transaction date, transaction time, reimbursement amount and other information.
[0084] Step 402: Verify whether the reimbursement account information in the reimbursement instruction is legal based on the reimbursement account information in the historical records in the block. Specifically, the bank-enterprise interconnection system transmits the instruction information to the blockchain system. After the blockchain receives the transaction information related to the business card in the information instruction transmitted by the bank-enterprise interconnection system, it automatically locates the block where the transaction occurred within a specific time and starts the verification process.
[0085] Specifically, first verify whether the CIS, card account number, certificate ID, business card number, and cardholder name of the business card-related transaction information in the information instructions transmitted by the bank-enterprise interconnection system are legal.
[0086] Step 403: If yes, check whether the amount changed in the block is consistent with the reimbursement amount corresponding to the reimbursement account information. If the reimbursement account information in the information instruction is legal, further verify the reimbursement account information with the block identity certificate where the data has changed in the blockchain, and then extract the reimbursement amount and verify the amount of data change in the blockchain to verify whether the amount changed in the blockchain is consistent with the reimbursement amount.
[0087] Step 404: If yes, the information instruction is allowed to be written into the blockchain. When the amount changed in the blockchain is consistent with the reimbursement amount, the information instruction is allowed to be directly written into the blockchain. The output module of the blockchain transmits the above verification result to the bank-enterprise interconnection, and the bank-enterprise interconnection system determines the verification result. If the above verification passes, the verification success information is returned and reimbursement is made.
[0088] Step 405: If not, prohibit writing the information instruction into the blockchain. If the amount changed in the blockchain is inconsistent with the reimbursement amount, prohibit writing the information instruction into the blockchain, output an error message to the client, and no longer reimburse.
[0089] like Figure 5 The figure shows a schematic diagram of the structure of a blockchain-based information transmission device according to an embodiment of the present specification. The figure describes the basic structure of the blockchain-based information transmission device, wherein the functional units and modules can realize information transmission by software, or by using a general chip or a specific chip. The device specifically includes:
[0090] A global trust value determination unit 501, used to determine the global trust value of each node on the blockchain according to the direct trust value and the recommended trust value of each node;
[0091] The consensus node determination unit 502 is used to determine a primary node and a secondary node from each node according to the size of the global trust value of each node, wherein the primary node and the secondary node together constitute a consensus node;
[0092] A voting score determination unit 503 is used to assign different voting weights to the primary node and the secondary node in the consensus node, and determine the sum of the voting scores of all consensus nodes;
[0093] The writing unit 504 is used to write the instruction uploaded by the client into the blockchain when the sum of the voting scores is greater than a preset condition.
[0094] This manual applies blockchain technology to the scenario of bank-enterprise business card reimbursement. On the one hand, it uses the improved R-PBFT algorithm to eliminate the defect of malicious nodes selecting nodes with low security to damage the system network to a certain extent, thereby improving the security of the system; on the other hand, it avoids the loss of money caused by the inconsistency between reimbursement materials and actual consumption, as well as the rework costs caused by errors made by the reimbursement personnel.
[0095] As an example of this specification, please refer to Figure 6 The figure shows a specific structural diagram of the information transmission device based on blockchain in this embodiment.
[0096] As an embodiment of this specification, the global trust value determination unit 501 further includes:
[0097] A direct trust value determination module 5011 is used to determine a first node, a second node set, obtain the number of times a certain node in the second node set transmits a message to the first node, score the message of the first node each time a message is transmitted, and determine a direct trust value of a certain node in the second node set to the first node;
[0098] The recommendation trust value determination module 5012 is used to determine the number of times the first node is satisfied and dissatisfied with the recommended node, and determine the recommendation capability of the recommended node based on the number of times satisfied and dissatisfied.
[0099] like Figure 7As shown, a computer device provided by an embodiment of this specification. The script-based microservice query method described in this specification can be applied to the computer device. The computer device 702 may include one or more processors 704, such as one or more central processing units (CPUs), each of which may implement one or more hardware threads. The computer device 702 may also include any memory 706, which is used to store any kind of information such as code, settings, data, etc. Non-restrictive, for example, the memory 706 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent a fixed or removable component of the computer device 702. In one case, when the processor 704 executes an associated instruction stored in any memory or a combination of memories, the computer device 702 may perform any operation of the associated instruction. The computer device 702 also includes one or more drive mechanisms 708 for interacting with any memory, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.
[0100] The computer device 702 may also include an input / output module 710 (I / O) for receiving various inputs (via input devices 712) and for providing various outputs (via output devices 714). A specific output mechanism may include a presentation device 716 and an associated graphical user interface (GUI) 718. In other embodiments, the input / output module 710 (I / O), the input device 712, and the output device 714 may not be included, and the computer device 702 may be used as a computer device in a network. The computer device 702 may also include one or more network interfaces 720 for exchanging data with other devices via one or more communication links 722. One or more communication buses 724 couple the components described above together.
[0101] The communication link 722 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 722 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.
[0102] Corresponds to Figures 1 to 4 The method in the embodiment of the present specification also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are executed.
[0103] The embodiment of the present specification also provides a computer-readable instruction, wherein when the processor executes the instruction, the program therein causes the processor to execute the following Figures 1 to 4 The method shown.
[0104] It should be understood that in the various embodiments of this specification, the size of the serial numbers of the above-mentioned processes 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 embodiments of this specification.
[0105] It should also be understood that in the embodiments of this specification, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this specification generally indicates that the associated objects before and after are in an "or" relationship.
[0106] 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 in this specification can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. 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 specification.
[0107] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0108] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the 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. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0109] 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 embodiments of this specification.
[0110] In addition, each functional unit in each embodiment of this specification 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 integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0111] If the integrated 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 technical solution of this specification is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0112] Specific embodiments are used in this specification to illustrate the principles and implementation methods of this specification. The description of the above embodiments is only used to help understand the methods and core ideas of this specification. At the same time, for those skilled in the art, according to the ideas of this specification, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on this specification.
Claims
1. A method for information transmission based on blockchain, characterized in that: The method comprises: Determine the global trust value of each node based on the direct trust value and recommended trust value of each node on the blockchain; According to the size of the global trust value of each node, a master node and a slave node are determined from each node, wherein the master node and the slave node together constitute a consensus node; Assigning different voting weights to the primary node and the secondary node in the consensus node respectively, and determining the sum of the voting scores of all consensus nodes; When the sum of the voting scores is greater than a preset value, the information instructions uploaded by the client are written into the blockchain.
2. The information transmission method based on blockchain according to claim 1 is characterized in that: The direct trust value of each node is obtained through the following methods, including: Select any node from among the nodes as the first node, and determine the nodes other than the first node from among the nodes as the second node set; According to historical transactions, obtain the number of times a certain node in the second node set transmits messages to the first node and the message score of the first node each time the message is transmitted; Determine a direct trust value of a node of the second node set to the first node according to the number of message transmissions, the message score of the first node during each message transmission, and the transaction impact factor of a node in the second node set; According to the above method, the direct trust values of other nodes in the second node set to the first node are obtained in sequence, and the direct trust values of other nodes in the second node set to the first node are integrated into the direct trust value of the first node.
3. The information transmission method based on blockchain according to claim 2 is characterized in that: The recommended trust value of each node is determined in the following way; Determine, based on historical transactions between the recommending node and the first node, the number of times the first node is satisfied with the recommending node and the number of times the first node is dissatisfied with the recommending node, wherein the recommending node is a node other than a certain node among the second nodes; Determining the recommendation capability of the recommendation node according to the number of satisfactions and the number of dissatisfactions; The recommendation trust value of the first node is determined according to the recommendation capability and the direct trust value of the recommending node to the first node.
4. The information transmission method based on blockchain according to claim 3 is characterized in that: Determining the global trust value of each node based on the direct trust value and recommended trust value of each node on the blockchain includes: The global trust value is determined according to the sum of the direct trust value and the weight of the direct trust value, the recommended trust value and the weight of the recommended trust value.
5. The information transmission method based on blockchain according to claim 3 is characterized in that: The method comprises: The recommendation capability of the recommended node is determined by the following formula: Among them, S(i,m) represents the number of times the first node is satisfied with the recommended node in the historical transactions between the recommending node and the first node; F(i,m) represents the number of times the first node is dissatisfied with the recommended node, and H(i,m) represents the recommendation capability value of the recommending node.
6. The information transmission method based on blockchain according to claim 1 is characterized in that: When the sum of the voting scores is greater than a preset condition, writing the instructions uploaded by the client into the blockchain includes: When the voting score is greater than 2F+1, the instructions uploaded by the client are written into the blockchain, where: Where N is the total number of nodes.
7. The information transmission method based on blockchain according to claim 6 is characterized in that: Different voting weights are assigned to the master node and the secondary node in the consensus node, including: The weight value set for the primary node is greater than the weight value set for the secondary node.
8. The information transmission method based on blockchain according to claim 1 is characterized in that: After determining the master node and before writing the information instructions uploaded by the client into the blockchain, the method includes: The master node receives an information instruction sent by the client, wherein the information instruction includes reimbursement account information and reimbursement amount; Verify whether the reimbursement account information in the information instruction is legal based on the reimbursement account information recorded in the historical records of the block; If so, check whether the changed amount in the block is consistent with the reimbursement amount corresponding to the reimbursement account information; If so, the information instruction is allowed to be written into the blockchain; If not, it is prohibited to write information instructions into the blockchain.
9. An information transmission device based on blockchain, characterized in that: The device comprises: A global trust value determination unit, used to determine the global trust value of each node on the blockchain according to the direct trust value and recommended trust value of each node; A consensus node determination unit, used to determine a primary node and a secondary node from each node according to the size of the global trust value of each node, wherein the primary node and the secondary node together constitute a consensus node; A voting score determination unit is used to assign different voting weights to the primary node and the secondary node in the consensus node, and determine the sum of the voting scores of all consensus nodes; The writing unit is used to write the instructions uploaded by the client into the blockchain when the sum of the voting scores is greater than a preset condition.
10. A computer 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 8 is implemented.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.