Crowdsourcing data transaction method based on Stackelberg game and smart contract
By introducing blockchain and smart contract technology into the crowdsourcing data trading platform, combined with Stackelberg game model, a three-stage Stackelberg game and smart contract trading framework was built, solving the problems of opaque transactions and easy tampering records in traditional platforms, and achieving efficient, secure and transparent data trading.
Patent Information
- Application Number
- CN202510221943.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-01-10
- Filing Date
- 2025-02-27
- Publication Date
- 2025-05-09
AI Technical Summary
Traditional crowdsourcing data trading platforms have problems such as opaque transaction processes and easy tampering with transaction records, which makes it difficult to guarantee the reliability and transparency of data.
Blockchain and smart contract technology are introduced, combined with Stackelberg game model, and a crowdsourcing data trading framework based on three-stage Stackelberg game and smart contracts is built to ensure that transactions are transparent, safe and efficient.
Through blockchain and smart contract technology, transaction transparency and reliability are improved, data integrity and security are ensured, profit distribution is optimized, and the interests of each participant are maximized.
Smart Images

Figure CN119963190A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data trading, and in particular relates to a crowdsourcing data trading method based on Stackelberg game and smart contract. Background Art
[0002] Technologies such as artificial intelligence, the Internet of Things, big data analysis, and cloud computing are reshaping the way we produce, live, and consume. Different from traditional industrial production methods, modern industry needs to make use of smart devices to quickly record industrial data to provide real-time industrial services. With the continuous development of mobile networks and smart devices, large-scale sensor applications such as the Industrial Internet of Things (IIoT) have emerged. Crowdsourcing, as an effective means of utilizing group intelligence, can assign industrial sensing tasks to workers (i.e., mobile devices) through crowdsourcing cloud platforms for data collection and sharing. It has attracted widespread attention from industry and academia due to its broad application prospects.
[0003] In the past few years, more and more literature has used game theory to optimize crowdsourcing platforms, and some of these studies focus on applying Stackelberg games to improve the performance and efficiency of crowdsourcing systems. Yang et al. designed a platform-centric incentive mechanism based on Stackelberg games and a user-oriented auction incentive mechanism, and verified their performance through a large number of simulations. An et al. proposed a new data exchange method involving the use of a combined multi-armed bandit and a three-stage Stackelberg game, theoretically proved its Stackelberg equilibrium and tight regret bound, and verified its excellent performance through real data simulation. Li et al. proposed a crowd-sensing incentive mechanism in a continuous time-varying scenario using Stackelberg games, and the simulation results proved the effectiveness and significance of the method. Yang et al. introduced an incentive mechanism algorithm with reputation constraints based on Stackelberg games. The simulation results show that the algorithm effectively gives priority to users with higher reputation, bringing real benefits to the server platform and users. The rapid development of blockchain has attracted widespread attention and research, and some scholars have combined blockchain with Stackelberg games to optimize crowdsourcing data trading systems. Huang et al. designed a blockchain-assisted social perception framework through smart contract technology, used the Stackelberg game model to select tasks and participation levels, and used the Hessian matrix to analyze the game equilibrium. Huang et al. proposed a crowdsourcing data trading system based on dynamic games and blockchain, in which the Stackelberg game was used to manage the selection of suppliers and combined with watermarking technology to protect data copyright. Zhang et al. designed a dedicated blockchain to provide decentralized, real and transparent vehicle crowd-sensing services, in which the Stackelberg game was used to solve the task scheduling problem between task publishers and crowdsourcing workers to achieve the optimal design of smart contracts. There are also many scholars who use evolutionary game theory to optimize crowdsourcing service systems, mainly providing solutions to problems such as perception cost, data quality, optimal price determination and incentives in crowdsourcing systems. For example, Wang et al. proposed an evolutionary game model to predict the evolution trend of mobile crowdsourcing systems and used K anonymity to protect the information of crowdsourcing workers. Chi et al. proposed an incentive mechanism based on multi-strategy repeated games to guide workers' strategy selection, and used evolutionary game theory and Wright Fisher model to analyze the strategies of participants. Shao et al. proposed an evolutionary game model and benefit selection method based on non-cooperative evolutionary game to solve the problem of evolutionary stable equilibrium. Li et al. modeled a three-party evolutionary game model between task publishers, platforms and people, and provided strategies to avoid free riding and false reporting by analyzing the stability of evolutionary game strategies.
[0004] Crowdsourcing Data Trading (CDT) usually involves three basic participants: the cloud platform acting as a data exchange intermediary, the task publisher, and the crowdsourcing workers, such as Figure 1 As shown in Figure 2, the platform can select workers to perform tasks published by task publishers. However, the industrial IoT network environment is vulnerable to a series of malicious attacks, including tampering or deleting data, which leads to data distortion and inaccurate trend analysis. Therefore, designing an effective worker selection mechanism to maximize the utility of crowdsourcing is a research hotspot in mobile sensing technology. Summary of the invention
[0005] The purpose of the present invention is to address the problems that the traditional CDT platform may bring, such as the opaque transaction process and the easy tampering of transaction records. Therefore, the blockchain is introduced as an intermediary to provide a crowdsourcing data transaction method based on Stackelberg game and smart contracts, and a high-quality CDT framework named BG-CDT is proposed to maximize the utility of crowdsourcing. In order to maximize the interests of each participant in the CDT system and consider the role of the CDT platform in the CDT system, on the basis of the existing two-stage Stackelberg game, the CDT platform based on blockchain is introduced into Stackelberg as a game participant. The present invention proposes a three-stage Stackelberg game and gives the optimal strategy for each participant.
[0006] To achieve the above object, the technical solution of the present invention is: a crowdsourcing data transaction method based on Stackelberg game and smart contract, comprising:
[0007] S1. Initialize by building a four-party evolutionary game model, using Nash equilibrium to analyze interactive behaviors, and using digital twins and reinforcement learning algorithms to prevent fraud;
[0008] S2. Build a crowdsourcing data trading solution based on Stackelberg game and smart contracts. The trading stage is driven by smart contracts.
[0009] S3: After completing the transaction phase, each crowdsourcing worker will process his / her own data. wi Send to IPFS and get the corresponding hash storage path Addr wi .
[0010] In one embodiment of the present invention, step S3 further includes: the task publisher obtains the path verified and aggregated by the platform, and downloads the corresponding data from IPFS.
[0011] In one embodiment of the present invention, step S1 specifically includes the following steps:
[0012] S10, define the initial structure, require all participants in the blockchain to register, establish a four-party evolutionary game model, and meet
[0013] msgR.value≥$foregift
[0014] msgP.value≥$foregift
[0015] Among them, value indicates the fee that the caller needs to pay, $foregift is the minimum deposit required to participate in the crowdsourcing data transaction CDT, msgR is the RequesterIntilization function called by the task publisher when initiating CDT by sending a transaction message, and calls the PlatformIntilization function through msgP;
[0016] S11, check whether the task publisher and the platform have provided a deposit no less than the $foregift threshold, if so, proceed to step S12;
[0017] S12, send msgR to call RequesterIntilization function, record as task publisher; initialize variables, including: task publisher's perception task M, task publishing platform P and data quality requirement ε; at the same time, set time constraints;
[0018] S13, trigger p Notify The platform selected for event notification;
[0019] S14. Send msgP to call PlatformIntilization function and record it as platform; initialize variables, including: task publisher R and task publisher-aware task T, and notify all registered crowdsourcing workers in the system by sending sNotify event.
[0020] In one embodiment of the present invention, in step S12, the time constraints are set as follows:
[0021] T trade =now+τ trade
[0022] T viodet =T publish +τ viodet
[0023] T delivery =T viodet +τ delivery
[0024] Where <τ trade ,τ viodet ,τ delivery>Represents the time thresholds for data transaction, violation detection and data processing respectively; <T trade ,T viodet ,T publish ,T delivery >Represents data transaction, violation detection, transaction release time and data processing time respectively; now represents the current time;
[0025] In one embodiment of the present invention, in step S2, the crowdsourcing data transaction scheme based on Stackelberg game and smart contract includes a three-stage Stackelberg game, namely, the first stage - task publisher strategy, the second stage - platform strategy, and the third stage - crowdsourcing worker strategy.
[0026] In one embodiment of the present invention, step S2 is specifically implemented as follows:
[0027] S20. Define the optimal incentive strategy for the three-stage Stackelberg game as (R * , r * , ), where the data task publisher is the leader of the first stage, and the optimal strategy is R * ; The platform is the leader in the second stage, and the optimal strategy is r * , the data crowdsourcing worker is a follower in the third stage, and the optimal strategy of crowdsourcing worker i is The goal of each participant is to increase their own benefits by finding the best strategy among the self-adjustable strategies to meet:
[0028] Phase 1 - Task Issuer Strategy:
[0029]
[0030] The profit of the task publisher is defined as the income of the task publisher minus the transaction fee paid to the platform:
[0031]
[0032] The first part is the income that the task publisher can get after completing the task. The linear quadratic function with diminishing marginal returns is used to convert the participation of crowdsourcing workers into the income of the task publisher. η is an adjustable parameter that represents the degree of participation of crowdsourcing workers in monetary form, where the coefficient c i >0,d i >0; the second part is the total reward from the task publisher to the platform and crowdsourcing workers, p i is the level of participation of the participants, α is an adjustable parameter of the monetary value that the task publisher is willing to give to the crowdsourcing workers’ participation level; N is the total number of crowdsourcing workers; R is the strategy of the task publisher;
[0033] Phase 2 - Platform Strategy:
[0034]
[0035] Ω(R,r,p i ) is the platform profit, defined as:
[0036]
[0037] in, Represents the total reward of the task publisher, represents the total amount paid to crowdsourcing workers, C i (p i is the maintenance cost of the platform, and the profit of the platform is the reward minus the platform maintenance cost; r is the strategy of the crowdsourcing platform;
[0038] Phase 3 - Crowdsourcing Worker Strategy:
[0039]
[0040] ψ i (r,p i ) is the crowdsourcing worker benefit, defined as r i (p i ) represents the remuneration paid by the crowdsourcing platform to crowdsourcing worker i, represents the cost function required by crowdsourcing worker i in the data collection process;
[0041] S21. The optimal strategy must follow the Stackelberg equilibrium principle to ensure that no participant is willing to switch to other less profitable strategies. The Stackelberg equilibrium satisfies the following inequality:
[0042]
[0043] S22. Use backward induction to solve the Stackelberg equilibrium problem; first, solve the follower game to determine the optimal strategy for different crowdsourcing workers i
[0044]
[0045] Among them, θ>0, λ>0, α i >0, b i >0 is a predefined parameter, s is an adjustable parameter;
[0046] Through the results of the follower game, the leaders in the second stage determine their optimal strategy r * :
[0047]
[0048] Finally, considering the follower game and the leader's strategy in the second stage, the leader in the first stage finally decides his optimal strategy R * :
[0049]
[0050] A, B, C, D 1 , D 2 and Λ is an intermediate variable; where, Λ=2A(1+α 2 θA), c i >0,d i >0 is the coefficient that represents the degree of concavity of the function.
[0051] In one embodiment of the present invention, step S3 specifically includes the following steps:
[0052] S30. Each crowdsourcing worker will submit his / her own data wi Send to IPFS and get the corresponding hash storage path Addr wi ;
[0053] S31, the crowdsourcing worker will pathAddr wi Upload to the blockchain smart contract, and the platform obtains the address Addr wi Perform data validation and aggregation;
[0054] S32. The platform will verify and aggregate the data p Upload to IPFS and store the corresponding storage path Addr p Upload to smart contract;
[0055] S33. The task publisher obtains the address Addr p And download the corresponding data from IPFS.
[0056] The present invention also provides a crowdsourcing data trading system based on Stackelberg game and smart contract, including:
[0057] The model building module is initialized by building a four-party evolutionary game model, using Nash equilibrium to analyze interactive behaviors, and using digital twins and reinforcement learning algorithms to prevent fraud;
[0058] The transaction scheme construction module builds a crowdsourcing data transaction scheme based on Stackelberg game and smart contracts. The transaction stage is driven by smart contracts.
[0059] The data processing module performs data processing. After completing the transaction phase, each crowdsourcing worker will wi Send to IPFS and get the corresponding hash storage path Addr wi ;The task publisher obtains the path verified and aggregated by the platform and downloads the corresponding data from IPFS.
[0060] The present invention also provides a computer device, including a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the method steps described above can be implemented.
[0061] The present invention also provides a computer-readable storage medium, on which computer program instructions that can be executed by a processor are stored. When the processor executes the computer program instructions, the method steps described above can be implemented.
[0062] Compared with the prior art, the present invention has the following beneficial effects:
[0063] (1) Analysis from the perspective of improving transaction transparency and reliability: The present invention introduces blockchain and smart contract technology to improve the credibility of the platform based on the crowdsourcing data transaction solution of Stackelberg game and smart contract. The present invention uses Stackelberg game to analyze the profit distribution in crowdsourcing data transaction to achieve economical and efficient data transaction, and transforms the problem into a three-stage Stackelberg game to optimize the profit distribution, involving task publishers, platforms and multiple crowdsourcing workers. The present invention ensures transaction transparency and security through blockchain and smart contracts.
[0064] (2) Analysis from the perspective of transaction efficiency: This paper proposes a high-quality CDT framework, named BG-CDT, to optimize the efficiency of the CDT system. This paper introduces blockchain as an intermediary to maximize the interests of each participant in the CDT system. Based on the existing Stackelberg game, this paper proposes a three-stage Stackelberg game and gives the optimal strategy for each participant. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A high-quality CDT framework according to an embodiment of the present invention and an overall flow chart of BG-CDT work;
[0066] Figure 2 The profit change curves of the task publisher strategy, crowdsourcing platform strategy and crowdsourcing worker strategy;
[0067] Figure 3The present invention is a flowchart of a mobile crowdsourcing data transaction solution based on Stackelberg game and smart contract. DETAILED DESCRIPTION
[0068] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.
[0069] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0070] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0071] The present invention provides a crowdsourcing data transaction method based on Stackelberg game and smart contract, comprising:
[0072] S1. Initialize by building a four-party evolutionary game model, using Nash equilibrium to analyze interactive behaviors, and using digital twins and reinforcement learning algorithms to prevent fraud;
[0073] S2. Build a crowdsourcing data trading solution based on Stackelberg game and smart contracts. The trading stage is driven by smart contracts.
[0074] S3: After completing the transaction phase, each crowdsourcing worker will process his / her own data. wi Send to IPFS and get the corresponding hash storage path Addr wi ;The task publisher obtains the path verified and aggregated by the platform and downloads the corresponding data from IPFS.
[0075] The following is the specific implementation process of the present invention.
[0076] Please refer to Figure 1 , Embodiment 1 of the present invention is:
[0077] A crowdsourcing data trading scheme based on Stackelberg game and smart contract. This embodiment is based on the existing two-stage Stackelberg game. By introducing the blockchain-based CDT platform into Stackelberg as a game participant, we propose a three-stage Stackelberg game. First, initialization is performed. All blockchain participants must register and submit a minimum deposit that meets the standards. After the platform verifies whether all participants have provided a minimum deposit that is not less than the threshold, the function sends a pNotify event to notify the crowdsourcing platform specified in the system. Then the transaction phase is carried out, which is driven by smart contracts. First, the task publisher formulates a strategy to optimize profits. The platform then selects a strategy that can maximize its own profits based on the task publisher's strategy. Finally, each crowdsourcing worker determines the strategy that can maximize personal profits based on the strategy formulated by the leader. After the transaction phase is completed, the crowdsourcing workers upload their data to IPFS and obtain the corresponding hash storage path. After obtaining the hash storage path, the crowdsourcing workers upload it to the blockchain smart contract for verification by the platform. The platform uploads the verified and aggregated data to IPFS and uploads the corresponding storage path to the smart contract. Finally, the task publisher obtains the address and downloads the corresponding data from IPFS.
[0078] like Figure 1 As shown, a crowdsourcing data transaction method based on Stackelberg game and smart contract in this embodiment includes the following steps:
[0079] S1. Initialize the entire system. All participants in the blockchain must register before participating, and the minimum deposit of all participants must meet certain requirements;
[0080] S2. The transaction phase is driven by smart contracts, which includes a three-stage Stackelberg game. Each stage maximizes its own profits according to a certain strategy.
[0081] S3. Based on the optimized strategy, the transaction phase is completed. The crowdsourcing workers upload the corresponding data to IPFS to obtain the corresponding path. The crowdsourcing workers upload the obtained path to the blockchain smart contract. The platform obtains the address for data verification and aggregation. After completion, it is uploaded to the smart contract. Finally, the task publisher downloads the corresponding data from IPFS.
[0082] That is, in this embodiment, on the basis of the existing two-stage Stackelberg game, by introducing the blockchain-based CDT platform into Stackelberg as a game participant, we proposed a three-stage Stackelberg game and gave the optimal strategy for each participant. It consists of a task publisher, a blockchain-based platform using smart contracts, and multiple crowdsourcing workers, where data storage is implemented using distributed storage IPFS based on blockchain. The first stage is to initialize the participants, and all participants need to register. The minimum deposit of all participants needs to meet certain requirements, and then the function sends a pNotify event to notify the crowdsourcing platform specified in the system. Then the transaction stage is carried out, which is driven by smart contracts. First, the task publisher formulates a strategy to optimize profits, and then the platform selects a strategy that can maximize its own profits based on the strategy of the task publisher. Finally, each crowdsourcing worker determines the strategy that can maximize personal profits based on the strategy formulated by the leader. After the transaction phase is completed, the crowdsourcing workers upload their data to IPFS and obtain the corresponding hash storage path. After obtaining the hash storage path, the crowdsourcing workers upload it to the blockchain smart contract for verification by the platform. The platform uploads the verified and aggregated data to IPFS and uploads the corresponding storage path to the smart contract. Finally, the task publisher obtains the address and downloads the corresponding data from IPFS.
[0083] Please refer to Figure 2 , Embodiment 2 of the present invention is:
[0084] On the basis of the above-mentioned embodiment 1, a structural causal model is defined in step S1, triggers are eliminated through a causal diffusion model, and the causal intervention layer is used to unmix the false association between images and labels caused by the noise or distribution of the data itself in the reverse denoising process, which specifically includes the following steps:
[0085] S1. By establishing a four-party evolutionary game model, using Nash equilibrium to analyze interactive behavior, and utilizing digital twins and reinforcement learning algorithms to prevent fraud, all participants in the blockchain must register before participating, and all participants need to provide their own minimum deposit and meet certain requirements.
[0086] S2. Crowdsourcing data trading scheme based on Stackelberg game and smart contract. The transaction stage is driven by smart contracts and includes a three-stage Stackelberg game.
[0087] S3: After completing the transaction phase, each crowdsourcing worker will process his / her own data. wi Send to IPFS and get the corresponding hash storage path Addr wi .
[0088] Step S1 specifically includes the following steps:
[0089] S10, define the initial structure, require all participants in the blockchain to register, establish a four-party evolutionary game model, and meet
[0090] msgR.value≥$foregift
[0091] msgP.value≥$foregift
[0092] Among them, value indicates the fee that the caller needs to pay (such as the ether paid), $foregift is the minimum deposit required to participate in the crowdsourcing data transaction CDT, msgR is the RequesterIntilization function called by the task publisher when initiating CDT, and calls the PlatformIntilization function through msgP;
[0093] S11, check whether the task publisher and the platform have provided a deposit no less than the $foregift threshold, if so, proceed to step S12;
[0094] S12, send msgR to call RequesterIntilization function, record as task publisher; initialize variables, including: task publisher's perception task M, task publishing platform P and data quality requirement ε; at the same time, set time constraints;
[0095] T trade =now+τ trade
[0096] T viodet =T publish +τ viodet
[0097] T delivery =T viodet +τ delivery
[0098] Where <τ trade ,τ viodet ,τ delivery >Represent the time thresholds for data transaction, violation detection and data processing respectively. <T trade ,T viodet ,T publish ,T delivery >Represents data transaction, violation detection, transaction release time and data processing time respectively; now represents the current time;
[0099] S13, trigger p NotifyThe platform selected for event notification;
[0100] S14. Send msgP to call PlatformIntilization function and record it as platform; initialize variables, including: task publisher R and task publisher-aware task T, and notify all registered crowdsourcing workers in the system by sending sNotify event.
[0101] The specific implementation steps of step S2 are as follows:
[0102] S20. Define the optimal incentive strategy for the three-stage Stackelberg game as (R * , r * , ), where the data task publisher is the leader of the first stage, and the optimal strategy is R * ; The platform is the leader in the second stage, and the optimal strategy is r * , the data crowdsourcing worker is a follower in the third stage, and the optimal strategy of crowdsourcing worker i is The goal of each participant is to increase their own benefits by finding the best strategy among the self-adjustable strategies to meet:
[0103] Phase 1 - Task Issuer Strategy:
[0104]
[0105] The profit of the task publisher is defined as the income of the task publisher minus the transaction fee paid to the platform:
[0106]
[0107] The first part is the income that the task publisher can get after completing the task. The linear quadratic function with diminishing marginal returns is used to convert the participation of crowdsourcing workers into the income of the task publisher. η is an adjustable parameter that represents the degree of participation of crowdsourcing workers in monetary form, where the coefficient c i >0,d i >0; the second part is the total reward from the task publisher to the platform and crowdsourcing workers, p i is the level of participation of the participants, α is an adjustable parameter of the monetary value that the task publisher is willing to give to the crowdsourcing workers’ participation level; N is the total number of crowdsourcing workers; R is the strategy of the task publisher;
[0108] Phase 2 - Platform Strategy:
[0109]
[0110] Ω(R,r,p i ) is the platform profit, defined as:
[0111]
[0112] in, Represents the total reward of the task publisher, represents the total amount paid to crowdsourcing workers, C i (p i is the maintenance cost of the platform, and the profit of the platform is the reward minus the platform maintenance cost; r is the strategy of the crowdsourcing platform;
[0113] Phase 3 - Crowdworker Strategy:
[0114]
[0115] ψ i (r,p i ) is the crowdsourcing worker benefit, defined as r i (p i ) represents the remuneration paid by the crowdsourcing platform to crowdsourcing worker i, represents the cost function required by crowdsourcing worker i in the data collection process;
[0116] S21. The optimal strategy must follow the Stackelberg equilibrium principle to ensure that no participant is willing to switch to other less profitable strategies. The Stackelberg equilibrium satisfies the following inequality:
[0117]
[0118] S22. Use backward induction to solve the Stackelberg equilibrium problem; first, solve the follower game to determine the optimal strategy for different crowdsourcing workers i
[0119]
[0120] Among them, θ>0, λ>0, α i >0, b i >0 is a predefined parameter, s is an adjustable parameter;
[0121] Through the results of the follower game, the leaders in the second stage determine their optimal strategy r * :
[0122]
[0123] Finally, considering the follower game and the leader's strategy in the second stage, the leader in the first stage finally decides his optimal strategy R * :
[0124]
[0125] A, B, C, D 1 , D 2 and Λ is an intermediate variable. Among them, c i >0,d i >0 indicates a coefficient that characterizes the degree of concavity of the function.
[0126] That is, in this embodiment, the optimal incentive strategy of the three-stage Stackelberg game is assumed, in which the task publisher is the leader of the first stage, the crowdsourcing platform is the leader of the second stage, and the data crowdsourcing worker is the follower of the third stage. The goal of each participant is to increase their income by finding the best strategy among the self-adjustable strategies to maximize their own theory. The present invention uses MATLAB R2019b version to simulate the impact of strategy changes of game participants on their income, and concludes that when the decision maker approaches the optimal strategy, his income will also approach the maximum value. It can be seen that when all three parties choose the Nash equilibrium strategy (R * ,r * , At this time, the benefits that the three parties can obtain are the highest.
[0127] The present invention discloses a crowdsourcing data transaction scheme based on Stackelberg game and smart contract, introduces blockchain and smart contract to improve transaction transparency and reliability, and optimizes profit distribution through three-stage Stackelberg game. Game decision analysis based on agent modeling uses multi-agent reinforcement learning to simulate game decision evolution in a digital twin environment to improve prediction accuracy. The present invention proposes a high-quality CDT framework, named BG-CDT, to optimize the efficiency of the CDT system. In view of the problems that the traditional CDT platform may bring, such as the opaque transaction process and the easy tampering of transaction records, we introduce blockchain as an intermediary. In order to maximize the interests of each participant in the CDT system and consider the role of the CDT platform in the CDT system, on the basis of the existing two-stage Stackelberg game, by introducing the blockchain-based CDT platform into Stackelberg as a game participant, a three-stage Stackelberg game is proposed on this basis, and the optimal strategy of each participant is given. Specifically, it consists of a task publisher, a block-based platform using smart contracts, and multiple crowdsourcing workers, wherein data storage is implemented using distributed storage IPFS based on blockchain.
[0128] The present invention also provides a crowdsourcing data trading system based on Stackelberg game and smart contract, including:
[0129] The model building module is initialized by building a four-party evolutionary game model, using Nash equilibrium to analyze interactive behaviors, and using digital twins and reinforcement learning algorithms to prevent fraud;
[0130] The transaction scheme construction module builds a crowdsourcing data transaction scheme based on Stackelberg game and smart contracts. The transaction stage is driven by smart contracts.
[0131] The data processing module performs data processing. After completing the transaction phase, each crowdsourcing worker will wi Send to IPFS and get the corresponding hash storage path Addr wi ;The task publisher obtains the path verified and aggregated by the platform and downloads the corresponding data from IPFS.
[0132] The present invention also provides a computer device, including a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the method steps described above can be implemented.
[0133] The present invention also provides a computer-readable storage medium, on which computer program instructions that can be executed by a processor are stored. When the processor executes the computer program instructions, the method steps described above can be implemented.
[0134] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0135] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0136] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0137] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0138] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
Claims
1. A crowdsourcing data transaction method based on Stackelberg game and smart contract, characterized in that: include: S1. Initialize by building a four-party evolutionary game model, using Nash equilibrium to analyze interactive behaviors, and using digital twins and reinforcement learning algorithms to prevent fraud; S2. Build a crowdsourcing data trading solution based on Stackelberg game and smart contracts. The trading stage is driven by smart contracts. S3: After completing the transaction phase, each crowdsourcing worker will process his / her own data. wi Send to IPFS and get the corresponding hash storage path Addr wi .
2. The crowdsourcing data transaction method based on Stackelberg game and smart contract according to claim 1 is characterized in that: Step S3 also includes: the task publisher obtains the path verified and aggregated by the platform, and downloads the corresponding data from IPFS.
3. The crowdsourcing data transaction method based on Stackelberg game and smart contract according to claim 1 is characterized in that: Step S1 specifically includes the following steps: S10. Define the initial structure, require all participants in the blockchain to register, establish a four-party evolutionary game model, and satisfy msgR.value≥$foregift msgP.value≥$foregift Among them, value means that the caller needs to pay the fee, $foregift is the minimum deposit required to participate in the crowdsourcing data transaction CDT, msgR is the RequesterIntilization function called by the task publisher when initiating CDT, and calls the PlatformIntilization function through msgP; S11, check whether the task publisher and the platform have provided a deposit no less than the $foregift threshold, if so, proceed to step S12; S12, send msgR to call RequesterIntilization function, record as task publisher; initialize variables, including: task publisher's perception task M, task publishing platform P and data quality requirement ε; at the same time, set time constraints; S13, trigger p Notify The platform selected for event notification; S14. Send msgP to call PlatformIntilization function and record it as platform; initialize variables, including: task publisher R and task publisher-aware task T, and notify all registered crowdsourcing workers in the system by sending sNotify event.
4. The crowdsourcing data transaction method based on Stackelberg game and smart contract according to claim 3 is characterized in that: In step S12, the time constraints are set as follows: T trade =now+τ trade T viodet =T publish +τ viodet T delivery =T viodet +τ delivery Where <τ trade ,τ viodet ,τ delivery >Represents the time thresholds for data transaction, violation detection and data processing respectively; <T trade ,T viodet ,T publish ,T delivery >Represents the time of data transaction, violation detection, transaction release and data processing respectively; now represents the current time.
5. The crowdsourcing data transaction method based on Stackelberg game and smart contract according to claim 1 is characterized in that: In step S2, the crowdsourcing data transaction scheme based on Stackelberg game and smart contract includes three-stage Stackelberg game, namely, the first stage - task publisher strategy, the second stage - platform strategy, and the third stage - crowdsourcing worker strategy.
6. The crowdsourcing data transaction method based on Stackelberg game and smart contract according to claim 5 is characterized in that: The specific implementation steps of step S2 are as follows: S20. Define the optimal incentive strategy for the three-stage Stackelberg game as Among them, the data task publisher is the leader of the first stage, and the optimal strategy is R * ; The platform is the leader in the second stage, and the optimal strategy is r * , the data crowdsourcing worker is a follower in the third stage, and the optimal strategy of crowdsourcing worker i is The goal of each participant is to increase their own benefits by finding the best strategy among the self-adjustable strategies to meet: Phase 1 - Task Issuer Strategy: The profit of the task publisher is defined as the income of the task publisher minus the transaction fee paid to the platform: The first part is the income that the task publisher can get after completing the task. The linear quadratic function with diminishing marginal returns is used to convert the participation of crowdsourcing workers into the income of the task publisher. η is an adjustable parameter that represents the degree of participation of crowdsourcing workers in monetary form, where the coefficient c i >0,d i >0; the second part is the total reward from the task publisher to the platform and crowdsourcing workers, p i is the level of participation of the participants, α is an adjustable parameter of the monetary value that the task publisher is willing to give to the crowdsourcing workers’ participation level; N is the total number of crowdsourcing workers; R is the strategy of the task publisher; Phase 2 - Platform Strategy: Ω(R,r,p i ) is the platform profit, defined as: in, Represents the total reward of the task publisher, represents the total amount paid to crowdsourcing workers, C i (p i is the maintenance cost of the platform, and the profit of the platform is the reward minus the platform maintenance cost; r is the strategy of the crowdsourcing platform; Phase 3 - Crowdworker Strategy: ψ i (r,p i ) is the crowdsourcing worker benefit, defined as r i (p i ) represents the remuneration paid by the crowdsourcing platform to crowdsourcing worker i, represents the cost function required by crowdsourcing worker i in the data collection process; S21. The optimal strategy must follow the Stackelberg equilibrium principle to ensure that no participant is willing to switch to other less profitable strategies. The Stackelberg equilibrium satisfies the following inequality: S22. Use backward induction to solve the Stackelberg equilibrium problem; first, solve the follower game to determine the optimal strategy for different crowdsourcing workers i Among them, θ>0, λ>0, α i >0, b i >0 is a predefined parameter, s is an adjustable parameter; Through the results of the follower game, the leaders in the second stage determine their optimal strategy r * : Finally, considering the follower game and the leader's strategy in the second stage, the leader in the first stage finally decides his optimal strategy R * : A, B, C, D1, D2 and Λ are intermediate variables, among which, Λ=2A(1+α 2 θA), c i >0,d i >0 is the coefficient that represents the degree of concavity of the function.
7. The crowdsourcing data transaction method based on Stackelberg game and smart contract according to claim 1 or 2, characterized in that: Step S3 specifically includes the following steps: S30. Each crowdsourcing worker will submit his / her own data wi Send to IPFS and get the corresponding hash storage path Addr wi ; S31, the crowdsourcing worker will pathAddr wi Upload to the blockchain smart contract, and the platform obtains the address Addr wi Perform data validation and aggregation; S32. The platform will verify and aggregate the data p Upload to IPFS and store the corresponding storage path Addr p Upload to smart contract; S33. The task publisher obtains the address Addr p And download the corresponding data from IPFS.
8. A crowdsourcing data trading system based on Stackelberg game and smart contract, characterized in that: include: The model building module is initialized by building a four-party evolutionary game model, using Nash equilibrium to analyze interactive behaviors, and using digital twins and reinforcement learning algorithms to prevent fraud; The transaction scheme construction module builds a crowdsourcing data transaction scheme based on Stackelberg game and smart contracts. The transaction stage is driven by smart contracts. The data processing module performs data processing. After completing the transaction phase, each crowdsourcing worker will wi Send to IPFS and get the corresponding hash storage path Addr wi ;The task publisher obtains the path verified and aggregated by the platform and downloads the corresponding data from IPFS.
9. A computer device, characterized in that: The method comprises a memory, a processor, and computer program instructions stored in the memory and executable by the processor. When the processor executes the computer program instructions, the method steps as claimed in any one of claims 1 to 7 can be implemented.
10. A computer-readable storage medium storing computer program instructions that can be executed by a processor, wherein when the processor executes the computer program instructions, the method steps according to any one of claims 1 to 7 can be implemented.