CN112738213B - Task demand response method, device and system based on block chain and storage medium - Google Patents

Task demand response method, device and system based on block chain and storage medium Download PDF

Info

Publication number
CN112738213B
CN112738213B CN202011573438.0A CN202011573438A CN112738213B CN 112738213 B CN112738213 B CN 112738213B CN 202011573438 A CN202011573438 A CN 202011573438A CN 112738213 B CN112738213 B CN 112738213B
Authority
CN
China
Prior art keywords
blockchain
preset
demand response
task
evaluation indexes
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
CN202011573438.0A
Other languages
Chinese (zh)
Other versions
CN112738213A (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.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology 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 Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202011573438.0A priority Critical patent/CN112738213B/en
Publication of CN112738213A publication Critical patent/CN112738213A/en
Application granted granted Critical
Publication of CN112738213B publication Critical patent/CN112738213B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5066Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

The invention discloses a task demand response method based on a block chain, which comprises the following steps: receiving tasks participating in demand response based on a preset block chain, and acquiring evaluation indexes of the tasks; selecting a target block from all blocks of the preset blockchain based on the evaluation index; and distributing the task to the target block for processing. The invention also discloses a task demand response device based on the block chain, a task demand response system based on the block chain and a computer readable storage medium. The invention improves the reliability of data and the response speed of task demands.

Description

Task demand response method, device and system based on block chain and storage medium
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a blockchain-based task demand response method, device, system, and computer readable storage medium.
Background
With the rapid development of the internet of things, task demand responses of servers are increased in millions, and the higher the reliability requirements of behaviors and data in the task demand responses are. Currently, servers are manually optimized and regulated to handle the ever-increasing task demand response. However, the server is manually optimized and regulated, the interaction between the data still depends too much on the centralized server, so that the reliability of the data is not high, and the task demand response is too slow due to low data interaction efficiency.
Disclosure of Invention
The invention mainly aims to provide a task demand response method, device and system based on a block chain and a computer readable storage medium, aiming at improving the reliability of data and improving the response speed of task demands.
In order to achieve the above object, the present invention provides a task demand response method based on a blockchain, the task demand response method based on a blockchain including the steps of:
receiving tasks participating in demand response based on a preset block chain, and acquiring evaluation indexes of the tasks;
selecting a target block from all blocks of the preset blockchain based on the evaluation index;
and distributing the task to the target block for processing.
Optionally, the evaluation index includes a plurality of evaluation indexes, and the step of selecting the target block from the blocks of the preset blockchain based on the evaluation indexes includes:
performing standardization processing on the multiple evaluation indexes to obtain multiple standardized evaluation indexes;
weighting the plurality of standardized evaluation indexes to obtain weights of the plurality of evaluation indexes;
and selecting a target block from all blocks of the preset block chain based on the weight.
Optionally, before the step of receiving the task participating in the demand response based on the preset blockchain and obtaining the evaluation index of the task, the method further includes:
dividing a preset blockchain into side chains corresponding to a plurality of preset evaluation indexes, wherein the number of the side chains is the same as that of the plurality of evaluation indexes, and the side chains comprise nodes for processing tasks;
and constructing a main chain in the preset blockchain, and respectively connecting each side chain with the main chain, wherein the main chain comprises a main node with a sharing function.
Optionally, the task demand response method based on the blockchain further comprises:
when detecting a request of an application to join the preset blockchain, verifying whether the application has a joining authority;
and if the application has the joining authority, the application is added into the preset blockchain so as to enable information interaction between a plurality of applications based on the preset blockchain.
Optionally, the step of adding the application to the preset blockchain includes:
acquiring a unique identifier of the application;
based on the unique identification, the application is connected to a node in the preset blockchain.
Optionally, the task demand response method based on the blockchain further comprises:
when the preset block link receives a plurality of tasks, performing similarity calculation on the plurality of tasks;
based on the similarity calculation result, connecting the task with the calculated similarity value smaller than a preset similarity threshold to the same block in the preset block chain.
Optionally, the step of performing similarity calculation on the plurality of tasks includes:
respectively calculating the duty ratio of the evaluation indexes of the tasks;
carrying out standardization treatment on the duty ratio to obtain a standardized duty ratio;
and calculating Euclidean distances among the tasks based on the normalized duty ratio, wherein the Euclidean distances are similarity calculation results.
In addition, in order to achieve the above object, the present invention also provides a task demand response device based on a blockchain, the task demand response device based on a blockchain includes:
the index acquisition module is used for receiving tasks participating in demand response based on a preset block chain and acquiring evaluation indexes of the tasks;
the block selection module is used for selecting a target block from all blocks of the preset block chain based on the evaluation index;
and the task processing module is used for distributing the task to the target block for processing.
In addition, in order to achieve the above object, the present invention further provides a task demand response system based on a blockchain, the task demand response system based on a blockchain includes: the system comprises a memory, a processor and a blockchain-based task demand response program stored on the memory and executable on the processor, wherein the blockchain-based task demand response program realizes the steps of the blockchain-based task demand response method when being executed by the processor.
In addition, in order to achieve the above object, the present invention also provides a computer readable storage medium having stored thereon a blockchain-based task demand response program that when executed by a processor implements the steps of the blockchain-based task demand response method as described above.
The invention provides a task demand response method, device and system based on a block chain and a computer readable storage medium, wherein tasks participating in demand response are received based on a preset block chain, and evaluation indexes of the tasks are obtained; selecting a target block from all blocks of a preset block chain based on an evaluation index; and distributing the task to the target block for processing. Through the mode, interaction among the data is performed according to the established rule based on the decentralised preset blockchain, specifically, the interaction data among the nodes is verified through the digital signature technology without mutual trust, mutual deception among the nodes cannot be realized, and the nodes are descensive, so that identities among the nodes are not required to be disclosed, each participating node is anonymous, in addition, the current node cannot tamper with other nodes, the data interaction among the nodes is traceable, the reliability of the data under the task response requirement is ensured, meanwhile, a corresponding target block is selected according to the evaluation index of the task, and the task requirement is enabled to achieve faster response speed under the corresponding target block. Therefore, the invention improves the reliability of the data and the response speed of the task demand.
Drawings
FIG. 1 is a schematic diagram of a terminal structure of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart of a first embodiment of a blockchain-based task demand response method of the present invention;
FIG. 3 is a block chain architecture diagram according to an embodiment of the present invention;
FIG. 4 is a block diagram illustrating a blockchain link in accordance with an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a second embodiment of a blockchain-based task demand response method according to the present invention;
FIG. 6 is a schematic diagram of a major chain according to an embodiment of the present invention;
FIG. 7 is a functional block diagram of a first embodiment of a blockchain-based task demand response device.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a terminal structure of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention is task demand response equipment based on a blockchain, and the task demand response equipment based on the blockchain can be terminal equipment with processing functions such as a PC (personal computer ), a microcomputer, a notebook computer, a server and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU (Central Processing Unit ), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the terminal structure shown in fig. 1 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in FIG. 1, an operating system, a network communication module, a user interface module, and a blockchain-based task demand response program may be included in memory 1005, which is a type of computer storage medium.
In the terminal shown in fig. 1, the processor 1001 may be configured to call a blockchain-based task demand response program stored in the memory 1005, and perform the following operations:
receiving tasks participating in demand response based on a preset block chain, and acquiring evaluation indexes of the tasks;
selecting a target block from all blocks of the preset blockchain based on the evaluation index;
and distributing the task to the target block for processing.
Further, the evaluation metrics include a plurality of metrics, and the processor 1001 may be configured to invoke the blockchain-based task demand response program stored in the memory 1005, and further perform the following operations:
performing standardization processing on the multiple evaluation indexes to obtain multiple standardized evaluation indexes;
weighting the plurality of standardized evaluation indexes to obtain weights of the plurality of evaluation indexes;
and selecting a target block from all blocks of the preset block chain based on the weight.
Further, the processor 1001 may be configured to invoke the blockchain-based task demand response program stored in the memory 1005, and further perform the following operations:
dividing a preset blockchain into side chains corresponding to a plurality of preset evaluation indexes, wherein the number of the side chains is the same as that of the plurality of evaluation indexes, and the side chains comprise nodes for processing tasks;
and constructing a main chain in the preset blockchain, and respectively connecting each side chain with the main chain, wherein the main chain comprises a main node with a sharing function.
Further, the processor 1001 may be configured to invoke the blockchain-based task demand response program stored in the memory 1005, and further perform the following operations:
when detecting a request of an application to join the preset blockchain, verifying whether the application has a joining authority;
and if the application has the joining authority, the application is added into the preset blockchain so as to enable information interaction between a plurality of applications based on the preset blockchain.
Further, the processor 1001 may be configured to invoke the blockchain-based task demand response program stored in the memory 1005, and further perform the following operations:
acquiring a unique identifier of the application;
based on the unique identification, the application is connected to a node in the preset blockchain.
Further, the processor 1001 may be configured to invoke the blockchain-based task demand response program stored in the memory 1005, and further perform the following operations:
when the preset block link receives a plurality of tasks, performing similarity calculation on the plurality of tasks;
based on the similarity calculation result, connecting the task with the calculated similarity value smaller than a preset similarity threshold to the same block in the preset block chain.
Further, the processor 1001 may be configured to invoke the blockchain-based task demand response program stored in the memory 1005, and further perform the following operations:
respectively calculating the duty ratio of the evaluation indexes of the tasks;
carrying out standardization treatment on the duty ratio to obtain a standardized duty ratio;
and calculating Euclidean distances among the tasks based on the normalized duty ratio, wherein the Euclidean distances are similarity calculation results.
Based on the hardware structure, various embodiments of the task demand response method based on the block chain are provided.
The invention provides a task demand response method based on a block chain.
Referring to fig. 2, fig. 2 is a flowchart of a first embodiment of a task demand response method based on a blockchain according to the present invention.
In this embodiment, the task demand response method based on the blockchain includes:
step S10, receiving tasks participating in demand response based on a preset block chain, and acquiring evaluation indexes of the tasks;
in this embodiment, the related art based on the blockchain constructs an architecture of the blockchain system, and builds a preset blockchain based on the architecture. Specifically, the preset blockchain is constructed in a decentralised form, and the preset blockchain can be controlled by a plurality of mechanism centers, namely, the preset blockchain is controlled by each entity node. The nodes coordinate to maintain the whole preset block chain together according to a consensus mechanism. The preset blockchain may be used to increase participants, i.e., to increase nodes of or connect applications, devices, organizations, etc. to nodes. After the preliminary construction of the preset block chain is completed, a task participating in demand response is received based on the preset block chain, and an evaluation index of the task is obtained to determine the type of the task based on the evaluation index.
The task of participating in the demand response is generated by a node such as an application, a device, a mechanism, or the like in the preset blockchain or an application, a device, a mechanism, or the like connected to the node. Of course, the task involved in the demand response may also be generated by an external application and then obtained by acquiring the preset blockchain.
In an embodiment, the evaluation index is task type information participating in demand response, for example, the tasks include storage, energy consumption, communication, bandwidth, time, flow and other indexes, each task can have the above indexes, and the task can select or establish corresponding indexes according to own service and demand so as to meet different service demands. Of course, the task may select one or more indexes according to its own service requirement, i.e. different service requirements are connected to different evaluation indexes. In other embodiments, the evaluation index may also include other indexes, or more or less evaluation indexes, which are not limited herein.
In an embodiment, by setting different index nodes in a preset blockchain and ensuring data security, reliability of task demand data is realized according to different task demands. Wherein the index nodes are used for processing functions of the corresponding index, such as storing data, transmitting data, etc. In addition, the interaction data among the nodes are verified through the digital signature technology, mutual trust is not needed, mutual deception among the nodes can not be realized only according to the set rule of the preset block chain, and therefore the data security can be ensured. Meanwhile, as the nodes are de-trusted, the nodes do not need to disclose identities, each participating node is anonymous, the current node cannot tamper with other nodes, and the data interaction between the nodes is traceable, so that the data security can be ensured.
For easy understanding of the architecture of the blockchain system, reference may be made to fig. 3, where fig. 3 is a schematic diagram of the architecture of the blockchain system according to an embodiment of the present invention, and in which intelligent driving, smart medicine, research institutions, load aggregation, smart home, service companies are applications or institutions generating tasks, which are connected to the blockchain, and synchronous between nodes is performed to obtain a synchronous block. The architecture of the whole blockchain is controlled by a plurality of institutions (such as intelligent driving, intelligent medical treatment, research institutions, load aggregation, intelligent home, service companies), the blockchain supports point-to-point transaction of massive application requirements, information among nodes is disclosed and transparent, and a decentralised distributed system is formed by means of distributed accounting, propagation and the like. Because of the difference of task demands of all institutions, different demands are made on privacy, safety, supervision and the like of data, and by constructing the architecture, the above various demands can be met, the overall data processing speed in the blockchain is improved, more interactive information can be processed in a short time, and therefore, the data safety can be ensured and the processing capacity of single nodes in the blockchain can be improved.
Step S20, selecting a target block from all blocks of the preset block chain based on the evaluation index;
when the preset block chain is divided into blocks, a plurality of different evaluation indexes such as storage, energy consumption, communication, bandwidth, time and flow can be set first, and then the duty ratio of the evaluation indexes in each task requirement is calculated respectively. Since the evaluation indexes have different properties and usually have different dimensions and magnitude, when the level differences among the evaluation indexes are large, if the original duty ratio is directly used for analysis, the classification processing is not accurate enough, so that in order to ensure the reliability of the result, the duty ratio needs to be standardized, and the standardized processing can be realized through a data standardization algorithm, for example, an extremum method, a standard deviation method, a tri-fold line method, a semi-normal distribution method and the like, which are not described herein. Then, based on the duty ratio of the normalization process, the similarity distance between the respective tasks is calculated for different indexes, for example, the euclidean distance, the L1 norm, and the like, which are not limited herein. Finally, each task can be classified based on the similarity distance, and the preset block chain is divided into blocks based on the classified blocks. After the above classification process, a corresponding target block may be selected for the task newly received by the preset blockchain. Specifically, a target block is selected from the blocks of the preset blockchain based on the task evaluation index.
It should be noted that, each task has a unique identifier, for example, an ID (Identity document, identity identifier), and after the task is selected from the target block, the unique identifier and the task can be passed to the target block together, so that the target block can accurately and rapidly process the task.
In addition, it should be noted that, each block of the preset blockchain is connected with each other, each node, task, index, etc. in the block are connected with each other, and based on the consensus mechanism, the nodes or blocks can share respective messages.
In an embodiment, a target block for the connection is determined according to the priority of the evaluation index, and the target block may be one or more. Specifically, referring to fig. 4, fig. 4 is a schematic block-chain block connection diagram according to an embodiment of the present invention, where the priority of the storage index and the bandwidth index in the relevant task of intelligent medical treatment is higher, so that two block-chain node services are respectively selected as target blocks. The processing procedures of other mechanisms or applications in the figure are basically the same as those of the intelligent medical treatment, and are not described in detail herein. In other embodiments, the target area for the connection may be determined according to factors such as the weight, importance, and duty ratio of the evaluation index.
Specifically, the step S20 includes:
step a21, carrying out standardization processing on the plurality of evaluation indexes to obtain a plurality of standardized evaluation indexes;
step a22, carrying out weighting operation on the plurality of standardized evaluation indexes to obtain weights of the plurality of evaluation indexes;
step a23, selecting a target block from the blocks of the preset block chain based on the weight.
After the evaluation indexes of the task are obtained, the plurality of evaluation indexes are subjected to standardization processing based on a data standardization algorithm, then the plurality of standardized evaluation indexes are subjected to weighting operation to obtain weights of the plurality of evaluation indexes, and finally the target block is selected from all blocks of the preset block chain based on the weights. Wherein the evaluation index includes a plurality of indexes.
Since the evaluation indexes have different properties and usually have different dimensions and magnitude, if the level difference between the evaluation indexes is large, the evaluation indexes are not comparable if the original evaluation indexes are directly analyzed, and therefore, in order to ensure the reliability of the result, the normalization process needs to be performed on each evaluation index to eliminate the property difference (dimension difference) of each evaluation index.
The data normalization algorithm can be an extremum method, a standard deviation method, a tri-fold line method, a semi-normal distribution method and the like. The weighting operation may be a mean square error operation method, and of course, may be other methods for calculating weights.
In an embodiment, a block corresponding to the index with the largest weight can be selected as the target block, so that the demand response speed corresponding to the index with the largest weight is higher, and the interaction efficiency is higher. In other embodiments, a block corresponding to an index having a weight greater than a preset weight threshold may be selected as the target block, where the target block may include one or more target blocks, and the preset weight threshold may be set according to actual needs, which is not limited herein.
And step S30, distributing the task to the target block for processing.
After the target block is selected, the task is distributed to the target block for processing. Specifically, the processing is performed by the blockchain node service in the target block, that is, the response processing is performed by the service node with the corresponding demand response. It should be noted that, the task is allocated to the target block, and a unique identifier of the task is attached to the target block, so that the target block can index the task based on the unique identifier, thereby improving the response speed of the task requirement.
In an embodiment, after a task is allocated to a target block, the task and nodes in the target block form a chained storage network structure, and each node in the task and the target block can share information, so that data security can be ensured and response speed of task requirements can be improved based on a preset rule of the preset blockchain.
The embodiment of the invention provides a task demand response method based on a block chain, which is used for receiving tasks participating in demand response based on a preset block chain and acquiring evaluation indexes of the tasks; selecting a target block from all blocks of a preset block chain based on an evaluation index; and distributing the task to the target block for processing. The embodiment of the invention is based on the decentralised preset blockchain, so that the interaction between the data is carried out according to the established rule, specifically, the interaction data between the nodes is verified through the digital signature technology without mutual trust, the nodes cannot be deceived mutually, the nodes are deceived mutually, so that the nodes do not need to disclose identities, each participated node is anonymous, in addition, the current node cannot tamper with other nodes, the data interaction between the nodes can be traced, the reliability of the data under the task response requirement is ensured, and meanwhile, the corresponding target block is selected according to the evaluation index of the task, so that the task requirement can realize faster response speed under the corresponding target block. Therefore, the embodiment of the invention improves the reliability of the data and the response speed of the task demands.
Further, based on the first embodiment described above, a second embodiment of the task demand response method based on a blockchain of the present invention is presented.
Referring to fig. 5, fig. 5 is a flowchart illustrating a second embodiment of a task demand response method based on a blockchain according to the present invention.
In this embodiment, before the step S10, the task demand response method based on the blockchain further includes:
step S40, dividing a preset blockchain into side chains corresponding to a plurality of preset evaluation indexes, wherein the number of the side chains is the same as that of the plurality of evaluation indexes, and the side chains comprise nodes for processing tasks;
and S50, constructing a main chain in the preset blockchain, and respectively connecting each side chain with the main chain, wherein the main chain comprises a main node with a sharing function.
In this embodiment, the architecture of the main side chain is further designed based on the preset blockchain, and the task can select or establish a corresponding index according to its own service and requirement, so as to realize different service requirements through the main side chain. Specifically, the preset blockchain is divided into side chains corresponding to a plurality of preset evaluation indexes, wherein the number of the side chains is the same as that of the plurality of evaluation indexes, the side chains comprise nodes for processing tasks, then, a main chain is constructed in the preset blockchain, and each side chain is connected with the main chain respectively, wherein the main chain comprises a main node with a sharing function.
It should be noted that, the main chain is used as a sharing platform of all participants, that is, a sharing data channel of all nodes such as applications, task demands, devices, institutions, etc., so as to realize transaction and sharing among each evaluation index, block and main chain. Specifically, referring to fig. 6, fig. 6 is a schematic diagram of a main chain according to an embodiment of the present invention, where a bandwidth side chain includes five nodes, a time side chain includes five nodes, and of course, the number of nodes of the side chain is set according to an actual situation, which is not limited herein, and a main chain is used to connect the bandwidth side chain with the time side chain, and the main chain includes two main nodes, which are used to realize sharing of data, and of course, the number of main chain nodes is set according to an actual situation, which is not limited herein.
In an embodiment, the preset evaluation indexes may include indexes such as storage, energy consumption, communication, bandwidth, time and flow, and the task may select or establish corresponding indexes according to own service and requirements so as to meet different service requirements. Of course, the task may select one or more indexes according to its own service requirement, i.e. different service requirements are connected to different evaluation indexes. In other embodiments, the evaluation index may also include other indexes, or more or less evaluation indexes, which are not limited herein.
In the embodiment, the main side chain is designed for the task demands according to the evaluation indexes, so that the interaction efficiency between tasks with the same evaluation indexes is improved under the same side chain, and the processing and the linking of subsequent data are facilitated.
Further, based on the first embodiment described above, a third embodiment of the task demand response method based on a blockchain of the present invention is presented.
In this embodiment, the task demand response method based on the blockchain further includes:
step A, when detecting a request of an application to join the preset blockchain, verifying whether the application has a joining authority;
and step B, if the application has the joining authority, the application is added into the preset blockchain so as to enable information interaction between a plurality of applications based on the preset blockchain.
In this embodiment, the preset blockchain is controlled by multiple mechanism centers, and the application needs to obtain rights to join the preset blockchain. For the preset blockchain, when a request of adding the application into the preset blockchain is detected, whether the application has the adding authority is verified, and if the application has the adding authority, the application is added into the preset blockchain. After a plurality of applications join a preset blockchain, information interaction is performed between the plurality of applications based on the preset blockchain based on a preset rule of the blockchain.
In addition, it should be noted that, each block of the preset blockchain is connected with each other, each application, node, task, index, etc. in the block are connected with each other, each node may be connected with a different application, and based on a consensus mechanism, the applications may share respective messages. In addition, the nodes of the preset block chain are mutually synchronous, one node is lost in data, and other nodes are backed up with the data, so that the safety of the data can be ensured.
Specifically, in the step B, adding the application to the preset blockchain includes:
step B1, obtaining a unique identifier of the application;
and step B2, connecting the application to a node in the preset blockchain based on the unique identification.
In this embodiment, the application itself has a unique identifier, and for the preset blockchain, the unique identifier of the application is obtained, and then, based on the unique identifier, the application is connected to a node in the preset blockchain. Wherein the unique identification may be an ID identification.
It should be noted that each application has a unique identifier, for example, an ID identifier, and when the application joins the preset blockchain, the unique identifier and the application may be handed to the preset blockchain together, so that the preset blockchain may accurately and quickly index and process the application.
In this embodiment, the added application is subjected to authority verification, so that the preset blockchain can be added only by the allowed application, thereby ensuring the reliability of the preset blockchain.
Further, based on the above-described first embodiment, a fourth embodiment of the task demand response method based on a blockchain of the present invention is proposed.
In this embodiment, the task demand response method based on the blockchain further includes:
step C, when the preset block links receive a plurality of tasks, similarity calculation is carried out on the tasks;
and D, based on a similarity calculation result, connecting the task with the calculated similarity value smaller than a preset similarity threshold to the same block in the preset block chain.
In this embodiment, when the preset block link receives a plurality of tasks, that is, when the preset block link has a plurality of tasks, the plurality of tasks are subjected to similarity calculation, and then, based on a result of the similarity calculation, the tasks with the calculated similarity smaller than the preset similarity threshold are connected to the same block in the preset block link. It can be understood that similarity calculation is performed on a plurality of tasks, that is, the types of the tasks are calculated, then the tasks are classified according to the types, and the classified tasks are respectively connected to each block. The preset similarity threshold is set according to actual needs, and is not limited herein, for example, when calculating the euclidean distance, the preset similarity threshold is an absolute distance.
When classifying tasks, it is necessary to calculate the difference between tasks. The similarity calculation is to compare the similarity of two tasks, namely calculating the characteristic value and the characteristic distance between the tasks, wherein if the characteristic distance is small, the similarity is large, and if the characteristic distance is large, the similarity is small.
In an embodiment, the invention performs similarity calculation based on task evaluation indexes, wherein the evaluation indexes can comprise indexes such as storage, energy consumption, communication, bandwidth, time and flow. The similarity calculation may be performed by calculating euclidean distance (euclidean distance), manhattan distance, markov distance, or the like. In other embodiments, the evaluation index may be set according to actual needs, and is not limited herein.
Specifically, in the step C, performing similarity calculation on the plurality of tasks includes:
step C1, respectively calculating the duty ratio of the evaluation indexes of the tasks;
step C2, carrying out standardization processing on the duty ratio to obtain a standardized duty ratio;
and C3, calculating Euclidean distances among the tasks based on the standardized duty ratio, wherein the Euclidean distances are similarity calculation results.
In this embodiment, the duty ratios of the evaluation indexes of the plurality of tasks are calculated respectively, then the duty ratios are normalized based on a data normalization algorithm, and finally the euclidean distance between the plurality of tasks is calculated based on the duty ratios after the normalization processing, wherein the euclidean distance is a similarity calculation result. Of course, the duty ratio may be replaced with priority, weight, importance, or the like.
It should be noted that, since the evaluation indexes have different properties and usually have different dimensions and magnitude, when the level difference between the evaluation indexes is large, if the analysis is directly performed with the original duty ratio, the classification process will be not accurate enough, so, in order to ensure the reliability of the result, the normalization process of the duty ratio is required, and the normalization process may be implemented by a data normalization algorithm, for example, an extremum method, a standard deviation method, a tri-fold line method, a semi-normal distribution method, and the like, which will not be described herein.
And then, calculating Euclidean distances among the tasks according to different indexes based on the duty ratio of the standardized processing, classifying the tasks based on the Euclidean distances, and dividing the preset block chain based on the classified blocks. After the classification process is completed, a corresponding target block can be selected for the task newly received by the preset blockchain. Specifically, a target block is selected from the blocks of the preset blockchain based on the task evaluation index.
In this embodiment, tasks of similar types are connected to the same block in the preset blockchain, so that the interaction efficiency between the similar tasks is higher, and the task response speed of the preset blockchain is further improved.
The invention also provides a task demand response device based on the block chain.
Referring to fig. 7, fig. 7 is a schematic functional block diagram of a first embodiment of a task demand response device based on a blockchain according to the present invention.
In this embodiment, the task demand response device based on a blockchain includes:
the index acquisition module 10 is used for receiving tasks participating in demand response based on a preset blockchain and acquiring evaluation indexes of the tasks;
a block selection module 20, configured to select a target block from the blocks of the preset blockchain based on the evaluation index;
and the task processing module 30 is used for distributing the task to the target block for processing.
Wherein, each virtual function module of the task demand response device based on the blockchain is stored in the memory 1005 of the task demand response device based on the blockchain shown in fig. 1, and is used for implementing all functions of the task demand response program based on the blockchain; each module, when executed by the processor 1001, may implement a blockchain-based task demand response function.
Further, the block selection module 20 includes:
the index processing unit is used for carrying out standardization processing on the plurality of evaluation indexes to obtain a plurality of standardized evaluation indexes;
a weighting operation unit, configured to perform a weighting operation on the plurality of standardized evaluation indexes, so as to obtain weights of the plurality of evaluation indexes;
and the block selecting unit is used for selecting a target block from all blocks of the preset block chain based on the weight.
Further, the task demand response device based on the blockchain further comprises:
the side chain dividing module is used for dividing a preset blockchain into side chains corresponding to a plurality of preset evaluation indexes, wherein the number of the side chains is the same as that of the plurality of evaluation indexes, and the side chains comprise nodes for processing tasks;
and the main chain construction module is used for constructing a main chain in the preset blockchain and respectively connecting each side chain with the main chain, wherein the main chain comprises a main node with a sharing function.
Further, the task demand response device based on the blockchain further comprises:
the permission verification module is used for verifying whether the application has the joining permission or not when detecting the request of joining the application into the preset blockchain;
and the application adding module is used for adding the application into the preset blockchain if the application has the adding authority so as to enable information interaction between a plurality of applications based on the preset blockchain.
Further, the application joining module includes:
an identifier obtaining unit, configured to obtain a unique identifier of the application;
and the application connection unit is used for connecting the application to the node in the preset blockchain based on the unique identification.
Further, the task demand response device based on the blockchain further comprises:
the similarity calculation module is used for calculating the similarity of a plurality of tasks when the preset block links receive the tasks;
and the task connection module is used for connecting the task with the calculated similarity value smaller than a preset similarity threshold value to the same block in the preset block chain based on the similarity calculation result.
Further, the similarity calculation module includes:
a duty ratio calculation unit for calculating duty ratios of the evaluation indexes of the plurality of tasks, respectively;
the duty ratio processing unit is used for carrying out standardization processing on the duty ratio to obtain a standardized duty ratio;
and the distance calculation unit is used for calculating Euclidean distances among the tasks based on the standardized duty ratio, wherein the Euclidean distances are similarity calculation results.
The function implementation of each module in the task demand response device based on the blockchain corresponds to each step in the task demand response method embodiment based on the blockchain, and the function and the implementation process of each module are not described in detail herein.
The invention also provides a task demand response system based on the block chain, which comprises: a memory, a processor, and a blockchain-based task demand response program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of a blockchain-based task demand response method as in any of the embodiments above.
The specific embodiments of the task demand response system based on the blockchain are basically the same as the embodiments of the task demand response method based on the blockchain, and are not described herein.
The present invention also provides a computer readable storage medium having stored thereon a blockchain-based task demand response program that when executed by a processor implements the steps of the blockchain-based task demand response method according to any of the embodiments above.
Embodiments of the computer readable storage medium of the present invention are substantially the same as the above-described embodiments of the task demand response method based on blockchain, and are not described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (9)

1. The task demand response method based on the block chain is characterized by comprising the following steps of:
receiving tasks participating in demand response based on a preset block chain, and acquiring evaluation indexes of the tasks;
selecting a target block from all blocks of the preset blockchain based on the evaluation index;
distributing the task to the target block for processing;
wherein the evaluation index includes a plurality of evaluation indexes, and the step of selecting a target block from the blocks of the preset blockchain based on the evaluation indexes includes:
performing standardization processing on the multiple evaluation indexes to obtain multiple standardized evaluation indexes;
weighting the plurality of standardized evaluation indexes to obtain weights of the plurality of evaluation indexes;
and selecting a target block from all blocks of the preset block chain based on the weight.
2. The blockchain-based task demand response method of claim 1, wherein before the step of receiving a task participating in demand response based on a preset blockchain and acquiring an evaluation index of the task, further comprising:
dividing a preset blockchain into side chains corresponding to a plurality of preset evaluation indexes, wherein the number of the side chains is the same as that of the plurality of evaluation indexes, and the side chains comprise nodes for processing tasks;
and constructing a main chain in the preset blockchain, and respectively connecting each side chain with the main chain, wherein the main chain comprises a main node with a sharing function.
3. The blockchain-based task demand response method of any of claims 1-2, further comprising:
when detecting a request of an application to join the preset blockchain, verifying whether the application has a joining authority;
and if the application has the joining authority, the application is added into the preset blockchain so as to enable information interaction between a plurality of applications based on the preset blockchain.
4. The blockchain-based task demand response method of claim 3, wherein the step of adding the application to the preset blockchain includes:
acquiring a unique identifier of the application;
based on the unique identification, the application is connected to a node in the preset blockchain.
5. The blockchain-based task demand response method of any of claims 1-2, further comprising:
when the preset block link receives a plurality of tasks, performing similarity calculation on the plurality of tasks;
based on the similarity calculation result, connecting the task with the calculated similarity value smaller than a preset similarity threshold to the same block in the preset block chain.
6. The blockchain-based task demand response method of claim 5,
the step of performing similarity calculation on the tasks comprises the following steps:
respectively calculating the duty ratio of the evaluation indexes of the tasks;
carrying out standardization treatment on the duty ratio to obtain a standardized duty ratio;
and calculating Euclidean distances among the tasks based on the normalized duty ratio, wherein the Euclidean distances are similarity calculation results.
7. A blockchain-based task demand response device, the blockchain-based task demand response device comprising:
the index acquisition module is used for receiving tasks participating in demand response based on a preset block chain and acquiring evaluation indexes of the tasks;
the block selection module is used for selecting a target block from all blocks of the preset block chain based on the evaluation index;
the task processing module is used for distributing the task to the target block for processing;
wherein the evaluation index includes a plurality of evaluation indexes, and the block selection module is further configured to:
performing standardization processing on the multiple evaluation indexes to obtain multiple standardized evaluation indexes;
weighting the plurality of standardized evaluation indexes to obtain weights of the plurality of evaluation indexes;
and selecting a target block from all blocks of the preset block chain based on the weight.
8. A blockchain-based task demand response system, the blockchain-based task demand response system comprising: memory, a processor, and a blockchain-based task demand response program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the blockchain-based task demand response method of any of claims 1 to 6.
9. A computer readable storage medium, wherein a blockchain-based task demand response program is stored on the computer readable storage medium, which when executed by a processor, implements the steps of the blockchain-based task demand response method of any of claims 1 to 6.
CN202011573438.0A 2020-12-25 2020-12-25 Task demand response method, device and system based on block chain and storage medium Active CN112738213B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011573438.0A CN112738213B (en) 2020-12-25 2020-12-25 Task demand response method, device and system based on block chain and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011573438.0A CN112738213B (en) 2020-12-25 2020-12-25 Task demand response method, device and system based on block chain and storage medium

Publications (2)

Publication Number Publication Date
CN112738213A CN112738213A (en) 2021-04-30
CN112738213B true CN112738213B (en) 2023-06-30

Family

ID=75617129

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011573438.0A Active CN112738213B (en) 2020-12-25 2020-12-25 Task demand response method, device and system based on block chain and storage medium

Country Status (1)

Country Link
CN (1) CN112738213B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900519B (en) * 2022-05-06 2023-12-12 中国电信股份有限公司 Capability calling method, capability calling device, storage medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110348242A (en) * 2017-06-12 2019-10-18 腾讯科技(深圳)有限公司 Service request processing method and device
CN110458702A (en) * 2019-07-15 2019-11-15 阿里巴巴集团控股有限公司 Based on the virtual resource allocation method and device of block chain, electronic equipment
CN110633323A (en) * 2019-09-16 2019-12-31 腾讯科技(深圳)有限公司 Business data storage method, device, storage medium and computer equipment
CN111224793A (en) * 2018-11-27 2020-06-02 华为技术有限公司 Data storage method and device, computer equipment and readable storage medium
CN111460504A (en) * 2020-03-31 2020-07-28 腾讯科技(深圳)有限公司 Service processing method, device, node equipment and storage medium
CN111885133A (en) * 2020-07-10 2020-11-03 深圳力维智联技术有限公司 Data processing method and device based on block chain and computer storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11310234B2 (en) * 2017-11-16 2022-04-19 International Business Machines Corporation Securing permissioned blockchain network from pseudospoofing network attacks

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110348242A (en) * 2017-06-12 2019-10-18 腾讯科技(深圳)有限公司 Service request processing method and device
CN111224793A (en) * 2018-11-27 2020-06-02 华为技术有限公司 Data storage method and device, computer equipment and readable storage medium
CN110458702A (en) * 2019-07-15 2019-11-15 阿里巴巴集团控股有限公司 Based on the virtual resource allocation method and device of block chain, electronic equipment
CN110633323A (en) * 2019-09-16 2019-12-31 腾讯科技(深圳)有限公司 Business data storage method, device, storage medium and computer equipment
CN111460504A (en) * 2020-03-31 2020-07-28 腾讯科技(深圳)有限公司 Service processing method, device, node equipment and storage medium
CN111885133A (en) * 2020-07-10 2020-11-03 深圳力维智联技术有限公司 Data processing method and device based on block chain and computer storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于区块链的需求响应系统设计;宫飞翔等;《电力信息与通信技术》;20200630(第06期);88-94 *

Also Published As

Publication number Publication date
CN112738213A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
CN110245220A (en) Electronic document signs method, apparatus and server, storage medium
CN103118140B (en) By sharing files to the method, system and device of relation loop other user terminals outer
US20220311607A1 (en) Key generation method and apparatus, device, and medium
Hajizadeh et al. A method for trust evaluation in the cloud environments using a behavior graph and services grouping
Jagabathula et al. Identifying unreliable and adversarial workers in crowdsourced labeling tasks
CN113268336A (en) Service acquisition method, device, equipment and readable medium
Garuti A set theory justification of Garuti's compatibility index
CN112307331A (en) Block chain-based college graduate intelligent recruitment information pushing method and system and terminal equipment
CN112738213B (en) Task demand response method, device and system based on block chain and storage medium
CN113726890A (en) Block chain data service-oriented federal prediction method and system
CN115829731A (en) Transaction information processing method and device
CN117216758A (en) Application security detection system and method
CN112487487A (en) Authority management method, device, equipment and storage medium for member of block chain node
CN111008873A (en) User determination method and device, electronic equipment and storage medium
KR102498336B1 (en) Method and system for managing user reputation based on blockchain
US8498957B2 (en) Optimal multi-factor evaluation in computing systems
CN114092268A (en) User community detection method and device, computer equipment and storage medium
CN115659346A (en) Function testing method and device for multi-party secure computing platform
US20210012001A1 (en) Storage medium, information processing method, and information processing apparatus
Selen et al. Approximate performance analysis of generalized join the shortest queue routing
CN110276403B (en) Model building method and device
CN113591943A (en) Method and device for quickly authenticating user of newly added channel and electronic equipment
CN108537418B (en) Method and system for evaluating remote control multi-operation object of multi-operation terminal
Peng et al. Spatiotemporal prediction based intelligent task allocation for secure spatial crowdsourcing in industrial IoT
CN111798315A (en) Intelligent contract system, intelligent contract management method, intelligent contract management device and readable 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