Resource exchange processing method, device, equipment and storage medium
Through the use of public blockchain networks to generate and store resource authorization vouchers in the federal study, the problem of not supporting resource credible exchange in existing technologies has been solved, and the effect of reducing cooperation and coordination and improving processing efficiency is achieved.
Patent Information
- Application Number
- CN202110290804.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-18
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2041-03-18
AI Technical Summary
The existing federal learning does not support trusted exchanges of resources by participants, resulting in the inability to reduce cooperation and coordination costs and improve processing efficiency.
By receiving the request message of the initiator of the resource, generate the logo of the target resource authorization voucher, and store it in the public blockchain network to ensure that the voucher cannot be tampered with and traceable resource.
The resource credit exchange has been realized, the coordination cost of cooperation is reduced, and the efficiency of processing is improved. The participants participating in the federal learning are trusted to exchange resource exchange.
Smart Images

Figure CN112989380B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a resource exchange processing method, device, equipment and storage medium. Background Art
[0002] Federated learning is a joint machine learning task performed by multiple parties, in which one or some of the parties hope to exchange some non-core data resources, such as logs, indicators, etc., so as to reduce the cost of cooperation and coordination and improve the efficiency of cooperation.
[0003] However, the current federated learning is a process in which all participants jointly model and implement encrypted sample alignment, encrypted model training, and effect incentives. In order to ensure the resource security of all participants, it does not support the trusted exchange of resources among all participants in federated learning, and thus cannot reduce the cost of cooperation and coordination and improve processing efficiency. Summary of the invention
[0004] The main purpose of the present invention is to provide a resource exchange processing method, device, equipment and storage medium, aiming to solve the problem that the existing federated learning does not support the various participants in the federated learning to conduct trusted resource exchange, thereby failing to reduce the cost of cooperation and coordination and improve processing efficiency.
[0005] To achieve the above object, the present invention provides a resource exchange processing method, comprising:
[0006] receiving a request message indicating that a resource initiator applies to use resources provided by a resource provider, and sending the request message to the resource provider;
[0007] If the resource authorization information sent by the resource provider is received, a target resource authorization credential identifier is generated according to the resource authorization information;
[0008] The target resource authorization credential identifier is stored in the public blockchain network, and the resource initiator is notified of the successful authorization and the credential content corresponding to the target resource authorization credential identifier is sent to the resource initiator;
[0009] The received credential content to be verified sent by the resource initiator is verified according to the target resource authorization credential identifier and the credential content corresponding to the target resource authorization credential identifier. If the verification is successful, the resource initiator is allowed to use the resources provided by the resource provider.
[0010] In a possible implementation, generating a target resource authorization credential identifier according to the resource authorization information includes:
[0011] If the request message is sent by the resource initiator through at least one third party, generating credential content corresponding to each third party according to the resource authorization information, and storing the credential content;
[0012] Generate, according to the credential content corresponding to each of the third parties, a credential identifier corresponding to each of the third parties and a first nested credential identifier corresponding to the at least one third party, and store the credential identifier corresponding to each of the third parties in the public blockchain network;
[0013] A target resource authorization credential identifier is generated according to the first nested credential identifier and the resource authorization information corresponding to the resource initiator.
[0014] In a possible implementation, the generating of the credential identifiers corresponding to the respective third parties and the first nested credential identifier corresponding to the at least one third party includes:
[0015] According to the credential content, traverse the at least one third party in the reverse order of the request message sent by the at least one third party, and for each traversed third party, perform the following steps:
[0016] Generate a credential identifier corresponding to the third party according to the credential content corresponding to the third party, and store the credential identifier corresponding to the third party in the public blockchain network;
[0017] Generate a nested credential identifier corresponding to the current third party by using the credential identifier corresponding to the current third party and the credential identifier corresponding to the previous third party;
[0018] Among them, the nested credential identifier corresponding to the third party that is the last in the reverse order is the first nested credential identifier.
[0019] In a possible implementation, storing the target resource authorization credential identifier in a public blockchain network includes:
[0020] Writing the target resource authorization credential identifier into the resource provider blockchain node in the public blockchain network, and synchronously storing it in other nodes of the public blockchain network;
[0021] After the public blockchain network confirms that the synchronization is successful, a message indicating successful authorization is received from the blockchain node of the resource provider and the message indicating successful authorization is sent to the resource provider.
[0022] In a possible implementation, the verifying the to-be-verified credential identifier sent by the resource initiator according to the target resource authorization credential identifier and the credential content corresponding to the target resource authorization credential identifier includes:
[0023] Obtaining the target resource authorization credential identifier from the public blockchain network;
[0024] The credential identifier to be verified is verified according to the stored credential content corresponding to the target resource authorization credential identifier and the target resource authorization credential identifier.
[0025] In a possible implementation, the target resource authorization credential identifier includes a resource identifier field, an authorized site field, and an effective date field, and the credential content corresponding to the target resource authorization credential identifier includes the identity information of the resource initiator;
[0026] The verifying the credential content to be verified according to the stored credential content corresponding to the target resource authorization credential identifier and the target resource authorization credential identifier includes:
[0027] Verifying the identity information in the to-be-verified credential content according to the identity information of the resource initiator in the credential content corresponding to the target resource authorization credential identifier;
[0028] If they are consistent, it is determined that the identity verification is successful, and a hash calculation is performed on the content of the credential to be verified to generate a credential identifier to be verified, and the credential identifier to be verified is verified according to the target resource authorization credential identifier;
[0029] If the verification is successful, the content represented by each field in the credential identifier to be verified is verified.
[0030] In a possible implementation, verifying the content represented by each field in the to-be-verified credential identifier includes:
[0031] Matching the content represented by each field in the target resource authorization credential identifier with the content represented by each field in the credential identifier to be verified;
[0032] If the match is successful, it is determined that the resource authority verification corresponding to the resource initiator is successful, so as to allow the resource initiator to use the resources provided by the resource provider.
[0033] The present invention also provides a resource exchange processing device, the device comprising:
[0034] A receiving module, used to receive a request message indicating that a resource initiator applies to use resources provided by a resource provider, and send the request message to the resource provider;
[0035] A first processing module is used to generate a target resource authorization credential identifier according to the resource authorization information when receiving the resource authorization information sent by the resource provider;
[0036] A second processing module is used to store the target resource authorization credential identifier in the public blockchain network, notify the resource initiator of the successful authorization, and send the credential content corresponding to the target resource authorization credential identifier to the resource initiator;
[0037] The third processing module is used to verify the credential content to be verified sent by the resource initiator according to the target resource authorization credential identifier and the credential content corresponding to the target resource authorization credential identifier. If the verification is successful, the resource initiator is allowed to use the resources provided by the resource provider.
[0038] The present invention also provides a resource exchange processing device, which includes: a memory, a processor, and a resource exchange processing program stored in the memory and executable on the processor, wherein the resource exchange processing program implements the steps of the resource exchange processing method as described in any one of the above items when executed by the processor.
[0039] The present invention also provides a computer-readable storage medium, on which a resource exchange processing program is stored. When the resource exchange processing program is executed by a processor, the steps of the resource exchange processing method as described in any one of the above items are implemented.
[0040] The present invention also provides a computer program product, comprising a computer program, which implements the steps of any of the resource exchange processing methods described above when executed by a processor.
[0041] In the present invention, firstly, a request message for indicating that a resource initiator applies to use resources provided by a resource provider is received, and the request message is sent to the resource provider; if resource authorization information sent by the resource provider is received, a target resource authorization credential identifier is generated according to the resource authorization information; then the target resource authorization credential identifier is stored in a public blockchain network, and based on the characteristics of the blockchain, the storage of the target resource authorization credential identifier is guaranteed to be permanent, verifiable, tamper-proof and traceable, and the resource initiator is notified of successful authorization and the credential content corresponding to the target resource authorization credential identifier (i.e., the target resource authorization credential content) is sent to the resource initiator; and according to the target resource authorization credential identifier and the target resource authorization credential content, the received credential content to be verified sent by the resource initiator is verified, and if the verification is successful, the resource initiator is allowed to use the resources provided by the resource provider. Based on the storage permanence, immutability and traceability of blockchain, the resource authorization credential identifier is recorded in the blockchain. When the resource initiator applies to use or exchange resources provided by the resource provider, its identity can be verified. After the verification is successful, the resource initiator is allowed to use the resources provided by the resource provider. This supports the trusted exchange of resources by all participants in federated learning (such as resource initiators, resource providers, etc.), which can reduce the cost of cooperation and coordination, and improve processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of a scenario of a resource exchange processing method provided by an embodiment of the present invention;
[0043] Figure 2 A schematic diagram of a process flow of a resource exchange processing method provided by an embodiment of the present invention;
[0044] Figure 3 A schematic diagram of a trusted exchange of resources among multiple parties provided in an embodiment of the present invention;
[0045] Figure 4 A schematic diagram of a flow chart of another resource exchange processing method provided by an embodiment of the present invention;
[0046] Figure 5 A schematic diagram of a flow chart of another resource exchange processing method provided by an embodiment of the present invention;
[0047] Figure 6 A schematic diagram of the structure of a resource exchange processing device provided by an embodiment of the present invention;
[0048] Figure 7 A schematic diagram of the structure of a resource exchange processing device provided in an embodiment of the present invention.
[0049] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0050] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0051] In many fields, technologies such as machine learning and model training based on big data are constantly developing. By mining big data, a lot of valuable information can be obtained. With the development of technology, the source of raw data is becoming more and more extensive, and there will even be cross-field collaboration.
[0052] In some business scenarios, multiple business platforms collect their own business data. This business data is very valuable and is usually saved as the privacy information of the business platform. Each business platform does not expect to share the original business data with other business platforms. However, in some requirements, multiple business platforms expect to perform collaborative computing without disclosing the business data of each party to improve business processing capabilities. Based on this, methods such as federated machine learning came into being.
[0053] Federated Machine Learning, also known as Federated Learning, can unite all parties to use data and conduct collaborative modeling without leaving the local data, and has gradually become a common method in privacy-preserving computing.
[0054] At present, in the existing federated learning, various participants jointly build models to achieve the process of encrypted sample alignment, encrypted model training, and effect incentives. In order to ensure the resource security of each participant, the various participants in federated learning are not supported to conduct trusted resource exchange, and thus cannot reduce the cost of cooperation and coordination and improve processing efficiency.
[0055] In order to solve this problem, the technical concept of the present invention is to design that if you want to realize trusted exchange of resources based on federated learning, the resource initiator first needs to send a request message to the resource provider to apply for the use or exchange of resources, and the resource provider generates a resource authorization credential identifier and records it on the blockchain. Based on the permanent storage, non-tamperability and traceability of the blockchain, the resource initiator is allowed to use or exchange the resources provided by the resource provider with the credential identifier, so that multiple participants in the interactive data can conduct a trusted exchange. Therefore, it is achieved that each participant is allowed to conduct a trusted exchange of data resources under privacy protection.
[0056] In the following, some embodiments of the present invention are described in detail in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and features in the embodiments can be combined with each other.
[0057] Figure 1 A scenario diagram of a resource exchange processing method provided by an embodiment of the present invention. The execution subject in the method of this embodiment can be a resource exchange processing device, such as a blockchain system of federated learning (i.e., FATE Chain system), which can be a terminal device or a server with a resource exchange processing function.
[0058] In practical applications, various participants in federated learning, such as resource initiators and resource providers, can also be resource providers. Similarly, resource providers can also be resource initiators. Take the resource initiator's application for the use of resources provided by the resource provider as an example. In the resource exchange process, when the resource initiator wants to use or exchange resources provided by the resource provider, it can first send a request message to the resource provider to indicate that the resource initiator applies to use the resources provided by the resource provider. The request message here may include a resource authorization request. When the resource provider receives the request message, it can send the resource authorization information (such as data set authorization information: authorized site, data set identifier, etc.) carried in the request message to the FATE Chain system. The FATE Chain system generates and stores the resource authorization credential content based on the resource authorization information, and generates a resource authorization credential identifier from the resource authorization credential content, and records the resource authorization credential identifier in the blockchain, so that the resource authorization credential identifier has the characteristics of permanent storage, non-tamperability, traceability, and authentication. When the FATE Chain system completes the authorization, it sends the authorization success message to the resource provider. When the resource initiator wants to use the resources provided by the resource provider, it first obtains the credential identifier through the FATE Chain system, and then sends a resource use application to the resource provider based on the obtained credential identifier. At this time, the FATE Chain system needs to verify the credential identifier sent by the resource initiator based on the credential identifier stored on the blockchain. If the verification passes, the resource initiator is allowed to use or exchange the resources provided by the resource provider.
[0059] Since the resource authorization credential identifier is recorded in the blockchain, it cannot be tampered with and can be authenticated, and resource exchange is transmitted through the blockchain network security channel with multiple encryption methods to ensure that resources are not stolen.
[0060] Figure 2The flowchart of a resource exchange processing method provided by an embodiment of the present invention is shown in FIG. The method in this embodiment can be implemented by software, hardware, or a combination of software and hardware. Figure 2 As shown, the method may include:
[0061] S201: Receive a request message indicating that a resource initiator applies to use resources provided by a resource provider, and send the request message to the resource provider.
[0062] Specifically, a resource participant can directly send a request message to a resource provider, that is, only the resource initiator and the resource provider can conduct a trusted resource exchange; a resource participant can also send a request message to a resource provider through at least one third party, that is, the resource initiator does not obtain resources directly from the resource provider, but obtains resources from the resource provider through at least one third party, and then the resource initiator obtains the resources of the resource provider from the third party, see Figure 3 The schematic diagram of the trusted exchange of resources among multiple parties is shown, exemplarily including a resource initiator, a resource provider, and three third parties (third party A, third party B, and third party C).
[0063] Among them, the FATE Chain system can directly receive the request message sent by the resource initiator to indicate that the resource initiator applies to use the resources provided by the resource provider, and send the request message to the resource provider; it can also receive the request message sent by a third party, and send the request message to the resource provider. The content of the request message sent in different ways may be different, that is, the resource authorization information carried by the request message may be different. Resource authorization information may include authorized sites, resource identifiers, etc.
[0064] S202: If the resource authorization information sent by the resource provider is received, a target resource authorization credential identifier is generated according to the resource authorization information.
[0065] Specifically, the resource provider sends resource authorization information to the FATE Chain system based on the request message. When the FATEChain system receives the resource authorization information (such as the authorized site, resource identifier, etc.), it generates the corresponding credential content according to the authorized site, resource identifier, etc., and then performs a hash calculation on the credential content to generate a credential identifier, i.e., the target resource authorization credential identifier, where the credential identifier can be a credential fingerprint or a credential iris, etc., which is not specifically limited here.
[0066] S203: Store the target resource authorization credential identifier in the public blockchain network, notify the resource initiator of successful authorization, and send the target resource authorization credential identifier to the resource initiator.
[0067] Specifically, in order to ensure the storage permanence, non-tamperability, traceability and authentication of the credential identifier, the FATE Chain system can store the target resource authorization credential identifier in the public blockchain network, i.e., on the blockchain, and send the authorization success message and the credential content corresponding to the target resource authorization credential identifier, i.e., the target resource authorization credential content, to the resource initiator through the resource provider. In the process of the resource initiator obtaining resources from the resource provider, the resource initiator can perform modeling configuration based on the credential content obtained by itself, generate the credential content to be verified, and wait for verification by the FATE Chain system. Only when the verification is successful, the resource initiator is allowed to use the resources provided by the resource provider.
[0068] S204. Verify the credential content to be verified received from the resource initiator according to the target resource authorization credential identifier and the credential content corresponding to the target resource authorization credential identifier. If the verification is successful, allow the resource initiator to use the resources provided by the resource provider.
[0069] For the security of information exchange, the FATE Chain system verifies the content of the credential based on the credential identifier stored on the blockchain. The verification here can include identity verification, credential identifier verification, and credential content verification. Only if all verifications are successful, the resource initiator is determined to have successfully authorized and authenticated, and the resource initiator is allowed to use the resources provided by the resource provider. Among them, the verification process, that is, the resource exchange behavior is recorded in the blockchain, which ensures that the behavior record cannot be tampered with, is traceable, and auditable, and the resource exchange is transmitted through the blockchain network security channel, with multiple encryption methods to ensure that the resources are not stolen.
[0070] The resource exchange processing method provided in this embodiment first receives a request message indicating that a resource initiator applies to use resources provided by a resource provider, and sends the request message to the resource provider; if resource authorization information sent by the resource provider is received, a target resource authorization credential identifier is generated according to the resource authorization information; the target resource authorization credential identifier is then stored in a public blockchain network, and based on the characteristics of the blockchain, the storage of the target resource authorization credential identifier is guaranteed to be permanent, verifiable, tamper-proof, and traceable, and the resource initiator is notified of a successful authorization and the credential content corresponding to the target resource authorization credential identifier is sent to the resource initiator; and the credential content to be verified sent by the resource initiator is verified according to the target resource authorization credential identifier and the credential content corresponding to the target resource authorization credential identifier, and if the verification is successful, the resource initiator is allowed to use the resources provided by the resource provider. Based on the storage permanence, immutability and traceability of blockchain, the resource authorization credential fingerprint is recorded in the blockchain. When the resource initiator applies to use or exchange resources provided by the resource provider, its identity can be verified. After the verification is successful, the resource initiator is allowed to use the resources provided by the resource provider. This supports the trusted exchange of resources by all participants in federated learning (such as resource initiators, resource providers, etc.), which can reduce the cost of cooperation and coordination while improving processing efficiency.
[0071] Optionally, this embodiment provides a detailed description of S202 based on the above embodiment. Generating a target resource authorization credential identifier according to the resource authorization information can be achieved by the following steps:
[0072] Step a1: if the request message is sent by the resource initiator through at least one third party, then generating credential content corresponding to each third party according to the resource authorization information, and storing the credential content;
[0073] Step a2: Generate a credential identifier corresponding to each third party and a first nested credential identifier corresponding to at least one third party according to the credential content corresponding to each third party, and store the credential identifier corresponding to each third party in the public blockchain network.
[0074] The generating of the credential identifiers corresponding to the respective third parties and the first nested credential identifier corresponding to the at least one third party may be achieved by the following steps:
[0075] According to the credential content, traverse the at least one third party in the reverse order of the request message sent by the at least one third party, and for each traversed third party, perform the following steps:
[0076] Step b1: Generate a credential identifier corresponding to the third party according to the credential content corresponding to the third party, and store the credential identifier corresponding to the third party in the public blockchain network;
[0077] Step b2: Generate a nested credential identifier corresponding to the current third party by using the credential identifier corresponding to the current third party and the credential identifier corresponding to the previous third party;
[0078] Among them, the nested credential identifier corresponding to the third party that is the last in the reverse order is the first nested credential identifier.
[0079] Step a3: Generate a target resource authorization credential identifier according to the first nested credential identifier and the resource authorization information corresponding to the resource initiator.
[0080] If the request message is sent by the resource initiator through at least one third party, Figure 3 As shown, taking three third parties as an example, first the resource provider obtains the request message sent by the third party A, obtains the identity information of the third party A through the data system and obtains the resource authorization information corresponding to the third party A (including the authorized site A, resource identifier A, which resources can be authorized to the third party A, etc.), and desensitizes it. Then the resource provider sends the resource authorization information corresponding to the third party A to the FATE Chain system to generate a voucher A. The voucher A here can be the voucher A fingerprint obtained by hash calculation. The FATE Chain system writes the voucher A fingerprint on the blockchain network and sends the voucher A to the third party A through the resource provider. Among them, the voucher here can be used to represent the voucher identification, and the following embodiments will not be repeated. The voucher identification here can be a voucher fingerprint or a voucher iris, etc., and the following takes the voucher fingerprint as an example.
[0081] When third party A receives the request message sent by third party B, it obtains the identity information of third party B and the resource authorization information corresponding to third party B (including authorized site B, resource identifier B, which resources can be authorized to third party B, etc.), and then third party A sends the resource authorization information corresponding to third party B to the FATE Chain system to generate credential B. Here, credential B can be the fingerprint of credential B obtained by hash calculation. The FATE Chain system writes the fingerprint of credential B into the blockchain network and generates a nested credential B in combination with credential A. Third party A sends the nested credential B to third party B.
[0082] When third party B receives the request message sent by third party C, it obtains the identity information of third party C and the resource authorization information corresponding to third party C (including authorized site C, resource identifier C, which resources can be authorized to third party B, etc.), and third party B sends the resource authorization information corresponding to third party C to the FATE Chain system to generate voucher C. Voucher C here can be the fingerprint of voucher C obtained by hash calculation. The FATE Chain system writes the fingerprint of voucher C to the blockchain network and combines it with nested voucher B to generate nested voucher C. Third party B sends nested voucher C to third party C. Taking three third parties as an example, the nested voucher C here is the first nested voucher.
[0083] By analogy, when the third party C receives the request message sent by the resource initiator, it obtains the identity information of the resource initiator and the resource authorization information corresponding to the resource initiator (including the authorized site 1, resource identifier 1, which resources can be authorized to the resource initiator, etc.), and the third party C sends the resource authorization information corresponding to the resource initiator to the FATEChain system to generate voucher 1, where voucher 1 can be the voucher 1 fingerprint obtained by hash calculation. The FATE Chain system writes the voucher 1 fingerprint on the blockchain network and combines the nested voucher C to generate a nested voucher 1 (i.e., the target resource authorization voucher identifier). When the resource initiator applies for resource exchange, the target resource authorization voucher identifier is obtained from the blockchain network through the secure channel of the blockchain network, and the voucher content sent by the resource initiator is verified. If the verification is successful, the resource initiator is allowed to use the resources provided by the resource provider, and the resource exchange behavior is stored in the blockchain network to ensure that the behavior record cannot be tampered with, is traceable, and auditable.
[0084] In addition, if there is no third party, when the resource initiator directly applies for resource exchange to the resource provider, the process of generating a credential identifier can refer to the process of the resource provider obtaining the credential identifier corresponding to the request message sent by the third party A. The generated credential identifier is directly the target resource credential identifier, rather than a nested credential identifier, which will not be repeated here.
[0085] Optionally, after generating the target resource authorization credential identifier, in order to ensure that the authorization credential identifier cannot be tampered with and can be authenticated, the target resource authorization credential identifier can be stored in a public blockchain network, which can be achieved by the following steps:
[0086] Step c1: write the target resource authorization credential identifier into the resource provider blockchain node in the public blockchain network, and synchronously store it in other nodes of the public blockchain network;
[0087] Step c2: After the public blockchain network confirms that the synchronization is successful, receive the message sent by the blockchain node of the resource provider to indicate the authorization success and send the message to the resource provider to indicate the authorization success.
[0088] Among them, the FATE Chain system can include the resource initiator blockchain system (i.e., FATE Chain (A)) and the resource provider blockchain system (i.e., FATE Chain (B)).
[0089] Specifically, combined Figure 4 As shown, Figure 4 A flowchart of another resource exchange processing method provided by an embodiment of the present invention. The process of authorizing resources (including the process of storing credential identifiers) is:
[0090] Taking the authorized dataset as an example (for example, the resource here refers to the dataset), the resource provider sends the dataset authorization information to FATE Chain (A) through the upper management system (such as the data system, i.e., FATE Studio (A)). FATE Chain (A) generates the credential content according to the obtained dataset authorization information: the authorized site, dataset identifier, etc., performs hash calculation on the credential content to generate the credential identifier (i.e., the target resource authorization credential identifier), and writes the credential hash to the resource provider's blockchain node (i.e., Block Chain Node (A)). Block Chain Node (A) synchronizes the credential hash consensus to other nodes in the public blockchain network, i.e., the credential hash is recorded on the blockchain.
[0091] After being recorded in the public blockchain network, the public blockchain network will send a synchronization success message to the blockchain node of the resource provider, and then the blockchain node of the resource provider will send an authorization completion message to FATE Chain (A), and FATE Chain (A) will then send the authorization success message to FATE Studio (A) to complete the authorization.
[0092] Optionally, how to verify the credentials can be achieved through the following steps:
[0093] Step d1: Obtain the target resource authorization credential identifier from the public blockchain network.
[0094] Step d2: verify the credential identifier to be verified according to the stored credential content corresponding to the target resource authorization credential identifier and the target resource authorization credential identifier.
[0095] Among them, after the resource provider sends the target resource authorization credential content to the resource initiator, when the resource initiator applies for resource exchange, in order to ensure the trusted exchange of data and avoid the resource initiator applying for wrong resources or resources beyond authorization, it is necessary to verify the credential content (i.e., the credential content to be verified) sent by the resource initiator, that is, to verify its resource permissions. If the verification is successful, the resource initiator is allowed to use the resources provided by the resource provider.
[0096] Optionally, the target resource authorization credential identifier includes a resource identification field, an authorized site field, and an effective date field, and the credential content corresponding to the target resource authorization credential identifier includes the identity information of the resource initiator; how to verify the credential content to be verified based on the above information, i.e., the target resource authorization credential identifier and the credential content, can be achieved by the following steps:
[0097] Step e1, verifying the identity information in the content of the to-be-verified credential according to the identity information of the resource initiator in the credential corresponding to the target resource authorization credential identifier;
[0098] Step e2: If they are consistent, it is determined that the identity verification is successful, and a hash calculation is performed on the content of the credential to be verified to generate a credential identifier to be verified, and the credential identifier to be verified is verified according to the target resource authorization credential identifier;
[0099] Step e3: If the verification is successful, verify the contents represented by each field in the credential identifier to be verified.
[0100] The verification of the contents represented by each field in the to-be-verified credential identifier may be achieved by the following steps:
[0101] Step f1, matching the content represented by each field in the target resource authorization credential identifier with the content represented by each field in the credential identifier to be verified;
[0102] Step f2: If the match is successful, it is determined that the resource authority verification corresponding to the resource initiator is successful, so as to allow the resource initiator to use the resources provided by the resource provider.
[0103] Specifically, combined Figure 5 As shown, Figure 5 A flowchart of another resource exchange processing method provided by an embodiment of the present invention. The process of verifying resource permissions is as follows (including identity verification, credential identifier hash verification, and credential identifier content verification):
[0104] Taking the target resource authorization credential identifier as a dataset credential as an example (for example, the resource here refers to a dataset), the resource initiator obtains the dataset credential (i.e., the dataset credential content) from the initiator blockchain system (i.e., FATE Chain (B)) through the resource initiator modeling system (i.e., FATE Flow (B)) in the modeling system. FATE Chain (B) returns the dataset credential to FATE Flow (B), and then the modeling system is used for federated learning. The modeling information may include the modeling credential (i.e., the modeling credential content). The modeling credential here may include configuration information, scheduling commands, datasets, etc. The modeling system sends the modeling information to the resource provider modeling system (i.e., FATE Flow (A)) in the modeling system through FATE Chain (B). FATE Flow (A) sends the modeling information to FATE Chain (A), and FATE Chain (A) verifies the modeling information based on the blockchain.
[0105] Specifically, FATE Chain (A) sends a message to verify the identity to the data provider's blockchain node, and verifies the identity of the resource initiator through the identity information of the resource initiator corresponding to the target resource authorization credential identifier recorded on the data provider's blockchain node, such as the identity ID. If the identity ID in the modeling credential is consistent with the identity ID of the resource initiator in the target resource authorization credential identifier, it means that the resource authority is granted to the resource initiator, that is, the identity is passed, and the message of identity passing is returned to FATE Chain (A); FATE Chain (A) continues to verify the credential hash (that is, credential identifier), that is, by comparing the credential hash recorded on the blockchain node with the credential hash corresponding to the modeling credential, for example, comparing the various field categories included in the credential hash, that is, checking whether they all contain information such as the resource identification field, the authorized site field, and the effective date field. If they are consistent, it means that the credential hash verification is passed; when both the identity and credential hash are passed, FATE Chain (A) sends the verification message to FATE Flow (A), and FATE Flow (A) verifies the modeling credential content and the modeling configuration, that is, the credential hash stored in FATE The content of the credential in the Chain system is compared with the content of the modeling credential. If they are consistent, it is determined that the match verification is successful, that is, the resource permission verification is successful. The message of successful match verification can also be sent to FATE Flow (B) through FATE Chain (B) to complete the verification of resource permissions, and then the permission required by the resource initiator can be executed, such as cooperating to complete modeling.
[0106] Therefore, in the present invention, when the resource initiator applies to use resources or apply for resource exchange, the resource authorization credential content is generated by the resource provider, and the credential identifier is generated based on the credential content, and the resource authorization credential identifier is recorded in the blockchain to ensure that the authorization credential identifier cannot be tampered with and can be authenticated; in the process of resource exchange, the resource exchange behavior is recorded in the blockchain to ensure that the behavior record cannot be tampered with, traceable, and auditable; and the resource exchange is transmitted through the blockchain network security channel, with multiple encryption methods to ensure that the resources are not stolen. Therefore, based on the storage permanence, non-tamperability and traceability of the blockchain, the resource authorization credential identifier is recorded in the blockchain, and when the resource initiator applies to use or exchange the resources provided by the resource provider, the identity can be verified according to the target resource authorization credential identifier and the credential content corresponding to the target resource authorization credential identifier. After the verification is successful, the resource initiator is allowed to use the resources provided by the resource provider, and the various participants (such as resource initiators, resource providers, etc.) participating in federated learning are supported to exchange resources with trust, which can reduce the cost of cooperation and coordination, and improve processing efficiency.
[0107] Figure 6 FIG. 1 is a schematic diagram of a resource exchange processing device provided by an embodiment of the present invention. Figure 6 As shown, the device may include:
[0108] The receiving module 601 is used to receive a request message indicating that a resource initiator applies to use resources provided by a resource provider, and send the request message to the resource provider;
[0109] The first processing module 602 is used to generate a target resource authorization credential identifier according to the resource authorization information when receiving the resource authorization information sent by the resource provider;
[0110] The second processing module 603 is used to store the target resource authorization credential identifier in the public blockchain network, notify the resource initiator of the successful authorization, and send the credential content corresponding to the target resource authorization credential identifier to the resource initiator;
[0111] The third processing module 604 is used to verify the credential content to be verified sent by the resource initiator according to the target resource authorization credential identifier and the credential content corresponding to the target resource authorization credential identifier. If the verification is successful, the resource initiator is allowed to use the resources provided by the resource provider.
[0112] The resource exchange processing device provided in this embodiment is configured with a receiving module 601, a first processing module 602, a second processing module 603 and a third processing module 604, which are used to receive a request message indicating that a resource initiator applies to use resources provided by a resource provider, and send the request message to the resource provider; if resource authorization information sent by the resource provider is received, a target resource authorization credential identifier is generated according to the resource authorization information; then the target resource authorization credential identifier is stored in a public blockchain network, and based on the characteristics of the blockchain, the storage of the target resource authorization credential identifier is guaranteed to be permanent, verifiable, tamper-proof and traceable, and the resource initiator is notified of the successful authorization and the credential content corresponding to the target resource authorization credential identifier (i.e., the target resource authorization credential content) is sent to the resource initiator; and according to the target resource authorization credential identifier and the target resource authorization credential content, the received credential content to be verified sent by the resource initiator is verified, and if the verification is successful, the resource initiator is allowed to use the resources provided by the resource provider. Based on the storage permanence, immutability and traceability of blockchain, the resource authorization credential identifier is recorded in the blockchain. When the resource initiator applies to use or exchange resources provided by the resource provider, its identity can be verified. After the verification is successful, the resource initiator is allowed to use the resources provided by the resource provider. This supports the trusted exchange of resources by all participants in federated learning (such as resource initiators, resource providers, etc.), which can reduce the cost of cooperation and coordination, and improve processing efficiency.
[0113] The resource exchange processing device provided in this embodiment can be used to execute the technical solution provided by any of the aforementioned method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.
[0114] In a possible implementation, the first processing module includes a first processing unit, a second processing unit and a third processing unit; the first processing unit is used to generate credential content corresponding to each third party according to the resource authorization information if the request message is sent by the resource initiator through at least one third party, and store the credential content; the second processing unit is used to generate a credential identifier corresponding to each third party and a first nested credential identifier corresponding to the at least one third party according to the credential content corresponding to each third party, and store the credential identifier corresponding to each third party in the public blockchain network; the third processing unit is used to generate a target resource authorization credential identifier according to the first nested credential identifier and the resource authorization information corresponding to the resource initiator.
[0115] In a possible implementation manner, the second processing unit is specifically configured to:
[0116] According to the credential content, traverse the at least one third party in the reverse order of the request message sent by the at least one third party, and for each traversed third party, perform the following steps:
[0117] Generate a credential identifier corresponding to the third party according to the credential content corresponding to the third party, and store the credential identifier corresponding to the third party in the public blockchain network;
[0118] Generate a nested credential identifier corresponding to the current third party by using the credential identifier corresponding to the current third party and the credential identifier corresponding to the previous third party;
[0119] Among them, the nested credential identifier corresponding to the third party that is the last in the reverse order is the first nested credential identifier.
[0120] In a possible implementation, the second processing module is further specifically configured to:
[0121] Writing the target resource authorization credential identifier into the resource provider blockchain node in the public blockchain network, and synchronously storing it in other nodes of the public blockchain network;
[0122] After the public blockchain network confirms that the synchronization is successful, a message indicating successful authorization is received from the blockchain node of the resource provider and the message indicating successful authorization is sent to the resource provider.
[0123] In one possible implementation, the third processing module includes a fourth processing unit and a fifth processing unit; the fourth processing unit is used to obtain the target resource authorization credential identifier from the public blockchain network; the fifth processing unit is used to verify the credential identifier to be verified according to the stored credential content corresponding to the target resource authorization credential identifier and the target resource authorization credential identifier.
[0124] In a possible implementation, the target resource authorization credential identifier includes a resource identification field, an authorized site field, and an effective date field, and the credential content corresponding to the target resource authorization credential identifier includes the identity information of the resource initiator; the fifth processing unit is specifically used to:
[0125] Verifying the identity information in the to-be-verified credential content according to the identity information of the resource initiator in the credential content corresponding to the target resource authorization credential identifier;
[0126] If they are consistent, it is determined that the identity verification is successful, and a hash calculation is performed on the content of the credential to be verified to generate a credential identifier to be verified, and the credential identifier to be verified is verified according to the target resource authorization credential identifier;
[0127] If the verification is successful, the content represented by each field in the credential identifier to be verified is verified.
[0128] In a possible implementation manner, the fifth processing unit is specifically configured to:
[0129] Matching the content represented by each field in the target resource authorization credential identifier with the content represented by each field in the credential identifier to be verified;
[0130] If the match is successful, it is determined that the resource authority verification corresponding to the resource initiator is successful, so as to allow the resource initiator to use the resources provided by the resource provider.
[0131] The resource exchange processing device provided in any of the foregoing embodiments is used to execute the technical solution of any of the foregoing method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.
[0132] Figure 7 A schematic diagram of the structure of a resource exchange processing device provided by an embodiment of the present invention. Figure 7 As shown, the device may include: a memory 701, a processor 702, and a resource exchange processing program stored in the memory 701 and executable on the processor 702. When the resource exchange processing program is executed by the processor 702, the steps of the resource exchange processing method described in any of the foregoing embodiments are implemented.
[0133] Optionally, the memory 701 may be independent or integrated with the processor 702 .
[0134] The implementation principle and technical effects of the device provided in this embodiment can be found in the aforementioned embodiments and will not be described in detail here.
[0135] An embodiment of the present invention further provides a computer-readable storage medium, on which a resource exchange processing program is stored. When the resource exchange processing program is executed by a processor, the steps of the resource exchange processing method as described in any of the above embodiments are implemented.
[0136] In the several embodiments provided by the present invention, it should be understood that the disclosed 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 modules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.
[0137] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present invention.
[0138] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0139] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0140] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0141] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.
[0142] The present invention also provides a computer program product, including a computer program, which implements the method provided by any embodiment of the present invention when executed by a processor.
[0143] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0144] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0145] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0146] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A resource exchange processing method, characterized in that: The method comprises: receiving a request message indicating that a resource initiator applies to use resources provided by a resource provider, and sending the request message to the resource provider; If the resource authorization information sent by the resource provider is received, and if the request message is sent by the resource initiator through at least one third party, generating credential content corresponding to each of the third parties according to the resource authorization information, and storing the credential content; According to the credential content corresponding to each of the third parties, a credential identifier corresponding to each of the third parties and a first nested credential identifier corresponding to the at least one third party are generated in the following manner: according to the credential content, in the reverse order of the request message sent by the at least one third party, the at least one third party is traversed, and for each traversed third party, the following steps are performed: according to the credential content corresponding to the current third party, a credential identifier corresponding to the current third party is generated, and the credential identifier corresponding to the current third party is stored in the public blockchain network; the credential identifier corresponding to the current third party and the credential identifier corresponding to the previous third party are used to generate a nested credential identifier corresponding to the current third party; wherein the nested credential identifier corresponding to the third party that is the last in the reverse order is the first nested credential identifier; Storing the credential identifiers corresponding to each of the third parties in the public blockchain network; Generate a target resource authorization credential identifier according to the first nested credential identifier and the resource authorization information corresponding to the resource initiator; The target resource authorization credential identifier is stored in the public blockchain network, and the resource initiator is notified of the successful authorization and the credential content corresponding to the target resource authorization credential identifier is sent to the resource initiator; The received credential content to be verified sent by the resource initiator is verified according to the target resource authorization credential identifier and the credential content corresponding to the target resource authorization credential identifier. If the verification is successful, the resource initiator is allowed to use the resources provided by the resource provider.
2. The method according to claim 1, characterized in that The storing the target resource authorization credential identifier in a public blockchain network includes: Writing the target resource authorization credential identifier into the resource provider blockchain node in the public blockchain network, and synchronously storing it in other nodes of the public blockchain network; After the public blockchain network confirms that the synchronization is successful, a message indicating successful authorization is received from the blockchain node of the resource provider and the message indicating successful authorization is sent to the resource provider.
3. The method according to claim 1, characterized in that The verifying the credential identifier to be verified sent by the resource initiator according to the target resource authorization credential identifier and the credential content corresponding to the target resource authorization credential identifier includes: Obtaining the target resource authorization credential identifier from the public blockchain network; The credential identifier to be verified is verified according to the stored credential content corresponding to the target resource authorization credential identifier and the target resource authorization credential identifier.
4. The method according to claim 3, characterized in that The target resource authorization credential identifier includes a resource identification field, an authorized site field, and an effective date field, and the credential content corresponding to the target resource authorization credential identifier includes the identity information of the resource initiator; The verifying the credential content to be verified according to the stored credential content corresponding to the target resource authorization credential identifier and the target resource authorization credential identifier includes: Verifying the identity information in the to-be-verified credential content according to the identity information of the resource initiator in the credential content corresponding to the target resource authorization credential identifier; If they are consistent, it is determined that the identity verification is successful, and a hash calculation is performed on the content of the credential to be verified to generate a credential identifier to be verified, and the credential identifier to be verified is verified according to the target resource authorization credential identifier; If the verification is successful, the content represented by each field in the credential identifier to be verified is verified.
5. The method according to claim 4, characterized in that The verifying of the contents represented by each field in the to-be-verified credential identifier includes: Matching the content represented by each field in the target resource authorization credential identifier with the content represented by each field in the credential identifier to be verified; If the match is successful, it is determined that the resource authority verification corresponding to the resource initiator is successful, so as to allow the resource initiator to use the resources provided by the resource provider.
6. A resource exchange processing device, characterized in that: The device comprises: A receiving module, used to receive a request message indicating that a resource initiator applies to use resources provided by a resource provider, and send the request message to the resource provider; A first processing module is used to generate a target resource authorization credential identifier according to the resource authorization information when receiving the resource authorization information sent by the resource provider; A second processing module is used to store the target resource authorization credential identifier in the public blockchain network, notify the resource initiator of the successful authorization, and send the credential content corresponding to the target resource authorization credential identifier to the resource initiator; A third processing module is used to verify the to-be-verified credential content sent by the resource initiator according to the target resource authorization credential identifier and the credential content corresponding to the target resource authorization credential identifier, and if the verification is successful, allow the resource initiator to use the resources provided by the resource provider; The first processing module comprises: A first processing unit, configured to generate credential content corresponding to each third party according to the resource authorization information, and store the credential content if the request message is sent by the resource initiator through at least one third party; The second processing unit is used to generate a credential identifier corresponding to each third party and a first nested credential identifier corresponding to at least one third party according to the credential content corresponding to each third party, and store the credential identifier corresponding to each third party in the public blockchain network; the second processing unit is specifically used to: according to the credential content, traverse the at least one third party in the reverse order of the request message sent by the at least one third party, and for each traversed third party, perform the following steps: generate a credential identifier corresponding to the current third party according to the credential content corresponding to the current third party, and store the credential identifier corresponding to the current third party in the public blockchain network; generate a nested credential identifier corresponding to the current third party by using the credential identifier corresponding to the current third party and the credential identifier corresponding to the previous third party; wherein the nested credential identifier corresponding to the third party that is the last in the reverse order is the first nested credential identifier; The third processing unit is used to generate a target resource authorization credential identifier according to the first nested credential identifier and the resource authorization information corresponding to the resource initiator.
7. A resource exchange processing device, characterized in that: The resource exchange processing device includes: a memory, a processor, and a resource exchange processing program stored in the memory and executable on the processor. When the resource exchange processing program is executed by the processor, the steps of the resource exchange processing method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a resource exchange processing program, and when the resource exchange processing program is executed by a processor, the steps of the resource exchange processing method according to any one of claims 1 to 5 are implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the resource exchange processing method described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method, apparatus and electronic device for acquiring and feeding back user resources
CN109033774A
Resource transfer request verification method and device and resource transfer request sending method and device based on block chain
CN112508578A