Data transaction processing method and apparatus, and storage medium
By constructing a multi-master-slave game model and using NSGA-III and PSO algorithms to calculate utility, the problem of low utility for data owners and data requesters in data transactions is solved, realizing trustworthy transactions and maximizing the utility of data assets.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING UNIV OF POSTS & TELECOMM
- Filing Date
- 2022-11-02
- Publication Date
- 2026-06-12
Smart Images

Figure CN115619560B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data transaction technology, and in particular to a data transaction processing method, apparatus and storage medium. Background Technology
[0002] To promote the development of materials genome engineering, it is necessary to achieve reliable sharing of materials genome databases, which also places higher demands on the management and transaction effectiveness of data assets.
[0003] Among existing technologies, blockchain, as a distributed ledger technology, possesses characteristics such as decentralization, openness, autonomy, immutability, and anonymity. It can, to some extent, solve the trust problem between entities, and blockchain technology has already seen some applications in the field of data transactions. Data and transaction logs are recorded on the blockchain, with the final transaction price determined solely by the seller or trading platform, and transactions are completed based on cryptography.
[0004] However, in existing blockchain-based data transaction methods, data benefits cannot be effectively reflected, and the competitive relationship between data requesters and data owners, as well as among data owners, is not considered during the transaction process. As a result, the interests and utility of data requesters and data owners are not optimized, leading to low utility for both data owners and data requesters. Summary of the Invention
[0005] This application provides a data transaction processing method, apparatus, and storage medium to solve the technical problem of low utility for data owners and data requesters in data transactions in the prior art.
[0006] In a first aspect, embodiments of this application provide a data transaction processing method, including:
[0007] Construct a multi-master-slave game model;
[0008] The utility function of the data owner and the utility function of the data requester are calculated based on the multi-master-slave game model.
[0009] Based on the data owner utility function, the distributed non-dominated sorting genetic algorithm NSGA-III is used to calculate the data owner's utility locally;
[0010] The utility of the data requester is calculated locally using the Particle Swarm Optimization (PSO) algorithm based on the aforementioned data requester utility function.
[0011] A transaction plan is determined based on the utility of the data owner and the utility of the data requester; the transaction plan includes the data price and the amount of data to be purchased.
[0012] Data transactions will be conducted according to the aforementioned transaction plan.
[0013] In some embodiments, the multi-master-slave game model includes a data owner, a data requester, the data price, the utility of the data owner, the amount of data purchased, and the utility of the data requester.
[0014] The data price is determined by the data owner based on the amount of data purchased by the data requester;
[0015] The amount of data purchased is determined by the data requester based on the data price or initial pricing; the initial pricing is determined by the data agent.
[0016] In some embodiments, prior to constructing the multi-master-slave game model, the method further includes:
[0017] The data owner stores the encrypted data in a distributed database and stores the data storage address and hash on the blockchain;
[0018] Data ownership is established through a data broker, generating data ownership records.
[0019] The data owner signs the data ownership confirmation record and stores the signed data ownership confirmation record on the blockchain.
[0020] In some embodiments, generating a data ownership record by establishing data ownership includes:
[0021] The data owner sends a data ownership request message to the data agent;
[0022] The data agent generates a non-fungible token for the data based on the data ownership request message;
[0023] A data agent publishes data products; the data product includes a data product number, the blockchain address of the data owner, and a set of data attributes;
[0024] A data ownership record is generated using the data product number, timestamp, and data description; the timestamp is the generation time of the non-fungible token.
[0025] In some embodiments, prior to constructing the multi-master-slave game model, the method further includes:
[0026] The data requester sends a data transaction request message to the data broker; the data transaction request message contains the data requester's set of required attributes and the data requester's blockchain address;
[0027] The data agent retrieves data products based on the demand attribute set and sends the data products to the data requester; the data product includes a data product number, the data owner's blockchain address, and a data attribute set;
[0028] The data agent sends a data transaction notification message to the data owner and creates a status channel; the data transaction notification message contains the data product number and the blockchain address of the data requester; the status channel is used by the data owner and the data requester to match transactions and determine a transaction plan.
[0029] In some embodiments, before performing the data transaction according to the transaction scheme, the method further includes: the data owner signing the transaction scheme to obtain a transaction scheme signed by the data owner; the data requester signing the transaction scheme to obtain a transaction scheme signed by the data requester; storing the transaction scheme signed by the data owner and the transaction scheme signed by the data requester on a blockchain; the data broker closing the state channel; the state channel being used by the data owner and the data requester to match transactions and determine the transaction scheme.
[0030] In some embodiments, the data transaction according to the transaction scheme includes: according to the transaction scheme, the data requester sends a transfer request message to the data owner; the data owner stores the encrypted data in a distributed database based on the transfer request message; the encrypted data is sent to the data requester through the distributed database; and the data requester decrypts the encrypted data to obtain the data.
[0031] Secondly, embodiments of this application provide a data transaction processing apparatus, comprising: a construction module for constructing a multi-master-slave game model; a first calculation module for calculating a data owner utility function and a data requester utility function based on the multi-master-slave game model; a second calculation module for calculating the data owner's utility locally using a distributed non-dominated sorting genetic algorithm NSGA-III based on the data owner's utility function; a third calculation module for calculating the data requester's utility locally using a particle swarm optimization algorithm PSO based on the data requester's utility function; a determination module for determining a transaction scheme based on the data owner's utility and the data requester's utility; the transaction scheme including a data price and a data purchase quantity; and a transaction module for performing data transactions according to the transaction scheme.
[0032] In some embodiments, the multi-master-slave game model includes a data owner, a data requester, the data price, the utility of the data owner, the data purchase quantity, and the utility of the data requester; the data price is determined by the data owner based on the data purchase quantity of the data requester; the data purchase quantity is determined by the data requester based on the data price or an initial pricing; the initial pricing is determined by the data agent.
[0033] In some embodiments, the system further includes: a first storage module, which is used by the data owner to store the encrypted data in a distributed database and store the data storage address and hash on a blockchain; a first generation module, which is used to verify the data ownership through a data agent and generate a data ownership record; and a second storage module, which is used by the data owner to store the encrypted data in a distributed database and store the data storage address and hash on a blockchain.
[0034] In some embodiments, the first generation module is specifically used for: the data owner sending a data ownership request message to the data agent; the data agent generating a non-fungible token for the data based on the data ownership request message; the data agent publishing a data product; the data product including a data product number, the data owner's blockchain address, and a set of data attributes; generating a data ownership record using the data product number, a timestamp, and a data description; the timestamp being the generation time of the non-fungible token.
[0035] In some embodiments, the system further includes: a first sending module, configured to send a data transaction request message to a data broker from a data requester; the data transaction request message includes a set of required attributes of the data requester and the blockchain address of the data requester; a second sending module, configured to allow the data broker to retrieve a data product based on the set of required attributes and send the data product to the data requester; the data product includes a data product number, the blockchain address of the data owner, and a set of data attributes; and a creation module, configured to allow the data broker to send a data transaction notification message to the data owner and create a status channel; the data transaction notification message includes the data product number and the blockchain address of the data requester; the status channel is used for the data owner and the data requester to perform transaction matching and determine a transaction plan.
[0036] In some embodiments, the system further includes: a first signature module, used by the data owner to sign the transaction scheme to obtain a transaction scheme signed by the data owner; a second signature module, used by the data requester to sign the transaction scheme to obtain a transaction scheme signed by the data requester; a third storage module, used to store the transaction scheme signed by the data owner and the transaction scheme signed by the data requester on a blockchain; and a closing module, used by the data agent to close the state channel; the state channel is used by the data owner and the data requester to perform transaction matching and determine the transaction scheme.
[0037] In some embodiments, the transaction module is specifically used for: sending a transfer request message to the data owner according to the transaction scheme; the data owner storing the encrypted data in a distributed database based on the transfer request message; sending the encrypted data to the data requester through the distributed database; and the data requester decrypting the encrypted data to obtain the data.
[0038] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the data transaction processing method described in the first aspect above.
[0039] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the data transaction processing method described in the first aspect above.
[0040] The data transaction processing method, apparatus, and storage medium provided in this application construct a multi-master-slave game model between the data owner and the data requester, calculate the utility functions of the data owner and the data requester, and solve the multi-master-slave game model using a hierarchical optimization approach. Based on the utility of the data owner and the data requester, a transaction plan is determined, and the data transaction is completed according to the plan. This ensures the reliable trading of data assets while maximizing the utility of both the data owner and the data requester. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a flowchart illustrating a data transaction processing method provided in an embodiment of this application;
[0043] Figure 2 This application provides a schematic diagram of the structure of a data transaction processing device according to an embodiment;
[0044] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0045] With the development of gene material databases, effective interconnection and data sharing are difficult to achieve due to differences in research objects, material systems, and data completeness among databases, hindering the realization of data benefits. Data trading is a crucial means of data circulation and value realization. However, data trading and sharing involve multiple stakeholders, and the lack of trust among these stakeholders compromises fairness and security, leading to problems such as ambiguous data ownership, chaotic pricing, and difficulties in transaction matching. Blockchain, as a distributed ledger technology, possesses characteristics such as decentralization, openness, autonomy, immutability, and anonymity, which can address trust issues among stakeholders to some extent. Integrating blockchain with data trading to construct a distributed and trusted trading method for materials genome data is becoming a trend.
[0046] However, in existing blockchain-based data transaction methods, data benefits cannot be effectively reflected, and the competitive relationship between data requesters and data owners, as well as among data owners, is not considered during the transaction process. As a result, the interests and utility of data requesters and data owners are not optimized, leading to low utility for both data owners and data requesters.
[0047] To address the aforementioned technical issues, this application proposes a data transaction processing method. This method constructs a multi-master-slave game model to characterize the transaction behavior of data owners and data requesters. A distributed non-dominated sorting genetic algorithm is used to locally calculate the utility of the data owner, and a particle swarm optimization algorithm is used to locally calculate the utility of the data requester. Based on the utilities of the data owner and data requester, a transaction plan is determined, and the transaction is completed. By utilizing technologies such as blockchain, master-slave game theory, and multi-objective optimization, a trustworthy transaction of materials genome engineering data is achieved, maximizing the interests of all parties involved.
[0048] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0049] Figure 1 This is one of the flowcharts illustrating the data transaction processing method provided in the embodiments of this application, such as... Figure 1 As shown in the figure, this application provides a data transaction processing method including:
[0050] Step 101: Construct a multi-master-slave game model.
[0051] Specifically, a multi-master-slave game model is constructed between data owners and data requesters.
[0052] In this embodiment, the data owner's pricing of the data product depends on the data requester's purchasing strategy, and the data requester's purchasing strategy depends on the data owner's pricing of the data product; thus, a master-slave game is naturally formed. Since the data owner initially provides the product and price, they can be considered the leader in the data transaction. The data requester makes their own purchasing decision based on the information provided by the data owner and can be considered a follower in the transaction. Therefore, a multi-master-slave game model involving multiple leaders and multiple followers is constructed.
[0053] Step 102: Calculate the utility function of the data owner and the utility function of the data requester based on the multi-master-slave game model.
[0054] Specifically, the utility function of a data owner mainly considers the revenue from data transactions, the cost of data products, and the cost of participating in federated learning. The utility function of a data owner is obtained by subtracting the cost of data products and the cost of data sharing from the revenue received.
[0055] In this embodiment, data transaction revenue is affected by data price, data purchase volume, and number of transactions. Data product costs are affected by data price, maximum data purchase volume, unit cost of data products, and the cost of data ownership confirmation and pricing services. Data sharing methods include federated learning, data access, or other methods to achieve data sharing. The cost of data sharing is affected by the data sharing method. When federated learning is selected, the maximum number of iterations in federated learning and the communication overhead of word iteration are considered; when data access is selected, the cost of data sharing is 0.
[0056] The utility function of a data requester mainly considers the degree to which the data product meets its own needs, the cost of purchasing the data product, and the cost of participating in data sharing. The utility function of the data requester is obtained by subtracting the purchase cost and the cost of data sharing from the degree to which the obtained data product meets its own needs.
[0057] In this embodiment, the degree to which the data product meets the needs of the data requester, i.e., the data requester's satisfaction, is affected by the amount of data purchased, the degree of competition with other data requesters, and the data quality. The cost of purchasing the data product is affected by the product price and the purchase volume. The cost of participating in data sharing is affected by the data sharing method.
[0058] Step 103: Calculate the utility of the data owner locally using the Non-dominated Sorting Genetic Algorithms III (NSGA-III) based on the data owner utility function.
[0059] Specifically, at the upper level, data owners provide corresponding data products based on the attribute requirements of data requesters and set unit prices based on the purchase quantity to maximize their utility. There is competition among data owners at this level; maximizing the utility function of one owner may lead to a loss of utility functions for other owners, thus constituting a multi-objective optimization problem. Therefore, the NSGA-III algorithm is used for non-dominated sorting to solve for maximizing the utility of data owners, and data owners calculate their utility functions locally, protecting privacy.
[0060] Step 104: Calculate the utility of the data requester locally using the Particle Swarm Optimization (PSO) algorithm based on the data requester's utility function.
[0061] Specifically, at the lower level, data requesters aim to maximize their own utility by making purchasing decisions based on the data owner's products and unit prices. Since the exclusivity of data products is not considered, there is no competition among lower-level data requesters, constituting multiple single-objective optimization problems. Therefore, the PSO algorithm is used to solve for maximizing the utility of each data requester, and each data requester computes its utility function locally, protecting privacy.
[0062] Step 105: Determine a transaction plan based on the utility of the data owner and the utility of the data requester; the transaction plan includes the data price and the amount of data to be purchased.
[0063] Specifically, with the aim of maximizing the utility of data owners and data requesters, the final data price and data purchase volume are determined to arrive at the final transaction plan.
[0064] Step 106: Conduct data transactions according to the transaction plan.
[0065] Specifically, according to the final transaction plan, the data requester and the data owner transact at the final data price, with the data requester transferring funds to the data owner and the data owner sending data to the data requester.
[0066] The data transaction processing method provided in this application constructs a multi-master-slave game model between the data owner and the data requester to characterize their transaction behavior, calculates the utility functions of the data owner and the data requester, and solves the multi-master-slave game model using a hierarchical optimization approach. It utilizes a distributed non-dominated sorting genetic algorithm to calculate the data owner's utility locally and a particle swarm optimization algorithm to calculate the data requester's utility. Based on the data owner's and data requester's utilities, a transaction plan is determined, and the data transaction is completed according to this plan. This method maximizes the utility of both the data owner and the data requester while ensuring the trustworthiness of data asset transactions.
[0067] In some embodiments, the multi-master-slave game model includes a data owner, a data requester, the data price, the utility of the data owner, the data purchase quantity, and the utility of the data requester; the data price is determined by the data owner based on the data purchase quantity of the data requester; the data purchase quantity is determined by the data requester based on the data price or an initial pricing; the initial pricing is determined by the data agent.
[0068] Specifically, a data broker invokes a pricing smart contract, allowing a data pricing model to price the data. This initial pricing prevents chaos in the data trading market caused by overpricing or underpricing. Then, the data requester determines the quantity of data to purchase based on the initial price, the data owner adjusts the price accordingly, and the data requester adjusts their purchase quantity based on the adjusted price. Through multiple rounds of interaction, the utility of all parties is maximized, thus determining the final transaction plan.
[0069] By constructing a game theory model, data owners can flexibly adjust data prices based on utility, and data requesters can flexibly adjust the amount of data products they purchase based on utility, thereby improving the quality of data transactions and maximizing the utility of both data owners and data requesters.
[0070] In some embodiments, before constructing the multi-master-slave game model, the method further includes: the data owner storing the encrypted data in a distributed database and storing the data storage address and hash on a blockchain; confirming the data ownership through a data agent to generate a data ownership record; the data owner signing the data ownership record and storing the signed data ownership record on the blockchain.
[0071] By encrypting and storing data in a distributed database, and storing the data storage address and hash on the blockchain, a combined on-chain and off-chain data management approach is achieved, reducing on-chain pressure and thus enabling lightweight data management. Storing signed data ownership records on the blockchain ensures the trustworthiness and traceability of data transactions.
[0072] In some embodiments, generating a data ownership record by confirming data ownership includes: the data owner sending a data ownership request message to a data agent; the data agent generating a non-fungible token for the data based on the data ownership request message; the data agent publishing a data product; the data product including a data product number, the data owner's blockchain address, and a set of data attributes; generating a data ownership record using the data product number, a timestamp, and a data description; the timestamp being the generation time of the non-fungible token.
[0073] Specifically, non-fungible tokens are unique and indivisible. By using non-fungible token technology to establish ownership of material genome data, the credibility of data ownership is improved, and data ownership proof is achieved.
[0074] By packaging and distributing data products, data requesters can match their needs to data attribute sets, ensuring data security while enabling them to quickly and accurately find the target data products they require. Furthermore, data requesters and data owners can use the product number within the data product to match transactions, improving data transaction efficiency and the utility of all parties involved.
[0075] In some embodiments, before constructing the multi-master-slave game model, the method further includes: a data requester sending a data transaction request message to a data agent; the data transaction request message containing the data requester's demand attribute set and the data requester's blockchain address; the data agent retrieving a data product based on the demand attribute set and sending the data product to the data requester; the data product including a data product number, the data owner's blockchain address, and a data attribute set; the data agent sending a data transaction notification message to the data owner and creating a status channel; the data transaction notification message containing the data product number and the data requester's blockchain address; the status channel being used for the data owner and the data requester to match transactions and determine a transaction plan.
[0076] Specifically, the data requester initiates a transaction request. The data broker retrieves data products matching the required attribute set from the data catalog based on the request message, returns the data products to the data requester, and sends a transaction notification message to the data owner. The data owner then matches the data requester with the data product number or the data requester's blockchain address from the notification message. After multiple rounds of interaction, the final data price and purchase quantity are determined, resulting in the final transaction plan.
[0077] The data broker creates a state channel between the data requester and the data owner, enabling a large number of interactions between the data owner and the data requester to be moved off-chain, thereby achieving blockchain scaling, greatly shortening transaction time, and improving transaction efficiency.
[0078] In some embodiments, before performing the data transaction according to the transaction scheme, the method further includes: the data owner signing the transaction scheme to obtain a transaction scheme signed by the data owner; the data requester signing the transaction scheme to obtain a transaction scheme signed by the data requester; storing the transaction scheme signed by the data owner and the transaction scheme signed by the data requester on a blockchain; the data broker closing the state channel; the state channel being used by the data owner and the data requester to match transactions and determine the transaction scheme.
[0079] Specifically, a signature refers to a digital signature, which can be created using one or more of the following methods: RSA (Rivest-Shamir-Adleman) signature, ELGamal digital signature, Schnorr signature, or discrete logarithmic signature, etc. Storing the transaction scheme signed by the data owner and the transaction scheme signed by the data requester on the blockchain ensures the trustworthiness and traceability of data transactions.
[0080] In some embodiments, the data transaction according to the transaction scheme includes: according to the transaction scheme, the data requester sends a transfer request message to the data owner; the data owner stores the encrypted data in a distributed database based on the transfer request message; the encrypted data is sent to the data requester through the distributed database; and the data requester decrypts the encrypted data to obtain the data.
[0081] Specifically, after the data agent closes the state channel, it obtains the data owner's blockchain address based on the information in the data product. The data transaction smart contract initiates a transfer request from the data requester to the data owner according to the final transaction plan. The amount of the transfer is the product of the data price and the amount of data purchased in the transaction plan.
[0082] Upon receiving the request, the data owner encrypts the data using a public-key cryptography algorithm and stores the ciphertext in a distributed database, obtaining a content identifier. This content identifier is then sent to the data requester, who uses it to initiate a data access request to the distributed database, thereby obtaining the encrypted data. After decryption, the original data is retrieved.
[0083] Data transmission is accomplished through a distributed database, protecting the privacy and security of the data owner. Public-key cryptography ensures that only the data requester with the private key can decrypt the encrypted data, guaranteeing the security of data transactions.
[0084] The data transaction processing method provided in this application constructs a multi-master-slave game model between the data owner and the data requester to characterize their transaction behavior, calculates the utility functions of the data owner and the data requester, and solves the multi-master-slave game model using a hierarchical optimization approach. It utilizes a distributed non-dominated sorting genetic algorithm to calculate the data owner's utility locally and a particle swarm optimization algorithm to calculate the data requester's utility. Based on the data owner's and data requester's utilities, a transaction plan is determined, and the data transaction is completed according to this plan. This method maximizes the utility of both the data owner and the data requester while ensuring trustworthy data asset transactions and data security.
[0085] The data transaction processing methods provided in the above embodiments are further illustrated below with specific examples:
[0086] This application provides a data transaction processing method involving data owners, data requesters, and data agents. The data owner is the actual owner of the materials genome data, encrypts and stores the data in a distributed database, applies to the data agent for ownership verification and pricing of the IoT data, and realizes value through data transactions by selling data products. The data requester is the demander of the materials genome data, actively initiates a data transaction request to the data agent, and satisfies their own utility by purchasing data products. The data agent is responsible for receiving and processing requests from data owners and data requesters, earns revenue by providing data transaction-related services, and participates in consensus as a consensus node.
[0087] The specific steps to achieve distributed and trusted data transactions are as follows:
[0088] Step 1: The data owner encrypts the material genome data using their public key to obtain the ciphertext data:
[0089] CT Data =Encrypt(Data,PK) o )
[0090] Among them, CT DataFor encrypted data, Encrypt is the encryption algorithm, Data is the data, and PK is the encryption key. o The public key for the data owner.
[0091] The data owner sends a data storage request message (Req) to the distributed database. str The data storage request message Req str The information carried includes encrypted data from CT scans. Data Add the blockchain address of the data owner o Distributed database for storing encrypted data (CT) Data Then return the content identifier (CID).
[0092] Step 2: The data owner sends a data ownership request message (Req) to the data agent. con The data ownership request message carries information including the data attribute set Attr Data Content Identifier (CID) and Data Owner's Blockchain Address (Add) o Among them, the data attribute set Attr Data The formula is as follows:
[0093] Attr Data ={name,hash,type,size,source,description,Acc Data ,extendedproperties}
[0094] Where name is the name, hash is the hash value, type is the type, size is the size, source is the source, description is the description, and Acc is the hash value. Data The `shared` property specifies the sharing method, and `extendedproperties` specifies the extended properties. The data sharing methods include federated learning and data access.
[0095] Step 3: The data agent prices and confirms the ownership of the data.
[0096] First, the data is priced using a data pricing model, and the data price (price) is added to the data attribute set (Attr). Data middle.
[0097] Secondly, data ownership is established, non-fungible tokens are generated for the data, and these tokens are stored in the data owner's wallet.
[0098] Then, add the data product number ID and the data owner's blockchain address. o and data attribute set Attr Data Packaged as a data product: Data product = {ID, Addo Attr Data Then publish it to the data directory.
[0099] Finally, the data product number (ID) is returned to the data owner. A data ownership record (TX) is generated. r = {ID, timestamp, description}, where timestamp refers to the timestamp used to generate the non-fungible certificate. The data owner uses their own private key SK o Data ownership confirmation record TX r Sign the data to obtain a signed data ownership record. Here, Sign is the signature algorithm. The signed data is then used to establish ownership of the transaction. Stored on the blockchain.
[0100] Step 4: The data requester sends a data transaction request message (Req) to the data broker. tran The data transaction request message Req tran The information carried includes Attr req and Add r Attr req Add the required attribute set for the data requester. r This is the blockchain address of the data requester.
[0101] Step 5: The data agent invokes the data transaction smart contract. It retrieves the Attr attribute set that matches the data requester's requirements from the data catalog. req The data product is returned to the data requester, and a data transaction notification message (Msg) is sent to the corresponding data owner. The data transaction notification message (Msg) carries the data product ID and the data requester's blockchain address (Add). r .
[0102] Step 6: The data broker creates a state channel for the data owner and the data requester, where they match transactions. To maximize the utility of both the data requester and the data owner, a multi-master-slave game model and hierarchical optimization are used to calculate utility. The data requester determines the amount of data to purchase based on the data price and sends it to the data owner. The data owner adjusts the data price based on the purchase amount and sends it to the data requester. After multiple rounds of interaction, the data owner and the data requester reach a final transaction agreement: FinTx = {price...} fin Purchases fin}, where price fin For the final data price, purchases fin For the final data purchase volume. The data owner uses their private key SK oThe final transaction scheme FinTx is signed to obtain the transaction scheme FinTx signed by the data owner. o =Sign(FinTx,SK o The data requester uses its own private key SK. r The final transaction scheme FinTx is signed to obtain the data requester's signature. r =Sign(FinTx,SK r ), and FinTx o and FinTx r It is stored on the blockchain. Then the data broker closes the state channel.
[0103] Step 7: The data transaction smart contract sends a transfer request message Req from the data requester to the data owner according to the final transaction plan FinTx. tsf The transfer request message Req tsf The information carried includes the final data price. fin The final data purchase volume fin Add the blockchain address of the data owner. o And the transfer amount, where the transfer amount is price fin and purchases fin The product of.
[0104] If the data requester's data sharing method is data access-based, the data owner constructs a subset of data, Data, based on the amount of data purchased. r And use the public key of the data requester to PK r Data r Encrypt the data to obtain the ciphertext CTDatar = Encrypt(Data r PK r ), CT Datar Stored in a distributed database, obtain the Content Identifier (CID) of this subset of data. r and CID r Send to the data requester. The data requester sends a data access request message (Req) to the distributed database. acc The data access request message Req acc The information carried includes CID r Obtain encrypted data CT Datar Then, use your private key SK r Decoding CT Datr Get the raw data. r =Decrypt(CT) Datar SK r), where Decrypt is the decryption algorithm.
[0105] If the data sharing method of the data requester is federated learning, then the data broker acts as a global node to organize the data owner and the data requester to perform federated learning.
[0106] In step 6 above, the specific process of calculating utility using a multi-master-slave game model and hierarchical optimization is as follows:
[0107] 1) The data proxy set is DA = {DA1, ..., DA2} a ,…,DA A}, where DA a This represents one of the data brokers. Assume that over a period of time, data is sent to data broker DA. a The set of data requesters initiating data transaction requests is DR = {DR1, ..., DR2}. j ,…,DR J}, where DR j This represents one of the data requesters. The set of requirement attributes corresponding to this set of data requesters is MR = {MR1, ..., MR2}. j ,…,MR J}, where MR j Indicates DR j The required attributes.
[0108] After searching, the data product set that meets the requirements in the data catalog is DP = {DP1, ..., DP}. n ,…,DP N}, where DP n This indicates that one of them conforms to DR j Data products that meet demand. DP n The corresponding data attribute set is MD = {MD1, ..., MD} n ,…,MD N}, where MD n For DP n One of the attributes. The data size corresponding to DP is SD = {SD1, ..., SD}. n ,…,SD N}, where SD n DP n The amount of data. The set of data owners corresponding to DP is DO = {DO1, ..., DO...} i ,…,DO I}, where DO i For DP n The data owner.
[0109] DO i The data product vectors possessed are in, The formula for calculation is:
[0110]
[0111] The relationship between data owners, data requesters, and data products is as follows: a data requester can purchase multiple data products, and a data product can be purchased by multiple data requesters. A data owner can own multiple data products, but a data product can only belong to one data owner.
[0112] DR j The purchase volume vector is G j =[g j,1 ,…,g j,n ,…,g j,N ], where g j,n Indicates DR j For DP n Purchase volume. DR j The purchase volume range is in, The minimum purchase quantity for data products. DP represents the maximum purchase quantity of data products. n The price vector is P n =[p n,1 ,…,p n,j ,…,p n,J ], where p n,j Indicates DR j Purchase DP n The unit price.
[0113] 2) Construct a multi-master-slave game model.
[0114] Construct a multi-leader / follower game model involving multiple leaders and multiple followers:
[0115] S = {(DO,DR); P1,…,P} N ;UO1,…,UO I ;G1,…,G J ;UR1,…,UR J}
[0116] Where DO is the data owner, DR is the data requester, and P1,…,P N Let DP1,…,DP N The corresponding data prices, UO1,…,UO I For data owners DO1,…,DO I The corresponding utilities, G1,…,G J For data requesters DR1,…,DR JThe corresponding data purchase volume, UR1,…,UR J For data requesters DR1,…,DR J The corresponding utility.
[0117] (1) Solve for the data owner utility function.
[0118] Data owner DO i utility function UO i The main considerations are revenue from data transactions, costs of data products, and costs of participating in data sharing. The calculation formula is as follows:
[0119] UO i =SO i -CO i -FO i
[0120] SO i Indicates DO i Revenue from data transactions is calculated as follows:
[0121]
[0122] Where, μ(N) i ) represents DO i Revenue sharing. DO i Number of transactions N i The more, the more μ(N) i The higher the value, the better. i The calculation formula is:
[0123]
[0124] Where a and b are constants set according to relevant knowledge or experience, and 0 <a≤1,0<b<1,
[0125] CO i Indicates DO i The cost of providing data products is calculated as follows:
[0126]
[0127] Among them, c n It is DP n Unit cost, r n It is DP n The cost of providing data ownership confirmation and pricing services, g* ,n It is DP n The maximum purchase quantity is calculated as follows:
[0128] g* ,n =max(g 1,n ,…,gj,n ,…,g J,n )
[0129] Among them, g j,n Indicates DR j For DP n Purchase volume.
[0130] FO i Indicates DO i The cost of participating in data sharing is calculated as follows:
[0131]
[0132] Among them, Acc j For data sharing mode parameters, when Acc j When = 1, it indicates DR j Federated learning sharing method was selected; when Acc j =0 indicates DR j The data access sharing method has been selected. j Indicates DR j Maximum number of iterations for federated learning, cm i It is DO i The communication overhead of one iteration, cp i It is DO i The computational cost of performing one iteration.
[0133] (2) Solve the utility function of the data requester.
[0134] Data Requester (DR) j Utility function UR j The main considerations are the degree to which the data product meets the user's needs, the cost of purchasing the data product, and the cost of participating in federated learning. The calculation formula is as follows:
[0135] UR j =MR j -CR j -FR j
[0136] MR j Indicates DR j MR (Mean Satisfaction Rate) is a monotonically increasing function of data purchase volume, and as the number of purchases increases, MR... j The growth rate of MR is slowing down because the information entropy contained in the data is growing at a slower pace. j The calculation formula is:
[0137]
[0138] Where, α jThe degree of competition indicates the level of competition between other data requesters and the DR. j The more likely there are competing businesses, the more transactions occur with a data product, and the larger the amount of data purchased by the data owner, the greater the competition and the greater the negative impact on satisfaction. α j The calculation formula is:
[0139]
[0140]
[0141] Where, σ j DR is a constant. j Set σ according to relevant knowledge or experience j , t n It is DP n The number of transactions.
[0142] q j,n Attribute dependence represents DP n The richness of attributes indicates higher data quality and is beneficial for DR (Data Dependency Analysis). j The greater the availability. j,n The calculation formula is:
[0143]
[0144] Among them, M j,n =MR j ∩MD n θ j It is DR j Thresholds set based on relevant knowledge or experience.
[0145] CR j Indicates DR i The cost of purchasing data products is calculated as follows:
[0146]
[0147] FR j Indicates DR i The cost of participating in federated learning is calculated as follows:
[0148] FR j =Acc j iter j (cm j +cp j )
[0149] Among them, cm j It is DR j The communication overhead of performing one federated learning iteration, cp j It is DR jThe computational cost of performing one iteration.
[0150] 3) Maximize utility by using multi-objective optimization algorithms.
[0151] Because the data owner and the data requester are in competition, this constitutes a multi-objective optimization problem. To address this, this invention adopts a hierarchical optimization approach.
[0152] (1) At the upper level, the data owner provides corresponding data products based on the data requester's attribute requirements and sets a unit price based on the data requester's purchase volume to maximize its utility. i The formula for maximizing utility is as follows:
[0153] max UO i (G1,…,G J )=
[0154]
[0155] Where, p n,j The condition is greater than 0, and n = 1, ..., N, indicating that the unit price of the data product cannot be less than 0.
[0156] There is competition among data owners at the upper level. Maximizing the utility function of one owner may lead to a loss in the utility functions of other owners, thus constituting a multi-objective optimization problem. To address this, this invention employs the NSGA-III algorithm for solution. Considering privacy, each data owner calculates their utility function locally, and a data agent performs non-dominated ranking.
[0157] (2) At the lower level, the data requester aims to maximize its own utility and makes purchasing decisions based on the data owner's products and unit prices.
[0158]
[0159] Where, 0≤g j,n ≤SD n n = 1, ..., N, representing the data requester's request for data product DP. n The purchase volume cannot exceed that of the data product DP. n The amount of data. In addition, the data requester, DR... j The total amount of data purchased should be within its needs. and between.
[0160] Since this invention does not consider the exclusivity of data products, there is no competition among lower-level data requesters, resulting in multiple single-objective optimization problems. Therefore, this invention employs the PSO algorithm for solving these problems.
[0161] Figure 2This is one of the structural schematic diagrams of a data transaction processing device provided in the embodiments of this application, such as... Figure 2 As shown, this application embodiment provides a data transaction processing apparatus, including a construction module 201, a first calculation module 202, a second calculation module 203, a third calculation module 204, a determination module 205, and a transaction module 206, wherein:
[0162] The first determining module 301 is used to construct a multi-master-slave game model; the first calculation module 202 is used to calculate the utility function of the data owner and the utility function of the data requester based on the multi-master-slave game model; the second calculation module 203 is used to calculate the utility of the data owner locally using the distributed non-dominated sorting genetic algorithm NSGA-III based on the utility function of the data owner; the third calculation module 204 is used to calculate the utility of the data requester locally using the particle swarm optimization algorithm PSO based on the utility function of the data requester; the determining module 205 is used to determine a transaction scheme based on the utility of the data owner and the utility of the data requester; the transaction module 206 is used to determine that the transaction scheme includes the data price and the data purchase quantity;
[0163] In some embodiments, the multi-master-slave game model includes a data owner, a data requester, the data price, the utility of the data owner, the data purchase quantity, and the utility of the data requester; the data price is determined by the data owner based on the data purchase quantity of the data requester; the data purchase quantity is determined by the data requester based on the data price or an initial pricing; the initial pricing is determined by the data agent.
[0164] In some embodiments, the method further includes: the data owner storing the encrypted data in a distributed database and storing the data storage address and hash on a blockchain; verifying the data ownership through a data agent to generate a data ownership record; the data owner signing the data ownership record and storing the signed data ownership record on the blockchain.
[0165] In some embodiments, generating a data ownership record by confirming data ownership includes: the data owner sending a data ownership request message to a data agent; the data agent generating a non-fungible token for the data based on the data ownership request message; and the data agent publishing a data product; the data product includes a data product number, the data owner's blockchain address, and a set of data attributes.
[0166] A data ownership record is generated using the data product number, timestamp, and data description; the timestamp is the generation time of the non-fungible token.
[0167] In some embodiments, prior to constructing the multi-master-slave game model, the method further includes:
[0168] The data requester sends a data transaction request message to the data agent; the data transaction request message contains the data requester's demand attribute set and the data requester's blockchain address; the data agent retrieves a data product based on the demand attribute set and sends the data product to the data requester; the data product includes a data product number, the data owner's blockchain address, and a data attribute set; the data agent sends a data transaction notification message to the data owner and creates a status channel; the data transaction notification message contains the data product number and the data requester's blockchain address; the status channel is used for the data owner and the data requester to match transactions and determine a transaction plan.
[0169] In some embodiments, before the data transaction is performed according to the transaction scheme, the method further includes: the data owner signing the transaction scheme to obtain a transaction scheme signed by the data owner; the data requester signing the transaction scheme to obtain a transaction scheme signed by the data requester; storing the transaction scheme signed by the data owner and the transaction scheme signed by the data requester on a blockchain; the data broker closing the state channel; the state channel being used by the data owner and the data requester to match transactions and determine the transaction scheme.
[0170] In some embodiments, the data transaction according to the transaction scheme includes: according to the transaction scheme, the data requester sends a transfer request message to the data owner; the data owner stores the encrypted data in a distributed database based on the transfer request message; the encrypted data is sent to the data requester through the distributed database; and the data requester decrypts the encrypted data to obtain the data.
[0171] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3As shown, the electronic device may include a processor 310, a communications interface 320, a memory 330, and a communication bus 340, wherein the processor 310, communications interface 320, and memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute the data transaction processing method provided in the above embodiments. This method includes: constructing a multi-master-slave game model; calculating the utility function of the data owner and the utility function of the data requester based on the multi-master-slave game model; calculating the utility of the data owner locally using the distributed non-dominated sorting genetic algorithm NSGA-III based on the data owner's utility function; calculating the utility of the data requester locally using the particle swarm optimization algorithm PSO based on the data requester's utility function; determining a transaction scheme based on the utility of the data owner and the utility of the data requester; the transaction scheme including the data price and the data purchase quantity; and performing a data transaction according to the transaction scheme.
[0172] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0173] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the data transaction processing method provided by the above methods. This method includes: calculating a data owner utility function and a data requester utility function based on a constructed multi-master-slave game model; calculating the data owner's utility locally using a distributed non-dominated sorting genetic algorithm (NSGA-III) based on the data owner's utility function; calculating the data requester's utility locally using a particle swarm optimization algorithm (PSO) based on the data requester's utility function; determining a transaction scheme based on the data owner's utility and the data requester's utility; the transaction scheme including a data price and a data purchase quantity; and performing a data transaction according to the transaction scheme.
[0174] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0175] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of this application, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0176] It should be noted that the division of units / modules in the above embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.
[0177] It should also be noted that the terms "first," "second," etc., used in the embodiments of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, and the number of objects is not limited. For example, the first object can be one or more.
[0178] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A data transaction processing method, characterized by, include: Construct a multi-master-slave game model; The utility functions of the data owner and the data requester are calculated based on the multi-master-slave game model; and the multi-master-slave game model is solved using a hierarchical optimization approach. Based on the data owner utility function, the distributed non-dominated sorting genetic algorithm NSGA-III is used to calculate the data owner's utility locally; The utility of the data requester is calculated locally using the Particle Swarm Optimization (PSO) algorithm based on the aforementioned data requester utility function. A transaction plan is determined based on the utility of the data owner and the utility of the data requester; the transaction plan includes the data price and the amount of data to be purchased. Conduct data transactions according to the aforementioned transaction plan; The multi-master-slave game model includes a data owner, a data requester, the data price, the utility of the data owner, the amount of data purchased, and the utility of the data requester. The data price is determined by the data owner based on the amount of data purchased by the data requester; The amount of data purchased is determined by the data requester based on the data price or initial pricing; the initial pricing is determined by the data agent.
2. The data transaction processing method according to claim 1, characterized in that, Before constructing the multi-master-slave game model, the following is also included: The data owner stores the encrypted data in a distributed database and stores the data storage address and hash on the blockchain; Data ownership is established through a data broker, generating data ownership records. The data owner signs the data ownership confirmation record and stores the signed data ownership confirmation record on the blockchain.
3. The data transaction processing method according to claim 2, characterized in that, The process of establishing data ownership and generating data ownership records includes: The data owner sends a data ownership request message to the data agent; The data agent generates a non-fungible token for the data based on the data ownership request message; A data agent publishes data products; the data product includes a data product number, the blockchain address of the data owner, and a set of data attributes; A data ownership record is generated using the data product number, timestamp, and data description; the timestamp is the generation time of the non-fungible token.
4. The data transaction processing method according to claim 1, characterized in that, Before constructing the multi-master-slave game model, the following is also included: The data requester sends a data transaction request message to the data broker; the data transaction request message contains the data requester's set of required attributes and the data requester's blockchain address; The data agent retrieves data products based on the demand attribute set and sends the data products to the data requester; the data product includes a data product number, the data owner's blockchain address, and a data attribute set; The data agent sends a data transaction notification message to the data owner and creates a status channel; the data transaction notification message contains the data product number and the blockchain address of the data requester; the status channel is used by the data owner and the data requester to match transactions and determine a transaction plan.
5. The data transaction processing method according to claim 1, characterized in that, Before the data transaction is performed according to the transaction scheme, the following is also included: The data owner signs the transaction plan to obtain a transaction plan signed by the data owner; The data requester signs the transaction plan to obtain a transaction plan signed by the data requester; The transaction scheme signed by the data owner and the transaction scheme signed by the data requester are stored on the blockchain; The data agent closes the status channel; the status channel is used by the data owner and the data requester to match transactions and determine a transaction plan.
6. The data transaction processing method according to claim 1, characterized in that, The data transaction according to the transaction plan includes: According to the transaction plan, the data requester sends a transfer request message to the data owner; The data owner stores the encrypted data in a distributed database based on the transfer request message; The encrypted data is sent to the data requester through the distributed database. The data requester decrypts the encrypted data to obtain the data.
7. A data transaction processing device, characterized in that, include: The building module is used to build a multi-master-slave game model; The first calculation module is used to calculate the utility function of the data owner and the utility function of the data requester based on the multi-master-slave game model; and to solve the multi-master-slave game model using a hierarchical optimization approach. The second calculation module is used to calculate the utility of the data owner locally using the distributed non-dominated sorting genetic algorithm NSGA-III based on the data owner utility function. The third calculation module is used to calculate the utility of the data requester locally using the particle swarm optimization algorithm (PSO) based on the data requester's utility function. A determining module is used to determine a transaction plan based on the utility of the data owner and the utility of the data requester; the transaction plan includes the data price and the data purchase quantity; The transaction module is used to conduct data transactions according to the transaction plan; The multi-master-slave game model includes a data owner, a data requester, the data price, the utility of the data owner, the amount of data purchased, and the utility of the data requester. The data price is determined by the data owner based on the amount of data purchased by the data requester; The amount of data purchased is determined by the data requester based on the data price or initial pricing; the initial pricing is determined by the data agent.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the data transaction processing method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the data transaction processing method as described in any one of claims 1 to 6.