Blockchain-based device networking method, device, storage medium and electronic device
By calculating the target information of the device node in the blockchain network, determining the target device node and allocating IP network resources, the problem of low resource allocation efficiency during equipment networking is solved, and more efficient resource allocation and security management are achieved.
Patent Information
- Application Number
- CN202210725483.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-06-24
AI Technical Summary
In the prior art, resource allocation efficiency is low when equipment networking is formed, especially in the Internet of Things network. Due to the large differences in networking capabilities of heterogeneous nodes, resource allocation is unbalanced, which affects security management.
In the blockchain network, the target information of each device node, including capacity information and target values, determine the target device node through this information, and allocate IP networking resources to other device nodes based on the target device node, thereby determining the networking strategy of the terminal device.
Through the application of blockchain technology, the efficiency of resource allocation during equipment networking is improved, the reasonable allocation and security management of resources are ensured, and the overall performance of the Internet of Things network is improved.
Smart Images

Figure CN115086342B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular, to a device networking method, device, storage medium, and electronic device based on blockchain. Background Art
[0002] Although the flat networking technology of existing Internet of Things (IoT) technology has been realized, with the expansion of network nodes, the routing maintenance cost shows an exponential growth trend, and the consumed bandwidth is also limited due to the increase in devices. In addition, because the networking capabilities of heterogeneous nodes in the network vary greatly, and the resources of low-intelligence nodes are very limited, the same routing mechanism and security system cannot be deployed simultaneously with high-intelligence nodes, which also brings many inconveniences to the security management of the IoT.
[0003] Aiming at the problem of low resource allocation efficiency during device networking in related technologies, no effective solution has been proposed yet. Summary of the Invention
[0004] The main purpose of the present application is to provide a device networking method, device, storage medium, and electronic device based on blockchain, so as to solve the problem of low resource allocation efficiency during device networking in related technologies.
[0005] To achieve the above object, according to one aspect of the present application, a device networking method based on blockchain is provided. The method includes: calculating, in a blockchain network, target information corresponding to each device node, where the target information includes at least one of the following: capacity information of each device node, a target value corresponding to each device node, and the blockchain network includes at least: a plurality of device nodes; determining a target device node among the plurality of device nodes according to the target information; allocating IP networking resources to other device nodes among the plurality of device nodes except the target device node according to the target device node; and determining a networking strategy for a plurality of terminal devices according to the allocated IP networking resources, where each device node corresponds to a terminal device one by one.
[0006] Further, the capacity information is at least one of the following: the CPU running speed corresponding to each device node, the storage rate corresponding to each device node, the bandwidth delay rate corresponding to each device node, and the energy value corresponding to each device node.
[0007] Further, calculating the target information corresponding to each device node includes: calculating the CPU clock frequency of the terminal device corresponding to each device node; determining the CPU running speed according to each CPU clock frequency; and using the CPU running speed as the target information.
[0008] Further, calculating the target information corresponding to each device node includes: calculating the storage capacity of the terminal device corresponding to each device node; determining the storage rate according to each storage capacity; and using the storage rate as the target information.
[0009] Further, calculating the target information corresponding to each device node includes: calculating the bandwidth information of the terminal device corresponding to each device node; determining the bandwidth delay rate according to each bandwidth information; and using the bandwidth delay rate as the target information.
[0010] Further, calculating the target information corresponding to each device node includes: calculating the current input value of the terminal device corresponding to each device node; calculating the energy loss value corresponding to each device node according to the current input value; determining the energy value corresponding to each device node according to each energy loss value; and using the energy value as the target information.
[0011] Further, calculating the target information corresponding to each device node includes: obtaining the ID information value of the terminal device corresponding to each device node; determining the target value corresponding to each device node according to the ID information value; and using the target value as the target information.
[0012] Further, determining the target device node among multiple device nodes according to the target information includes: determining the largest target value among multiple target values; obtaining the target terminal device corresponding to the largest target value; collecting the target capacity information corresponding to the target terminal device; and determining the target device node among multiple device nodes according to the target terminal device and / or the target capacity information.
[0013] To achieve the above object, according to another aspect of the present application, there is provided a device networking apparatus based on a blockchain. The apparatus includes: a calculation unit, configured to calculate, in a blockchain network, the target information corresponding to each device node, where the target information includes at least one of the following: the capacity information of each device node, the target value corresponding to each device node, and where the blockchain network includes at least: multiple device nodes; a first determination unit, configured to determine the target device node among multiple device nodes according to the target information; an allocation unit, configured to allocate IP networking resources to other device nodes except the target device node among multiple device nodes according to the target device node; and a second determination unit, configured to determine the networking strategy of multiple terminal devices according to the allocated IP networking resources, where the device node corresponds to the terminal device one by one.
[0014] Through this application, the following steps are adopted: in a blockchain network, calculate the target information corresponding to each device node, where the target information includes at least one of the following: the capacity information of each device node, the target value corresponding to each device node, and the blockchain network includes at least: multiple device nodes; determine the target device node among the multiple device nodes according to the target information; allocate IP networking resources to other device nodes except the target device node among the multiple device nodes according to the target device node; determine the networking strategy of multiple terminal devices according to the allocated IP networking resources, where each device node corresponds to one terminal device. Through this application, the problem of low resource allocation efficiency during device networking in the related art is solved. By allocating IP networking resources to other device nodes except the target device node among the multiple device nodes in the blockchain network, the effect of improving the resource allocation efficiency during device networking is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings that form a part of this application are used to provide a further understanding of this application. The schematic embodiments and descriptions thereof of this application are used to explain this application and do not constitute an improper limitation of this application. In the drawings:
[0016] Figure 1 is a flowchart of a method for device networking based on blockchain provided by an embodiment of this application;
[0017] Figure 2 is a flowchart of selecting a target device node for a method for device networking based on blockchain provided by an embodiment of this application;
[0018] Figure 3 is a schematic diagram of a device networking device based on blockchain provided by an embodiment of this application;
[0019] Figure 4 is a schematic diagram of the network architecture of an electronic device for device networking based on blockchain provided by an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The following will refer to the accompanying drawings and combine the embodiments to detail this application.
[0021] In order to enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.
[0022] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that such data used can be interchanged under appropriate circumstances for the embodiments of this application described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily limit to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0023] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0024] The present invention will be described below in conjunction with preferred implementation steps. Figure 1 is a flowchart of a device networking method based on blockchain provided according to an embodiment of this application. As Figure 1 shown, the method includes the following steps:
[0025] Step S101, in the blockchain network, calculate the target information corresponding to each device node, where the target information includes at least one of the following: the capacity information of each device node, the target value corresponding to each device node, and where the blockchain network includes at least: a plurality of device nodes.
[0026] Specifically, the above-mentioned capacity information is at least one of the following: the CPU running speed corresponding to each device node, the storage rate corresponding to each device node, the bandwidth delay rate corresponding to each device node, the energy value corresponding to each device node.
[0027] That is to say, in this application, by calculating the target information corresponding to each device node, the capacity information of each device node can be obtained, and the target value corresponding to each device node can also be obtained.
[0028] In order to improve the networking efficiency of multiple devices, in the device networking method based on blockchain provided in the embodiments of this application, calculating the capacity information in the target information corresponding to each device node is one of the inventive points. Therefore, the specific steps of calculating at least one of the capacity information, the CPU running speed, include: calculating the CPU clock frequency of the terminal device corresponding to each device node; determining the CPU running speed according to each CPU clock frequency; taking the CPU running speed as the target information.
[0029] For example, E CPU (i) is the CPU clock frequency of the terminal device, which is a unified counting metric for representing the extreme capabilities of the node. If MF(i) represents the main frequency of the node, the calculation formula is:
[0030] E CPU (i) = MF ( i ) / MF max , where MF max is the maximum value of the node main frequency.
[0031] In order to further improve the networking efficiency of multiple devices, in the blockchain-based device networking method provided in the embodiments of the present application, calculating the capacity information in the target information is one of the inventive points. Therefore, the specific steps for calculating the storage rate of at least one of the capacity information include: calculating the storage capacity of the terminal device corresponding to each device node; determining the storage rate according to each storage capacity; and using the storage rate as the target information.
[0032] For example, E storage (i) is a unified counting metric for the storage capacity of the node, used to identify the storage rate in the present application. The storage capacity of the node includes two parameters: the storage rate of the current node and the storage capacity of the current node. The calculation formulas are respectively: S(i) = α * S speed (i) + β * C delay (i), E storage (i) = S(i) / S max , where Smax is the maximum value of the node storage capacity.
[0033] In order to further improve the networking efficiency of multiple devices, in the blockchain-based device networking method provided in the embodiments of the present application, calculating the capacity information in the target information is one of the inventive points. Therefore, the specific steps for calculating the bandwidth information of at least one of the capacity information include: calculating the bandwidth information of the terminal device corresponding to each device node; determining the bandwidth delay rate according to each bandwidth information; and using the bandwidth delay rate as the target information.
[0034] For example, E cumm (i) represents a unified counting metric for the communication capabilities of the node, including: the amount of bits that can be transmitted per second by the node (bandwidth) and the transmission delay rate. Specifically, the calculation formula is: C(i) = α * S bandw (i) + β * C delay (i), E cumm (i) = C(i) / C max where C max is the maximum value of the node bandwidth amount.
[0035] In order to further improve the networking efficiency of multiple devices, in the blockchain-based device networking method provided in the embodiments of the present application, calculating the capacity information in the target information is one of the inventive points. Therefore, the specific steps for calculating at least one of the energy values in the capacity information include: calculating the current input value of the terminal device corresponding to each device node; calculating the energy loss value corresponding to each device node according to the current input value; determining the energy value corresponding to each device node according to each energy loss value; and using the energy value as the target information.
[0036] For example, E power (i) represents the node energy value. Without considering energy loss. Assuming that the node energy loss is the same per second, when the current input value is i, the energy loss of the cluster head node will definitely be greater than that of the cluster member node. The calculation formula is:
[0037] E power (i) = E remain (i) / E max *100%, Among them, the explanation of the above formula is:
[0038] α, β are weight factors, that is, α + β = 1, representing different energy value weights. α, β, μ, ω, θ ∈ [0, 1].
[0039] In order to further improve the networking efficiency of multiple devices, in the blockchain-based device networking method provided in the embodiments of the present application, calculating the target value in the target information is one of the inventive points. The specific operation steps include: obtaining the ID information value of the terminal device corresponding to each device node; determining the target value corresponding to each device node according to the ID information value; and using the target value as the target information.
[0040] Specifically, the target value in the present application is the node trustworthiness. The larger the value, the higher the security of the terminal device corresponding to the node device. The calculation logic algorithm for the node trustworthiness according to the ID information value can be expressed as follows:
[0041] Ai = 0; / / Ai is the ID of the sender
[0042] When ID == Idi and T stamps –T > T threshold ; / / Tstamps is the time to send HELLO; T threshold is the timeout time set in advance.
[0043] Then do: Ai = Ai + 1;
[0044] Node Repu(IDi) = 0; / / The trustworthiness of node i
[0045] AveRepu(ID) = 0; / / Average trust value of node i
[0046] Then do: j = 1; j < A i ; j++;
[0047] If (HELLOj.status == ID) / / Cluster head node
[0048] Node Repu(ID) = Node Repu(IDj) + ratio ij *ratioh j *RepuValue ij ;
[0049] Otherwise / / Cluster member node
[0050] Node Repu(ID) = Node Repu(IDj) + ratio ij *RepuValue ij ;
[0051] Among them, the average trust value of the node is calculated according to the trust value of each node.
[0052] Step S102, determine the target device node among multiple device nodes according to the target information.
[0053] For example, it can be as Figure 2 shown, the selection process of the cluster head node (corresponding to the target device node in this application) can be determined according to the largest target value among multiple target values (that is, the trust value in the figure).
[0054] Optionally, in the device networking method based on blockchain provided in the embodiments of this application, determining the target device node among multiple device nodes according to the target information includes: determining the largest target value among multiple target values; obtaining the target terminal device corresponding to the largest target value; collecting the target capacity information corresponding to the target terminal device; determining the target device node among multiple device nodes according to the target terminal device and / or the target capacity information.
[0055] For example, as Figure 2As shown in the figure, when the internal network structure is not a cluster, all nodes in the Internet of Things (corresponding to the device nodes in this application, the same below) have not determined their clustering status, that is, they cannot judge whether they meet the conditions to become a cluster head. At this time, each node broadcasts a HELLO message to the network, and the current state of each node x is set to pending (status = NULL); after receiving the HELLO message, the node divides the message into a message that can be discovered by adjacent nodes and its own cluster head value message. After a period of time, after each node can establish a complete trust database, compare the target values (that is, trust values) of the multiple nodes obtained above. If a node can autonomously become a cluster head node and the trust degree of adjacent nodes is less than its own value, its own state remains unchanged, and the state of adjacent nodes is set to its own ID (status = ID). Otherwise, its own state is set to the ID of the adjacent node.
[0056] For example: If there is a node with the highest trust degree among adjacent nodes, set its own state value to the state value of the adjacent node and elect this node as the cluster head. In the process of comparing and changing the state time after time, when more than half of the number of nodes have become the same ID value, according to the principle of blockchain trust degree, determine the cluster head node in this network as the node ID after the current node's autonomous selection, and send a HELLO message for broadcasting. Thus, all nodes in this network cluster set their own ID to the cluster head node ID (status = cluster head node ID).
[0057] Optionally, this application can also obtain the terminal device corresponding to the maximum target value and collect the target capacity information corresponding to the target terminal device; determine the target device nodes among multiple device nodes according to the target terminal device and / or target capacity information, so as to further improve the networking efficiency of the devices.
[0058] Step S103, allocate IP networking resources to other device nodes except the target device node among multiple device nodes according to the target device node.
[0059] Step S104, determine the networking strategy of multiple terminal devices according to the allocated IP networking resources, where the device nodes correspond to the terminal devices one by one.
[0060] Specifically, by allocating IP networking resources to other device nodes except the target device node among multiple device nodes and connecting each node through a router, the networking operation of all devices in the entire network can be completed, and then the networking strategy of multiple terminal devices can be determined, which can ensure that the power of the router is not affected to the greatest extent and reduce the risk of the router and customers being attacked by the network at the same time.
[0061] In summary, the device networking method based on blockchain provided by the embodiments of the present application calculates the target information corresponding to each device node in the blockchain network, where the target information includes at least one of the following: the capacity information of each device node, the target value corresponding to each device node. The blockchain network includes at least: a plurality of device nodes; determines the target device nodes among the plurality of device nodes according to the target information; allocates IP networking resources to other device nodes except the target device nodes among the plurality of device nodes according to the target device nodes; determines the networking strategy of the plurality of terminal devices according to the allocated IP networking resources, where each device node corresponds to one terminal device. Through the present application, the problem of low resource allocation efficiency during device networking in the related art is solved. By allocating IP networking resources to other device nodes except the target device nodes among the plurality of device nodes according to the target device nodes in the blockchain network, the effect of improving the resource allocation efficiency during device networking is achieved.
[0062] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0063] The embodiments of the present application also provide a device networking device based on blockchain. It should be noted that the device networking device based on blockchain in the embodiments of the present application can be used to execute the device networking method based on blockchain provided by the embodiments of the present application. The following introduces the device networking device based on blockchain provided by the embodiments of the present application.
[0064] Figure 3 It is a schematic diagram of the device networking device based on blockchain according to the embodiments of the present application. As Figure 3 shown, the device includes: a calculation unit 301, a first determination unit 302, an allocation unit 303, and a second determination unit 304.
[0065] Specifically, the calculation unit 301 is configured to calculate the target information corresponding to each device node in the blockchain network, where the target information includes at least one of the following: the capacity information of each device node, the target value corresponding to each device node. The blockchain network includes at least: a plurality of device nodes;
[0066] The first determination unit 302 is configured to determine the target device nodes among the plurality of device nodes according to the target information; the allocation unit 303 is configured to allocate IP networking resources to other device nodes except the target device nodes among the plurality of device nodes according to the target device nodes;
[0067] A second determination unit 304, configured to determine a networking policy for multiple terminal devices according to the allocated IP networking resources, where a device node corresponds to a terminal device one by one.
[0068] In summary, for the device networking apparatus based on a blockchain provided in the embodiments of the present application, a calculation unit 301 calculates target information corresponding to each device node in a blockchain network, where the target information includes at least one of the following: capacity information of each device node, a target value corresponding to each device node, and the blockchain network includes at least: multiple device nodes; a first determination unit 302 determines a target device node among the multiple device nodes according to the target information; an allocation unit 303 allocates IP networking resources to other device nodes except the target device node among the multiple device nodes according to the target device node; a second determination unit 304 determines a networking policy for multiple terminal devices according to the allocated IP networking resources, where a device node corresponds to a terminal device one by one, and solves the problem of low resource allocation efficiency during device networking in related technologies. By allocating IP networking resources to other device nodes except the target device node among the multiple device nodes according to the target device node in the blockchain network, the effect of improving the resource allocation efficiency during device networking is achieved.
[0069] Optionally, in the device networking apparatus based on a blockchain provided in the embodiments of the present application, the capacity information is at least one of the following: the CPU running speed corresponding to each device node, the storage rate corresponding to each device node, the bandwidth delay rate corresponding to each device node, and the energy value corresponding to each device node.
[0070] Optionally, in the device networking apparatus based on a blockchain provided in the embodiments of the present application, the calculation unit includes: a first calculation module, configured to calculate the CPU clock frequency of the terminal device corresponding to each device node; a first determination module, configured to determine the CPU running speed according to each CPU clock frequency; a second determination module, configured to use the CPU running speed as the target information.
[0071] Optionally, in the device networking apparatus based on a blockchain provided in the embodiments of the present application, the calculation unit includes: a second calculation module, configured to calculate the storage capacity of the terminal device corresponding to each device node; a third determination module, configured to determine the storage rate according to each storage capacity; a fourth determination module, configured to use the storage rate as the target information.
[0072] Optionally, in the device networking apparatus based on a blockchain provided in the embodiments of the present application, the calculation unit includes: a third calculation module, configured to calculate the bandwidth information of the terminal device corresponding to each device node; a fifth determination module, configured to determine the bandwidth delay rate according to each bandwidth information; a sixth determination module, configured to use the bandwidth delay rate as the target information.
[0073] Optionally, in the blockchain-based device networking apparatus provided in the embodiments of the present application, the calculation unit includes: a fourth calculation module for calculating the current input value of the terminal device corresponding to each device node; a fifth calculation module for calculating the energy loss value corresponding to each device node according to the current input value; a seventh determination module for determining the energy value corresponding to each device node according to each energy loss value; an eighth determination module for using the energy value as the target information.
[0074] Optionally, in the blockchain-based device networking apparatus provided in the embodiments of the present application, the calculation unit includes: a first acquisition module for acquiring the ID information value of the terminal device corresponding to each device node; a ninth determination module for determining the target value corresponding to each device node according to the ID information value; a tenth determination module for using the target value as the target information.
[0075] Optionally, in the blockchain-based device networking apparatus provided in the embodiments of the present application, the first determination unit includes: an eleventh determination module for determining the largest target value among multiple target values; a second acquisition module for acquiring the target terminal device corresponding to the largest target value; a collection module for collecting the target capacity information corresponding to the target terminal device; a twelfth determination module for determining the target device node among multiple device nodes according to the target terminal device and / or the target capacity information.
[0076] The blockchain-based device networking apparatus includes a processor and a memory. The above calculation unit 301, first determination unit 302, allocation unit 303, second determination unit 304, etc. are all stored in the memory as program units, and the processor executes the above program units stored in the memory to implement corresponding functions.
[0077] The processor contains a kernel, and the kernel retrieves the corresponding program unit from the memory. One or more kernels can be set, and the blockchain-based device networking is performed by adjusting the kernel parameters.
[0078] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of, for example, read-only memory (ROM) or flash memory (flash RAM), and the memory includes at least one storage chip.
[0079] The embodiments of the present invention provide a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, a blockchain-based device networking method is implemented.
[0080] The embodiments of the present invention provide a processor, and the processor is used to run a program, where when the program runs, a blockchain-based device networking method is executed.
[0081] As Figure 4 shown, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: In a blockchain network, calculate the target information corresponding to each device node, where the target information includes at least one of the following: the capacity information of each device node, the target value corresponding to each device node, and the blockchain network includes at least: a plurality of device nodes; determine the target device node among the plurality of device nodes according to the target information; allocate IP networking resources to other device nodes except the target device node among the plurality of device nodes according to the target device node; determine the networking strategy of the plurality of terminal devices according to the allocated IP networking resources, where each device node corresponds to one terminal device.
[0082] When the processor executes the program, the following steps are also implemented: the CPU running speed corresponding to each device node, the storage rate corresponding to each device node, the bandwidth delay rate corresponding to each device node, and the energy value corresponding to each device node.
[0083] When the processor executes the program, the following steps are also implemented: calculate the CPU clock frequency of the terminal device corresponding to each device node; determine the CPU running speed according to each CPU clock frequency; use the CPU running speed as the target information.
[0084] When the processor executes the program, the following steps are also implemented: calculate the storage capacity of the terminal device corresponding to each device node; determine the storage rate according to each storage capacity; use the storage rate as the target information.
[0085] When the processor executes the program, the following steps are also implemented: calculate the bandwidth information of the terminal device corresponding to each device node; determine the bandwidth delay rate according to each bandwidth information; use the bandwidth delay rate as the target information.
[0086] When the processor executes the program, the following steps are also implemented: calculate the current input value of the terminal device corresponding to each device node; calculate the energy loss value corresponding to each device node according to the current input value; determine the energy value corresponding to each device node according to each energy loss value; use the energy value as the target information.
[0087] When the processor executes the program, the following steps are also implemented: obtain the ID information value of the terminal device corresponding to each device node; determine the target value corresponding to each device node according to the ID information value; use the target value as the target information.
[0088] When the processor executes the program, the following steps are also implemented: determining the largest target value among multiple target values; obtaining the target terminal device corresponding to the largest target value; collecting the target capacity information corresponding to the target terminal device; and determining the target device node among multiple device nodes according to the target terminal device and / or the target capacity information.
[0089] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0090] This application also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program initialized with the following method steps: in a blockchain network, calculating the target information corresponding to each device node, where the target information includes at least one of the following: the capacity information of each device node, the target value corresponding to each device node, and the blockchain network at least includes: multiple device nodes; determining the target device node among multiple device nodes according to the target information; allocating IP networking resources to other device nodes except the target device node among multiple device nodes according to the target device node; and determining the networking strategy of multiple terminal devices according to the allocated IP networking resources, where the device node corresponds to the terminal device one by one.
[0091] When executed on a data processing device, it is also adapted to execute a program initialized with the following method steps: the CPU running speed corresponding to each device node, the storage rate corresponding to each device node, the bandwidth delay rate corresponding to each device node, and the energy value corresponding to each device node.
[0092] When executed on a data processing device, it is also adapted to execute a program initialized with the following method steps: calculating the CPU clock frequency of the terminal device corresponding to each device node; determining the CPU running speed according to each CPU clock frequency; and using the CPU running speed as the target information.
[0093] When executed on a data processing device, it is also adapted to execute a program initialized with the following method steps: calculating the storage capacity of the terminal device corresponding to each device node; determining the storage rate according to each storage capacity; and using the storage rate as the target information.
[0094] When executed on a data processing device, it is also adapted to execute a program initialized with the following method steps: calculating the bandwidth information of the terminal device corresponding to each device node; determining the bandwidth delay rate according to each bandwidth information; and using the bandwidth delay rate as the target information.
[0095] When executed on a data processing device, it is also suitable for executing a program initialized with the following method steps: calculating the current input value of the terminal device corresponding to each device node; calculating the energy loss value corresponding to each device node according to the current input value; determining the energy value corresponding to each device node according to each energy loss value; and using the energy value as target information.
[0096] When executed on a data processing device, it is also suitable for executing a program initialized with the following method steps: obtaining the ID information value of the terminal device corresponding to each device node; determining the target numerical value corresponding to each device node according to the ID information value; and using the target numerical value as target information.
[0097] When executed on a data processing device, it is also suitable for executing a program initialized with the following method steps: determining the largest target numerical value among a plurality of target numerical values; obtaining the target terminal device corresponding to the largest target numerical value; collecting the target capacity information corresponding to the target terminal device; and determining the target device node among a plurality of device nodes according to the target terminal device and / or the target capacity information.
[0098] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0099] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for realizing the functions specified in Figure 1 one or more flows or multiple flows and / or blocks Figure 1 one or more blocks or multiple blocks.
[0100] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device realizes the functions specified in Figure 1 one or more flows or multiple flows and / or blocks Figure 1The functions specified in one or more boxes.
[0101] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the steps of the functions specified in one Figure 1 one process or more processes and / or boxes Figure 1 step of the functions specified in one box or more boxes.
[0102] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0103] The memory may include non-permanent memory in the computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
[0104] Computer-readable media includes permanent and non-permanent, removable and non-removable media and can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0105] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or also includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the existence of additional identical elements in the process, method, commodity or device comprising the element.
[0106] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.
[0107] The above are only the embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A device networking method based on blockchain, characterized in that, it includes: In the blockchain network, calculate the target information corresponding to each device node, where the target information at least includes: the capacity information of each device node, the target value corresponding to each device node, where the blockchain network at least includes: multiple device nodes; where the capacity information at least includes: the CPU operating speed corresponding to each device node, the storage rate corresponding to each device node, the bandwidth delay rate corresponding to each device node, the energy value corresponding to each device node, and the target value is the node trust degree; Determine the target device node among the multiple device nodes according to the target information; Allocate IP networking resources to the other device nodes except the target device node among the multiple device nodes according to the target device node; Determine the networking strategy of multiple terminal devices according to the allocated IP networking resources, where the device node corresponds to the terminal device one by one; Among them, calculating the target information corresponding to each device node includes: Obtain the ID information value of the terminal device corresponding to each device node; Determine the target value corresponding to each device node according to the ID information value and the duration of the message sent by each device node; Use the target value as the target information; Among them, calculating the target information corresponding to each device node includes: Calculate the current input value of the terminal device corresponding to each device node; Calculate the energy loss value corresponding to each device node according to the current input value; Determine the energy value corresponding to each device node according to each energy loss value; Use the energy value as the target information; Determining the target device node among the multiple device nodes according to the target information includes: Determine the largest target value among multiple target values; Obtain the target terminal device corresponding to the largest target value; Collect the target capacity information corresponding to the target terminal device; Determine the target device node among the multiple device nodes according to the target terminal device and the target capacity information.
2. The method according to claim 1, characterized in that, Calculating the target information corresponding to each device node includes: Calculate the CPU clock frequency of the terminal device corresponding to each device node; Determine the CPU operating speed according to each CPU clock frequency; Use the CPU operating speed as the target information.
3. The method according to claim 1, characterized in that, Calculating the target information corresponding to each device node includes: Calculate the storage capacity of the terminal device corresponding to each device node; Determine the storage rate according to each storage capacity; Use the storage rate as the target information.
4. The method according to claim 1, characterized in that, Calculating the target information corresponding to each device node includes: Calculate the bandwidth information of the terminal device corresponding to each device node; Determine the bandwidth delay rate according to each bandwidth information; Use the bandwidth delay rate as the target information.
5. A device networking apparatus based on blockchain, characterized in that, it includes: A calculation unit, configured to calculate, in a blockchain network, target information corresponding to each device node, where the target information at least includes: capacity information of each device node, a target value corresponding to each device node, where the blockchain network at least includes: a plurality of device nodes; where the capacity information at least includes: CPU running speed corresponding to each device node, storage rate corresponding to each device node, bandwidth delay rate corresponding to each device node, energy value corresponding to each device node, and the target value is node trustworthiness; A first determination unit, configured to determine a target device node among the plurality of device nodes according to the target information; An allocation unit, configured to allocate IP networking resources to other device nodes among the plurality of device nodes except the target device node according to the target device node; A second determination unit, configured to determine a networking strategy for a plurality of terminal devices according to the allocated IP networking resources, where the device nodes and the terminal devices are in one-to-one correspondence; Wherein, the calculation unit includes: a first acquisition module, configured to acquire an ID information value of a terminal device corresponding to each device node; a ninth determination module, configured to determine a target value corresponding to each device node according to the ID information value and the duration of the message sent by each device node; a tenth determination module, configured to use the target value as the target information; Wherein, the calculation unit includes: a fourth calculation module, configured to calculate a current input value of the terminal device corresponding to each device node; a fifth calculation module, configured to calculate an energy loss value corresponding to each device node according to the current input value; a seventh determination module, configured to determine an energy value corresponding to each device node according to each energy loss value; an eighth determination module, configured to use the energy value as the target information; The first determination unit includes: an eleventh determination module, configured to determine the largest target value among a plurality of target values; a second acquisition module, configured to acquire a target terminal device corresponding to the largest target value; a collection module, configured to collect target capacity information corresponding to the target terminal device; a twelfth determination module, configured to determine a target device node among the plurality of device nodes according to the target terminal device and the target capacity information.
6. A computer-readable storage medium, characterized in that, the storage medium stores a program, where the program executes the method according to any one of claims 1 to 4.
7. An electronic device, characterized in that, it includes one or more processors and a memory, and the memory is used to store one or more programs, where when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
8. A computer program product, characterized in that, when executed on a data processing device, it is adapted to execute a program for initializing the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Block chain enabled distributed computing task unloading method and system
CN110262845A