CN112288433B - Block chain consensus task processing system and method supporting edge-side cooperation - Google Patents

Block chain consensus task processing system and method supporting edge-side cooperation Download PDF

Info

Publication number
CN112288433B
CN112288433B CN202011284478.3A CN202011284478A CN112288433B CN 112288433 B CN112288433 B CN 112288433B CN 202011284478 A CN202011284478 A CN 202011284478A CN 112288433 B CN112288433 B CN 112288433B
Authority
CN
China
Prior art keywords
mobile device
preset
trust value
block chain
mobile
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011284478.3A
Other languages
Chinese (zh)
Other versions
CN112288433A (en
Inventor
胡博
徐思雅
杨超
赵景宏
郭少勇
金垒
廖博娴
刘冬
王得全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
Beijing University of Posts and Telecommunications
Information and Telecommunication Branch of State Grid Liaoning Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Beijing University of Posts and Telecommunications
Information and Telecommunication Branch of State Grid Liaoning Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, Beijing University of Posts and Telecommunications, Information and Telecommunication Branch of State Grid Liaoning Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202011284478.3A priority Critical patent/CN112288433B/en
Publication of CN112288433A publication Critical patent/CN112288433A/en
Application granted granted Critical
Publication of CN112288433B publication Critical patent/CN112288433B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the invention provides a block chain consensus task processing system and a block chain consensus task processing method supporting edge-side collaboration, wherein the system comprises the following steps: a plurality of MEC servers and a plurality of mobile devices as blockchain devices; the first mobile equipment is used for acquiring a block chain consensus task and selecting a target unloading rule from a plurality of preset unloading rules; processing the block chain consensus task according to a target unloading rule to obtain a first processing result, or sending the block chain consensus task to an MEC server according to the target unloading rule, or splitting the block chain consensus task into a preset number of subtasks according to the target unloading rule after obtaining the trust value of each second mobile device, and sending the subtasks to the second mobile devices meeting the preset trust value condition; and receiving a second processing result returned by the MEC server, or receiving a plurality of subtask processing results returned by each second mobile device, and generating a third processing result. The embodiment of the invention can improve the safety of transaction data storage.

Description

Block chain consensus task processing system and method supporting edge-side cooperation
Technical Field
The invention relates to the technical field of information energy networks, in particular to a block chain consensus task processing system and method supporting edge-side cooperation.
Background
With the application development of the information energy network, users can buy or sell energy products in the information energy network to achieve the purpose of investment and profit, and the energy transaction operation in the information energy network is convenient and fast, so that mobile equipment accessed to the network is increased explosively.
In the prior art, an information energy transaction network generally comprises: the energy product trading system comprises a plurality of edge servers and a plurality of mobile devices, wherein a centralized trading center is arranged in each edge server, and each user can install an application program capable of conducting energy trading on each mobile device to conduct energy product trading or log in an energy trading website of each mobile device to conduct energy product trading. For each transaction process, the centralized transaction center needs to store transaction data corresponding to the transaction process, for example, a user a performs a first energy transaction with a user B through a mobile device a and a mobile device B, and the centralized transaction center can store transaction data between the user a and the user B in the transaction process, where the transaction data may include: energy products of the transaction, transaction amount and the like.
However, the transaction data stored in the centralized transaction center is easily tampered or stolen maliciously, and further the transaction information of the user is leaked, that is, the energy transaction network in the prior art has the problem of low security of the stored transaction data.
Disclosure of Invention
The embodiment of the invention aims to provide a block chain consensus task processing system and method supporting edge-side cooperation so as to improve the safety of transaction data storage. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a block chain consensus task processing system supporting edge-to-edge coordination, where the system includes: the mobile edge computing MEC comprises a plurality of mobile edge computing MEC servers and a plurality of mobile devices serving as block chain devices, wherein the mobile device used for generating block data is a first mobile device, and other mobile devices are second mobile devices;
the first mobile device is used for acquiring a block chain consensus task and selecting a target unloading rule from a plurality of preset unloading rules; processing the block chain consensus task according to a target unloading rule to obtain a first processing result, or sending the block chain consensus task to the MEC server according to the target unloading rule, or splitting the block chain consensus task into a preset number of subtasks according to the target unloading rule after obtaining the trust value of each second mobile device and sending the subtasks to the second mobile devices meeting the preset trust value condition; the block chain consensus task is a task generated by writing target transaction data into a block by using a block chain and verifying the authenticity of the block;
receiving a second processing result returned by the MEC server, or receiving a plurality of subtask processing results returned by each second mobile device meeting a preset trust value condition, and generating a third processing result;
the MEC server is used for receiving the block chain consensus task, processing the block chain consensus task to obtain a second processing result, and returning the second processing result to the first mobile equipment;
and the second mobile equipment is used for receiving the subtask sent by the first mobile equipment, processing the subtask, obtaining a subtask processing result and returning the subtask processing result to the first mobile equipment.
In a second aspect of the embodiments of the present invention, a method for processing a block chain consensus task supporting edge-side cooperation is provided, where the method is applied to a block chain consensus task processing system supporting edge-side cooperation, and the system includes: the mobile edge computing MEC comprises a plurality of mobile edge computing MEC servers and a plurality of mobile devices serving as block chain devices, wherein the mobile device used for generating block data is a first mobile device, and other mobile devices are second mobile devices;
the method comprises the following steps:
the first mobile equipment acquires a block chain consensus task and selects a target unloading rule from a plurality of preset unloading rules; processing the block chain consensus task according to a target unloading rule to obtain a first processing result, or sending the block chain consensus task to the MEC server according to the target unloading rule, or splitting the block chain consensus task into a preset number of subtasks according to the target unloading rule after obtaining the trust value of each second mobile device and sending the subtasks to the second mobile devices meeting the preset trust value condition; the block chain consensus task is a task generated by writing target transaction data into a block by using a block chain and verifying the authenticity of the block;
receiving a second processing result returned by the MEC server, or receiving a plurality of subtask processing results returned by each second mobile device meeting a preset trust value condition, and generating a third processing result;
the MEC server receives the block chain consensus task, processes the block chain consensus task to obtain a second processing result, and returns the second processing result to the first mobile device;
and the second mobile equipment receives and processes the subtask sent by the first mobile equipment, obtains a subtask processing result and returns the subtask processing result to the first mobile equipment.
The embodiment of the invention has the following beneficial effects:
the system and the method for processing the block chain consensus task supporting the edge-side cooperation provided by the embodiment of the invention comprise a plurality of MEC servers and a plurality of mobile devices serving as block chain devices, wherein the mobile device used for generating the block data is a first mobile device, and the other mobile devices are second mobile devices. Since in the embodiment of the present invention, the target transaction data can be written into the block, and the authenticity of the block can be verified, and the block in the block chain has the non-tamper property, the security of the target transaction data stored in the block chain is higher.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a block chain consensus task processing system supporting edge-to-edge coordination according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a block chain consensus task processing system supporting edge-side coordination according to an embodiment of the present invention;
FIG. 3a is a schematic diagram showing a variation rule of a loss function obtained from a simulation experiment;
FIG. 3b is a schematic diagram showing reward variation rules obtained from simulation experiments;
fig. 4a is a schematic diagram showing a relationship between a CPU cycle frequency and a total delay of an MEC server obtained by a simulation experiment;
FIG. 4b is a schematic diagram showing the relationship between CPU cycle frequency and average transaction throughput of the MEC server obtained from simulation experiments;
fig. 5 is a signaling interaction diagram of a block chain consensus task processing method supporting edge-to-edge coordination according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a block chain consensus task processing system supporting edge-to-edge coordination, where the system includes: a plurality of MEC (Mobile Edge Computing) servers 101 and a plurality of Mobile devices as blockchain devices.
The MEC servers 101 are connected by wired links, and each MEC server 101 has computing power to process the blockchain consensus task.
Of the plurality of mobile devices, the mobile device for generating tile data is the first mobile device 102, and the other mobile devices are the second mobile devices 103. In the block chain consensus task processing system supporting edge-to-edge coordination provided in the embodiment of the present invention, an MEC server access node (not shown in fig. 1) is further provided corresponding to each MEC server 101, and the mobile device is accessed to the MEC server 101 through the MEC server access node.
Each mobile device is served by the MEC server access node to which it is connected, i.e. all mobile devices that want to transmit data with the MEC server 101 need to transmit through the MEC server access node.
In the block chain consensus task processing system supporting edge-side collaboration provided by the embodiment of the present invention, the mobile device may be a user terminal, such as a mobile phone or a computer. Every two mobile devices can be transacted with energy, and the transacted products can be energy products such as natural gas, petroleum and the like. Each mobile device may be a blockchain device, and when a user performs an energy transaction on a certain mobile device, the mobile device is the first mobile device 102, that is, the mobile device records transaction data of the energy transaction process. A blockchain application may be installed in each mobile device in advance, and the blockchain application may record energy transaction data performed in the blockchain consensus task processing system supporting edge-side cooperation, that is, generate a block corresponding to the transaction process.
The first mobile device 102 is configured to obtain a blockchain consensus task and select a target offload rule from a plurality of preset offload rules; and processing the block chain consensus task according to a target unloading rule to obtain a first processing result, or sending the block chain consensus task to the MEC server 101 according to the target unloading rule, or splitting the block chain consensus task into a preset number of subtasks according to the target unloading rule after obtaining the trust value of each second mobile device 103 and sending the split subtasks to the second mobile devices 103 meeting the preset trust value condition.
The blockchain consensus task is a task that is generated by writing target transaction data into a block and verifying the authenticity of the block by using the blockchain. After a user performs an energy transaction in the first mobile device 101, the first user device needs to write data of the energy transaction into a block of the first user device, and before that, a Hash value of the block to be generated this time needs to be calculated first, specifically, an existing Hash value calculation method may be used, and a Hash value is calculated according to target transaction data, for example, a Hash value may be calculated by using SHA (Secure Hash Algorithm) 256, and after the Hash value is obtained, the first user device may write the Hash value and the energy transaction data this time into a new block together, and perform verification of block authenticity in cooperation with the second mobile device 103.
A plurality of preset uninstalling rules can be used n (t) e {0,1,2}, where the preset offload rule may include three offload rules, where the identifier corresponding to the first offload rule is 0, which indicates that: not offloading block chain consensus tasksI.e., processing, by the first mobile device 102, the blockchain consensus task; the second offload rule corresponds to a label 1, which indicates that: offloading the blockchain consensus task into the MEC server 101; the third offload rule corresponds to a label 2, which indicates that: and unloading the block chain consensus task to a plurality of second user equipment.
In the process of selecting the target uninstalling rule from the plurality of preset uninstalling rules, a random selection method may be specifically adopted. Or a polling method can be adopted, namely, after the block chain consensus task is obtained for the first time, when a target unloading rule needs to be selected, a first unloading rule can be selected; after the second acquisition of the blockchain consensus task, a second offload rule may be selected, and so on.
In addition, in the process of determining whether to use the first offloading rule as the target offloading rule, a calculation rate of the first mobile device for processing the blockchain consensus task may be calculated first, and the calculation rate is compared with a preset calculation rate threshold, and when the calculation rate of the first mobile device for processing the blockchain consensus task is greater than the preset calculation rate threshold, the first offloading rule may be selected; otherwise, the second offload rule or the third offload rule is selected, wherein the computation rate of the first mobile device 102 for processing the blockchain consensus task can be calculated by the following expression:
Figure GDA0003746013710000051
in the formula, R locl (t) represents the calculated rate at which the first mobile device 102 processes block chain consensus tasks in time slot t,
Figure GDA0003746013710000061
indicating the computational power of the first mobile device 102 in units of number of CPU cycles/s, L n Indicating the number of CPU cycles required for the first mobile device 102 to process the 1-bit blockchain consensus task.
When the target offloading rule is that the blockchain consensus task is not offloaded, the first mobile device 102 processes the blockchain consensus task, that is, calculates a hash value according to a preset hash value calculation method, and obtains a first processing result, where the first processing result is the hash value obtained by the calculation.
When the target offload rule is to offload the blockchain consensus task to the MEC server 101, the first mobile device 102 may send the blockchain consensus task to the MEC server 101 according to the target offload rule, where the blockchain consensus task includes the target transaction data.
When the target uninstalling rule is to uninstall the blockchain consensus task to the plurality of second mobile devices 103, the first mobile device 102 may obtain the trust value of each second mobile device 103 according to the target uninstalling rule, split the blockchain consensus task into a preset number of subtasks, select a preset number of second mobile devices 103 that satisfy a preset trust value condition from the plurality of second mobile devices 103 according to the trust value of each second mobile device 103, and send the split preset number of subtasks to the preset number of second mobile devices 103, respectively.
The preset number may be a value set empirically or experimentally in advance, and for example, the preset number may be set to 10. When the target offload rule selected by the first mobile device 102 is to offload the blockchain consensus task to the plurality of second mobile devices 103, the first mobile device 102 may obtain a trust value of each second mobile device 103, where the trust value may represent a result of the trust evaluation of one entity to another entity at a certain time, and therefore, by obtaining the trust value of each second mobile device 103, a preset number of second mobile devices 103 that satisfy a preset trust value condition are selected from the plurality of second mobile devices 103 and are second mobile devices 103 with a higher trust value.
The block chain consensus task is a complete calculation task capable of calculating a hash value, and the processing of the block chain consensus task is substantially a processing process of executing a more complex program and obtaining a final calculation result. Therefore, the first mobile device 102 may split the block chain consensus task into a plurality of subtasks, and send the split subtasks of the preset number to the second mobile devices 103 of the preset number, respectively, and the second mobile devices 103 process the subtasks, where each subtask includes the target transaction data.
When the first mobile device 102 selects the second offload rule as the target offload rule, the second mobile device that meets the preset trust value condition may be selected from the plurality of second mobile devices according to the trust value of each second mobile device. Next, the transmission rate at which the first mobile device 102 sends the subtasks to the second mobile devices 103 that satisfy the preset trust value condition is calculated, and a preset number of second mobile devices with a higher transmission rate are selected from the second mobile devices that satisfy the preset trust value condition, and the subtasks are received.
The transmission rate at which the first mobile device 102 sends the subtasks to the plurality of second mobile devices 103 may be calculated by the following expression:
Figure GDA0003746013710000071
in the formula (I), the compound is shown in the specification,
Figure GDA0003746013710000072
indicating the transmission rate in time slot t at which the first mobile device 102 sends the block chain consensus task to the plurality of second mobile devices 103, B indicating the channel bandwidth,
Figure GDA0003746013710000073
represents a trust value, P, of the second mobile device 103 n,k (t) represents the transmission power required for the first mobile device 102 to send the blockchain consensus task to the second mobile device 103 in time slot t, g n,k (t) denotes the channel gain between the first mobile device 102 and the second mobile device 103 in time slot t, σ n,k (t) represents the noise variance between the first mobile device 102 and the second mobile device 103 in time slot t.
The MEC server 101 is configured to receive the blockchain consensus task, process the blockchain consensus task, obtain a second processing result, and return the second processing result to the first mobile device 102.
After receiving the blockchain consensus task, the MEC server 101 processes the blockchain consensus task to obtain a second processing result, where the specific processing process is as follows: and calculating the hash value by using a preset hash value calculation method, wherein the hash value is the second processing result. After the second processing result is obtained, the second processing result may be sent to the first mobile device 102, the first mobile device 102 generates a new block according to the hash value and the energy transaction data of this time, and verifies the authenticity of the block in cooperation with the other second mobile devices 103.
And the second mobile device 103 is configured to receive the subtask sent by the first mobile device 102, process the subtask, obtain a subtask processing result, and return the subtask processing result to the first mobile device 102.
After receiving the subtasks sent by the first mobile device 102, the second mobile device 103 processes the subtasks respectively to obtain a subtask processing result, and returns the subtask processing result to the first mobile device 102.
The first mobile device 102 is further configured to receive a second processing result returned by the MEC server 101, or receive a plurality of sub-task processing results returned by each second mobile device 103 that meet a preset trust value condition, and generate a third processing result.
Since the second processing result calculated by the MEC server is a hash value, the hash value can be directly obtained after the first mobile device 102 receives the second processing result returned by the MEC server 101. Since the second mobile devices 103 obtain the sub-task processing results after respectively processing the sub-tasks, the first mobile device 102 needs to generate a third processing result according to the multiple sub-task processing results after receiving the sub-task processing results returned by each second mobile device 103, so as to obtain the hash value.
The block chain consensus task processing system supporting edge-side collaboration provided by the embodiment of the present invention includes a plurality of MEC servers 101 and a plurality of mobile devices serving as block chain devices, where a mobile device used for generating block data is a first mobile device 102, and other mobile devices are second mobile devices 103. Since in the embodiment of the present invention, the target transaction data can be written into the block, and the authenticity of the block can be verified, and the block in the block chain has the non-tamper property, the security of the target transaction data stored in the block chain is higher.
Furthermore, since the amount of computation of the blockchain consensus task generated during the process of writing the target transaction data into the chunk and verifying the authenticity of the chunk, and generating the hash value of the new chunk is large, when the first mobile device 102 offloads the blockchain consensus task into the MEC server 101, the computation time for processing the blockchain consensus task can be reduced due to strong computation resources in the MEC server 101. When the first mobile device 102 splits the blockchain consensus task into a preset number of sub-tasks and the second mobile device 103 meeting the preset trust value condition processes the sub-tasks, the amount of computation of the sub-tasks is less than that of the blockchain consensus task, so that the computation time for processing the blockchain consensus task can be reduced.
Moreover, in the block chain consensus task processing system supporting edge-side coordination provided in the embodiment of the present invention, there may be some second ues that are malicious second ues, and these second ues will affect the security of the block chain consensus task processing system supporting edge-side coordination, for example, leak transaction data of the user, discard a data packet, and the like. Therefore, after the second mobile devices 103 that execute the subtasks are selected and the trust values of the second mobile devices 103 are obtained, the second mobile devices 103 that satisfy the preset trust value condition are selected from the plurality of second mobile devices 103 to execute the subtasks, so that the selected preset number of second mobile devices 103 are all the second mobile devices 103 with higher trust values. The second user equipment with a higher trust value is used for processing the subtask, so that the integrity and the safety of transaction data can be well guaranteed, and potential safety threats are avoided.
As an optional implementation manner in the embodiment of the present invention, after obtaining the trust value of each second mobile device 103 according to the target uninstalling rule, the first mobile device 102 splits the blockchain consensus task into a preset number of subtasks and sends the subtasks to the second mobile devices 103 that satisfy the preset trust value condition, which may include three methods:
the first method comprises the following steps:
obtaining a current direct trust value of each second mobile device 103; the current direct trust value is calculated based on historical transaction records for each second mobile device 103.
Trust values are typically an assessment of the trustworthiness of one entity to another entity at a time, and thus this method may be used in situations where there are many interactions between the first mobile device 102 and the second mobile device 103. The current direct trust value may be calculated by the first mobile device 102 or by the second mobile device 103. In the calculation process, the historical transaction record may be calculated based on the historical transaction record of the second mobile device 103, and the historical transaction record may be the historical transaction record obtained during the interaction with the first mobile device 102 within a preset time period. Wherein the historical transaction records may include: the number of times the transaction was successful, the number of times the transaction failed, and the number of times the transaction result was uncertain.
A preset number of second target mobile devices are selected from the plurality of second mobile devices 103 according to whether the current direct trust value of each second mobile device 103 is greater than a preset direct trust threshold.
After the current direct trust value of each second mobile device 103 is obtained, it may be determined whether the current direct trust value of each second mobile device 103 is greater than a preset direct trust threshold, and when the current direct trust value is greater than the preset direct trust threshold, it indicates that the second mobile device 103 is authentic; otherwise, the second mobile device 103 is not trusted. The preset direct trust threshold may be a value set empirically in advance, for example, the preset direct trust threshold may be 0.5. A preset number of second target mobile devices having a current direct trust value greater than a preset direct trust threshold are then selected from the plurality of second mobile devices 103.
And splitting the block chain consensus task into a preset number of subtasks, and respectively sending the subtasks to a preset number of second target mobile devices.
After the preset number of second target mobile devices are obtained, the block chain consensus task may be split into the preset number of sub-tasks, and the sub-tasks are respectively sent to the preset number of second target mobile devices, and are processed by the second target mobile devices.
And the second method comprises the following steps:
acquiring an indirect trust value of each second mobile device 103; the indirect trust value is used to characterize the probability of transaction success during the historical transaction of the second mobile device 103.
When the degree of interaction between the second mobile device 103 and the first mobile device 102 is not high, or in an initial state of a blockchain consensus task processing system supporting edge-to-edge collaboration, no historical transaction record is stored in the second mobile device 103, and in such a case, the current direct trust value of each second mobile device 103 cannot be calculated, a third-party recommended trust mechanism may be adopted, specifically, a blockchain is adopted as a third party, and the blockchain determines an indirect trust value according to the probability of successful transaction in the historical transaction process of the second mobile device 103.
A preset number of second target mobile devices are selected from the plurality of second mobile devices 103 according to whether the indirect trust value of each second mobile device 103 is greater than a preset indirect trust threshold.
After the indirect trust value of each second mobile device 103 is obtained, it may be determined whether the indirect trust value of each second mobile device 103 is greater than a preset indirect trust threshold, and when the indirect trust value is greater than the preset indirect trust threshold, it indicates that the second mobile device 103 is trusted; otherwise, the second mobile device 103 is not trusted. The preset indirect trust threshold may be a value set empirically in advance, for example, the preset indirect trust threshold may be 0.5. A preset number of second target mobile devices having an indirect trust value greater than a preset indirect trust threshold are then selected from the plurality of second mobile devices 103.
And splitting the block chain consensus task into a preset number of subtasks, and respectively sending the subtasks to a preset number of second target mobile devices.
After the preset number of second target mobile devices are obtained, the block chain consensus task may be split into the preset number of sub-tasks, and the sub-tasks are respectively sent to the preset number of second target mobile devices, and are processed by the second target mobile devices.
And the third is that:
acquiring a current direct trust value and an indirect trust value of each second mobile device 103; the current direct trust value is calculated based on historical transaction records of each second mobile device 103; the indirect trust value is used to characterize the probability of transaction success during the historical transaction of the second mobile device 103.
This method may be applied in case the first mobile device 102 has an interaction with the second mobile device 103. The current direct trust value and the indirect trust value of each second mobile device 103 may be obtained respectively, and the total trust value of each second mobile device 103 may be calculated according to the current direct trust value and the indirect trust value of each second mobile device 103.
The first mobile device 102 may calculate the overall trust value as follows:
calculating the total trust value of each second mobile device 103 by using a sixth preset expression, where the sixth preset expression is:
V n,k =αD n,k +βR n,k
in the formula, V n,k Representing the total confidence value, alpha representing a preset weight coefficient of the direct confidence value, D n,k Representing a direct trust value, beta representing a preset indirect trust value weight coefficient, R n,k Represents an indirect trust value, α ∈ [0,1 ]],β∈[0,1]And α + β ═ 1.
After weighted calculation of the current direct trust value and the indirect trust, the total trust value of the second mobile device 103 may be obtained, where α and β may be preset empirically or experimentally. For example, when the interaction between the second mobile device 103 and the first mobile device 102 is frequent, it indicates that the current direct trust value can objectively reflect the trust level of the second mobile device 103, and α may be set to a value greater than 0.5, which indicates that the current direct trust value is dominant in the total trust value; otherwise, if it is indicated that the current direct trust value cannot objectively reflect the trust level of the second mobile device 103, β may be set to a value greater than 0.5, indicating that the indirect trust value dominates the total trust value.
And selecting a preset number of second target mobile devices from the plurality of second mobile devices 103 according to whether the total trust value of each second mobile device 103 is greater than a preset total trust threshold value.
After the total trust value of each second mobile device 103 is obtained through calculation, it may be determined whether the total trust value of each second mobile device 103 is greater than a preset total trust threshold, and when the total trust value is greater than the preset total trust threshold, it indicates that the second mobile device 103 is trusted; otherwise, the second mobile device 103 is not trusted. The preset total trust threshold may be a value set empirically in advance, for example, the preset total trust threshold may be 0.5. A preset number of second target mobile devices having an overall trust value greater than a preset overall trust threshold are then selected from the plurality of second mobile devices 103.
And splitting the block chain consensus task into a preset number of subtasks, and respectively sending the subtasks to a preset number of second target mobile devices.
After the preset number of second target mobile devices are obtained, the block chain consensus task may be split into the preset number of sub-tasks, and the sub-tasks are respectively sent to the preset number of second target mobile devices, and are processed by the second target mobile devices.
As an optional implementation manner of the embodiment of the present invention, the second mobile device 103 calculates the current direct trust value in the following manner:
and calculating the sum of the times of successful transaction, the times of failed transaction and the times of uncertain transaction results in the historical transaction records, and determining the sum as the total transaction times.
Wherein, each second mobile device 103 can store the historical transaction record with a certain structure data and continuously update the historical transaction record. For example, the storage structure of the historical transaction record may be a triple {1,0, -1}, where 1 indicates successful transaction, -1 indicates failed transaction, and 0 indicates indeterminate transaction results. When calculating the current direct trust value, historical transaction data within a time period prior to the current time may be obtained. After the number of successful transactions, the number of failed transactions, and the number of uncertain transaction results in the historical transaction record are obtained from the triple, the number of successful transactions, the number of failed transactions, and the number of uncertain transaction results may be added to obtain the total number of transactions.
Calculating an initial direct trust value by using a first preset expression, wherein the first preset expression is as follows:
Figure GDA0003746013710000121
in the formula, D n,k Representing an initial direct trust value; s n,k Indicating the number of times the transaction was successful; n is a radical of n,k Representing the total number of transactions. The quotient obtained by dividing the number of successful transactions by the total number of transactions can represent the credibility of the second mobile device 103 in a time period before the current time to some extent.
Calculating a trust value attenuation factor by using a second preset expression, wherein the second preset expression is as follows:
Figure GDA0003746013710000122
in the formula, ζ and ζ 1 And ζ 2 All represent a confidence value decay factor, F n,k Indicating the number of transaction failures.
Updating the initial direct trust value by using a third preset expression to obtain the current direct trust value, wherein the third preset expression is as follows:
D n,k1 t=ζD n,k t+(1-ζ)D n,k1 (t-1)
in the formula, D n,k1 t represents the current direct trust value, D n,k t denotes the initial direct trust value, D n,k1 (t-1) represents the direct trust value corresponding to the last time period. After the initial direct trust value is obtained, the initial direct trust value obtained by the calculation and the direct trust value corresponding to the last time period can be weighted according to the number between the transaction success times and the transaction failure times, when the transaction success times are larger than the transaction failure times, the trust value attenuation factor is set to be a value between 0 and 0.5, otherwise, the trust value attenuation factor is set to be a value between 0.5 and 1, so that the honest second mobile equipment 103 is rewarded, and the malicious second mobile equipment 103 is punished.
As an optional implementation manner of the embodiment of the present invention, the first mobile device 102 calculates the indirect trust value by using the following method:
acquiring a recommendation value corresponding to each second mobile device 103 from each second mobile device 103; the recommended value is preset and stored in a block of the second mobile device 103. An initial value of the recommended value may be set, and the initial value of the recommended value is stored in the block of the second mobile device 103, and the recommended value may be updated periodically according to a historical transaction record of the second mobile device 103 in a time period, for example, a size relationship between the number of successful transactions and the number of failed transactions, and when the number of successful transactions is greater than the number of failed transactions, the recommended value may be increased; otherwise, the recommendation value may be decreased.
The average between the recommended values of the second mobile devices 103 is calculated.
The first mobile device 102 may calculate an average value between the recommended values after obtaining the recommended values of the second mobile devices 103.
The evaluation value of each second mobile device 103 is calculated using a fourth preset expression, which is:
E n,k =1-|R rec -R ave |
in the formula, E n,k Represents an evaluation value, R rec Represents a recommended value, R ave The average value is shown. And evaluating the recommended value of the block chain system by calculating the difference between the average value and the recommended value, wherein the larger the difference between the average value and the recommended value is, the lower the evaluation value of the recommended value is, namely, the recommended value is not credible.
A second mobile device 103 having an evaluation value larger than a preset evaluation threshold value is selected from the plurality of second mobile devices 103 as a second candidate mobile device.
A preset evaluation threshold value which can be 0.5 can be set, the magnitude between the evaluation value of each second mobile device 103 and the preset evaluation threshold value is judged, and when the evaluation value is smaller than the preset evaluation threshold value, even if the recommended value of the second mobile device 103 is higher, the evaluation value cannot be used for processing the subtasks; when the evaluation value is greater than or equal to a preset evaluation threshold value, an indirect trust value may be further calculated. That is, it is necessary to select a second candidate mobile device having an evaluation value larger than a preset evaluation threshold value from among the plurality of second mobile devices 103.
Calculating the indirect trust value of each second candidate mobile device by using a fifth preset expression, wherein the fifth preset expression is as follows:
Figure GDA0003746013710000141
in the formula, R n,k Representing an indirect trust value, E n,k Represents an evaluation value; r rec Represents a recommended value; j denotes the number of second alternative mobile devices.
As an optional implementation manner of the embodiment of the present invention, the sending, by the first mobile device 102, the blockchain consensus task to the MEC server 101 according to the target uninstalling rule includes:
selecting a target MEC server 101 closest to the first mobile device 102 from the plurality of MEC servers 101; or selecting a target MEC server with the largest available resource from a plurality of MEC servers.
The first mobile device 102 sends the blockchain consensus task to the target MEC server 101.
Each MEC server 101 and the first mobile device 102 may be connected by a link, and therefore, a distance between the MEC server 101 and the first mobile device 102 may be determined according to a length of the link between the MEC server 101 and the first mobile device 102, so that a target MEC server 101 closest to the first mobile device 102 is selected from the plurality of MEC servers 101, and the first mobile device 102 may transmit the block chain consensus task to the target MEC server 101.
In addition, when the first mobile device 102 selects the target MEC server 101, the selection may be performed according to available resources of each MEC server 101, specifically, the available resources of each MEC server 101 may be stored in the first mobile device 102, and the available resources are remaining resources after processing the received block chain consensus task, and one MEC server 101 with the largest available resource is selected as the target MEC server by comparing size relationships among the available resources of each MEC server 101.
The MEC server 101 is pre-configured with a fifo data buffer for storing the blockchain consensus tasks that have been offloaded to the MEC server 101 but have not yet been executed. Therefore, the computational resources required for the blockchain consensus task in the processing queue in the MEC server 101 at the beginning of the t +1 time slot can be calculated by the following expression:
F n (t+1)=max{F n (t)-f n Un R n (t),0}
wherein, F n (t +1) represents the computational resources required by the MEC server 101 to process the blockchain consensus task in the queue during the t +1 time slot, F n (t) represents the computational resources required by the MEC server 101 to process the blockchain consensus task in the queue during the t time slot, f n U Representing the computational power of the first mobile device 102 in units of number of CPU cycles/s, p n Is a predetermined processing density (in units of CPU cycles/bit), R n (t) is the total computation rate of the first mobile device 102.
Wherein the total computation rate of the first mobile device 102 may be computed by the following expression:
Figure GDA0003746013710000151
in the formula, R n (t) represents the total calculation rate, a n (t) represents a preset unload rule, and a may be used when calculating the total calculation rate n (t) replace with the identifier corresponding to the target offload rule, R loc (t) represents the calculated rate at which the first mobile device 102 processes the block chain consensus task,
Figure GDA0003746013710000152
representing the transmission rate at which the first mobile device 102 sends the blockchain consensus task to the MEC server 101,
Figure GDA0003746013710000153
representing the transmission rate at which the first mobile device 102 sends the blockchain consensus task to the plurality of second mobile devices 103.
The transmission rate at which the first mobile device 102 sends the blockchain consensus task to the MEC server 101 may be calculated by the following expression:
Figure GDA0003746013710000154
in the formula (I), the compound is shown in the specification,
Figure GDA0003746013710000155
represents the transmission rate at which the first mobile device 102 sends the blockchain consensus task to the MEC server 101 during the time slot t, B represents the channel bandwidth, P n (t) represents the transmission power required by the first mobile device 102 to transmit the blockchain consensus task to the MEC server 101 during the time slot t, g n (t) denotes the channel gain between the first mobile device 102 and the MEC server 101 in the time slot t, σ n (t) represents the noise variance between the first mobile device 102 and the MEC server 101 during the time slot t.
The computing resources available to the blockchain system by the MEC server 101 in the time slot t can be calculated by the following expression:
C n (t)=max{F′-F n (t),C min }
in the formula, C n (t) denotes the computational resources available for the blockchain system in time slot t, F' denotes the total computational capacity of the MEC server 101, F n (t) represents the computational resources, C, required by the MEC server 101 to process the blockchain consensus task in the queue during the t time slots min Representing the minimum computational power required by the blockchain system.
As shown in fig. 2, the block chain consensus task processing system supporting edge-side cooperation according to an embodiment of the present invention further includes: the MEC server manager 201, the MEC server manager 201 is disposed in the cloud, all the MEC servers 101 are connected to the MEC server manager 201 through a core network, and the core network may be a backbone network, and specifically may be a communication transmission network that carries fast communication traffic between main connection nodes.
As an optional implementation manner of the embodiment of the present invention, the first mobile device 102 is further configured to send the processing result to the MEC server 101. Wherein the processing result is as follows: a first processing result, a second processing result, or a third processing result.
Wherein the preset data amount threshold value can be set in advance according to experience or experiment. Each time a processing result is obtained by the first mobile device 102, the processing result may be sent to the MEC server 101.
The MEC server 101 is further configured to send the received processing result to the MEC server manager for storage. After receiving the processing result, the MEC server 101 may send the processing result to the MEC server manager 201 for storage.
The following describes a block chain consensus task processing system supporting edge-side cooperation according to an embodiment of the present invention with a simulation experiment:
in the simulation experiment, 200 mobile devices are included in the blockchain consensus task processing system supporting edge-end cooperation, wherein each mobile user can be connected to the nearest MEC server access node. The CPU cycle frequencies of the mobile device and the MEC server are 1GHz and 2.4GHz respectively. In the simulation experiment, a computer, which includes 8 CPU cores, was used. The CPU adopts Intel (R) core (TM) i7-8565U, and the RAM (Random Access Memory) is 8G.
In order to verify the performance of the block chain consensus task processing system supporting edge-side cooperation provided by the embodiment of the present invention, the following three different models are respectively established: the method comprises the steps of a resource random allocation model, unloading the block chain consensus task to an MEC server model and fixing a block chain task size model, and comparing and analyzing the performances of the three models and the performance of the block chain consensus task processing system supporting edge-end cooperation provided by the embodiment of the invention.
As shown in fig. 3a, the difference between the penalty functions of the blockchain consensus task processing system supporting edge-side coordination and the fixed blockchain task size model is shown. As shown in fig. 3b, the difference between the rewards of the blockchain consensus task processing system supporting edge-to-edge coordination and the fixed blockchain task size model is shown. As can be seen from fig. 3a, the penalty function of the blockchain consensus task processing system supporting edge-side cooperation converges faster, while the fixed blockchain task size model converges more time and converges more slowly. As can be seen from fig. 3b, the reward obtained in the blockchain consensus task processing system supporting edge-side collaboration is higher, while the reward obtained in the fixed blockchain task size model is lower.
FIG. 4a shows a block chain consensus task processing system supporting edge-to-edge coordination and the CPU cycle frequency f of the MEC server in three models t A Influence on the total delay, wherein the CPU cycle frequency f of the MEC server is changed t A The total time delay of the block chain consensus task processing system supporting edge-end cooperation and the three models is correspondingly reduced. FIG. 4b shows a block chain consensus task processing system supporting edge-to-edge coordination and the CPU cycle frequency f of the MEC server in three models t A Influence on average transaction throughput, wherein the average transaction throughput of the blockchain consensus task processing system supporting edge-end cooperation and the three models is along with the CPU cycle frequency f of the MEC server t A Is increased and decreased.
Since the computing resources of the MEC server are limited, as the MEC server consumes more computing resources to process the blockchain consensus task, the computing resources available in the MEC server for the blockchain system become less, resulting in a decrease in transaction throughput of the blockchain. As can be seen from fig. 4a and 4b, the block chain consensus task processing system supporting edge-to-end coordination according to the embodiment of the present invention has a good advantage, and can achieve more balanced energy consumption.
As shown in fig. 5, an embodiment of the present invention further provides a method for processing a blockchain consensus task supporting edge-side cooperation, which is applied to the blockchain consensus task processing system supporting edge-side cooperation shown in fig. 1, and the system includes: a plurality of mobile edge computing MEC servers 101 and a plurality of mobile devices as blockchain devices, wherein the mobile device for generating the block data is the first mobile device 102, and the other mobile devices are the second mobile devices 103.
The block chain consensus task processing method supporting edge-side cooperation provided by the embodiment of the invention comprises the following steps:
s501, the first mobile device obtains a blockchain consensus task, and selects a target offload rule from a plurality of preset offload rules.
S502, processing the block chain consensus task according to the target unloading rule to obtain a first processing result, wherein the block chain consensus task is a task generated by writing target transaction data into a block by using the block chain and verifying the authenticity of the block.
Or S503, the first mobile equipment sends the block chain consensus task to the MEC server according to the target unloading rule.
Or S504, after the first mobile device obtains the trust value of each second mobile device according to the target unloading rule, the first mobile device splits the block chain consensus task into a preset number of subtasks and sends the subtasks to the second mobile devices meeting the preset trust value condition.
And S505, the MEC server receives the block chain consensus task and processes the block chain consensus task to obtain a second processing result.
S506, the MEC server returns the second processing result to the first mobile device.
And S507, the second mobile equipment receives the subtask sent by the first mobile equipment, processes the subtask and obtains a subtask processing result.
And S508, the second mobile equipment returns the subtask processing result to the first mobile equipment.
S509, the first mobile device receives the second processing result returned by the MEC server, or receives a plurality of sub-task processing results returned by each second mobile device that meets the preset trust value condition, so as to generate a third processing result.
The block chain consensus task processing method supporting edge-side cooperation provided by the embodiment of the invention can write target transaction data into a block and verify the authenticity of the block, and the block in the block chain has non-tamper-resistance, so that the security of the target transaction data stored in the block chain is higher.
As an optional implementation manner of the embodiment of the present invention, after obtaining the trust value of each second mobile device according to a target offload rule, the first mobile device splits the blockchain consensus task into a preset number of subtasks and sends the subtasks to the second mobile devices meeting a preset trust value condition, where the step includes:
acquiring the current direct trust value of each second mobile device; the current direct trust value is calculated based on historical transaction records of each second mobile device.
And selecting a preset number of second target mobile devices from the plurality of second mobile devices according to whether the current direct trust value of each second mobile device is larger than a preset direct trust threshold value.
And splitting the block chain consensus task into a preset number of subtasks, and respectively sending the subtasks to a preset number of second target mobile devices.
As an optional implementation manner of the embodiment of the present invention, after obtaining the trust value of each second mobile device according to a target offload rule, the first mobile device splits the blockchain consensus task into a preset number of subtasks and sends the subtasks to the second mobile devices meeting a preset trust value condition, where the step includes:
acquiring an indirect trust value of each second mobile device; the indirect trust value is used for representing the probability of successful transaction in the historical transaction process of the second mobile equipment.
And selecting a preset number of second target mobile devices from the plurality of second mobile devices according to whether the indirect trust value of each second mobile device is greater than a preset indirect trust threshold value.
And splitting the block chain consensus task into a preset number of subtasks, and respectively sending the subtasks to a preset number of second target mobile devices.
As an optional implementation manner of the embodiment of the present invention, after obtaining the trust value of each second mobile device according to a target offload rule, the first mobile device splits the blockchain consensus task into a preset number of subtasks and sends the subtasks to the second mobile devices meeting a preset trust value condition, where the step includes:
acquiring the current direct trust value and the indirect trust value of each second mobile device; the current direct trust value is calculated based on the historical transaction records of each second mobile device; the indirect trust value is used to characterize the probability of successful transaction during the historical transaction process of the second mobile device.
And calculating to obtain the total trust value of each second mobile device according to the current direct trust value and the indirect trust value of each second mobile device.
And selecting a preset number of second target mobile devices from the plurality of second mobile devices according to whether the total trust value of each second mobile device is greater than a preset total trust threshold value.
And splitting the block chain consensus task into a preset number of subtasks, and respectively sending the subtasks to a preset number of second target mobile devices.
As an optional implementation manner of the embodiment of the present invention, the second mobile device calculates the current direct trust value by using the following method:
and calculating the sum of the times of successful transactions, the times of failed transactions and the times of uncertain transaction results in the historical transaction records, and determining the sum as the total transaction times.
Calculating an initial direct trust value by using a first preset expression, wherein the first preset expression is as follows:
Figure GDA0003746013710000201
in the formula, D n,k Representing an initial direct trust value; s n,k Indicating the number of times the transaction was successful; n is a radical of n,k Representing the total number of transactions.
Calculating a trust value attenuation factor by using a second preset expression, wherein the second preset expression is as follows:
Figure GDA0003746013710000202
in the formula, ζ and ζ 1 And ζ 2 All represent a confidence value decay factor, F n,k Indicating the number of times the transaction failed.
Updating the initial direct trust value by using a third preset expression to obtain the current direct trust value, wherein the third preset expression is as follows:
D n,k1 t=ζD n,k t+(1-ζ)D n,k1 (t-1)
in the formula, D n,k1 t represents the current direct trust value, D n,k t denotes the initial direct trust value, D n,k1 (t-1) represents the direct trust value corresponding to the last time period.
As an optional implementation manner of the embodiment of the present invention, the first mobile device calculates the indirect trust value by using the following method:
acquiring a recommended value corresponding to each second mobile device from each second mobile device; the recommended value is preset and stored in a block of the second mobile device.
An average between the recommended values for the second mobile devices is calculated.
And calculating the evaluation value of each second mobile device by using a fourth preset expression, wherein the fourth preset expression is as follows:
E n,k =1-|R rec -R ave |
in the formula, E n,k Represents an evaluation value, R rec Represents a recommended value, R ave The average value is shown.
And selecting a second mobile device with the evaluation value larger than the preset evaluation threshold value from the plurality of second mobile devices as a second candidate mobile device.
Calculating the indirect trust value of each second alternative mobile device by using a fifth preset expression, wherein the fifth preset expression is as follows:
Figure GDA0003746013710000211
in the formula, R n,k Representing an indirect trust value, E n,k Represents an evaluation value; r is rec Represents a recommended value; j denotes the number of second alternative mobile devices.
As an optional implementation manner of the embodiment of the present invention, the first mobile device calculates the total trust value by using the following method:
calculating the total trust value of each second mobile device by using a sixth preset expression, wherein the sixth preset expression is as follows:
V n,k =αD n,k +βR n,k
in the formula, V n,k Representing the total confidence value, alpha representing the direct confidence value weight coefficient, D n,k Representing a direct trust value, beta representing an indirect trust value weight coefficient, R n,k Represents an indirect trust value, α ∈ [0,1 ]],β∈[0,1]And α + β ═ 1.
As an optional implementation manner of the embodiment of the present invention, sending, by a first mobile device, a blockchain consensus task to an MEC server according to a target offload rule includes:
selecting a target MEC server closest to the first mobile equipment from a plurality of MEC servers; or selecting a target MEC server with the largest available resource from a plurality of MEC servers.
The first mobile device sends the blockchain consensus task to the target MEC server.
As an optional implementation manner of the embodiment of the present invention, the block chain consensus task processing system supporting edge-to-edge coordination further includes: MEC server manager.
The block chain consensus task processing method supporting edge-side cooperation provided by the embodiment of the invention further comprises the following steps:
the first mobile device sends the processing result to the MEC server.
And the MEC server sends the received processing result to the MEC server manager for storage.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the system embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A blockchain consensus task processing system supporting edge-side coordination, the system comprising: the mobile edge computing MEC comprises a plurality of mobile edge computing MEC servers and a plurality of mobile devices serving as block chain devices, wherein the mobile device used for generating block data is a first mobile device, and other mobile devices are second mobile devices;
the first mobile equipment is used for acquiring the block chain consensus task and selecting a target unloading rule from a plurality of preset unloading rules in a random or polling mode; processing the block chain consensus task according to a target unloading rule to obtain a first processing result;
or sending the block chain consensus task to the MEC server according to a target unloading rule, wherein the MEC server is used for receiving the block chain consensus task, processing the block chain consensus task, obtaining a second processing result, and returning the second processing result to the first mobile device;
or according to a target unloading rule, after the trust value of each second mobile device is obtained, dividing the block chain consensus task into a preset number of subtasks and sending the subtasks to the second mobile devices meeting the preset trust value condition; the second mobile equipment is used for receiving the subtask sent by the first mobile equipment, processing the subtask, and returning a subtask processing result to the first mobile equipment;
the block chain consensus task is a task generated by writing target transaction data into a block by using a block chain and verifying the authenticity of the block;
and receiving a second processing result returned by the MEC server, or receiving a plurality of subtask processing results returned by each second mobile device meeting a preset trust value condition, and generating a third processing result.
2. The system according to claim 1, wherein the first mobile device, after obtaining the trust value of each second mobile device according to a target uninstalling rule, splits the blockchain consensus task into a preset number of subtasks and sends the subtasks to the second mobile devices that satisfy a preset trust value condition, including:
obtaining a current direct trust value of each second mobile device; the current direct trust value is calculated based on historical transaction records of each second mobile device;
selecting a preset number of second target mobile devices from the plurality of second mobile devices according to whether the current direct trust value of each second mobile device is greater than a preset direct trust threshold value;
and splitting the block chain consensus task into a preset number of subtasks, and respectively sending the subtasks to a preset number of second target mobile devices.
3. The system according to claim 1, wherein the first mobile device, after obtaining the trust value of each second mobile device according to a target uninstalling rule, splits the blockchain consensus task into a preset number of subtasks and sends the subtasks to the second mobile devices that satisfy a preset trust value condition, including:
acquiring an indirect trust value of each second mobile device; the indirect trust value is used for representing the successful transaction probability of the second mobile equipment in the historical transaction process;
selecting a preset number of second target mobile devices from the plurality of second mobile devices according to whether the indirect trust value of each second mobile device is greater than a preset indirect trust threshold value;
and splitting the block chain consensus task into a preset number of sub-tasks, and respectively sending the sub-tasks to a preset number of second target mobile devices.
4. The system according to claim 1, wherein the first mobile device, after obtaining the trust value of each second mobile device according to a target uninstalling rule, splits the blockchain consensus task into a preset number of subtasks and sends the subtasks to the second mobile devices that satisfy a preset trust value condition, including:
acquiring the current direct trust value and the indirect trust value of each second mobile device; the current direct trust value is calculated based on historical transaction records of each second mobile device; the indirect trust value is used for representing the successful transaction probability of the second mobile equipment in the historical transaction process;
calculating to obtain a total trust value of each second mobile device according to the current direct trust value and the indirect trust value of each second mobile device;
selecting a preset number of second target mobile devices from the plurality of second mobile devices according to whether the total trust value of each second mobile device is greater than a preset total trust threshold value;
and splitting the block chain consensus task into a preset number of subtasks, and respectively sending the subtasks to a preset number of second target mobile devices.
5. The system according to claim 2 or 4, wherein the second mobile device calculates the current direct trust value by:
calculating the sum of the times of successful transaction, the times of failed transaction and the times of uncertain transaction results in the historical transaction records, and determining the sum as the total transaction times;
calculating an initial direct trust value by using a first preset expression, wherein the first preset expression is as follows:
Figure FDA0003746013700000031
in the formula D n,k Representing the initial direct trust value; s n,k Indicating a number of times the transaction was successful; n is a radical of n,k Representing the total number of transactions;
calculating a trust value attenuation factor by using a second preset expression, wherein the second preset expression is as follows:
Figure FDA0003746013700000032
in the formula, ζ and ζ 1 And ζ 2 All represent said confidence value decay factor, F n,k Indicating a number of times the transaction failed;
updating the initial direct trust value by using a third preset expression to obtain the current direct trust value, wherein the third preset expression is as follows:
D n,k1 t=ζD n,k t+(1-ζ)D n,k1 (t-1)
in the formula, D n,k1 t represents the current direct trust value, D n,k t represents the initial direct trust value, D n,k1 (t-1) represents the direct trust value corresponding to the last time period.
6. The system according to claim 3 or 4, wherein the first mobile device calculates the indirect trust value by:
acquiring a recommendation value corresponding to each second mobile device from each second mobile device; the recommended value is preset and stored in a block of the second mobile equipment;
calculating an average value between recommended values of the second mobile devices;
calculating the evaluation value of each second mobile device by using a fourth preset expression, wherein the fourth preset expression is as follows:
E n,k =1-|R rec -R ave |
in the formula, E n,k Represents the evaluation value, R rec Represents the recommended value, R ave Representing the average value;
selecting a second mobile device with the evaluation value larger than a preset evaluation threshold value from a plurality of second mobile devices as a second candidate mobile device;
calculating the indirect trust value of each second candidate mobile device by using a fifth preset expression, where the fifth preset expression is:
Figure FDA0003746013700000041
in the formula, R n,k Representing said indirect trust value, E n,k Representing the evaluation value; r rec Representing the recommended value; j denotes the number of second alternative mobile devices.
7. The system of claim 4, wherein the first mobile device calculates the overall trust value by:
calculating the total trust value of each second mobile device by using a sixth preset expression, where the sixth preset expression is:
V n,k =αD n,k +βR n,k
in the formula, V n,k Representing the total confidence value, alpha representing a direct confidence value weighting factor, D n,k Representing said direct trust value, beta representing an indirect trust value weight coefficient, R n,k Represents the indirect trust value, alpha is epsilon [0,1 ∈ ]],β∈[0,1]And α + β ═ 1.
8. The system of claim 1, wherein the first mobile device sends the blockchain consensus task to the MEC server according to a target offload rule, comprising:
selecting a target MEC server closest to the first mobile device from a plurality of MEC servers; or selecting a target MEC server with the largest available resource from the plurality of MEC servers;
the first mobile device sends the blockchain consensus task to the target MEC server.
9. The system of claim 1, further comprising: an MEC server manager;
the first mobile equipment is further used for sending a processing result to the MEC server;
and the MEC server is also used for sending the received processing result to the MEC server manager for storage.
10. A block chain consensus task processing method supporting edge-side cooperation is applied to a block chain consensus task processing system supporting edge-side cooperation, and the system comprises: the mobile edge computing MEC comprises a plurality of mobile edge computing MEC servers and a plurality of mobile devices serving as block chain devices, wherein the mobile device used for generating block data is a first mobile device, and other mobile devices are second mobile devices;
the method comprises the following steps:
the first mobile equipment acquires a block chain consensus task and selects a target unloading rule from a plurality of preset unloading rules in a random or polling mode; processing the block chain consensus task according to a target unloading rule to obtain a first processing result;
or sending the block chain consensus task to the MEC server according to a target unloading rule, wherein the MEC server receives the block chain consensus task, processes the block chain consensus task, obtains a second processing result, and returns the second processing result to the first mobile device;
or according to a target unloading rule, after the trust value of each second mobile device is obtained, dividing the block chain consensus task into a preset number of subtasks and sending the subtasks to the second mobile devices meeting the preset trust value condition; the second mobile equipment receives and processes the subtask sent by the first mobile equipment, and returns a subtask processing result to the first mobile equipment;
the block chain consensus task is a task generated by writing target transaction data into a block by using a block chain and verifying the authenticity of the block;
and the first mobile equipment receives a second processing result returned by the MEC server, or receives a plurality of subtask processing results returned by each second mobile equipment meeting a preset trust value condition, and generates a third processing result.
CN202011284478.3A 2020-11-17 2020-11-17 Block chain consensus task processing system and method supporting edge-side cooperation Active CN112288433B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011284478.3A CN112288433B (en) 2020-11-17 2020-11-17 Block chain consensus task processing system and method supporting edge-side cooperation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011284478.3A CN112288433B (en) 2020-11-17 2020-11-17 Block chain consensus task processing system and method supporting edge-side cooperation

Publications (2)

Publication Number Publication Date
CN112288433A CN112288433A (en) 2021-01-29
CN112288433B true CN112288433B (en) 2022-09-20

Family

ID=74399071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011284478.3A Active CN112288433B (en) 2020-11-17 2020-11-17 Block chain consensus task processing system and method supporting edge-side cooperation

Country Status (1)

Country Link
CN (1) CN112288433B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342418B (en) * 2021-06-24 2022-11-22 国网黑龙江省电力有限公司 Distributed machine learning task unloading method based on block chain

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018032369A1 (en) * 2016-08-13 2018-02-22 深圳市樊溪电子有限公司 Distributed photovoltaic power transaction platform based on block chain technology
CN108665276A (en) * 2018-05-22 2018-10-16 江苏安纳泰克能源服务有限公司 It is a kind of that microgrid energy deals match method is expanded based on block chain technology
CN110417872A (en) * 2019-07-08 2019-11-05 深圳供电局有限公司 A kind of edge network resource allocation methods towards mobile block chain
WO2020100342A1 (en) * 2018-11-14 2020-05-22 カウリー株式会社 Blockchain system and server
CN111556089A (en) * 2020-03-16 2020-08-18 西安电子科技大学 Resource joint optimization method based on enabling block chain mobile edge computing system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10326766B2 (en) * 2017-07-13 2019-06-18 Dell Products, Lp Method and apparatus for optimizing mobile edge computing for nomadic computing capabilities as a service

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018032369A1 (en) * 2016-08-13 2018-02-22 深圳市樊溪电子有限公司 Distributed photovoltaic power transaction platform based on block chain technology
CN108665276A (en) * 2018-05-22 2018-10-16 江苏安纳泰克能源服务有限公司 It is a kind of that microgrid energy deals match method is expanded based on block chain technology
WO2020100342A1 (en) * 2018-11-14 2020-05-22 カウリー株式会社 Blockchain system and server
CN110417872A (en) * 2019-07-08 2019-11-05 深圳供电局有限公司 A kind of edge network resource allocation methods towards mobile block chain
CN111556089A (en) * 2020-03-16 2020-08-18 西安电子科技大学 Resource joint optimization method based on enabling block chain mobile edge computing system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
区块链技术在分布式能源交易中的应用;徐嘉辉等;《电力自动化设备》;20200706(第08期);全文 *
区块链赋能的边缘异构计算系统中资源调度研究;张平等;《通信学报》;20201023(第10期);全文 *
移动边缘计算中基于Stackelberg博弈的算力交易与定价;吴雨芯等;《计算机应用》;20200430(第09期);全文 *

Also Published As

Publication number Publication date
CN112288433A (en) 2021-01-29

Similar Documents

Publication Publication Date Title
US11228386B2 (en) Blockchain node synchronization method and device using trust mechanism
Adewuyi et al. CTRUST: A dynamic trust model for collaborative applications in the Internet of Things
CN112579194B (en) Block chain consensus task unloading method and device based on time delay and transaction throughput
WO2021032666A1 (en) Data breach detection
Huang et al. Resource allocation and consensus on edge blockchain in pervasive edge computing environments
CN108900364B (en) Block chain network management method, block chain network management device, block chain network management medium and electronic equipment
US10679136B2 (en) Decision processing and information sharing in distributed computing environment
US20160212062A1 (en) Adaptive algorithm for cloud admission policies
CN109947740B (en) Performance optimization method and device of block chain system
US8060599B2 (en) System and method for determining a streaming media server configuration for supporting expected workload in compliance with at least one service parameter
US8566373B2 (en) Probabilistic fingerprint checking for preventing data leakage
WO2021139238A1 (en) Method and apparatus for upgrading cloud service application
US8977773B2 (en) System and method for a rate control technique for a lightweight directory access protocol over MQSeries (LoM) server
US11750711B1 (en) Systems and methods for adaptively rate limiting client service requests at a blockchain service provider platform
Zhang et al. IgS-wBSRM: A time-aware Web Service QoS monitoring approach in dynamic environments
CN112288433B (en) Block chain consensus task processing system and method supporting edge-side cooperation
CN116302469A (en) Task processing method and device
CN116669111A (en) Mobile edge computing task unloading method based on blockchain
CN116528335A (en) Satellite Internet of things access method, device, equipment and medium based on information value
Zhang et al. A modeling reliability analysis technique for cloud storage system
WO2024113947A1 (en) Training method and apparatus for graph neural network considering privacy protection and fairness
CN109450684B (en) Method and device for expanding physical node capacity of network slicing system
CN113795026B (en) Authentication security level and resource optimization method for computing unloading in edge computing network
CN113992335B (en) Self-adaptive multi-consensus block chain processing method and system
CN113282417B (en) Task allocation method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant