Alliance chain reconciliation method and related device based on authorized payee
By introducing a coalition chain reconciliation method with entitled payees in blockchain technology and performing payee authentication, the problem of low security during blockchain reconciliation processing is solved, and higher transaction security and reliability are achieved.
Patent Information
- Application Number
- CN202411186525.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-08-28
AI Technical Summary
The existing blockchain technology has low security problems when handling accounts, and the attacker may tamper with the statement or the payee, resulting in losses.
The alliance chain reconciliation method based on the entitled payee is adopted, and the entitled payee authentication is performed by treating the payee in the reconciliation bill to ensure that only legal payees can perform reconciliation processing.
Improves security during reconciliation, prevents attackers from tampering with statements or payees, and ensures the reliability and security of transactions.
Smart Images

Figure CN118710272B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a consortium chain reconciliation method and related devices based on authorized payees. Background Art
[0002] With the continuous development of network technology, when goods are transferred, they are increasingly inclined to be processed online. After the goods are transferred, reconciliation processing is required. With the development of blockchain technology, existing solutions include building blockchains based on different manufacturers and buyers, and performing goods transfers and related reconciliations on the blockchain. In existing solutions, due to the characteristics of blockchain, reconciliation information is usually sent directly to the reconciliation node for reconciliation processing. However, if the blockchain is attacked, the attacker tampers with the reconciliation statement or the payee, etc., which will cause losses and reduce security. Summary of the invention
[0003] The embodiment of the present application provides a consortium chain reconciliation method and related device based on authorized payees, which can authenticate the authorized payee according to the payee in the reconciliation bill, and then perform reconciliation processing after successful authentication, thereby improving the security during reconciliation.
[0004] A first aspect of an embodiment of the present application provides a consortium chain reconciliation method based on an authorized payee, which is applied to a target reconciliation node in a consortium chain, wherein the consortium chain includes k reconciliation nodes and multiple consortium nodes, the k reconciliation nodes and the multiple consortium nodes share a transaction ledger and a reconciliation smart contract, the transaction ledger includes transaction data sent by the reconciliation node and the multiple consortium nodes, the target reconciliation node is any one of the multiple reconciliation nodes, and the method includes:
[0005] Receiving reconciliation request information sent by a target alliance node, the reconciliation request information including the to-be-reconciled bill of the target commodity and target identity information of the target alliance node, the target alliance node being any one of the multiple alliance nodes;
[0006] Performing authorized payee authentication on the target alliance node according to the to-be-reconciled bill obtained by parsing the reconciliation request information and the target identity information to obtain an authentication result;
[0007] If the authentication result indicates that the target alliance node is the authorized payee, then extracting the target bill of the corresponding payer for the target commodity from the transaction ledger based on the bill to be reconciled and the reconciliation smart contract;
[0008] Reconciling the to-be-reconciled bill using the target bill to obtain a reconciliation result;
[0009] The reconciliation result is sent to the target alliance node.
[0010] In this example, by receiving reconciliation request information sent by a target alliance node, the reconciliation request information includes the to-be-reconciled bill of the target commodity and the target identity information of the target alliance node, and the target alliance node is any one of the multiple alliance nodes. The target alliance node is authenticated as an authorized payee according to the to-be-reconciled bill and the target identity information obtained by parsing the reconciliation request information to obtain an authentication result. If the authentication result indicates that the target alliance node is an authorized payee, the target bill of the corresponding payer for the target commodity is extracted from the transaction ledger based on the reconciliation smart contract according to the to-be-reconciled bill, and the to-be-reconciled bill is reconciled using the target bill to obtain a reconciliation result, which is sent to the target alliance node. Therefore, the payee in the to-be-reconciled bill can be authenticated as an authorized payee, and the reconciliation process is performed after the authentication is successful, thereby improving the security during reconciliation.
[0011] A second aspect of an embodiment of the present application provides a consortium chain reconciliation device based on an authorized payee, which is applied to a target reconciliation node in a consortium chain, wherein the consortium chain includes k reconciliation nodes and multiple consortium nodes, the k reconciliation nodes and multiple consortium nodes share a transaction ledger and a reconciliation smart contract, the transaction ledger includes transaction data sent by the reconciliation node and multiple consortium nodes, the target reconciliation node is any one of the multiple reconciliation nodes, and the device includes:
[0012] A receiving unit, configured to receive reconciliation request information sent by a target alliance node, wherein the reconciliation request information includes the to-be-reconciled bill of the target commodity and target identity information of the target alliance node, wherein the target alliance node is any one of the multiple alliance nodes;
[0013] an authentication unit, configured to authenticate the target alliance node as an authorized payee according to the to-be-reconciled bill obtained by parsing the reconciliation request information and the target identity information, and obtain an authentication result;
[0014] an extracting unit, configured to extract the target bill of the corresponding payer for the target commodity from the transaction ledger based on the bill to be reconciled and the reconciliation smart contract if the authentication result indicates that the target alliance node is the authorized payee;
[0015] A reconciliation unit, configured to use the target bill to perform reconciliation processing on the bill to be reconciled to obtain a reconciliation result;
[0016] A sending unit is used to send the reconciliation result to the target alliance node.
[0017] A third aspect of an embodiment of the present application provides a server, comprising a processor, an input interface, an output interface and a memory, wherein the processor, input interface, output interface and memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the step instructions in the first aspect of the embodiment of the present application.
[0018] The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in the first aspect of the embodiments of the present application.
[0019] A fifth aspect of the embodiments of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application 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 the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 A flowchart of a consortium chain reconciliation method based on an authorized payee is provided for an embodiment of the present application;
[0022] Figure 2 A schematic diagram of the structure of a server provided in an embodiment of the present application;
[0023] Figure 3 A structural schematic diagram of a consortium chain reconciliation device based on an authorized payee is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, 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 this field without creative work are within the scope of protection of this application.
[0025] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0026] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0027] In order to better understand the alliance chain reconciliation method based on the authorized payee provided in the embodiment of the present application, the alliance chain that applies the alliance chain reconciliation method based on the authorized payee is briefly introduced below. The alliance chain includes k reconciliation nodes and multiple alliance nodes. The reconciliation node is the reconciliation node selected when the alliance chain is constructed. The reconciliation node can be any node in the alliance chain. After selection, the reconciliation node performs subsequent reconciliation functions. Each reconciliation node can perform reconciliation processing. The alliance node can be a node corresponding to multiple manufacturers, or a node corresponding to the buyer. The manufacturer and the buyer are associated with a unique node in the alliance chain. Each alliance node or reconciliation node represents a corresponding manufacturer or buyer. The reconciliation node and the alliance node share the transaction ledger, and the same reconciliation smart contract is used for reconciliation processing. The transaction ledger includes transaction data sent by the reconciliation node and the alliance node, as well as historical transaction data. The alliance node can send a reconciliation request message to any of the k reconciliation nodes. The reconciliation node at this time is the target reconciliation node, which is used to process the subsequent affairs of the received reconciliation request message, such as authentication of the authorized payee, and reconciliation processing after successful authentication. Therefore, the payee in the bill can be authenticated as the authorized payee, and reconciliation processing can be performed after successful authentication, thereby improving the security and reliability of reconciliation.
[0028] See also Figure 1 , Figure 1 The present application embodiment provides a flowchart of a consortium chain reconciliation method based on an authorized payee. Figure 1As shown, the method is applied to a target reconciliation node in a consortium chain, the consortium chain includes k reconciliation nodes and multiple consortium nodes, the k reconciliation nodes and multiple consortium nodes share a transaction ledger and a reconciliation smart contract, the transaction ledger includes the transaction data sent by the reconciliation node and multiple consortium nodes, the target reconciliation node is any one of the multiple reconciliation nodes, and the method includes:
[0029] 101. Receive reconciliation request information sent by a target alliance node, where the reconciliation request information includes the to-be-reconciled bill of the target commodity and target identity information of the target alliance node, and the target alliance node is any one of the multiple alliance nodes.
[0030] The target alliance node is the alliance node that needs to be reconciled among multiple alliance nodes, for example, it can be a manufacturer. It can also be that after selling the target product, the manufacturer needs to collect payment, in which case it also needs to actively reconcile. Only after the reconciliation is correct can the payment be collected. The reconciliation bill includes the target product ID, the target product quantity, the transaction time, etc., to support subsequent reconciliation processing.
[0031] The target identity information of the target alliance node can be the unique identifier of the target alliance node. When the target alliance node is a buyer, the target identity information can be a unified identification code. Of course, the reconciliation request information also includes the block identifier of the target alliance node, which is the block identifier assigned when the buyer joins the alliance chain.
[0032] 102. Perform authorized payee authentication on the target alliance node according to the to-be-reconciled bill obtained by parsing the reconciliation request information and the target identity information to obtain an authentication result.
[0033] The invoice to be reconciled and the target identity information may be extracted from the corresponding fields in the reconciliation request information.
[0034] An authorized payee authentication request message may be generated based on the bill to be reconciled and the target identity information, and the authorized payee authentication request message may be sent to the remaining reconciliation nodes and the remaining alliance nodes (sent to the reconciliation nodes other than the target reconciliation node, and to the alliance nodes other than the target alliance node).
[0035] The remaining alliance nodes and the remaining reconciliation nodes store the information of the current owner of the target product, so that the payee (usually the target alliance node) in the reconciliation bill can be judged according to the current owner information of the target product to determine whether the payee is the current owner, thereby obtaining the judgment result. After obtaining the judgment result, the remaining alliance nodes and the remaining reconciliation nodes send the judgment result to the target reconciliation node in the form of an authorized payee authentication result feedback message. The target reconciliation node performs authorized payee authentication on the target alliance node according to the received authorized payee authentication result feedback message to obtain the authentication result.
[0036] By having the reconciliation node and other alliance nodes in the alliance chain participate in the authorized payee authentication, it is possible to avoid abnormal authentication results due to attacks on the target reconciliation node, thereby improving the reliability and security of authorized payee authentication.
[0037] 103. If the authentication result indicates that the target alliance node is the authorized payee, then the target bill of the corresponding payer for the target commodity is extracted from the transaction ledger based on the bill to be reconciled and the reconciliation smart contract.
[0038] After the target alliance node is determined as the authorized payee, it can be determined that the target alliance node can collect the corresponding amount of the target product. At this point, subsequent reconciliation operations can be performed. The target bill of the target product is stored in the transaction ledger. The target bill includes information with the same format template as the bill to be reconciled. Specifically, it can be understood that the style of the target bill and the bill to be reconciled are the same.
[0039] In a specific example, if the target alliance node is a buyer, it is necessary to extract the corresponding payee's target bill for the target product from the transaction ledger. Therefore, the identification information that needs to be authenticated in the aforementioned embodiment can be the target identity identification information of the payee in the reconciliation bill.
[0040] 104. Use the target bill to perform reconciliation processing on the bill to be reconciled to obtain a reconciliation result.
[0041] Among them, the quantity and corresponding occurrence time of the target goods in the target bill can be extracted, and compared with the quantity and corresponding time of the target goods in the bill to be reconciled. If the two are consistent, the reconciliation result is a successful reconciliation, otherwise, the reconciliation result is a failed reconciliation.
[0042] Specifically, it can be: comparing the first quantity and the corresponding first occurrence time of the target product in the target bill with the second quantity and the corresponding second occurrence time of the target product in the bill to be reconciled; if the first quantity is the same as the second quantity, and the first occurrence time is the same as the second occurrence time, the reconciliation result is a successful reconciliation; if the first quantity is different from the second quantity and / or the first occurrence time is different from the second occurrence time, the reconciliation result is a failed reconciliation.
[0043] After the reconciliation process, if the reconciliation result is a reconciliation failure, the reconciliation failure factor can be extracted and sent to the target alliance node. The reconciliation failure factor can be different in quantity or inconsistent in time, etc.
[0044] 105. Send the reconciliation result to the target alliance node.
[0045] The reconciliation result may be sent to the target alliance node by placing the reconciliation result in a reconciliation result message and sending the reconciliation result message to the target alliance node.
[0046] In this example, by receiving reconciliation request information sent by a target alliance node, the reconciliation request information includes the to-be-reconciled bill of the target commodity and the target identity information of the target alliance node, and the target alliance node is any one of the multiple alliance nodes. The target alliance node is authenticated as an authorized payee according to the to-be-reconciled bill and the target identity information obtained by parsing the reconciliation request information to obtain an authentication result. If the authentication result indicates that the target alliance node is an authorized payee, the target bill of the corresponding payer for the target commodity is extracted from the transaction ledger based on the reconciliation smart contract according to the to-be-reconciled bill, and the to-be-reconciled bill is reconciled using the target bill to obtain a reconciliation result, which is sent to the target alliance node. Therefore, the payee in the to-be-reconciled bill can be authenticated as an authorized payee, and the reconciliation process is performed after the authentication is successful, thereby improving the security during reconciliation.
[0047] In a possible implementation, a method for authenticating the target alliance node as an authorized payee based on the to-be-reconciled bill obtained by parsing the reconciliation request information and the target identity information to obtain an authentication result includes:
[0048] A1. Generate an authorized payee authentication request message according to the to-be-reconciled bill and the target identity information;
[0049] A2. Sending the authorized payee authentication request message to the alliance nodes other than the target alliance node in the alliance chain, and sending the authorized payee authentication request message to the reconciliation nodes other than the target reconciliation node in the alliance chain;
[0050] A3. receiving an authorized payee authentication result feedback message sent by a reconciliation node other than the target reconciliation node in the alliance chain to obtain a first authentication result feedback message set, and receiving an authorized payee authentication result feedback message sent by an alliance node other than the target alliance node in the alliance chain to obtain a second authentication result feedback message set;
[0051] A4. Obtaining a first number of authentication result feedback messages of successful authentication from the first authentication result feedback message set;
[0052] A5. If the first amount is not equal to the first preset amount threshold, the authentication result is that the target alliance node is not the authorized payee;
[0053] A6. If the first amount is equal to the first preset amount threshold, it is determined that the target alliance node is a suspected authorized payee;
[0054] A7. Obtaining a second number of successful authentication result feedback messages from the second authentication result feedback message set;
[0055] A8. If the second amount is less than or equal to the second preset amount threshold, the authentication result is that the target alliance node is not the authorized payee;
[0056] A9. If the first amount is greater than the second preset amount threshold, the target alliance node is changed from a suspected authorized authorizer to an authorized payee.
[0057] Among them, the target identity information and the target commodity identification can be extracted from the bill to be reconciled, and the target identity information can be sent to other reconciliation nodes (reconciliation nodes other than the target reconciliation node in the alliance chain). After receiving the target identity information, other reconciliation nodes authenticate whether it is a legitimate payee, sign the authentication result, and finally return the payee authentication result and the payee authentication result signature to reduce the risk of the payee authentication result being tampered with. Then, after the authentication processing is performed according to the payee authentication result and the payee authentication result signature, if both are successfully authenticated, the target commodity identification is converted to obtain the first largest prime number, and then the first random number, the first largest prime number and the base point of the elliptic curve are used to sign the first payee, and the target commodity identification is signed, and finally the signatures are merged to obtain the target signature information, and the request message is constructed based on the target signature information, so as to obtain the authorized payee authentication request message. In this way, the security of the payee authentication request message can be improved, and at the same time, the content of the sent authentication request message can be guaranteed not to be tampered with.
[0058] The authorized payee authentication request message is sent to a reconciliation node other than the target node. After receiving the authorized payee authentication request message, the reconciliation node performs signature authentication on the target identity information and the target commodity identification according to the target signature information. After the signature authentication is successful, the target identity information, the target commodity identification and the current owner identification corresponding to the stored target commodity identification are compared. If the target identity information is the same as the current owner identification, the authentication result is successful authentication, otherwise, the authentication result is failed authentication. The reconciliation node places the authentication result in the payload field of the authentication result feedback message and sends the authentication result feedback message to the target reconciliation node. Other alliance nodes authenticate the target identity information in the same way as the above reconciliation node to obtain the authentication result. And the authentication result is sent to the target reconciliation node in the same way.
[0059] The first preset quantity threshold may be k-1, that is, if all other reconciliation nodes have determined that the target alliance node indicated by the target identity information is the authorized payee, then the target alliance node can be identified as a suspected authorized payee and further confirmation can be performed. The second preset quantity threshold is 0.9 of the total number of other alliance nodes. That is, only when 90% of the other alliance nodes recognize the target alliance node as the authorized payee can the target alliance node be changed from a suspected authorized payee to an authorized payee. Because there may be some synchronization deviations when synchronizing information, specifically, when reconciling accounts, there are some alliance nodes that have not yet had time to synchronize messages, so that they determine the target alliance node as a non-authorized payee when judging. This is a case of misjudgment. Therefore, setting a second preset quantity threshold can reduce the impact of the above situation on the overall judgment, thereby improving the accuracy of the judgment of the authorized payee.
[0060] In this example, the target alliance node is authenticated as the authorized payee through the strong authentication relationship of other reconciliation nodes. After all other reconciliation nodes consider the target alliance node to be the authorized payee node, it is authenticated again from other alliance nodes in the entire alliance chain. After a second preset number threshold of other alliance nodes consider the target alliance node to be the authorized payee, the target alliance node is determined to be the authorized payee, which can greatly improve the accuracy of the authorized payee authentication.
[0061] In a possible implementation, since the security of the alliance chain itself is subject to certain challenges, the transmitted information can be signed to improve the reliability of information transmission. Specifically, a method for generating an authorized payee authentication request message based on the to-be-reconciled bill and the target identity information includes:
[0062] B1. Sending the target identity information to the reconciliation nodes in the alliance chain other than the target reconciliation node;
[0063] B2. Receive the payee authentication result signature and the payee authentication result sent by the reconciliation node other than the target reconciliation node in the alliance chain;
[0064] B3. If the signature authentication of the payee authentication result is successful and the payee authentication result is a legal payee, the target commodity identifier is converted into a prime number to obtain a first largest prime number, and a first random number is obtained;
[0065] B4. Use the first random number, the first large prime number, and the first base point of the elliptic curve to sign the target identity information to obtain first signature information;
[0066] B5. Combine the first signature information and the public key of the first signature information to obtain first combined signature information;
[0067] B6. Extracting the target commodity ID from the invoice to be reconciled;
[0068] B7, performing signature processing on the target commodity identifier to obtain second combined signature information;
[0069] B8. Perform signature fusion processing on the first combined signature information, the second combined signature information, and the payee authentication result signature sent by the reconciliation node other than the target reconciliation node in the alliance chain to obtain target signature information;
[0070] B9. Construct a request message according to the target signature information to obtain the authorized payee authentication request message.
[0071] The target identity identification information can first be sent to other reconciliation nodes for preliminary payee authentication. The preliminary payee authentication can be: after other reconciliation nodes receive the target identity identification information, they authenticate whether it belongs to the alliance node in the alliance chain. A first block identifier can be generated based on the target identity identification information, and the first block identifier can be searched in the block identifier table stored in the reconciliation node. If the first block identifier is in the block identifier table, it can be determined that the target identity identification information is a legal payee identifier, the target alliance node is a legal payee, and the payee authentication result is successful authentication; if the first block identifier cannot be found in the block identifier table, it is determined that the target identity identification information is an illegal payee identifier, the target alliance node is an illegal payee, and the payee authentication result is failed authentication.
[0072] After determining the payee authentication result, other reconciliation nodes use a signature algorithm to sign the payee authentication result to obtain the payee authentication result signature. The signature algorithm can be an elliptic curve signature algorithm, etc. After the signature is completed, the payee authentication result signature, the payee authentication result and the relevant signature authentication information are sent to the target reconciliation node. The target node performs signature authentication based on the relevant signature authentication information, the payee authentication result and the payee authentication result signature to obtain the signature authentication result, which includes authentication success or authentication failure.
[0073] When the signature authentication is successful and the authentication result is a legal payee, the target alliance node can be ensured to be a legal payee, which facilitates the subsequent authentication of the authorized payee. If the signature authentication fails and / or the authentication result is an illegal payee, there is no need to authenticate the authorized payee in the future, thereby reducing a lot of authentication costs and improving the efficiency of authentication.
[0074] The target product identifier is converted into a prime number to obtain the first largest prime number, which can be converted randomly, that is, a large prime number is randomly generated to correspond to the target product identifier, so as to obtain the first largest prime number. Of course, a preset mapping relationship can also be used to convert the target product identifier into a mapping number to obtain the first largest prime number.
[0075] The target identity information M is signed by the first random number e1, the first large prime number k, and the first base point G. The first signature information obtained can be signed by the method shown in the following formula:
[0076] P1 = G / H(k);
[0077] Q1=e1*G;
[0078] S1=(M||s),s=(H(M)*wmod(n)+e1*Px))*H(k);
[0079] Among them, M is the target identity information, k is the first largest prime number, e1 is the first random number, Q1 is the first public key, P1 is the second public key, G is the first base point, n is the order of the elliptic curve, H (*) is the hash operation, S1 is the first signature information, || is the concatenation operation, mod (*) is the modular operation, Px is the horizontal coordinate of the second public key, w is equal to Py, and Py is the vertical coordinate of the second public key.
[0080] The first combined signature information A1 can be expressed as: A1=(S1, P1, Q1), where P1 is the second public key corresponding to the target product identifier.
[0081] The method for signing the target product identifier to obtain the second combined signature information can be the method for signing the target identity identifier information to obtain the second combined signature information, which will not be repeated here. The second combined signature information A2 can be expressed as: A2 = (S2, P2, Q2, M2), where S2 is the signature information corresponding to the target product identifier, P2 is the second public key corresponding to the target product identifier, and Q2 is the first public key corresponding to the target product identifier.
[0082] The signature of the payee authentication result sent by the reconciliation node other than the target reconciliation node in the alliance chain can be expressed as: B=(B1, B2, ..., Bk-1). Bi=(Ci, Di), Ci is the payee authentication result sent by the reconciliation node, Di is the signature of the payee authentication result, and Bi is the i-th reconciliation node.
[0083] The method of performing signature fusion processing on the first combined signature information, the second combined signature information, and the payee authentication result signature sent by the reconciliation node other than the target reconciliation node in the alliance chain to obtain the target signature information can be represented by the following formula method, specifically:
[0084] Z=(A1||A2||B);
[0085] Among them, Z is the target signature information, A1 is the first combined signature information, A2 is the second combined signature information, and B is the signature of the payee authentication result sent by the reconciliation node in the alliance chain except the target reconciliation node.
[0086] After receiving the signature information, other alliance nodes or other reconciliation nodes can verify the signature information. The verification method can be: extract A1 as the first combination signature information from the target signature information, A1 is the first combination signature information, A2 is the second combination signature information, and B is the payee authentication result signature sent by the reconciliation node other than the target reconciliation node in the alliance chain. Other alliance nodes or reconciliation nodes save B for backup processing, etc., and of course, they can also perform signature authentication again. If the signature authentication is successful, other subsequent authentication processing is performed to improve security.
[0087] Here, other alliance nodes are used as an example. Other alliance nodes extract S1, P1, and Q1 from A1 and calculate the first parameter L using the following formula:
[0088] L=H(M)*G*Pymod(n) / s+Q*Px / s;
[0089] S1= (M||s);
[0090] Wherein, Py is the ordinate of the second public key. If the first parameter L is the same as P1, it indicates that M has not been tampered with. If the first parameter L is different from P1, it indicates that M has been tampered with. If M has not been tampered with, other alliance nodes perform subsequent authentication processing of the authorized payee. If M has been tampered with, an error is returned and no authentication processing is performed. Of course, if M has been tampered with, information extraction can also be performed on M to obtain relevant information in M. For example, the relevant information includes a first identity identifier. It is determined that the first identity identifier matches the identity identifier information already existing in the blockchain. If there is identity identifier information that matches the first identity identifier, the historical behavior information of the node corresponding to the first identity identifier within a preset historical time period is extracted, and the alliance node or reconciliation node corresponding to the first identity identifier is abnormally identified according to the historical behavior information to obtain an abnormal identification result. Among them, the historical behavior information includes the authentication result when the authorized payee is authenticated, and the authentication result includes the number of successful authentications, the number of failed authentications, and the number of unauthenticated times. Historical behavior information may also include offline information of the corresponding alliance node or reconciliation node, the time of the most recent offline, whether any abnormal message was sent, etc.
[0091] Then, it can identify abnormalities based on historical behavior information. If the ratio between the number of successful authentications and the number of failed authentications is less than the preset ratio threshold, the number of unauthenticated times is determined. If there are unauthenticated times, it is determined to be a suspected abnormal node. Then the time and duration of its most recent offline time are determined. If the time of the most recent offline time is less than the preset duration from the current time, and the offline duration is large, or if an abnormal message is sent, the node can be considered an abnormal node. In this way, the node can be identified as an abnormal node and sent to the reconciliation node. If the reconciliation node receives messages from multiple abnormal nodes, it identifies the node as an abnormal node and performs identity verification on the node again. Through the above method, the abnormality can be analyzed and processed after it occurs, and after the node is identified as an abnormal node, the identity of the node can be verified again, thereby improving security.
[0092] The above method can further improve the difficulty of tampering with other parameters in the signature, thereby further improving the reliability and security of signature authentication.
[0093] For the above embodiments, please refer to Figure 2 , Figure 2 A schematic diagram of the structure of a server provided in an embodiment of the present application, such as Figure 2As shown, it includes a processor, an input interface, an output interface and a memory, the processor, the input interface, the output interface and the memory are connected to each other, wherein the memory is used to store a computer program, the computer program includes program instructions, the processor is configured to call the program instructions, and the program includes instructions for executing the following steps;
[0094] Receiving reconciliation request information sent by a target alliance node, the reconciliation request information including the to-be-reconciled bill of the target commodity and target identity information of the target alliance node, the target alliance node being any one of the multiple alliance nodes;
[0095] Performing authorized payee authentication on the target alliance node according to the to-be-reconciled bill obtained by parsing the reconciliation request information and the target identity information to obtain an authentication result;
[0096] If the authentication result indicates that the target alliance node is the authorized payee, then extracting the target bill of the corresponding payer for the target commodity from the transaction ledger based on the bill to be reconciled and the reconciliation smart contract;
[0097] Reconciling the to-be-reconciled bill using the target bill to obtain a reconciliation result;
[0098] The reconciliation result is sent to the target alliance node.
[0099] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that in order to realize the above functions, the terminal includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0100] The embodiment of the present application can divide the terminal into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0101] In line with the above, see Figure 3 , Figure 3 The present invention provides a schematic diagram of a structure of a device for determining a business product. Figure 3 As shown, the target reconciliation node is applied to a consortium chain, the consortium chain includes k reconciliation nodes and multiple consortium nodes, the k reconciliation nodes and multiple consortium nodes share a transaction ledger and a reconciliation smart contract, the transaction ledger includes the transaction data sent by the reconciliation node and multiple consortium nodes, the target reconciliation node is any one of the multiple reconciliation nodes, and the device includes:
[0102] The receiving unit 301 is configured to receive reconciliation request information sent by a target alliance node, wherein the reconciliation request information includes the to-be-reconciled bill of the target commodity and the target identity information of the target alliance node, and the target alliance node is any one of the multiple alliance nodes;
[0103] The authentication unit 302 is used to authenticate the target alliance node as an authorized payee according to the to-be-reconciled bill obtained by parsing the reconciliation request information and the target identity information, and obtain an authentication result;
[0104] The extraction unit 303 is configured to extract the target bill of the corresponding payer for the target commodity from the transaction ledger based on the bill to be reconciled and the reconciliation smart contract if the authentication result indicates that the target alliance node is the authorized payee;
[0105] A reconciliation unit 304, configured to use the target bill to reconcile the bill to be reconciled to obtain a reconciliation result;
[0106] The sending unit 305 is used to send the reconciliation result to the target alliance node.
[0107] In a possible implementation, the authentication unit 302 is specifically configured to:
[0108] Generate an authorized payee authentication request message according to the to-be-reconciled bill and the target identity information;
[0109] Sending the authorized payee authentication request message to the alliance nodes other than the target alliance node in the alliance chain, and sending the authorized payee authentication request message to the reconciliation nodes other than the target reconciliation node in the alliance chain;
[0110] receiving an authorized payee authentication result feedback message sent by a reconciliation node other than the target reconciliation node in the alliance chain to obtain a first authentication result feedback message set, and receiving an authorized payee authentication result feedback message sent by an alliance node other than the target alliance node in the alliance chain to obtain a second authentication result feedback message set;
[0111] Acquire a first number of authentication result feedback messages of successful authentication from the first authentication result feedback message set;
[0112] If the first amount is not equal to the first preset amount threshold, the authentication result is that the target alliance node is not an authorized payee;
[0113] If the first amount is equal to the first preset amount threshold, determining that the target alliance node is a suspected authorized payee;
[0114] Acquire a second number of authentication result feedback messages of successful authentication from the second authentication result feedback message set;
[0115] If the second amount is less than or equal to the second preset amount threshold, the authentication result is that the target alliance node is not an authorized payee;
[0116] If the first amount is greater than the second preset amount threshold, the target alliance node is changed from a suspected authorized authorizer to an authorized payee.
[0117] In a possible implementation, in the aspect of generating the authorized payee authentication request message according to the to-be-reconciled bill and the target identity information, the authentication unit 302 is configured to:
[0118] Sending the target identity information to the reconciliation nodes in the alliance chain other than the target reconciliation node;
[0119] Receiving the payee authentication result signature and the payee authentication result sent by the reconciliation node other than the target reconciliation node in the alliance chain;
[0120] If the signature authentication of the payee authentication result is successful and the payee authentication result is a legal payee, the target commodity identifier is converted into a prime number to obtain a first largest prime number, and a first random number is obtained;
[0121] Using the first random number, the first large prime number, and the first base point of the elliptic curve to sign the target identity information to obtain first signature information;
[0122] Combine the first signature information and the public key of the first signature information to obtain first combined signature information;
[0123] Extracting the target commodity identifier from the to-be-reconciled invoice;
[0124] The target commodity is identified and signed to obtain second combined signature information;
[0125] The first combined signature information, the second combined signature information, and the payee authentication result signature sent by the reconciliation node other than the target reconciliation node in the alliance chain are processed by signature fusion to obtain the target signature information;
[0126] A request message is constructed according to the target signature information to obtain the authorized payee authentication request message.
[0127] In a possible implementation, the reconciliation unit 304 is specifically configured to:
[0128] Compare the first quantity and the corresponding first occurrence time of the target commodity in the target invoice with the second quantity and the corresponding second occurrence time of the target commodity in the invoice to be reconciled;
[0129] If the first amount is the same as the second amount, and the first occurrence time is the same as the second occurrence time, the reconciliation result is successful;
[0130] If the first quantity is different from the second quantity and / or the first occurrence time is different from the second occurrence time, the reconciliation result is reconciliation failure.
[0131] In a possible implementation, after reconciliation processing is performed on the to-be-reconciled bill using the target bill to obtain a reconciliation result, the device is further configured to:
[0132] If the reconciliation result is a reconciliation failure, extracting a reconciliation failure factor;
[0133] The reconciliation failure factor is sent to the target alliance node.
[0134] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the alliance chain reconciliation methods based on authorized payees as recorded in the above method embodiments.
[0135] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program enables a computer to execute part or all of the steps of any one of the alliance chain reconciliation methods based on authorized payees as recorded in the above method embodiments.
[0136] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0137] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0138] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.
[0139] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0140] In addition, the functional units in the various embodiments of the application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software program modules.
[0141] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, 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. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk, etc., and other media that can store program codes.
[0142] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which can include: a flash drive, a read-only memory, a random access memory, a magnetic disk or an optical disk, etc.
[0143] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A consortium chain reconciliation method based on authorized payees, characterized in that: A target reconciliation node applied to a consortium chain, wherein the consortium chain includes k reconciliation nodes and multiple consortium nodes, the k reconciliation nodes and the multiple consortium nodes share a transaction ledger and a reconciliation smart contract, the transaction ledger includes the transaction data sent by the reconciliation node and the multiple consortium nodes, the target reconciliation node is any one of the multiple reconciliation nodes, and the method includes: Receiving reconciliation request information sent by a target alliance node, the reconciliation request information including the to-be-reconciled bill of the target commodity and target identity information of the target alliance node, the target alliance node being any one of the multiple alliance nodes; Performing authorized payee authentication on the target alliance node according to the to-be-reconciled bill obtained by parsing the reconciliation request information and the target identity information to obtain an authentication result; If the authentication result indicates that the target alliance node is the authorized payee, then extracting the target bill of the corresponding payer for the target commodity from the transaction ledger based on the bill to be reconciled and the reconciliation smart contract; Reconciling the to-be-reconciled bill using the target bill to obtain a reconciliation result; Sending the reconciliation result to the target alliance node; The step of authenticating the target alliance node as an authorized payee based on the to-be-reconciled bill obtained by parsing the reconciliation request information and the target identity information to obtain an authentication result includes: Generate an authorized payee authentication request message according to the to-be-reconciled bill and the target identity information; Sending the authorized payee authentication request message to the alliance nodes other than the target alliance node in the alliance chain, and sending the authorized payee authentication request message to the reconciliation nodes other than the target reconciliation node in the alliance chain; receiving an authorized payee authentication result feedback message sent by a reconciliation node other than the target reconciliation node in the alliance chain to obtain a first authentication result feedback message set, and receiving an authorized payee authentication result feedback message sent by an alliance node other than the target alliance node in the alliance chain to obtain a second authentication result feedback message set; Acquire a first number of authentication result feedback messages of successful authentication from the first authentication result feedback message set; If the first amount is not equal to the first preset amount threshold, the authentication result is that the target alliance node is not an authorized payee; If the first amount is equal to the first preset amount threshold, determining that the target alliance node is a suspected authorized payee; Acquire a second number of authentication result feedback messages of successful authentication from the second authentication result feedback message set; If the second amount is less than or equal to the second preset amount threshold, the authentication result is that the target alliance node is not an authorized payee; If the second amount is greater than the second preset amount threshold, the target alliance node is changed from a suspected authorized authorizer to an authorized payee; The step of generating an authorized payee authentication request message according to the to-be-reconciled bill and the target identity information includes: Sending the target identity information to the reconciliation nodes in the alliance chain other than the target reconciliation node; Receiving the payee authentication result signature and the payee authentication result sent by the reconciliation node other than the target reconciliation node in the alliance chain; If the signature authentication of the payee authentication result is successful and the payee authentication result is a legal payee, the target commodity identifier is converted into a prime number to obtain a first largest prime number, and a first random number is obtained; The target identity information is signed using the first random number, the first large prime number, and the first base point of the elliptic curve to obtain first signature information, specifically: the signature is signed using the method shown in the following formula: P = G / H(k); Q=e1*G; S=(M||s),s=(H(M)*wmod(n)+e1*Px))*H(k); Wherein, M is the target identity information, k is the first largest prime number, e1 is the first random number, Q is the first public key, P is the second public key, G is the first base point, n is the order of the elliptic curve, H (*) is the hash operation, S is the first signature information, || is the concatenation operation, mod (*) is the modulus operation, Px is the horizontal coordinate of the second public key, w is equal to Py, and Py is the vertical coordinate of the second public key; Combine the first signature information and the public key of the first signature information to obtain first combined signature information; Extracting the target commodity identifier from the to-be-reconciled invoice; The target commodity is identified and signed to obtain second combined signature information; The first combined signature information, the second combined signature information, and the payee authentication result signature sent by the reconciliation node other than the target reconciliation node in the alliance chain are processed by signature fusion to obtain the target signature information; A request message is constructed according to the target signature information to obtain the authorized payee authentication request message.
2. The alliance chain reconciliation method based on the authorized payee according to claim 1 is characterized in that: The using the target bill to reconcile the bill to be reconciled to obtain a reconciliation result includes: Compare the first quantity and the corresponding first occurrence time of the target commodity in the target invoice with the second quantity and the corresponding second occurrence time of the target commodity in the invoice to be reconciled; If the first amount is the same as the second amount, and the first occurrence time is the same as the second occurrence time, the reconciliation result is successful; If the first quantity is different from the second quantity and / or the first occurrence time is different from the second occurrence time, the reconciliation result is reconciliation failure.
3. The alliance chain reconciliation method based on the authorized payee according to claim 2 is characterized in that: After reconciliation processing is performed on the to-be-reconciled bill using the target bill to obtain a reconciliation result, the method further includes: If the reconciliation result is a reconciliation failure, extracting a reconciliation failure factor; The reconciliation failure factor is sent to the target alliance node.
4. A consortium chain reconciliation device based on authorized payees, characterized in that: A target reconciliation node applied to a consortium chain, wherein the consortium chain includes k reconciliation nodes and multiple consortium nodes, the k reconciliation nodes and multiple consortium nodes share a transaction ledger and a reconciliation smart contract, the transaction ledger includes transaction data sent by the reconciliation node and multiple consortium nodes, the target reconciliation node is any one of the multiple reconciliation nodes, and the device includes: A receiving unit, configured to receive reconciliation request information sent by a target alliance node, wherein the reconciliation request information includes the to-be-reconciled bill of the target commodity and target identity information of the target alliance node, wherein the target alliance node is any one of the multiple alliance nodes; an authentication unit, configured to authenticate the target alliance node as an authorized payee according to the to-be-reconciled bill obtained by parsing the reconciliation request information and the target identity information, and obtain an authentication result; an extracting unit, configured to extract the target bill of the corresponding payer for the target commodity from the transaction ledger based on the bill to be reconciled and the reconciliation smart contract if the authentication result indicates that the target alliance node is the authorized payee; A reconciliation unit, configured to use the target bill to perform reconciliation processing on the bill to be reconciled to obtain a reconciliation result; A sending unit, configured to send the reconciliation result to the target alliance node; The authentication unit is specifically used for: Generate an authorized payee authentication request message according to the to-be-reconciled bill and the target identity information; Sending the authorized payee authentication request message to the alliance nodes other than the target alliance node in the alliance chain, and sending the authorized payee authentication request message to the reconciliation nodes other than the target reconciliation node in the alliance chain; receiving an authorized payee authentication result feedback message sent by a reconciliation node other than the target reconciliation node in the alliance chain to obtain a first authentication result feedback message set, and receiving an authorized payee authentication result feedback message sent by an alliance node other than the target alliance node in the alliance chain to obtain a second authentication result feedback message set; Acquire a first number of authentication result feedback messages of successful authentication from the first authentication result feedback message set; If the first amount is not equal to the first preset amount threshold, the authentication result is that the target alliance node is not an authorized payee; If the first amount is equal to the first preset amount threshold, determining that the target alliance node is a suspected authorized payee; Acquire a second number of authentication result feedback messages of successful authentication from the second authentication result feedback message set; If the second amount is less than or equal to the second preset amount threshold, the authentication result is that the target alliance node is not an authorized payee; If the second amount is greater than the second preset amount threshold, the target alliance node is changed from a suspected authorized authorizer to an authorized payee; In the aspect of generating the authorized payee authentication request message according to the to-be-reconciled bill and the target identity information, the authentication unit is specifically used for: Sending the target identity information to the reconciliation nodes in the alliance chain other than the target reconciliation node; Receiving the payee authentication result signature and the payee authentication result sent by the reconciliation node other than the target reconciliation node in the alliance chain; If the signature authentication of the payee authentication result is successful and the payee authentication result is a legal payee, the target commodity identifier is converted into a prime number to obtain a first largest prime number, and a first random number is obtained; The target identity information is signed using the first random number, the first large prime number, and the first base point of the elliptic curve to obtain first signature information, specifically: the signature is signed using the method shown in the following formula: P = G / H(k); Q=e1*G; S=(M||s),s=(H(M)*wmod(n)+e1*Px))*H(k); Wherein, M is the target identity information, k is the first largest prime number, e1 is the first random number, Q is the first public key, P is the second public key, G is the first base point, n is the order of the elliptic curve, H (*) is the hash operation, S is the first signature information, || is the concatenation operation, mod (*) is the modulus operation, Px is the horizontal coordinate of the second public key, w is equal to Py, and Py is the vertical coordinate of the second public key; Combine the first signature information and the public key of the first signature information to obtain first combined signature information; Extracting the target commodity identifier from the to-be-reconciled invoice; The target commodity is identified and signed to obtain second combined signature information; The first combined signature information, the second combined signature information, and the payee authentication result signature sent by the reconciliation node other than the target reconciliation node in the alliance chain are processed by signature fusion to obtain the target signature information; A request message is constructed according to the target signature information to obtain the authorized payee authentication request message.
5. A server, characterized in that: It includes a processor, an input interface, an output interface and a memory, which are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the alliance chain reconciliation method based on the authorized beneficiary as described in any one of claims 1-3.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor executes the alliance chain reconciliation method based on the authorized payee as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Block chain-based settlement method
CN113554512A
Supply chain account checking method and system based on block chain and storage medium
CN117333184A
Reconciliation and reporting method and device based on authorized payee, medium and equipment
CN117974151A