Method for selecting optimal distributor in point-to-point content distribution network based on block chain
By designing a comprehensive evaluation mechanism and a verifiable distribution quality verification protocol in a blockchain-based point-to-point content distribution network, the problem of inefficient distribution is solved, and reliable and efficient transmission and security of content blocks are achieved.
Patent Information
- Application Number
- CN202510050640.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-01-13
AI Technical Summary
The lack of effective distributor selection methods in the blockchain-based peer-to-peer content distribution network, resulting in inefficient distribution. Existing methods are mainly random selection or selection based on a single evaluation dimension, lacking comprehensive evaluation and verification.
A comprehensive evaluation mechanism is designed to automatically settle and verify the distributor's service quality through verifiable distribution quality verification protocols and smart contracts, combine the distribution quality dimension weight calculation of domain entropy, evaluate the distributor's comprehensive credibility, and select the most suitable distributor within the budget provided by the content provider.
It improves the distribution efficiency of content blocks in the point-to-point content distribution network, realizes reliable and efficient transmission of content blocks, and ensures security and efficiency.
Smart Images

Figure CN119892849A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular to a method for selecting an optimal distributor in a peer-to-peer content distribution network based on blockchain. Background Art
[0002] With the development of the Internet and the enrichment of social life, the amount of online content transmission has increased dramatically. According to Cisco statistics, by the end of 2022, video has accounted for more than 82% of the entire Internet transmission content. In order to cope with such a huge demand for data transmission, content providers usually need to quickly distribute content through content distribution networks (CDNs). In centralized content distribution networks, the content distribution server is uniformly provided by a distribution service provider, but it has many disadvantages, including: users cannot estimate the required peak bandwidth, so they need to purchase excess bandwidth capacity to cope with peak requests; the system is not robust enough, and centralized servers are easily targeted by network attacks, which brings single point problems; the cost is expensive, because idle server resources ultimately need to be paid by users. To solve these problems, peer-to-peer networks have great potential. The system model of peer-to-peer content distribution networks is that content providers own and intend to sell content, content distributors contribute storage and bandwidth resources to achieve fast content distribution services and obtain rewards from content providers, and content consumers obtain the required content from content distributors and pay fees to content providers.
[0003] As a revolutionary distributed ledger technology, blockchain can reshape the trust model between distrustful peers in distributed networks. Blockchain technology has two important characteristics. The first is asymmetric incentive exchange. The token mechanism in blockchain (such as cryptocurrency) can motivate participants in peer-to-peer content distribution networks to actively share their asymmetric resource needs. The second is a trusted third party. Blockchain can replace the traditional role of middlemen and purely rely on encryption algorithms or tools to act as a third-party trusted institution (TTP). Therefore, many studies have combined blockchain technology with peer-to-peer content distribution networks and have shown the effective application of blockchain technology in peer-to-peer content distribution networks. For example, in order to ensure the security of peer-to-peer content distribution networks, especially to ensure that all participants can fairly get what they deserve (that is, content providers should be rewarded for providing content; content distributors should be rewarded for contributing bandwidth resources; content consumers only need to pay when they get the right content), and for a large number of typical download scenarios (such as software packages, audio and video content distribution and download services), He designed a secure and efficient peer-to-peer download transmission protocol based on blockchain. Goyal proposed Gringotts, a secure currency reward system for peer-to-peer content distribution networks, which allows content providers to verify the correct distribution of content by providing a new delivery proof mechanism. Almashaqbeh proposed Cachecash, a decentralized content distribution network based on cryptocurrency, bypassing the centralized management methods of existing content distribution network companies, and end users can organically set up new caches in exchange for cryptocurrency. Qureshi proposed a blockchain-based peer-to-peer content distribution system that provides copyright protection, anti-collusion, micropayments, piracy tracking, etc. by using technologies such as anti-collusion fingerprints, perceptual hash functions, and peer-to-peer content distribution networks.
[0004] However, although the blockchain-based peer-to-peer content distribution network ensures important security attributes for participants, the problem of content block distribution efficiency still exists, and one of the main reasons is the lack or failure to identify the most suitable distributor. Specifically, the above literature ignores the process of selecting distributors and randomly entrusts distributors; only a single evaluation dimension of distributors is considered, resulting in a lack of universality in the selection of distributors. Even if multiple dimensions are considered, the collected information of each dimension cannot be verified, resulting in the unreliability of the selection process. Therefore, selecting reliable and efficient content distributors can improve the distribution efficiency of content blocks in peer-to-peer content distribution networks and achieve reliable and efficient transmission of content blocks.
[0005] Currently, peer-to-peer content distribution networks based on blockchain face the problem of distribution efficiency. More specifically, distribution efficiency depends largely on the appropriate selection of distributors. Existing distributor selection solutions mainly include two methods: random selection and evaluation-based selection. The former randomly selects from candidate distributors without adopting a specific selection strategy, resulting in the inability to guarantee distribution performance in an optimized manner. The latter evaluates the behavior of distributors and produces an overall evaluation result, such as total credit or reputation, to determine the priority distributor. Evaluation-based methods can be further divided into subjective methods (i.e., subjective evaluations by consumers) and objective methods, but there are problems such as single consideration of dimensions and unreliable collection of dimensional information. Summary of the invention
[0006] The purpose of the present invention is to provide a method for selecting the best distributor in a peer-to-peer content distribution network based on blockchain. By considering multiple objective dimensions of the distributor, a comprehensive evaluation mechanism is designed, and the credibility problem of dimensional information is solved in a verifiable manner through automatic settlement by smart contracts, so as to select the most suitable distributor within the budget provided by the content provider and improve the distribution efficiency.
[0007] To achieve the above object, the present invention provides a method for selecting the optimal distributor in a peer-to-peer content distribution network based on blockchain, and the specific steps are as follows:
[0008] In the synchronization network, a specific protocol instance, a global predicate φ(·) for the correctness of a given content, and a global synchronization time function Ο time and static polynomial-time adversaries, through a verifiable distribution quality verification protocol Π PoDQ The proof of the quality of the distributor's distribution is implemented in the interaction between the sender S, the receiver R and the verifier V (i.e., the blockchain), including:
[0009] Sender S sends the first content block to the blockchain. The chain records the time of sending as the start time of sending. Receiver R receives the first content block through the chain and returns a "receipt" to the sender.
[0010] For each subsequent content block, the receiver R will send a "receipt" back to the sender to confirm that the content block has indeed been distributed, and the receiver will continue to send the next content block after verifying that the receipt is correct;
[0011] Content m is divided into n ordered content blocks of the same size γ, and the content is distributed from the ξth block, ξ∈[1,n]. The sender S uses the latest "receipt" containing the content block index to quantify the distributor's service quality, including three aspects:
[0012] First, once the protocol is completed, the number of distribution tasks of sender S will increase by 1;
[0013] Second, when the sender S uses the latest receipt to obtain payment from the blockchain, the blockchain can calculate how many content blocks have been distributed in total, and combine the size γ of each block to calculate the total content distribution amount this time;
[0014] Third, the blockchain will record the time when the sender sends the latest receipt as the end time of sending. Based on this, combined with the start time of sending, the blockchain automatically calculates the total time spent, and combines it with the amount of content distributed this time to calculate the speed of this content distribution, and combines it with the previous average speed to update the sender's total average speed;
[0015] Establish a comprehensive reputation evaluation mechanism for distributors based on the distribution quality dimension weight calculation based on domain entropy; in the application scenario, the sender S is transformed into the distributor d;
[0016] Combining the above-mentioned quantifiable and verifiable distributor service quality proof and the distributor comprehensive reputation evaluation mechanism based on the distribution quality dimension weight calculation based on domain entropy, the comprehensive credibility of each distributor is obtained;
[0017] According to the comprehensive credibility of the distributor and the total budget θ of the content provider, the most suitable distributor is selected using the optimal distributor selection algorithm.
[0018] Preferably, the latest receipt containing the content block index is used to quantify the number of distributed content blocks, the total amount of distributed content, the total distribution time and the distribution speed thus calculated.
[0019] Preferably, the distributor S uses the interface S.send(·) to input n content blocks and corresponding verification string sequences. Activation; after activation, the distributor S interacts with the receiver R and opens an interface S.prove(·).
[0020] Preferably, the receiver R uses the interface R.receive(·) to activate and interact with the distributor S by inputting the global predicate φ(·) and the starting block index ξ; at the same time, the output where n',ξ∈[1,n],ξ≤n', and each It is verified to be valid by the global predicate φ(·).
[0021] Preferably, the verifier V takes the starting block index ξ∈[1,n], the proof π generated by the interface S.prove(·) and other information received from S and R as input, and outputs the total distributed content amount total_amount=ω×γ, where ω∈{0,...,n} is the number of distributed content blocks;
[0022] The validator V uses the smart contract G deployed in the blockchain network PoDQOnce instantiated, the verifier stores data and executes the agreed program when the predetermined conditions are met.
[0023] Preferably, the distributor S and the receiver R generate a public key pair (sk S ,pk S ) and (sk R ,pk R ), and their public keys are declared bound to themselves.
[0024] Preferably, the distributor starts a timer T S And continue for two rounds, initialize a variable π S :=null is used to save the sender S's latest receipt proof and execute as follows:
[0025] For the initial block, that is, i≡ξ, S distributes to V Where: sid is the protocol session ID, start_chunk is a string used to indicate the initial content block to be sent, ξ represents the subscript of the initial content block, Represents the ξth content block and its digital signature, and waits for a response message from R Where receipt is a string to indicate that this is receipt information, i is the content block index, The receipt for the i-th content block sent back by the receiver, i.e., the digital signature; for i∈[ξ+1,n], i.e., a non-initial content block: S distributes to R And wait for the response message; if S If it expires before receiving the receipt, the iteration is terminated; otherwise, S verifies If true, the output Reset S and continue to the next iteration; if not, the iteration is interrupted; when S.prove(·) is called, it returns the proof π S and stop.
[0026] Preferably, the recipient starts a timer T that lasts two rounds. R , and execute as follows: for j≡ξ, wait for the distribution from V For j∈[ξ+1,n], wait for the distribution from S If the timer R If the timeout period elapses before a message is received, R stops; otherwise R verifies that the global predicate is satisfied. If true, reset Τ R , output And distribute to S in If false, stop.
[0027] Preferably, the distributor comprehensive reputation evaluation mechanism includes:
[0028] First, normalize the dimension value of each dimension to obtain N(d,q);
[0029] For each distributor d selected from the distributor set D, each dimension q∈Q calculates the neighborhood granularity δ based on the neighborhood radius ε q (d);
[0030] Based on δ q (d) Calculate the neighborhood entropy NE(q), and calculate the weight value α of each dimension based on NE(q);
[0031] Each distributor d selected from the distributor set D is N(d,q i ) and α i Calculate the value of the distributor's comprehensive credibility Δ d , update the distributor d's Δ d , and added to the ordered set of distributors in descending order of comprehensive credibility
[0032] Preferably, the optimal distributor selection algorithm includes
[0033] First, select a distributor that can meet the distribution task of all n content blocks within the distribution budget θ Then if there is a remaining budget, add a cost performance E(d') = Δ d' / B d' The highest distributor until the budget is exhausted.
[0034] Therefore, the present invention adopts the above-mentioned method for selecting the best distributor in a peer-to-peer content distribution network based on blockchain, designs a comprehensive evaluation mechanism by considering multiple objective dimensions of the distributor, and solves the credibility problem of dimension information in a verifiable way through automatic settlement by smart contracts, selects the most suitable distributor within the budget provided by the content provider, and improves the distribution efficiency. It achieves a complete guarantee of security and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A flowchart of a method for selecting the best distributor in a peer-to-peer content distribution network based on blockchain;
[0036] Figure 2 The on-chain Gas cost of each function in the smart contract;
[0037] Figure 3 Assign weights to different neighborhood radii;
[0038] Figure 4 Results for selected distributors under different budgets;
[0039] Figure 5 The distribution time cost of different content block sizes;
[0040] Figure 6 This is a time cost comparison chart. DETAILED DESCRIPTION
[0041] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.
[0042] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.
[0043] Embodiment 1
[0044] like Figure 1 As shown in FIG. 1 , a method for selecting the optimal distributor in a peer-to-peer content distribution network based on blockchain is shown in FIG. 1 . The specific steps are as follows:
[0045] In the synchronization network, a specific protocol instance, a global predicate φ(·) for the correctness of a given content, and a global synchronization time function Ο time and static polynomial-time adversaries, through a verifiable distribution quality verification protocol Π PoDQ The proof of the quality of the distributor's distribution is implemented in the interaction between the sender S, the receiver R and the verifier V (i.e., the blockchain), including:
[0046] Step 1: Verify the quality of the distribution protocol Π under the assumption of a synchronous network and an independent setting PoDQ Against probabilistic polynomial-time and static adversaries in S, R, and V, we implement a global predicate φ(·) and a globally synchronized time oracle Ο time Distribution quality verification, including
[0047] Sender S sends the first content block to the blockchain. The chain records the time of sending as the start time of sending. Receiver R receives the first content block through the chain and returns a "receipt" to the sender.
[0048] For each subsequent content block, the receiver R will send a "receipt" back to the sender to confirm that the content block has indeed been distributed, and the receiver will continue to send the next content block after verifying that the receipt is correct;
[0049] Content m is divided into n ordered content blocks of the same size γ, and the content is distributed from the ξth block, ξ∈[1,n]. The sender S uses the latest "receipt" containing the content block index to quantify the distributor's service quality, including three aspects:
[0050] First, once the protocol is completed, the number of distribution tasks of sender S will increase by 1;
[0051] Second, when the sender S uses the latest receipt to obtain payment from the blockchain, the blockchain can calculate how many content blocks have been distributed in total, and combine the size γ of each block to calculate the total content distribution amount this time;
[0052] Third, the blockchain will record the time when the sender sends the latest receipt as the end time of sending. Based on this, combined with the start time of sending, the blockchain automatically calculates the total time spent, and combines it with the amount of content distributed this time to calculate the speed of this content distribution, and combines it with the previous average speed to update the sender's total average speed. Intuitively, the distributor may lose the bandwidth of distributing a content block at most, but such a distribution process is obviously safe and efficient.
[0053] The number of content blocks distributed, the total amount of content distributed, the total distribution time and the distribution speed calculated are quantified using the latest receipt containing the content block index.
[0054] The parties to the distribution quality verification protocol are: Interactive Multi-Time Turing Machine (ITM) distributor S, ITM receiver R and non-interactive Turing machine verifier V, and follow the following rules:
[0055] Distributor S can use the interface S.send(·) to input n content blocks and corresponding verification string sequences. Activate. A global and effective predicate Used to verify m i Is it the i-th valid block of content m? Once activated, the distributor S interacts with the receiver R and opens an interface S.prove(·), which can be called to generate a proof π, which is used to represent the relevant verification information of the distributed content block.
[0056] The receiver R can use the interface R.receive(·) to activate and interact with the distributor S by inputting the global predicate Φ(·) and the starting block index ξ. At the same time, the output where n',ξ∈[1,n],ξ≤n', and each It is verified to be valid by the global predicate Φ(·).
[0057] The verifier V takes the starting index ξ∈[1,n], the proof π generated by S.prove(·) and other information received from S and R as input, and outputs the total distributed content amount total_amount=ω×γ, where ω∈{0,…,n} is the number of distributed content blocks.
[0058] Distribution Quality Verification Protocol Π PoDQConstruction: To implement the verification setting, the distributor S and the receiver R generate a public key pair (sk S ,pk S ) and (sk R ,pk R ), and their public keys are declared bound to themselves. Therefore, under the synchronous network assumption and independent setting, it is possible to PoDQ Fight probabilistic polynomial time (PPT) and static adversaries in S, R, and V to achieve a global predicate Φ(·) and a globally synchronized time oracle Ο time Verification of the quality of distribution (e.g., instantiated by the Network Time Protocol NTP).
[0059] Construction of distributor S: Once distributor S passes S.send(·), input pk R and initial block index ξ∈[1,n] to activate. Start a timer Τ S And continue for two rounds, initialize a variable π S :=null is used to save the sender S's latest receipt proof and execute as follows:
[0060] For the initial block, that is, i≡ξ, S distributes to V Where: sid is the protocol session ID, start_chunk is a string used to indicate the initial content block to be sent, ξ represents the subscript of the initial content block, Represents the ξth content block and its digital signature, and waits for a response message from R Where receipt is a string to indicate that this is receipt information, i is the content block index, The receipt for the i-th content block sent back by the receiver, i.e., the digital signature; for i∈[ξ+1,n], i.e., a non-initial content block: S distributes to R And wait for the response message; if S If it expires before receiving the receipt, the iteration is terminated; otherwise, S verifies If true, the output Reset S and continue to the next iteration; if not, the iteration is interrupted; when S.prove(·) is called, it returns the proof π S and stop.
[0061] Construction of receiver R: Receiver R uses R.receive(·) to input pk S , the starting block index ξ∈[1,n] and (pk R ,sk R ) to activate. Start a timer that lasts two rounds. R, and execute as follows: for j≡ξ, wait for the distribution from V For j∈[ξ+1,n], wait for the distribution from S If the timer R If the timeout period elapses before a message is received, R stops; otherwise R verifies that the global predicate is satisfied. If true, reset Τ R , output And distribute to S in If false, stop;
[0062] Construction of Validator V: Validator V is deployed in the blockchain network through smart contract G PoDQ Instantiated (e.g., Ethereum), the validator can store data securely and transparently and execute the agreed program when the predetermined conditions are met. The specific functions are shown in Table 1.
[0063] Table 1 Contract function: Function G PoDQ
[0064]
[0065] Step 2: Establish a distributor comprehensive reputation evaluation mechanism based on the distribution quality dimension weight calculation based on domain entropy; in the application scenario, the sender S is transformed into the distributor d; combine the above-mentioned quantifiable and verifiable distributor service quality proof and the distributor comprehensive reputation evaluation mechanism based on the distribution quality dimension weight calculation based on domain entropy to obtain the comprehensive credibility of each distributor;
[0066] According to the trust evaluation dimensions in step 1: the number of delivery tasks delivery_nums, the total amount of distribution content total_amount, and the average distribution speed avg_speed, the comprehensive trustworthiness of a distributor can be calculated. First, the dimension value of each dimension is normalized by formula (1):
[0067]
[0068] Where f(d,q) represents the specific dimension value of distributor d under dimension q, max(·) and min(·) represent the maximum and minimum values of all distributors under dimension q, respectively.
[0069] According to the normalized result, the neighborhood entropy NE under dimension q can be calculated by formula (2):
[0070]
[0071] where δ q (d)={d'∈D,S q(d,d')≤ε} represents the neighborhood granularity. S q (d, d') = |N(d, q) - N(d', q) represents the similarity between distributor d and other distributors d'. ε∈[0, 1] is the neighborhood radius. Neighborhood entropy is used to represent the average neighborhood uncertainty of dimension q, which can characterize the diversity of distributors in different dimensions.
[0072] Based on the neighborhood entropy of dimension q, the weight of dimension q can be calculated by formula (3):
[0073]
[0074] in Q = {q1, q2, q3} are the three dimensions that can be verified in step 1. At the same time, a sliding time window is introduced to maintain the stability of the weight of each dimension over a period of time.
[0075] By aggregating all dimensions {q1:delivery_nums; q2:total_amount; q3:avg_speed;}, the comprehensive credibility Δ of distributor d d It can be calculated by formula (4)
[0076]
[0077] According to the obtained comprehensive credibility of each distributor, all distributors are sorted in descending order according to the comprehensive credibility to obtain an ordered distributor set, as shown in Algorithm 1.
[0078] Table 2 Algorithm 1: Distributor comprehensive credibility evaluation algorithm
[0079]
[0080]
[0081] Step 3: According to the comprehensive credibility of the distributor and the total budget θ of the content provider, use the optimal distributor selection algorithm to select the most suitable distributor
[0082] When a content distribution task is issued by a content provider P, the distributor can use their respective bidding fee B for each content block. d According to the comprehensive credibility of the distributor and the total budget θ of the content provider, the most suitable distributor is selected using Algorithm 2. The core idea is: first select a distributor that can meet the distribution task of all n content blocks within the distribution budget θ Then if there is a remaining budget, add a cost performance E(d') = Δ d' / B d'The highest distributor is selected until the budget is exhausted. Therefore, k distributors can be solved in a greedy manner by Algorithm 2. In addition, a system parameter is introduced to ensure that the workload of different distributors is balanced during parallel distribution.
[0083] Table 3 Algorithm 2: Optimal distributor selection algorithm
[0084]
[0085] Verifiable distribution quality verification protocol based on identity authentication, network synchronization and independent settings PoDQ In the case of static PPT adversaries corrupting distributors and receivers, termination, integrity, verifiable γ distribution fairness and verifiable distribution time cost are met.
[0086] Termination and integrity: After the verifiable distribution quality verification protocol is executed, each participant can obtain the output they deserve, that is, the content consumer downloads the correct content; the content distributor obtains the fees paid by the content provider; the content provider obtains the net profit, that is, the fees paid by the content consumer minus the fees paid to the content distributor;
[0087] Verifiable fairness of γ distribution: On the one hand, the malicious distributor S is corrupted by the adversary * It is possible to still receive a "receipt" after termination, for example, to obtain a receipt for a content block with index ω, an honest receiver R can ensure that it has a valid sequence of j∈[ξ,ω] is a set of content blocks, where ξ is the starting block, unless the malicious distributor S * The recipient's signature can be forged. However, this means breaking the EU-CMA security of the signature scheme SIG, and this probability is negligible. On the other hand, for a malicious recipient R who is corrupted by the adversary * , if the verifier V is the input party, receiving the proof π from the honest distributor S S And output ω, then the distributor S can distribute at most ω+1 content block pairs, that is, at most a bandwidth of a content block size γ is wasted. The verifiable fairness of γ distribution is strictly guaranteed.
[0088] Verifiable distribution time cost: Distributor S needs to send the first starting data block with index ξ to the smart contract, and the smart contract will automatically record the timestamp of the distribution start. When the distributor provides the smart contract with valid proof π S, the smart contract will verify it. If the proof is true, the end timestamp of the distribution will be recorded, and the distributor's delivery_nums, total_amount, and avg_speed will be updated. In this process, due to the incentive of reputation evaluation, the distributor S will provide valid proof π to the smart contract as soon as possible. S (To a certain extent, the distribution efficiency can be improved) to obtain rewards and higher reputation evaluation results. Since the start time and end time are stored by the smart contract, the distribution time cost is verifiable and credible.
[0089] At the same time, the distribution quality verification protocol Π can be verified PoDQ The starting content chunk index ξ can start from any specific position so that the distribution quality verification protocol Π can be verified PoDQ Ability to resume content delivery upon unpredictable termination; session IDs are designed to resist replay attacks.
[0090] Quality Verification Protocol Π via Verifiable Distribution PoDQ , the present invention first solves the problem of credibility of the collected dimension values in reputation evaluation. At the same time, the smart contract G PoDQ The Ethereum test network was used to implement and deploy the system, and the on-chain Gas cost was evaluated, such as Figure 2 As shown, the on-chain costs of all parties are acceptable.
[0091] To demonstrate the effectiveness of the proposed optimal distributor selection algorithm, an experimental simulation is performed by randomly generating credible values of three dimensions of 1000 distributor nodes. The experimental environment is a PC with Windows 10, Core(TM) i5-11400H CPU2.7GHz and 16GB RAM. The code is implemented using Python 3.7 with the IDE Pycharm 2020. First, the assignment of dimension weights is determined experimentally. The dimension weight is determined by the neighborhood radius ε. The neighborhood radius should be set as small as possible and can effectively distinguish the three dimensions. Through ten-fold cross validation, as shown in Figure 3 In the subsequent experiments shown, we set the neighborhood radius to 0.8.
[0092] Then, according to different budgets, Algorithm 2 is used to select the optimal distributor, such as Figure 4 As shown in Figure 2, the number of selected distributors and the overall credibility under different budgets are shown. The experimental results show that Algorithm 2 can adaptively select k distributors. At the same time, as the budget increases, the selected content distributors have higher overall credibility.
[0093] The present invention is directed to a peer-to-peer content distribution network based on blockchain, and can adaptively select a set of k distributors with the greatest overall credibility under a budget given by a content provider.
[0094] The peer-to-peer content distribution process was implemented using the Netty framework. The experiment was run on three virtual machines (VMs) in the same LAN, acting as providers, distributors, and consumers, with a network bandwidth of 1GB between them. Each VM was equipped with 2 CPUs, 4GB of memory, and a 200GB hard disk. Figure 5 The time cost of delivering content of different sizes using different content chunk sizes is shown.
[0095] like Figure 6 As shown, the present invention is compared with related works (the greedy algorithm in Algorithm 3 of Table 4, random selection, and selection through a single dimension). Experimental results show that the optimal distributor selected by the present invention through the credibility evaluation mechanism can obtain a higher overall credibility.
[0096] Table 4 Algorithm 3: Greedy Algorithm
[0097]
[0098] Therefore, the present invention adopts the above-mentioned method for selecting the best distributor in a peer-to-peer content distribution network based on blockchain, designs a comprehensive evaluation mechanism by considering multiple objective dimensions of the distributor, and solves the credibility problem of dimension information in a verifiable way through automatic settlement by smart contracts, selects the most suitable distributor within the budget provided by the content provider, and improves the distribution efficiency. It achieves a complete guarantee of security and efficiency.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for selecting the best distributor in a peer-to-peer content distribution network based on blockchain, characterized in that: The specific steps are as follows: In the synchronization network, a specific protocol instance, a global predicate Φ(·) for the correctness of a given content, and a global synchronization time function Ο time and static polynomial-time adversaries, through a verifiable distribution quality verification protocol Π PoDQ The proof of the quality of the distributor's distribution is implemented in the interaction between the sender S, the receiver R and the verifier V (i.e., the blockchain), including: Sender S sends the first content block to the blockchain. The chain records the time of sending as the start time of sending. Receiver R receives the first content block through the chain and returns a "receipt" to the sender. For each subsequent content block, the receiver R will send a "receipt" back to the sender to confirm that the content block has indeed been distributed, and the receiver will continue to send the next content block after verifying that the receipt is correct; The content m is divided into n ordered content blocks of the same size γ, and the content is distributed from the ξth block, ξ∈[1,n]. The sender S uses the latest "receipt" containing the content block index to quantify the distributor's service quality, including three aspects: First, once the protocol is completed, the number of distribution tasks of sender S will increase by 1; Second, when the sender S uses the latest receipt to obtain payment from the blockchain, the blockchain can calculate how many content blocks have been distributed in total, and combine the size γ of each block to calculate the total content distribution amount this time; Third, the blockchain will record the time when the sender sends the latest receipt as the end time of sending. Based on this, combined with the start time of sending, the blockchain automatically calculates the total time spent, and combines it with the amount of content distributed this time to calculate the speed of this content distribution, and combines it with the previous average speed to update the sender's total average speed; Establish a comprehensive reputation evaluation mechanism for distributors based on the distribution quality dimension weight calculation based on domain entropy; in the application scenario, the sender S is transformed into the distributor d; Combining the above-mentioned quantifiable and verifiable distributor service quality proof and the distributor comprehensive reputation evaluation mechanism based on the distribution quality dimension weight calculation based on domain entropy, the comprehensive credibility of each distributor is obtained; According to the comprehensive credibility of the distributor and the total budget θ of the content provider, the most suitable distributor is selected using the optimal distributor selection algorithm.
2. According to claim 1, a method for selecting the best distributor in a peer-to-peer content distribution network based on blockchain, characterized in that: The number of content blocks distributed, the total amount of content distributed, the total distribution time and the distribution speed calculated are quantified using the latest receipt containing the content block index.
3. According to claim 1, a method for selecting the best distributor in a peer-to-peer content distribution network based on blockchain, characterized in that: Distributor S uses the interface S.send(·) to input n content blocks and corresponding verification string sequences. Activation; after activation, the distributor S interacts with the receiver R and opens an interface S.prove(·).
4. According to claim 1, the method for selecting the optimal distributor in a peer-to-peer content distribution network based on blockchain is characterized in that: The receiver R uses the interface R.receive(·) to activate and interact with the distributor S by inputting the global predicate φ(·) and the starting block index ξ; at the same time, the output where n',ξ∈[1,n],ξ≤n', and each It is verified to be valid by the global predicate φ(·).
5. According to claim 3, the method for selecting the best distributor in a peer-to-peer content distribution network based on blockchain is characterized in that: The verifier V takes the starting block index ξ∈[1,n], the proof π generated by the interface S.prove(·) and other information received from S and R as input, and outputs the total distributed content amount total_amount=ω×γ, where ω∈{0,…,n} is the number of distributed content blocks; The validator V uses the smart contract G deployed in the blockchain network PoDQ Once instantiated, the verifier stores data and executes the agreed program when the predetermined conditions are met.
6. According to claim 1, a method for selecting the best distributor in a peer-to-peer content distribution network based on blockchain, characterized in that: The distributor S and the receiver R generate a public key pair (sk S ,pk S ) and (sk R ,pk R ), and their public keys are declared bound to themselves.
7. According to claim 1, a method for selecting the best distributor in a peer-to-peer content distribution network based on blockchain, characterized in that: The distributor starts a timer S And continue for two rounds, initialize a variable π S :=null is used to save the sender S's latest receipt proof and execute as follows: For the initial block, that is, i≡ξ, S distributes to V Where: sid is the protocol session ID, start_chunk is a string used to indicate the initial content block to be sent, ξ represents the subscript of the initial content block, Represents the ξth content block and its digital signature, and waits for a response message from R Where receipt is a string to indicate that this is receipt information, i is the content block index, The receipt for the i-th content block sent back by the receiver, i.e., the digital signature; for i∈[ξ+1,n], i.e., a non-initial content block: S distributes to R And wait for the response message; if S If it expires before receiving the receipt, the iteration is terminated; otherwise, S verifies If true, the output Reset S and continue to the next iteration; if not, the iteration is interrupted; when S.prove(·) is called, it returns the proof π S and stop.
8. According to claim 1, a method for selecting the best distributor in a peer-to-peer content distribution network based on blockchain, characterized in that: The receiver starts a timer T that lasts two rounds. R , and execute as follows: for j≡ξ, wait for the distribution from V For j∈[ξ+1,n], wait for the distribution from S If the timer R If the timeout period elapses before a message is received, R stops; otherwise R verifies that the global predicate is satisfied. If true, reset Τ R , output And distribute to S in If false, stop.
9. The method for selecting the optimal distributor in a peer-to-peer content distribution network based on blockchain according to claim 1, characterized in that: Distributor comprehensive reputation assessment mechanism, including: First, normalize the dimension value of each dimension to obtain N(d,q); For each distributor d selected from the distributor set D, each dimension q∈Q calculates the neighborhood granularity δ based on the neighborhood radius ε q (d); Based on δ q (d) Calculate the neighborhood entropy NE(q), and calculate the weight value α of each dimension based on NE(q); Each distributor d selected from the distributor set D is N(d,q i ) and α i Calculate the value of the distributor's comprehensive credibility Δ d , update the distributor d's Δ d , and added to the ordered set of distributors in descending order of comprehensive credibility 10. The method for selecting the optimal distributor in a peer-to-peer content distribution network based on blockchain according to claim 1, characterized in that: The optimal distributor selection algorithm includes First, select a distributor that can meet the distribution task of all n content blocks within the distribution budget θ Then if there is a remaining budget, add a cost performance E(d') = Δ d' / B d' The highest distributor until the budget is exhausted.
Citation Information
Patent Citations
Software defined content delivery network server selection mode based on block chain
CN112769590A
Transaction scheduling optimization method based on graph embedding
CN117216071A