CN117294701A - Block chain-based data processing method and related products - Google Patents

Block chain-based data processing method and related products Download PDF

Info

Publication number
CN117294701A
CN117294701A CN202210688066.9A CN202210688066A CN117294701A CN 117294701 A CN117294701 A CN 117294701A CN 202210688066 A CN202210688066 A CN 202210688066A CN 117294701 A CN117294701 A CN 117294701A
Authority
CN
China
Prior art keywords
task
data
participation
result data
blockchain
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.)
Pending
Application number
CN202210688066.9A
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202210688066.9A priority Critical patent/CN117294701A/en
Publication of CN117294701A publication Critical patent/CN117294701A/en
Pending legal-status Critical Current

Links

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
    • 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
    • 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
    • H04L67/104Peer-to-peer [P2P] networks
    • 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
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Abstract

The embodiment of the application discloses a data processing method based on a block chain and a related product, wherein the data processing method based on the block chain comprises the following steps: receiving a task participation request submitted by an object, wherein the task participation request comprises execution data generated by the object for executing a target task; invoking a predictor to acquire result data of a target task; determining a task completion of the object based on the execution data and the result data; and transferring the digital collection to the account of the object according to the task completion condition of the object. By adopting the embodiment of the application, the data intercommunication between the blockchain and the real world can be realized based on the predictor, so that task execution can be realized on the blockchain, and automatic binding of digital collection transfer and tasks on the chain can be realized, thereby realizing automatic task execution, solving tedious and error-prone manual operation and improving task execution efficiency.

Description

Block chain-based data processing method and related products
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a blockchain-based data processing method, a blockchain-based data processing apparatus, a computer device, a computer readable storage medium, and a computer program product.
Background
The guessing and correcting homework is a common activity (or called a task) in daily life, such as guessing the score between two teams in football match, guessing the number of personal medals in the athletic meeting, and correcting homework submitted by students by teachers; typically, the execution of these tasks is human-operated. For example, in a competition scene, activity data of competition activity is manually obtained, competition results of various competition objects are manually judged, and the like; in another example, in the case of a correction job, a teacher is required to manually correct the job. It is obvious that when these tasks are performed in a manual operation manner, the operations are quite troublesome, time and labor are wasted, errors (such as data acquisition errors, judgment errors and the like) are easy to occur, and the task execution efficiency cannot be improved.
Disclosure of Invention
The embodiment of the application provides a data processing method based on a blockchain and related products, which can realize data intercommunication between the blockchain and the real world based on a predictor so as to realize task execution on the blockchain, and can realize automatic binding of digital collection transfer and tasks on the chain, thereby realizing automatic task execution, solving tedious and error-prone manual operation and improving task execution efficiency.
An aspect of an embodiment of the present application provides a data processing method based on a blockchain, including:
receiving a task participation request submitted by an object, wherein the task participation request comprises execution data generated by the object for executing a target task;
invoking a predictor to acquire result data of the target task;
determining a task completion of the object based on the execution data and the result data;
and transferring the digital collection to the account of the object according to the task completion condition of the object.
An aspect of an embodiment of the present application provides a data processing apparatus based on a blockchain, including:
the receiving module is used for receiving a task participation request submitted by an object, wherein the task participation request comprises execution data generated by the object for executing a target task;
the acquisition module is used for calling a prophetic machine to acquire result data of the target task;
the determining module is used for determining the task completion condition of the object based on the execution data and the result data;
and the transfer module is used for transferring the digital collection to the account of the object according to the task completion condition of the object.
In one aspect, a computer device is provided, including: a processor and a memory; the processor is connected with the memory and the network interface, wherein the network interface is used for providing a network communication function, the memory is used for storing program codes, and the processor is used for calling the program codes to execute the data processing method based on the blockchain in the embodiment of the application.
The present embodiments provide a computer readable storage medium storing a computer program which, when executed by a processor, performs a blockchain-based data processing method in the embodiments of the present application.
Embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of the blockchain-based data processing method of embodiments of the present application.
In the embodiment of the application, a task participation request submitted by an object can be received, the task participation request can contain execution data generated by the object executing a target task, and after the task participation request is received, result data of the target task can be obtained by calling a propulsor, so that data interaction between a blockchain and the outside world is realized by calling the propulsor. Further, a task completion of the object may be determined based on the execution data and the result data, and a digital collection may be transferred to an account of the object according to the task completion. Thereby, the execution of tasks on the blockchain can be realized; moreover, based on the target task of the predictor, the automatic binding of the on-chain digital collection transfer and the actual event (such as the target task) can be realized, so that the automatic task execution can be realized, the target task is executed according to the preset rule, the tedious and error-prone manual operation is solved, and the task execution efficiency is improved; in addition, due to the characteristic of the blockchain, the safety of data in the execution process of the target task can be ensured, so that the reliability of the target task is improved.
Drawings
FIG. 1a is a schematic diagram of a data sharing system according to an embodiment of the present application;
FIG. 1b is a schematic block diagram of a block composition according to an embodiment of the present disclosure;
FIG. 1c is a flow chart of a new block generation provided by an embodiment of the present application;
FIG. 2a is a block chain system architecture diagram provided in an embodiment of the present application;
FIG. 2b is a schematic diagram of a hierarchical deployment of an exemplary blockchain-based data processing system provided by embodiments of the present application;
FIG. 2c is a schematic diagram of a hierarchical deployment of an exemplary blockchain-based data processing system provided by embodiments of the present application;
FIG. 3 is a flowchart illustrating a method for processing data based on a blockchain in accordance with an exemplary embodiment of the present application;
FIG. 4 is a flowchart illustrating a second exemplary block chain based data processing method according to an exemplary embodiment of the present application;
FIG. 5 is a block chain based data processing apparatus according to one illustrative embodiment of the present application;
fig. 6 is a schematic structural diagram of a computer device according to an exemplary embodiment of the present application.
Detailed Description
For a better understanding of aspects of embodiments of the present application, related terms and concepts that may be related to embodiments of the present application are described below.
Digital collection: unique digital certificates generated for digital works, artworks and the like through a blockchain technology, and each digital collection has unique and unique identification, and the digital works and the artworks cannot be interchanged. Such as collection types may include digital pictures, music, video, electronic tickets, and the like.
P2P network: a network of point-to-point connections, based on a specific class of network protocols, does not require a central node between network nodes to maintain network state, but rather each node maintains the node state of the whole network or its neighboring node connection state by broadcasting interactions with neighboring nodes.
Intelligent contract: an intelligent contract is a computer protocol that can be used for transactions and/or any exchange actions between two/more parties. An intelligent contract is computer-generated code that contains some conditions that trigger the automatic execution of the contract. As one of the core technologies of blockchain, smart contracts allow trusted transactions to be conducted without third parties. When the triggering condition of the smart contract is external information (out of chain), a propulsor is required to provide data services, through which real world data is entered onto the blockchain.
Prophetic machine: the function of the predictor is to write external information into the blockchain to complete the data intercommunication between the blockchain and the real world. It allows a defined smart contract to react to the uncertain outside world, which is a way for the smart contract to interact with the outside, and also an interface for the blockchain to interact with the real world.
The embodiment of the application relates to a blockchain, which is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block.
A blockchain system can be generally considered a data sharing system. Referring to the data sharing system shown in fig. 1a, the data sharing system 100 refers to a system for sharing data between nodes, where the data sharing system may include a plurality of nodes 101, and the plurality of nodes 101 may be respective clients in the data sharing system. Each node 101 may receive input information while operating normally and maintain shared data within the data sharing system based on the received input information. In order to ensure the information intercommunication in the data sharing system, information connection can exist between each node in the data sharing system, and the nodes can transmit information through the information connection. For example, when any node in the data sharing system receives input information, other nodes in the data sharing system acquire the input information according to a consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes in the data sharing system are consistent.
Each node in the data sharing system has a node identifier corresponding to the node identifier, and each node in the data sharing system can store the node identifiers of other nodes in the data sharing system, so that the generated block can be broadcast to other nodes in the data sharing system according to the node identifiers of other nodes. Each node can maintain a node identification list shown in the following table, and the node names and the node identifications are correspondingly stored in the node identification list. The node identifier may be an IP (Internet Protocol, protocol of interconnection between networks) address, and any other information that can be used to identify the node, and the IP address is only illustrated in table 1.
Table 1:
for a schematic diagram of a related data sharing system in an embodiment of the present application, reference may be made to the blockchain system shown in fig. 2a below. The blockchain system includes a sharing network and a witness network that are both data sharing systems. Each node in the data sharing system stores one and the same blockchain. The blockchain is composed of a plurality of blocks, see fig. 1b, the blockchain is composed of a plurality of blocks, the starting block comprises a block head and a block body, the block head stores an input information characteristic value, a version number, a time stamp and a difficulty value, and the block body stores input information; the next block of the starting block takes the starting block as a father block, the next block also comprises a block head and a block body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the father block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain are associated with the block data stored in the father block, and the safety of the input information in the block is ensured.
When each block in the blockchain is generated, referring to fig. 1c, when the node where the blockchain is located receives input information, checking the input information, after the checking is completed, storing the input information into a memory pool, and updating a hash tree used for recording the input information; then, updating the update time stamp to the time of receiving the input information, trying different random numbers, and calculating the characteristic value for a plurality of times, so that the calculated characteristic value can meet the following formula:
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
wherein SHA256 is a eigenvalue algorithm used to calculate eigenvalues; version (version number) is version information of the related block protocol in the block chain; the prev_hash is the block header characteristic value of the parent block of the current block; the merkle_root is a characteristic value of input information; ntime is the update time of the update timestamp; the nbits is the current difficulty, is a fixed value in a period of time, and is determined again after exceeding a fixed period of time; x is a random number; TARGET is a eigenvalue threshold that can be determined from nbits.
Thus, when the random number meeting the formula is calculated, the information can be correspondingly stored to generate the block head and the block body, and the current block is obtained. And then, the node where the blockchain is located sends the newly generated blocks to other nodes in the data sharing system where the newly generated blocks are located according to the node identification of other nodes in the data sharing system, the other nodes verify the newly generated blocks, and the newly generated blocks are added into the blockchain stored in the newly generated blocks after the verification is completed. The present embodiment is directed to a hierarchical deployment diagram of a blockchain-based data processing system as shown in FIG. 2b below, wherein the consensus network includes a plurality of core chains (i.e., blockchains at a core consensus layer) and each core chain includes a plurality of blocks. The generation of the blocks in the core chain may be achieved with reference to the description above.
Based on the above terminology and the associated description of the blockchain, a schematic diagram of the blockchain system is provided as shown in FIG. 2a, a schematic diagram of a hierarchical deployment of a blockchain-based data processing system is provided as shown in FIG. 2b, and a schematic diagram of a hierarchical deployment of a blockchain-based data processing system is provided as shown in FIG. 2 c.
Typically, single-layer and unified P2P is used in blockchain products, i.e., peer-to-peer nodes, each in the same network. The blockchain of the single-layer chain structure may be shown in fig. 1a, in which nodes in the blockchain are equal to each other, and each node is in the same network, and each node may be a node for performing service execution, or may be a node for running a consensus protocol, that is, one node may be a service node, or may be a consensus node. Because blockchains are used in some special scenarios, not all blockchain executing nodes have sufficient resources and necessity to become nodes that join the blockchain consensus. For security reasons for data, a universal peer-to-peer blockchain deployment may not be used when private information or security related data is involved in the blockchain hierarchy.
As shown in fig. 2a, the blockchain system uses a two-layer network hierarchy, the blockchain system includes a witness network 201 and a consensus network 202, the witness network 201 and the consensus network 202 are different data sharing systems, wherein the witness network 201 includes one or more service nodes, each service node is used for performing service execution and does not join in accounting consensus, and the consensus network 202 includes one or more consensus nodes, each consensus node is used for running a consensus protocol, and the consensus nodes may also be called accounting nodes. The service node can acquire the block header data and the block data visible by partial authorization from the consensus network in an identity authentication mode. It can be seen that the blockchain system is an unequal blockchain deployment because the service nodes in the witness network do not join the billing consensus.
It should be noted that the service node and the consensus node may be a computer device, and the computer device may be a terminal device or a server, for example, the service node is a terminal device, and the consensus node is a server. The terminal device may be a smart phone, a tablet computer, an intelligent wearable device, an intelligent voice interaction device, an intelligent home appliance, a notebook computer, a vehicle-mounted terminal and the like, which is not limited in this application. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and intelligent platforms, but is not limited to this.
It will be appreciated that in the blockchain-based data processing scheme provided herein, blockchains may use a single layer chain, i.e., nodes peer to peer, with each node being in the same network; double-layer chains, i.e., p2p networks, may also be used to form the "witness-consensus" separation. The double-layer chain can achieve the aim of improving the confidentiality and the security of data on the blockchain in a network separation mode, and can adapt to the specific requirements of network layout required by a related industry blockchain production line, such as internal and external networks, business networks, office network separation and the like. Efficient execution of the core formulation algorithm can be guaranteed through network layering. Alternatively, the use of a double-layer chain may be prioritized in a scenario where confidentiality, security, etc. are required. In the embodiments of the present application, a block chain is mainly taken as a dual-layer chain for example for related description.
In one embodiment, witness 201 and consensus 202 are in different network environments. Specifically, witness network 201 is in a public network and consensus network 202 is in a private network, whereby service nodes are deployed in the public witness network 201 and consensus nodes are deployed in the private consensus network 202. Optionally, interactions between witness 201 and consensus 202 occur via a routing boundary. This is because the consensus network 202 is in a relatively secure private cloud, and the mutual access between the consensus nodes in the consensus network 202 is secure by a consensus mechanism, so that identity management and network control can be omitted. The service node is in the public network and may be accessed by other uncertain network terminals, so that the access actions of the service node and other possible nodes to the consensus network can be strictly controlled to ensure the access security.
With reference now to FIG. 2b, FIG. 2b is a pictorial representation of a hierarchical deployment of an exemplary blockchain-based data processing system in accordance with embodiments of the present application. As shown in fig. 2b, includes a blockchain system 210 and at least one client (or terminal). The blockchain system 210 includes a traffic layer 10, a routing agent layer 11, and a core consensus layer 12. The traffic layer 10 corresponds to the witness network 201 shown in fig. 2a, the core consensus layer corresponds to the consensus network 202 shown in fig. 2a, the traffic layer 10 may submit traffic operation interactions to the core consensus layer 12 through the routing agent layer 11, the routing agent layer 11 being used to isolate the traffic layer 10 from the core consensus layer 12 and to provide a secure access mechanism for traffic nodes in the traffic layer 10 to access consensus nodes in the core consensus layer 12, here TrustSQL nodes (also referred to as trusted nodes).
In one embodiment, a service node in the service layer 10 may receive a task participation request sent by a client, so that a task contract deployed on the service node may execute corresponding task participation logic based on the task participation request, so as to implement the blockchain-based data processing method provided in the embodiment of the present application; after the service node receives the task participation request, the task participation request may also be sent to the core consensus layer 12, so that the consensus node in the core consensus layer 12 may perform consensus verification on the task participation request, and after the consensus verification passes, the task participation request may be used to perform subsequent operations.
The routing proxy layer 11 includes at least one proxy node, and each proxy node may provide P2P services, and may also provide an access mechanism supported by a routing service, a certificate cache, and an authentication service. The service node can realize the safe access to the consensus node through the access mechanism.
The core consensus layer 12 may be a consensus network comprising H core chains, H being a positive integer. The core chain here refers to a blockchain at the core consensus layer 12, which includes at least one trusted node (trust sql node, i.e. consensus node), which may alternatively be a terminal device or a server. Each trusted node may store the following: blocks (Blocks), intelligent contracts, and caches (caches). Wherein blocks may be used to construct a blockchain, see in particular the description of fig. 1b and 1c above. Alternatively, the intelligent contracts may include a task contract, a propulsor management contract, and a resource management contract. The task contract can be used for executing the data processing method based on the blockchain, the propulsor management contract can be used for managing attribute information of propulsor called by the task contract, and the resource management contract can be used for managing digital collection associated with a target task. The intelligent contracts deployed in the core consensus layer can be synchronized to the service layer, namely, each service node in the service layer can be deployed with the same intelligent contracts as the consensus nodes, so as to ensure that the data stored by each node in the blockchain system are kept uniform.
With reference now to FIG. 2c, FIG. 2c is a diagram illustrating a hierarchical deployment of an exemplary blockchain-based data processing system in accordance with embodiments of the present application. As shown in fig. 2c, includes a blockchain system, a predictor, and at least one client (or terminal); the blockchain system comprises a witness network and a consensus network, wherein the witness network comprises one or more service nodes, and the consensus network comprises one or more consensus nodes. Optionally, a routing agent network may be further included in the blockchain system, which is not shown in fig. 2c, and interaction between the witness network and the consensus network may be performed through the routing agent network, and the function of the routing agent network may be referred to as understanding of the routing agent layer.
The intelligent contracts (such as task contracts, forestator management contracts and resource management contracts) related to the application can be deployed in a consensus network, and the blockchain system has a function of synchronizing data, so that the intelligent contracts deployed in the consensus network can be synchronized into a witness network, namely, intelligent contracts are deployed in all service nodes in the witness network.
In embodiments of the present application, see for example fig. 2b or 2c, the blockchain system may access different clients, in particular may be interfaced by a service node and a client (or terminal) in the witness network. For any client accessed by the blockchain system, a service node which is in butt joint with the client can acquire a task participation request submitted by an object through the client, wherein the task participation request can contain execution data generated by the object to execute a target task; after the task participation request is acquired, the predictor may be further invoked to acquire the result data of the guessing target task, for example, the predictor may be utilized to acquire the result data from an external network (out of chain), and the acquired result data may be written into the blockchain. After the result data is obtained, a task completion of the object may be determined based on the execution data and the result data, and the digital collection may be transferred to the account of the object according to the task completion of the object. Therefore, the data intercommunication between the blockchain and the real world is realized by calling the predictor, so that the execution of tasks on the blockchain can be realized; moreover, based on the target task of the predictor, the automatic binding of the on-chain digital collection transfer and the actual event (such as the target task) can be realized, so that the execution of the automatic task can be realized, the execution of the target task is carried out according to a preset rule, the tedious and error-prone manual operation is solved, and the task execution efficiency is improved; in addition, due to the characteristic of the blockchain, the safety of data in the execution process of the target task can be ensured, so that the reliability of the target task is improved.
It will be appreciated that in the detailed description of the present application, related data such as user data, execution data, result data, etc., are referred to, and that when the above embodiments of the present application are applied to a particular product or technology, permission or consent of the subject (e.g., a guessing subject) is required, and collection, use and processing of the related data is required to comply with relevant laws and regulations of the relevant country and region.
It is understood that the target task in this application may be a guess task, a job submission task, or other tasks. The guessing task may be a guess of a game, such as a guess of a team who may take a champion in a basketball game, a guess of a number of medals in a school in a college student's athletic meeting, or the like. The job submitting task may refer to that the student submits a job arranged by a teacher, and if the teacher gives a piece of digital test paper arranged by the student, the student submits a solution of each question in the digital test paper.
In one embodiment, in the case that the target task is a guessing task, the object in the blockchain-based data processing method provided in the embodiment of the present application may be a guessing object, that is, a user participating in the guessing task; the task participation request may be understood as a guess request, and the guess request may include prediction data obtained by a guess object for a guess task, where the prediction data may be equivalent to execution data; the task completion condition of determining the object based on the execution data and the result data may be understood as performing a guess decision based on the execution data and the result data, where the result data may refer to a real guess result corresponding to the guess task. Then, the specific implementation in the scenario that the target task is a guessing task may be: the method can receive the guess request submitted by the guess object, and can call the predictor to acquire the result data corresponding to the guess task so as to make the guess judgment based on the prediction data and the result data in the guess request, thereby transferring the digital collection to the account of the guess object according to the guess judgment result.
In one embodiment, in the case that the target task is an job submission task, the object in the blockchain-based data processing method provided in the embodiment of the present application may be a student participating in the job submission task; the task participation request may be understood as a job submission request, and the job submission request may include solution data obtained by solving the object for the job submission task, where the solution data may be equivalent to execution data; the task completion condition of determining the object based on the execution data and the result data may be understood as performing performance determination based on the execution data and the result data, where the result data may refer to a real answer of a job corresponding to the job submitting task. Then, the specific implementation in the scenario that the target task is the job submitting task may be: the method can receive a job submitting request submitted by an object, and can call the predictor to acquire result data corresponding to the job submitting task so as to judge the result based on the answer data and the result data in the job submitting request, so that the digital collection can be transferred to the account of the object according to the result of the judgment of the result.
The following description of the blockchain-based data processing method according to the embodiments of the present application will exemplify a target task as a guess task.
The following describes in detail a specific implementation manner of a data processing method based on a blockchain according to an embodiment of the present application with reference to the accompanying drawings.
Referring to fig. 3, fig. 3 is a flowchart illustrating a block chain based data processing method according to an exemplary embodiment of the present application. The blockchain-based data processing method may be performed by a computer device (such as a service node in the witness network shown in fig. 2 a) and includes, but is not limited to, the following steps.
S301, receiving a task participation request submitted by an object, wherein the task participation request comprises execution data generated by the object for executing a target task.
Wherein, the object may refer to a user participating in a target task; the target task may be a guess task, a job submission task, and so on. For example, the guessing task may be a guess for a venue, such as a sport, basketball game, table tennis game, etc. The job submission task may be that the student submits a job placed by the teacher so that the teacher can determine a result of the student's performance determination according to the submitted job.
For example, in the scenario where the target task is a guessing task, the object may refer to a user participating in the guessing task, which may also be referred to as a guessing object; and the execution data may be predicted data obtained by the guessing object competing for the guessing task. For example, the guessing task may be a team who may be championed in a basketball game, and accordingly, the predicted data (or understood as execution data) obtained by the guessing object for the guessing task may be a team in the basketball game, e.g., the predicted data may be team a; as another example, the guessing task may be to guess the number of medals obtained by school A in a college student's athletic meeting, and accordingly, the predicted data obtained by the guessing object for the guessing task may be a certain value, for example, the predicted data may be 10. Or other guessing tasks, not to be taken as an example here.
For another example, in a scenario where the target task is an assignment submission task, the object may refer to a student that needs to submit the assignment; and the execution data may be solution data for the object to solve for the job submission task. For example, the job submitting task is to submit a piece of digital examination paper arranged by a teacher, and correspondingly, the answer data generated by the object (such as a student) completing the job submitting task may refer to the answer data of each question in the mathematical examination paper completed by the object.
In one embodiment, the data processing method based on the blockchain provided by the application may be executed by calling a task contract deployed on the blockchain, and it should be understood that the task contract in the application includes execution logic for completing a target task, that is, the task contract executing steps S301-S304 may be called. If the target task is a guess, the task contract can be understood as a guess contract, and the guess contract comprises execution logic for completing a guess task; for another example, when the target task is a job submission competition, the task contract may be understood as a job submission contract that includes execution logic for completing a job submission task.
In one embodiment, the blockchain may include a witness network that may include one or more service nodes and a consensus network that may include one or more consensus nodes. The introduction of witness and consensus networks can be seen from the corresponding introduction of fig. 2a, 2b and 2 c. A task contract deployed on a blockchain is an intelligent contract for execution logic to complete a target task. The task contracts (e.g., guess contracts or job submission contracts, etc.) may be deployed in the consensus network as shown in fig. 2a or fig. 2b or fig. 2c, and in more detail, may be deployed on the core chain (blockchain at the core consensus layer) as shown in fig. 2 b. In one implementation, the task contracts deployed in the consensus network may be synchronized into the service network, i.e., the task contracts are likewise deployed on service nodes in the service network, in order to perform the blockchain-based data processing methods presented herein by invoking the task contracts on the service nodes.
In summary, it is known that a task participation request of an object may be submitted by a transaction invoking a task contract. For example, a client (or terminal) may access the blockchain system and may communicate with a service node in the blockchain system, typically in the form of a transaction when the client needs to do some operations in the blockchain system. For example, the task participation request of the object in the present application may be submitted in the form of a transaction. The object may send a transaction containing a task participation request to the service node through the client, and after the service node receives the transaction, the task contract on the service node may be invoked to execute the blockchain-based data processing method proposed in the present application.
The client may refer to a client used by an object, or refer to a client having a function of participating in a target task (such as a client having a guess function, or a client having a job submitting function, etc.), or other understandings.
S302, calling a predictor to acquire result data of the target task.
It will be appreciated that blockchains are deterministic environments that do not allow for uncertain things or factors to exist, and thus, smart contracts must be consistent results at runtime, nor do smart contracts exist for Network calls (Network calls), or else the results may be uncertain. That is, the smart contract cannot actively request data from the outside (or referred to as real world, out-of-chain, etc.), that is, cannot actively obtain out-of-chain data, but only passively receive out-of-chain data. The intelligent contract is a program which is started when the corresponding triggering condition is met, and when the triggering condition of the intelligent contract is external information (out-of-chain), the intelligent contract can call the predictor to provide data service, because the intelligent contract cannot support an external request, and real world data (out-of-chain data) is input into the blockchain through the predictor.
For example, if the public chain is used as an operating system, the DAPP (Decentralized Application, decentralised application) can be analogous to APP, then the predictor can be used as an API interface. The API is a set of definitions, programs and protocols, and mutual communication between computer software can be realized through an API interface; DAPP may be understood as a distributed application running on top of a smart contract based on a P2P peer-to-peer network for which the blockchain provides trusted data records. As can be seen from the above, the predictor can be a link connecting the blockchain and the real world, and is a tool for realizing data intercommunication.
The result data of the target task in the application exists in the real world, and the predictor can be called to acquire the result data of the target task. In one embodiment, the obtaining manner of the result data may be specified in the task contract, for example, the obtaining manner may be characterized by using attribute information of the propulsor, that is, the task contract may include attribute information of the propulsor, so that the task contract may call the propulsor based on the attribute information of the propulsor, thereby obtaining the result data of the target task. The attribute information of the propranker may also be registered and a consensus verified to ensure the reliability of the propranker service, e.g., the attribute information of the propranker may be registered in the propranker management contract and the task contract may be allowed to invoke the propranker after the attribute information is successfully registered in the propranker management contract. The predictor management contract may be deployed on a blockchain, such as in a consensus network as shown in fig. 2a or fig. 2b or fig. 2c, and in more detail, on a core chain (blockchain at a core consensus layer) as shown in fig. 2 b. In one implementation, the predictor management contracts deployed in the consensus network may also be synchronized into the service network, i.e., the service nodes in the service network have the predictor management contracts deployed thereon, so that the task contracts on subsequent service nodes may invoke the predictor management contracts to perform the corresponding operations.
Wherein the attribute information of the propulsor may include an address and a call interface of the propulsor, which may be used to redirect to a presentation page of the result data. For example, the call interface may be an interface to a data website that is accessible and has deterministic result data, or the call interface may be a website of a data website, and the interface (or website) may be directed to a presentation page in which result data corresponding to a target task is presented. For example, assuming that the target task is a guessing task and the guessing task is the number of medals obtained by university a at 3 months and 1 day in a college athletic meeting, the method for determining the number of medals may be obtained from a data website, and the interface (or website) corresponding to the data website may be: http:// xxxdata.com/Colleage Competition/a University/before_2022_03_01, the web address may be directed to a presentation page in which the number of medals obtained by University a at 1 day 3 month is presented.
In summary, the specific implementation manner of calling the predictor to obtain the result data of the target task may be: firstly, the method can redirect to a presentation page of the result data based on a call interface of the predictor, and read the result data corresponding to a target task (such as a guessing task or a job submitting task) from the presentation page so as to help the task to collect external data (such as the result data here) approximately outside the chain; further, the predictor may be invoked to write result data to the blockchain based on its address.
In one embodiment, the predictor may be invoked to obtain the result data of the target task after the result data is published in the real world.
S303, determining the task completion condition of the object based on the execution data and the result data.
The task completion situation may be understood differently according to different target tasks, for example, in a scenario where the target task is a guessing task, the task completion situation may refer to a guessing decision result of a guessing object, where the guessing decision result may include a guessing success and a guessing failure; as another example, in the case where the target task is a job submitting task, the task completion condition may refer to a job completion condition (or may also be understood as a result of performance determination), and the result of performance determination may include a job pass and a job fail, or the result of performance determination may also include 4 levels of good, medium, and bad. In other task scenarios, task completion may also be other understandings, not illustrated herein.
In one embodiment, the result data may be compared with the execution data, and if the execution data and the result data satisfy a preset condition, it may be determined that the task completion condition of the object is completion task. If the execution data and the result data do not meet the preset conditions, the task completion condition of the object can be judged to be an unfinished task. The corresponding preset conditions can be different for different target tasks, namely, the corresponding preset conditions can be preset according to specific target tasks.
For example, in a scenario where the target task is a guessing task, taking the task completion situation as a guessing decision result as an example, the preset condition may refer to that the execution data is the same as the result data, that is, in the case where the execution data is the same as the result data, the task completion situation of the object may be determined to be a completion task, and it may be understood that the completion task may also refer to that the guessing is successful; in the case where the execution data is different from the result data, it may be determined that the corresponding task is completed as an incomplete task, and it may be understood that the incomplete task may also refer to a competition failure.
For another example, in a scenario where the target task is a job submitting task, taking a task completion situation as a performance determination result (e.g., the performance determination result includes a job passing and a job failing), the preset condition may refer to that the same proportion of the execution data and the result data reaches a preset proportion (e.g., the preset proportion may be 100%, 80%, 60%, etc.), that is, in a case where the same proportion of the execution data and the result data reaches the preset proportion, the task completion situation of the object may be determined to be a completion task, and it may be understood that the completion task may refer to the job passing; and under the condition that the same proportion of the execution data and the result data does not reach the preset proportion, the corresponding task completion condition can be determined to be an incomplete task, and the incomplete task can also be understood to mean that the job fails.
In one embodiment, the task completion of determining an object based on the execution data and the result data is described in relation to a target task as a guess task. Wherein the execution data may be a predicted result of an object (or called a guess object) performing a guess for the guess task.
In the case where the target task is a guessing task, the prediction data and the result data may be compared, if the prediction data and the result data are identical, the object guess may be determined to be successful, and if the prediction data and the result data are not identical, the object guess may be determined to be failed.
For example, assume that the guessing task is to guess the number of medals obtained by school A in a college student's athletic meeting, and the result data is 12; if the predicted data submitted by the guessing object is 10, then it may be determined that the guessing object has failed the guessing; if the predicted data submitted by the competitor is 12, then it may be determined that the competitor is successful.
In one embodiment, the task completion of determining an object based on execution data and result data is described in relation to a target task as a job submission task. Wherein, the execution data may refer to solution data of an object for performing solution for the job submission task.
When the target task is a job submitting task, the solution data and the result data can be compared, if the same proportion of the solution data and the result data reaches a preset proportion, the object job can be judged to pass, and if the same proportion of the execution data and the result data does not reach the preset proportion, the object job can be judged to fail.
For example, assuming that the job submitting task is a piece of mathematical test paper and the preset proportion is 60%, after the comparison of the solution data and the result data, if the correct proportion in the mathematical test paper submitted by the object is 60%, the object job and the grid can be determined; if the correct proportion in the mathematical test paper submitted by the object does not reach 60%, the object can be determined that the operation fails.
S304, transferring the digital collection to the account of the object according to the task completion condition of the object.
The task completion condition may include completion of a task or incomplete task, and in a specific implementation, a digital collection may be transferred to an account of an object that completes the task.
For example, in the case where the target task is a guess task, the task completion may refer to a guess result, and the guess result may include a guess success and a guess failure, and correspondingly, the completion may refer to a guess success, and the incomplete task may refer to a guess failure. In a specific implementation, the digital collection may be transferred to the account of the object for which the competition was successful.
For another example, in the case where the target task is a job submission task, the task completion condition may refer to a result of performance determination, where the result of performance determination may include a job pass and a job fail, and the corresponding completion task may refer to a job pass and an incomplete task may refer to a job fail. In a particular implementation, the digital collection may be transferred to an account of the job and the object.
In one embodiment, a resource management contract may be invoked to transfer digital collections to accounts of objects that complete a task (e.g., a successful guess, or a job and grid, etc.), which may be used to manage digital collections associated with a target task. The resource management contract may be deployed on a blockchain, such as in the consensus network as shown in fig. 2a, and in more detail, on a core chain (blockchain at the core consensus layer) as shown in fig. 2 b. In one embodiment, the resource management contracts deployed in the consensus network may be synchronized into the business network as well, i.e., the business nodes in the business network are deployed with the resource management contracts so that the task contracts on subsequent business nodes may invoke the resource management contracts to perform the corresponding operations (e.g., transfer of digital collections).
According to the data processing method based on the blockchain, a task participation request submitted by an object can be received, the task participation request can comprise execution data generated by the object executing a target task, and after the task participation request is received, result data of the target task can be obtained by calling a predictor, so that data interaction between the blockchain and the outside world can be realized by calling the predictor. Further, a task completion of the object may be determined based on the execution data and the result data, and a digital collection may be transferred to an account of the object according to the task completion. Thereby, the execution of tasks on the blockchain can be realized; moreover, based on the target task of the predictor, the automatic binding of the on-chain digital collection transfer and the actual event (such as guessing task, job submitting task and the like) can be realized, so that the execution of the automatic task can be realized, the execution of the target task is carried out according to a preset rule, the tedious and error-prone manual operation is solved, and the task execution efficiency is improved; in addition, due to the characteristic of the blockchain, the safety of data in the execution process of the target task can be ensured, so that the reliability of the target task is improved.
Referring to fig. 4, fig. 4 is a second flowchart of a data processing method based on a blockchain according to an exemplary embodiment of the present application. The blockchain-based data processing method may be performed by a computer device (such as a service node in the witness network shown in fig. 2 a) and includes, but is not limited to, the following steps.
S401, receiving a task participation request submitted by an object, wherein the task participation request comprises execution data generated by the object for executing a target task.
The description of this step may refer to the description in step S301 in the above embodiment, and will not be repeated here.
S402, carrying out security check on the task participation request according to the task information of the task in the task contract.
In one embodiment, after receiving the task participation request, the security check may be performed on the task participation request, and in the case that the security check is successful, the subsequent operation may be continued, so as to ensure that the target task is performed as normally as possible. In case the security check fails, the subsequent operation, i.e. the participation of the object in the target task, may be stopped.
For example, in the scenario that the target task is a guessing task, after the guessing request is received, the guessing request may be first subjected to security check, and if the security check is successful, the subsequent operation may be continued, so as to ensure that the guessing task is performed normally as much as possible. In case the security check fails, the subsequent operation, i.e. the participation of the object in the guessing task, may be stopped.
For another example, in the scenario that the target task is a job submitting task, after the job submitting request is received, the job submitting request may be first subjected to security check, and in the case that the security check is successful, the subsequent operation may be continued, so as to ensure that the job submitting task is normally performed as much as possible. In the event that the security check fails, subsequent operations, i.e., the participation of the object in the job submission task, may be stopped.
In one embodiment, the task contract may include task information for the target task, where the task information may be used to perform qualification checking on the object, that is, determine whether the object qualifies for participating in the target task at this time, so as to ensure security of the target task during execution, that is, qualification checking may also be referred to herein as security checking. In a specific implementation, the task participation request may be securely checked using the task information. For example, the task information may include one or more of a task effective period, a task participation number, a fuel value required to be consumed for each task participation, a blacklist, a whitelist, and the like, and embodiments for performing security check on a task participation request are different for different task information.
In one embodiment, the task information includes one of the above mentioned examples as set forth below for the security check.
(1) In the case where the task information includes a task valid period
The task validity period may refer to a period of time in which the object may participate in the target task. For example, taking a target task as a guessing task, a certain guessing task is the number of medals obtained by school a in a college student sport meeting held in a guessing city a, wherein the holding time of the college student sport meeting is 9 months and 28 days, and the task effective period corresponding to the target task may be a period between the holding times, for example, the task effective period may be 9 months and 22 days to 9 months and 27 days. For another example, taking a target task as a job submitting task as an example, a job submitting task is to submit a plurality of examination papers, wherein the submitting time is 5 months, 5 days, 5 months and 10 days, and the submitting time can also refer to a task effective period, namely, the task effective period is 5 months, 5 days, 5 months and 10 days.
The specific implementation mode of carrying out safety verification on the task participation request by utilizing the task effective period is as follows: the receiving time of the task participation request can be compared with the effective period of the task, so that safety verification can be performed according to the comparison result. Specifically, whether the receiving time of the task participation request is in the task effective period or not can be checked, if the receiving time of the task participation request is in the task effective period, the success of the check of the task participation request can be determined, and the subsequent steps (such as calling a predictor to acquire the result data of the target task) can be triggered to be executed; if the receiving time of the task participation request exceeds the task effective period, the task participation request verification failure can be determined, and the target task participation failure prompt information can be output. If the prompt information can be displayed on the screen of the client used by the object, the participation condition of the object task is prompted, and the user experience is improved.
In one embodiment, the security check using the period of validity of the task is described with respect to a target task as a guess task. Wherein, the task participation request may refer to a guess request in the guess task, and the security check of the task participation request may refer to the security check of the guess request.
The time of receipt of the guess request may be compared with the period of validity of the task to perform a security check based on the comparison. Specifically, whether the receiving time of the guess request is in the task valid period can be checked, if the receiving time of the guess request is in the task valid period, the successful check of the guess request can be determined, and the subsequent steps (such as calling a predictor to acquire the result data of the guess task) can be triggered to be executed; if the receiving time of the guessing request exceeds the effective period of the task, the failure of the guessing request can be determined, and the prompt information of the participation failure of the guessing task can be output.
For example, taking a target task as a guessing task, assuming that the effective period of a task of a certain guessing task is from 5 months 22 days to 5 months 25 days, if the receiving time of a guessing request is from 5 months 23 days, the successful check of the guessing request of the guessing task can be determined, and if the receiving time of the guessing request is from 5 months 26 days, the failure check of the guessing request of the guessing task can be determined.
(2) In the case where the task information includes the number of task participation times
The number of task participation times may refer to the number of times an object may participate in a target task, or the number of times execution data may be submitted, or the number of task participation requests an object may submit. For example, the number of task participation times can be 3, 5, etc. By way of example, a task participation number of 3 indicates that the task participation request submitted by the object can be received a maximum of 3 times. For example, in the case that the target task is a guessing task, the task participation number may refer to the number of guesses, that is, the number of times the object may submit prediction data obtained by performing a guess for the guessing task, or the number of times the object may submit a task participation request (such as a guessing request). For example, in the case that the target task is a job submission task, the task participation number may specifically refer to the submission number, that is, the number of times the object may submit the job.
The specific implementation mode of carrying out safety verification on the task participation request by utilizing the task participation times is as follows: the current task participation times of the object can be used for comparing with the task participation times in the task information, so that the task participation request is safely checked according to the comparison result. The number of current task participation times of the object can be determined according to the number of historical task participation requests submitted by the object aiming at the target task; if the current task participation times can be the sum value between the number of historical task participation requests and 1; by way of example, assuming that the number of historical task participation requests is 3, the current task participation number is 4. As can be seen from the above, the current task participation number is determined according to the number of historical task participation requests, and then the number of historical task participation requests may be directly compared with the task participation number in the task information, so as to perform security check on the task participation requests according to the comparison result.
In one embodiment, the specific implementation of the security check is performed by using the current task participation times and the task participation times: the number of historical task participation requests submitted by the object aiming at the target task can be obtained, and the current task participation times of the object are determined according to the number; after determining the current number of task participation, the current number of task participation may be compared with the number of task participation. If the current task participation times are smaller than or equal to the task participation times, the success of the task participation request verification can be determined, and the execution and calling predictor can be triggered to acquire the result data of the target task; if the current task participation times are greater than the task participation times, the task participation request verification failure can be determined, and target task participation failure prompt information can be output.
For example, assuming that the number of task participation times of a certain target task is 3, if the number of historical task participation requests is 1, the current task participation times of the object can be determined to be 2, and then the task participation request of the target task can be determined to be successfully checked; if the number of historical task participation requests is 3, that is, the current task participation number of the object is 4, it can be determined that the task participation request of the target task fails to check.
In another embodiment, the specific implementation of the security check is performed by using the number of historical task participation requests and the task participation times: the number of historical task participation requests submitted by the object aiming at the target task can be obtained; after the number of historical task participation requests is obtained, the number may be compared to the number of task participation times. If the number is smaller than the task participation times, the success of the task participation request verification can be determined, and the execution of the call predictor can be triggered to acquire the result data of the target task; if the number is greater than or equal to the number of task participation times, the task participation request verification failure can be determined, and target task participation failure prompt information can be output.
For example, assuming that the number of task participation times of a certain target task is 3, if the number of historical task participation requests is 2, it may be determined that the task participation request verification of this target task is successful, and if the number of historical task participation requests is 3, it may be determined that the task participation request verification of this target task is failed.
In one embodiment, the security check of the number of participation times of the task is described by taking the target task as a guessing task as an example. Wherein, the task participation request may refer to a guess request in the guess task, and the security check of the task participation request may refer to the security check of the guess request. The number of task participation in the task information in the task contract may refer to the number of guesses.
The number of the current guesses of the guessing object can be compared with the number of the guesses in the task information, so that the guessing request can be safely checked according to the comparison result. The current number of the guesses of the guessing object can refer to the determination mode of the current task participation number. It can be known that the number of current guesses is determined according to the number of historical guesses, and the number of the historical guesses can be directly compared with the number of the guesses in the task information, so that the guesses can be safely checked according to the comparison result.
The specific implementation of the security check is carried out by utilizing the current guess times and the guess times: the number of historical guess requests submitted by the guess object aiming at the guess task can be obtained, and the current number of guesses of the guess object is determined according to the number; further, the current number of competitions may be compared to the number of competitions. If the number of the current guesses is smaller than or equal to the number of the guesses, the successful verification of the guessing request can be determined, and the execution and calling of the predictor can be triggered to acquire the result data of the guessing task; if the number of the current guesses is larger than the number of the guesses, the guesses request verification failure can be determined, and the guessing task participation failure prompt information can be output.
The specific implementation of the security check is carried out by utilizing the number of historical guess requests and the number of guess times: the number of historical guess requests submitted by the guess object for the guess task can be obtained; further, the number may be compared to the number of guesses. If the number is smaller than the number of the guesses, the success of the guessing request verification can be determined, and the execution of the call predictor can be triggered to acquire the result data of the guessing task; if the number is greater than or equal to the number of the guesses, the guessing request check failure can be determined, and a guessing task participation failure prompt message can be output.
For example, assuming that the number of guesses for a given guess task is 3, if the number of historical guess requests is 2, then the successful check of the guess request for that guess task may be determined, and if the number of historical guess requests is 3, then the failure of the check of the guess request for that guess task may be determined.
(3) In the case where the mission information includes a fuel value to be consumed for each mission participation
The fuel value required to be consumed for each task participation may refer to the energy value consumed for the object to participate in a target task; it will be appreciated that the execution of various transactions or contracts, etc. by nodes in the blockchain requires the consumption of computational and memory resources, and that in order for the nodes in the blockchain to be able to enhance their respective services, the consumption of energy values corresponding to the computational and memory resources is required, which may be referred to as fuel values (Gas). In this application, the object is a target task on the blockchain, and the consumption of energy value is required, that is, each participation consumes a part of fuel value, so that the safety check can be performed based on the fuel value required to be consumed by each participation, so as to ensure that the subsequent operation is performed under the condition that the object has enough fuel value.
The specific implementation mode of carrying out safety check on the task participation request by using the fuel value required to be consumed for each task participation is as follows: the remaining fuel value of the object may be compared with the fuel value that needs to be consumed for each mission participation to perform a safety check according to the comparison result. In particular, a remaining fuel value of the object may be obtained, which may be carried in the task participation request. If the residual fuel value is greater than or equal to the fuel value required to be consumed by each task participation, the success of the task participation request verification can be determined, and the execution and calling of the prophetic machine can be triggered to acquire the result data of the target task; if the residual fuel value is smaller than the fuel value required to be consumed by each task participation, the task participation request verification failure can be determined, and the target task participation failure prompt information can be output.
It can be understood that, when the remaining fuel value is greater than or equal to the fuel value that needs to be consumed for each task participation, it can be indicated that the object has the remaining fuel value to participate in the target task, and then it can be indicated that the task participation request is successfully checked; and in the case that the residual fuel value is smaller than the fuel value required to be consumed by each task participation, the object can be indicated to have insufficient fuel value to participate in the target task, and the task participation request verification failure can be indicated.
In one embodiment, the security check using the fuel value that needs to be consumed for each task participation is described with respect to a target task as a guessing task. Wherein, the task participation request may refer to a guess request in the guess task, and the security check of the task participation request may refer to the security check of the guess request. The fuel value that needs to be consumed for each task participation in the task information in the task contract may refer to the fuel value that needs to be consumed for each competition.
The remaining fuel value of the subject may be compared to the fuel value that needs to be consumed for each competition to perform a security check based on the comparison. In particular, a remaining fuel value for the object may be obtained, which may be carried in the guess request. If the residual fuel value is greater than or equal to the fuel value required to be consumed for each competition, the success of the competition request verification can be determined, and the execution of the call predictor can be triggered to acquire the result data of the competition task; if the remaining fuel value is smaller than the fuel value required to be consumed for each competition, the competition request check failure can be determined, and competition task participation failure prompt information can be output.
(4) In case the task information comprises a blacklist
The blacklist may refer to a user prohibited from participating in the target task, and may include therein identity information of the user prohibited from participating in the target task, which may be information for uniquely indicating one user, e.g., the identity information may be a telephone number or the like. For example, taking the target task as a guess task as an example, the blacklist may include users associated with the sponsor of the guess activity, non-honest users, and so forth.
The specific implementation mode of carrying out security check on the task participation request by using the blacklist comprises the following steps: the task participation request may also include identity information of the object, which may be used to uniquely indicate the object. Then, after receiving the task participation request of the object, security verification may be performed based on the identity information in the task participation request and the blacklist. If the identity information exists in the blacklist, namely the object is a user forbidden to participate in the target task, determining that the verification of the task participation request fails; if the identity information does not exist in the blacklist, i.e. the object is a user who is not prohibited from participating in the target task, it may be determined that the task participation request check-up is successful.
(5) In case the task information comprises a white list
A white list may refer to a user allowed to participate in a target task, and may include therein identity information of the user allowed to participate in the target task, which may be information for uniquely indicating one user, e.g., the identity information may be a telephone number, etc. For example, taking the target task as a guessing task as an example, assuming that the guessing task is the number of participating items of a sports meeting in a university, the whitelist may be students in the university, that is, only the students in the university are allowed to participate in the guessing task, and the identity information in the whitelist may be a number of students, a phone number, and the like. For another example, taking the target task as the job submitting task as an example, assuming that the job submitting task is a number of sheets, the white list may be the student on which the job is arranged, that is, only the student with the job is allowed to participate in the job submitting task, and the identity information in the white list may be a number of students, and so on.
The specific implementation mode of carrying out security check on the task participation request by using the white list comprises the following steps: the task participation request may also include identity information of the object. Then, after receiving the task participation request of the object, security verification may be performed based on the identity information in the task participation request and the white list. If the identity information exists in the white list, namely the object is a user allowed to participate in the target task, the success of verification of the task participation request can be determined; if the identity information does not exist in the white list, i.e. the object is a user who is not allowed to participate in the target task, it may be determined that the task participation request fails to check.
The above description mainly uses the task information including the effective period, the number of task participation, the fuel value required to be consumed for each task participation, the blacklist, and the whitelist as an example to describe the security check, and it can be understood that the task information may also include other information, where no description is made on the security check.
In one embodiment, in the case that the task information includes a plurality of task valid periods, task participation times, fuel values, black lists, white lists, and the like that need to be consumed for each task participation, the success of the security check of the task participation request can be determined in the case that each task information in the plurality of task information is successful in the security check, and if any task information in the plurality of task information fails in the security check, the failure of the security check of the task participation request can be determined. The following description of the security check is made on the task information including various examples.
(1) Assuming that the task information includes a task effective period and a task participation number, a specific implementation manner of performing security check on the task participation request by using the task effective period and the task participation number may be: acquiring the receiving time of the task participation request, and checking whether the receiving time of the task participation request is positioned in a task effective period; meanwhile, the number of historical task participation requests submitted by the object aiming at the target task can be obtained, and whether the number of the historical task participation requests is smaller than the task participation times or not is checked. If the receiving time of the task participation requests is in the effective period of the task and the number of the historical task participation requests is smaller than the number of task participation times, the success of the task participation requests can be determined, and the execution and calling predictor can be triggered to acquire the result data of the target task. If the receiving time of the task participation request exceeds the effective period of the task, or the number of the task participation requests is larger than or equal to the number of the task participation times, the task participation request verification failure can be determined, and target task participation failure prompt information can be output.
(2) Assuming that the task information includes a task valid period and a fuel value that needs to be consumed for each task participation, a specific embodiment of performing security check on the task participation request by using the task valid period and the fuel value that needs to be consumed for each task participation may be: acquiring the receiving time of the task participation request, and checking whether the receiving time of the task participation request is positioned in a task effective period; meanwhile, the residual fuel value of the object can be obtained, and whether the residual fuel value is larger than or equal to the fuel value required to be consumed by each task participation can be checked. If the receiving time of the task participation request is in the effective period of the task and the residual fuel value is greater than or equal to the fuel value required to be consumed by each task participation, the success of the task participation request verification can be determined, and the execution of the call propulsor can be triggered to acquire the result data of the target task. If the receiving time of the task participation request exceeds the task effective period, or the residual fuel value is smaller than the fuel value required to be consumed by each task participation, the task participation request verification failure can be determined, and the target task participation failure prompt information can be output.
The task information may also be other combinations, and correspondingly, there is a difference in specific implementation of security check on the task participation request, where the security check is not set forth for different combinations.
It will be appreciated that in the specific embodiments of the present application, related data such as user information (e.g. identity information, academic numbers, etc.) is referred to, and when the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data is required to comply with relevant laws and regulations and standards of relevant countries and regions.
S403, if the security check is passed, invoking a predictor to acquire result data of the target task.
In one embodiment, if the security check is passed, the predictor may be invoked to obtain result data for the target task. For example, in the case that the target task is a guessing task, the predictor may be called to obtain the result data of the guessing task, where the result data may refer to the real guessing result corresponding to the guessing task. In another example, in a scenario that the target task is a job submitting task, the predictor may be called to obtain result data of the job submitting task, where the result data may refer to a real answer of the job corresponding to the job submitting task. The specific implementation of the call prophetic agent to obtain the result data of the target task may refer to the description in step S302 in the above embodiment.
S404, determining the task completion condition of the object based on the execution data and the result data.
The task completion condition may include completion of a task or incomplete task; the task completion status may have different understandings according to different target tasks, and the completion tasks and the incomplete tasks included in the corresponding task completion status may also have different understandings. For example, in the scenario where the target task is a guessing task, the task completion may refer to a guess decision of the guessing object, which may include a guess success and a guess failure; i.e., completing a task may refer to successful competition, and incomplete tasks may refer to failed competition. As another example, in the scenario where the target task is a job submission task, the task completion condition may refer to a performance determination result, which may include a job pass and a job fail; i.e., completed tasks may refer to jobs that pass, and incomplete tasks may refer to jobs that fail. In other task scenarios, the task completion and corresponding completion and completion tasks may also be other understandings, not illustrated herein.
The number of the received task participation requests may be N, where N is a positive integer, that is, the number of the received task participation requests may be one or more, and it is known that one task participation request corresponds to one object, one task participation request corresponds to one execution data, and then the result data and one or more execution data need to be subjected to guess judgment.
In one embodiment, in the case that the task participation request is one, the execution data corresponding to the task participation request and the result data may be directly compared, so as to implement the determination between the result data and the execution data, that is, determine the task completion condition of the object. If the execution data and the result data meet the preset conditions, the object corresponding to the task participation request can be judged to complete the task; and if the execution data and the result data do not meet the preset conditions, the task completion of the object corresponding to the task participation request can be judged.
In one embodiment, in the case that the task participation requests are multiple, the result data may be compared with the execution data in each task participation request respectively, so as to implement the determination between the result data and the multiple execution data. In the N task participation requests, if the execution data and the result data of any one task participation request meet the preset conditions, the object corresponding to the any one task participation request can be judged to finish the task; and if the execution data and the result data of any task participation request do not meet the preset conditions, the incomplete task of the object corresponding to the any task participation request can be judged.
The corresponding preset conditions can be different for different target tasks, namely, the corresponding preset conditions can be preset according to specific target tasks. For example, in a scenario where the target task is a guess task, the preset condition may be that the execution data is the same as the result data, that is, in a case where the execution data is the same as the result data, the task completion condition of the object may be determined to be a completion task (i.e., the guess is successful); in the case where the execution data is not identical to the result data, it may be determined that the corresponding task is completed as an incomplete task (i.e., the competition fails). For another example, in a scenario where the target task is a job submitting task, taking an example where the result of performance determination may include a job passing and a job failing, the preset condition may be that the same proportion of the execution data and the result data reaches a preset proportion (for example, the preset proportion may be 100%, 80%, 60%, etc.), that is, in a case where the same proportion of the execution data and the result data reaches the preset proportion, it may be determined that the task completion condition of the object is a completion task (i.e., job passing); and under the condition that the same proportion of the execution data and the result data does not reach the preset proportion, the corresponding task completion condition can be determined to be an incomplete task (namely, the job fails).
In a specific embodiment, the task completion of the determination object is described by taking the target task as a guess task as an example. In the context of a guessing task, the task participation request may refer to a guessing request, the execution data may refer to prediction data, and the task completion condition may be a guessing determination result.
Under the condition that the competition request is one, the competition request can be directly compared with the corresponding prediction data and the result data so as to realize competition judgment between the result data and the prediction data. If the prediction data and the result data are the same, it may be determined that the object to which the guess request corresponds (or referred to as the guess object) is a successful guess; if the prediction data and the result data are not identical, it may be determined that the guess of the corresponding guess object has failed.
In the case of multiple competition requests, the result data can be respectively compared with the prediction data in each competition request, so as to realize competition judgment between the result data and the multiple prediction data. In the N guess requests, if the prediction data and the result data of any guess request are the same, the guess success of the guess object corresponding to any guess request can be judged; and the prediction data and the result data of any guess request are different, the guess failure of the guess object corresponding to any guess request can be determined.
For example, assume that the guessing task is to guess a score between team A and team B in a football match, and the result data is 1:2; if the prediction data of a certain competition request is 1:0, the competition failure of the competition object corresponding to the competition request can be determined; if the predicted data of a bid request is 1:2, then it can be determined that the bid request corresponds to a bid object.
In one embodiment, in the case where the task participation request is plural, when the determination is made based on the result data and the plural execution data (i.e., the task completion condition of the object is determined), the determination may be made collectively for a certain specified period of time. For example, the specified period may be the next day after the result data is published in the real world, if the result data is published in 2.12 days, then the determination may be made in 2.13 days, or the specified period may be another period, which is not particularly limited in this application.
When a plurality of execution data are determined in a set of specified periods, guess determination can be performed according to characteristics such as the receiving time of the task participation request and the determination priority of the object. For example, the execution data may be determined according to the order of the reception times corresponding to the task participation requests, and the execution data corresponding to the task participation requests having an earlier reception time may be preferentially determined. For example, the execution data may be determined according to the determination priority of each object, and the execution data corresponding to the high determination priority may be determined with priority. Optionally, the indication information for indicating the decision priority may be carried in the task participation request, and after the task participation request submitted by the object is received, the decision priority of the object may be determined according to the indication information in the task participation request, for example, a mapping relationship between the indication information and the decision priority may be stored in the blockchain in advance, and then the decision priority of the object may be determined directly based on the mapping relationship.
S405, transferring the digital collection to the account of the object according to the task completion condition of the object.
The task completion may include completion tasks and incomplete tasks, among other things.
In one embodiment, a digital collection may be transferred to an account of a task-completing object, and in particular, a resource management contract may be invoked to transfer a digital collection to an account of a task-completing object, which may be used to manage the digital collection associated with the target task. The resource management contract may be deployed on a blockchain, such as in a consensus network as shown in fig. 2a or fig. 2b or fig. 2c, and in more detail, on a core chain (blockchain at a core consensus layer) as shown in fig. 2 b. In one embodiment, the resource management contracts deployed in the consensus network may be synchronized into the business network as well, i.e., the business nodes in the business network have the resource management contracts deployed thereon, so that the task contracts on subsequent business nodes may invoke the resource management contracts to perform the corresponding operations (e.g., transfer digital collections to accounts of objects that complete the task).
In one embodiment, the resource management contract may include a total amount of digital collection allowed to be transferred for the target task, and a unit amount of digital collection allowed to be transferred for the target task, where the unit amount may be an amount of digital collection transferred to an object completing the task; it may also be determined how to transfer the digital collection to the account of the one or more task-completing objects based on the total amount of permitted transfer, in the event that the task-completing objects are one or more.
In one embodiment, if there are M objects in the N objects to complete the task, where M is a positive integer and M is less than or equal to N; the required amount of money for transferring digital collections to the accounts of M objects completing the task may be calculated based on the unit amount, so that digital collections may be transferred to the accounts of M objects based on the required amount and the total amount allowed to be transferred. The demand quota may be a product between the unit quota and M. For example, taking the value of the credit as an example, assuming that the unit credit is 1, the demand credit may be M. As another example, assuming that the unit credit is 100, the demand credit may be mx100.
If the demand credit is less than or equal to the total credit allowed to be transferred, the resource management contract may be invoked to transfer the digital collection of unit credits to the account of each object completing the task, respectively.
If the demand limit is greater than the total limit allowed to be transferred, selecting part of objects from M objects completing the task according to the sequence of the receiving time of the task participation request; further, a resource management contract may be invoked to transfer digital collections of unit credit to the accounts of the selected objects, respectively. Wherein the total transfer credit of the digital collection transferred to the accounts of all selected objects is less than or equal to the total credit allowed to be transferred.
Alternatively, the implementation manner of selecting the part of the objects may be: the number of objects of the object for which transfer of the digital collection is allowed may be determined based on the total amount allowed to be transferred and the unit amount; for example, the number of objects may be a ratio between the total amount allowed to be transferred and the unit amount. The task participation requests can be sequenced according to the sequence of the receiving time of the task participation requests, and a sequencing result aiming at the task participation requests is obtained; then after the number of objects and the ordering result are obtained, a portion of the objects may be selected based on the number of objects and the ordering result. For example, an object corresponding to the task participation request in the first L bits in the ordering result may be determined as the object to be selected, where the L value is the number of objects. By the method, the digital collection can be transferred to the object which completes the task first.
The following uses the target task as a guess task as an example to carry out the related example of the transfer of the digital collection.
For example, in a guessing task, the total amount of digital collections allowed to be transferred is 15, and the unit amount of digital collections allowed to be transferred is 1. For example, in the case that there are 8 guess objects in the N guess objects, it is known that the required amount of money required for transferring the digital collection to the account of the 8 guess objects that are successful is 8, that is, the required amount of money is less than the total amount allowed to be transferred, then the resource management contract may be invoked to transfer 1 digital collection to each of the accounts of the 8 guess objects that are successful. For example, in the case that there are 20 guess objects among the N guess objects, it is known that the required amount of money required for transferring the digital collection to the accounts of the 20 guess objects is 20, and the required amount of money is greater than the total amount allowed to be transferred, then 15 guess objects need to be selected from the 20 guess objects to call the resource management contract to transfer 1 digital collection to each of the accounts of the 15 guess objects.
It can be known that the intelligent contract is utilized and the on-chain guessing activity of the predictor is invoked, so that an automatic butt joint of a digital collection transfer system and a real event (such as the guessing activity) can be formed, and a public-credible digital collection guessing system is realized.
In one embodiment, the task contract may include a challenge period of the target task, and the challenge object may initiate a challenge request for the result data if the challenge object challenges the correctness of the result data during the challenge period. For example, in a scenario where the target task is a guessing task, if the challenge object challenges the result data corresponding to the guessing task, a challenge request for the result data may be initiated. The challenge object may be any object participating in the target task, or an object not participating in the target task, for example, the challenge request may be a user participating in the guessing task, or may refer to a user not participating in the guessing task; the challenge period may be a period of time after the transfer of the digital collection, such as the period of time may be 1 day, 3 days, etc. For example, assuming that the time to transfer the digital collection to the subject's account is at 9 months 16 days, the challenge period may be 9 months 16 days to 9 months 18 days.
When a challenge period exists in the target task, the state of the digital collection can be set to be an inactive state when the digital collection is transferred to an account of an object completing the task, and the state of the digital collection is changed after a challenge request is received in the challenge period.
Then, if a challenge request for result data is received during the challenge period, a determination may be made as to the challenge request, which may be used to challenge the correctness of the result data. Alternatively, the challenge request may include challenge data, and after the challenge request is received, it may be determined which of the result data and the challenge data is the correct data. For example, an initiator corresponding to the target task may implement a determination of the correct data in the result data and the challenge data. When the challenge data is judged to be correct data, the success of the challenge can be judged; when the result data is determined to be correct data, the challenge failure can be determined.
If the challenge is determined to be successful, i.e., the result data is erroneous data, indicating that the determination based on the result data is invalid, i.e., the task completion of the object is determined to be invalid using the result data, then the resource management contract may be invoked to set the digital collection that has been transferred to the account of the object that completed the task to an inactive state, where the setting may be to keep the digital collection in an inactive state, or to directly change the inactive state to an inactive state. And if the resource management contract contains the mortgage resource aiming at the target task, the resource management contract can be also called to allocate the mortgage resource to the account of the object for completing the task and the account of the challenge object corresponding to the challenge request. In order to compensate the object and the challenge object under the condition of misjudgment, thereby improving the experience of the user.
If the determination of the challenge fails, i.e., the result data is correct data, indicating that the determination based on the result data is valid, then the resource management contract may be invoked to set the digital offering that has been transferred to the account of the object completing the task to an active state, i.e., the digital offering may be changed from an inactive state to an active state. Alternatively, if a challenge request for result data is not received during the challenge period, the resource management contract may also be invoked to set the digital collection that has been transferred to the account of the object that completed the task to an active state. The state of the digital collection can be used as a sign of whether the digital collection can circulate or not; the digital stock in the inactive or inactive state is not allowed to circulate, i.e. cannot be used or transferred. The digital collection in the activated state allows circulation, i.e. allows it to be used or transferred.
In one embodiment, the challenge object may challenge the correctness of the result data by the reliability of the predictor service, typically if the predictor service is reliable, the result obtained with the predictor may be unreliable if the predictor service is unreliable. Wherein the reliability of the predictor service may be determined based on whether the attribute information of the predictor is successfully registered in the predictor management contract; for example, if the attribute information of the propranker is successfully registered in the propranker management contract, the service of the propranker may be determined to be reliable, and if the attribute information of the propranker is not successfully registered in the propranker management contract, the service of the propranker may be determined to be unreliable. The challenge request may be initiated if it is detected that the attribute information of the propulsor is not successfully registered in the propulsor management contract.
In one embodiment, the challenge object may send a reliability request regarding the reliability of the predictor service to the traffic node via the client (or terminal), and after the traffic node obtains the reliability request, the predictor management contract may be invoked to detect the reliability of the predictor service. If the attribute information of the predictor is included in the predictor management contract, the predictor service is reliable, the service node may send indication information for indicating that the predictor service is reliable to a client used by the challenge object. If the attribute information of the predictor is not included in the predictor management contract, indicating that the predictor service is unreliable, the service node may send indication information for indicating that the predictor service is unreliable to a client used by the challenge object. When the client used by the challenge object receives the indication information for indicating that the service of the predictor is unreliable, the challenge object may determine that the service of the predictor is unreliable, i.e. the challenge object may initiate a challenge request.
The data processing method based on the blockchain can receive the task participation request submitted by the object, the task participation request can comprise execution data generated by the object executing the target task, and after the task participation request is received, the task participation request can be subjected to safety verification, for example, the safety verification can be performed based on various task information, so that the target task can be smoothly performed in the target task holding period, and the reliability of the target task can be improved. Under the condition that the security check is successful, the result data of the target task can be obtained by calling the prophetic machine, so that the data interaction between the blockchain and the outside world is realized by calling the prophetic machine. Further, the task completion of the object may be determined based on the execution data and the result data, and the digital collection may be transferred to the account of the object according to the task completion of the object. Thereby enabling execution of tasks on the blockchain; moreover, based on the target task of the predictor, the automatic binding of the on-chain digital collection transfer and the actual event (such as guessing activity) can be realized, so that the execution of the automatic task can be realized, the execution of the target task is carried out according to the preset rule, the tedious and error-prone manual operation is solved, and the task execution efficiency is improved; in addition, due to the characteristic of the blockchain, the safety of data in the execution process of the target task can be ensured, so that the reliability of the target task is improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a blockchain-based data processing device according to an exemplary embodiment of the present application. The blockchain-based data processing device may be a computer program (including program code) running in a computer device, for example, the blockchain-based data processing device is an application software; the blockchain-based data processing device may be used to perform the corresponding steps in the methods provided by embodiments of the present application. As shown in fig. 5, the blockchain-based data processing device 500 may include: a receiving module 501, an acquiring module 502, a determining module 503, a transferring module 504 and a checking module 505.
A receiving module 501, configured to receive a task participation request submitted by an object, where the task participation request includes execution data generated by the object to execute a target task;
the obtaining module 502 is configured to invoke a prophetic machine to obtain result data of a target task;
a determining module 503, configured to determine a task completion status of the object based on the execution data and the result data;
and a transferring module 504, configured to transfer the digital collection to the account of the object according to the task completion situation of the object.
In one embodiment, the method is performed by invoking a task contract deployed on the blockchain, the task contract containing attribute information of the propulsor, the task contract invoking the propulsor based on the attribute information of the propulsor; the block chain is also provided with a propulsor management contract, and after attribute information of the propulsor is successfully registered in the propulsor management contract, the task contract is allowed to call the propulsor.
In one embodiment, the attribute information of the propulsor includes an address and call interface of the propulsor; the call interface of the prophetic machine is used for redirecting to the presentation page of the result data; the obtaining module 502 is specifically configured to: redirecting the call interface based on the predictor to a display page of the result data, and reading the result data from the display page; the predictor is invoked to write result data to the blockchain based on its address.
In one embodiment, the method is performed by invoking a task contract deployed on a blockchain; task information of the target task is contained in the task contract; the verification module 505 is specifically configured to: and carrying out safety verification on the task participation request according to the task information.
In one embodiment, the task information includes a task validity period; the verification module 505 is specifically configured to: checking whether the receiving time of the task participation request is in a task effective period; if the receiving time of the task participation request is in the effective period of the task, the task participation request is successfully checked, and the execution call predictor is triggered to acquire the result data of the target task; if the receiving time of the task participation request exceeds the effective period of the task, the verification of the task participation request fails, and the target task participation failure prompt information is output.
In one embodiment, the task information includes a number of task participation times; the verification module 505 is specifically configured to: acquiring the number of historical task participation requests submitted by an object aiming at a target task; if the number is greater than or equal to the number of task participation times, the verification of the task participation request fails, and target task participation failure prompt information is output; if the number is smaller than the number of task participation times, the task participation request is successfully checked, and the execution call predictor is triggered to acquire the result data of the target task.
In one embodiment, the mission information includes a fuel value that needs to be consumed for each mission engagement; the verification module 505 is specifically configured to: acquiring a residual fuel value of the object; if the residual fuel value is greater than or equal to the fuel value required to be consumed by each task participation, the task participation request is successfully checked, and the execution and calling predictor is triggered to acquire the result data of the target task; if the residual fuel value is smaller than the fuel value required to be consumed by each task participation, the task participation request fails to check, and the target task participation failure prompt information is output.
In one embodiment, the number of task participation requests received is N, N being a positive integer; a task participation request corresponds to an object; the determining module 503 is specifically configured to: comparing the result data with the execution data in each task participation request respectively; in the N task participation requests, if the execution data and the result data of any one task participation request meet the preset conditions, judging that the object corresponding to any one task participation request completes the task.
In one embodiment, a resource management contract is deployed on the blockchain, and the resource management contract is used for managing digital collections associated with the target task; the transfer module 504 is specifically configured to invoke a resource management contract to transfer the digital collection to an account of the object that completed the task.
In one embodiment, there are M objects in the N objects to complete the task, M is a positive integer and M is less than or equal to N; the resource management contract comprises the total amount of the digital collection allowed to be transferred for the target task and the unit amount of the digital collection allowed to be transferred for the target task; the transfer module 504 is specifically configured to: according to the unit amount, calculating the required amount for transferring the digital collection to the accounts of M objects completing the task; and if the demand limit is smaller than or equal to the total limit allowed to be transferred, invoking the resource management contract to transfer the digital collection of the unit limit to the account of each object completing the task.
In one embodiment, the transfer module 504 is further configured to: if the demand limit is greater than the total limit allowed to be transferred, selecting part of objects from M objects completing the task according to the sequence of the receiving time of the task participation request; and calling the resource management contracts to transfer the digital collection of the unit amount to the accounts of the selected objects respectively, wherein the total transfer amount of the digital collection transferred to the accounts of all the selected objects is smaller than or equal to the total amount allowed to be transferred.
In one embodiment, the method is performed by invoking a task contract deployed on a blockchain; the task contract comprises a challenge period of a target task; the resource management contract comprises a mortgage resource of the target task; the transfer module 504 is further configured to: if a challenge request for the result data is received in the challenge period, judging the challenge request, wherein the challenge request is used for challenging the correctness of the result data; if the challenge is judged to be successful, calling a resource management contract to set the digital stock transferred to the account of the object completing the task to be in an inactive state; and invoking a resource management contract to allocate the mortgage resource to the account of the object completing the task and the account of the challenge object corresponding to the challenge request.
In one embodiment, the transfer module 504 is further configured to: if it is determined that the challenge fails, or if a challenge request for the result data is not received during the challenge period, the resource management contract is invoked to set the digital collection that has been transferred to the account of the object that completed the task to an active state.
It may be appreciated that the functions of each functional module of the blockchain-based data processing apparatus described in the embodiments of the present application may be specifically implemented according to the method in the embodiments of the method, and the specific implementation process may refer to the relevant description of the embodiments of the method and will not be repeated herein. In addition, the description of the beneficial effects of the same method is omitted.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer device 600 may comprise a stand-alone device (e.g., one or more of a server, node, terminal, etc.), or may comprise components (e.g., a chip, software module, hardware module, etc.) internal to the stand-alone device. The computer device 600 may comprise at least one processor 601 and a communication interface 602, and further optionally the computer device 600 may comprise at least one memory 603 and a bus 604. Wherein the processor 601, the communication interface 602 and the memory 603 are connected via a bus 604.
The processor 601 is a module for performing arithmetic operation and/or logic operation, and may specifically be one or more of a central processing unit (Central Processing Unit, CPU), a picture processor (Graphics Processing Unit, GPU), a microprocessor (Microprocessor Unit, MPU), an application specific integrated circuit (Application SpecificIntegrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA), a complex programmable logic device (Complex Programmable Logic Device, CPLD), a coprocessor (assisting the central processing unit to perform corresponding processing and application), a micro control unit (Microcontroller Unit, MCU), and other processing modules.
The communication interface 602 may be used to provide information input or output to at least one processor. And/or the communication interface 602 may be configured to receive externally transmitted data and/or transmit externally, and may be a wired link interface including, for example, an ethernet cable, or may be a wireless link (Wi-Fi, bluetooth, universal wireless transmission, vehicle-mounted short-range communication technology, other short-range wireless communication technology, etc.) interface. In embodiments of the present application, the communication interface may include a network interface.
The memory 603 is used to provide storage space in which data such as an operating system and computer programs may be stored. The Memory 603 may be one or more of a random access Memory (Random Access Memory, RAM), a Read-Only Memory (ROM), an erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), or a portable Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM), etc.
The at least one processor 601 in the computer device 600 is configured to invoke the computer program stored in the at least one memory 603 for performing the blockchain-based data processing method described above, such as the blockchain-based data processing method described in the embodiments of fig. 3 and 4 described above.
In a possible implementation, the processor 601 in the computer device 600 is configured to invoke a computer program stored in the at least one memory 603 for performing the following operations: receiving a task participation request submitted by an object, wherein the task participation request comprises execution data generated by the object for executing a target task; invoking a predictor to acquire result data of a target task; determining a task completion of the object based on the execution data and the result data; and transferring the digital collection to the account of the object according to the task completion condition of the object.
In one embodiment, the method is performed by invoking a task contract deployed on the blockchain, the task contract containing attribute information of the propulsor, the task contract invoking the propulsor based on the attribute information of the propulsor; the block chain is also provided with a propulsor management contract, and after attribute information of the propulsor is successfully registered in the propulsor management contract, the task contract is allowed to call the propulsor.
In one embodiment, the attribute information of the propulsor includes an address and call interface of the propulsor; the call interface of the prophetic machine is used for redirecting to the presentation page of the result data; the processor 601 is specifically configured to: redirecting the call interface based on the predictor to a display page of the result data, and reading the result data from the display page; the predictor is invoked to write result data to the blockchain based on its address.
In one embodiment, the method is performed by invoking a task contract deployed on a blockchain; task information of the target task is contained in the task contract; processor 601, further configured to: and carrying out safety verification on the task participation request according to the task information.
In one embodiment, the task information includes a task validity period; the processor 601 is specifically configured to: checking whether the receiving time of the task participation request is in a task effective period; if the receiving time of the task participation request is in the effective period of the task, the task participation request is successfully checked, and the execution call predictor is triggered to acquire the result data of the target task; if the receiving time of the task participation request exceeds the effective period of the task, the verification of the task participation request fails, and the target task participation failure prompt information is output.
In one embodiment, the task information includes a number of task participation times; the processor 601 is specifically configured to: acquiring the number of historical task participation requests submitted by an object aiming at a target task; if the number is greater than or equal to the number of task participation times, the verification of the task participation request fails, and target task participation failure prompt information is output; if the number is smaller than the number of task participation times, the task participation request is successfully checked, and the execution call predictor is triggered to acquire the result data of the target task.
In one embodiment, the mission information includes a fuel value that needs to be consumed for each mission engagement; the verification module 505 is specifically configured to: acquiring a residual fuel value of the object; if the residual fuel value is greater than or equal to the fuel value required to be consumed by each task participation, the task participation request is successfully checked, and the execution and calling predictor is triggered to acquire the result data of the target task; if the residual fuel value is smaller than the fuel value required to be consumed by each task participation, the task participation request fails to check, and the target task participation failure prompt information is output.
In one embodiment, the number of task participation requests received is N, N being a positive integer; a task participation request corresponds to an object; the processor 601 is specifically configured to: comparing the result data with the execution data in each task participation request respectively; in the N task participation requests, if the execution data and the result data of any one task participation request meet the preset conditions, judging that the object corresponding to any one task participation request completes the task.
In one embodiment, a resource management contract is deployed on the blockchain, and the resource management contract is used for managing digital collections associated with the target task; the processor 601 is specifically configured to invoke a resource management contract to transfer a digital collection to an account of an object that completes a task.
In one embodiment, there are M objects in the N objects to complete the task, M is a positive integer and M is less than or equal to N; the resource management contract comprises the total amount of the digital collection allowed to be transferred for the target task and the unit amount of the digital collection allowed to be transferred for the target task; the processor 601 is specifically configured to: according to the unit amount, calculating the required amount for transferring the digital collection to the accounts of M objects completing the task; and if the demand limit is smaller than or equal to the total limit allowed to be transferred, invoking the resource management contract to transfer the digital collection of the unit limit to the account of each object completing the task.
In one embodiment, the processor 601 is further configured to: if the demand limit is greater than the total limit allowed to be transferred, selecting part of objects from M objects completing the task according to the sequence of the receiving time of the task participation request; and calling the resource management contracts to transfer the digital collection of the unit amount to the accounts of the selected objects respectively, wherein the total transfer amount of the digital collection transferred to the accounts of all the selected objects is smaller than or equal to the total amount allowed to be transferred.
In one embodiment, the method is performed by invoking a task contract deployed on a blockchain; the task contract comprises a challenge period of a target task; the resource management contract comprises a mortgage resource of the target task; processor 601, further configured to: if a challenge request for the result data is received in the challenge period, judging the challenge request, wherein the challenge request is used for challenging the correctness of the result data; if the challenge is judged to be successful, calling a resource management contract to set the digital stock transferred to the account of the object completing the task to be in an inactive state; and invoking a resource management contract to allocate the mortgage resource to the account of the object completing the task and the account of the challenge object corresponding to the challenge request.
In one embodiment, the processor 601 is further configured to: if it is determined that the challenge fails, or if a challenge request for the result data is not received during the challenge period, the resource management contract is invoked to set the digital collection that has been transferred to the account of the object that completed the task to an active state.
It should be understood that the computer device 600 described in the embodiments of the present application may perform the description of the blockchain-based data processing method in the embodiments described above, and may also perform the description of the blockchain-based data processing apparatus 500 in the embodiments described above with reference to fig. 5, which are not described herein. In addition, the description of the beneficial effects of the same method is omitted.
It should be further noted that an exemplary embodiment of the present application also provides a computer readable storage medium having stored therein a computer program of the foregoing blockchain-based data processing method, which when executed by a processor, performs the description of the blockchain-based data processing method in the embodiments of the present application. That is, when one or more processors loads and executes the computer program, the description of the data processing method based on the blockchain in the embodiment may be implemented, which is not repeated herein, and the description of the beneficial effects of the same method is not repeated herein.
The computer readable storage medium may be a blockchain-based data processing apparatus provided in any of the foregoing embodiments or an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the computer device. Further, the computer-readable storage medium may also include both internal storage units and external storage devices of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
In one aspect of the present application, a computer program product or computer program is provided. A processor of a computer device reads the computer program from a computer readable storage medium, and the processor executes the computer program to cause the computer device to perform a method of blockchain-based data processing provided in an aspect of an embodiment of the present application.
In one aspect of the present application, another computer program product or computer program is provided, the computer program product comprising a computer program that, when executed by a processor, implements the steps of the blockchain-based data processing method provided by the embodiments of the present application.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs.
The modules in the device of the embodiment of the application can be combined, divided and deleted according to actual needs.
The foregoing disclosure is only a few examples of the present application and is not intended to limit the scope of the claims herein, as many equivalents are intended to fall within the scope of the invention.

Claims (17)

1. A blockchain-based data processing method, comprising:
receiving a task participation request submitted by an object, wherein the task participation request comprises execution data generated by the object for executing a target task;
invoking a predictor to acquire result data of the target task;
determining a task completion of the object based on the execution data and the result data;
and transferring the digital collection to the account of the object according to the task completion condition of the object.
2. The method of claim 1, wherein the method is performed by invoking a task contract deployed on a blockchain, the task contract including attribute information of the propulsor, the task contract invoking the propulsor based on the attribute information of the propulsor;
and the blockchain is further provided with a propulsor management contract, and the task contract is allowed to call the propulsor after the attribute information of the propulsor is successfully registered in the propulsor management contract.
3. The method of claim 2, wherein the attribute information of the predictor includes an address and call interface of the predictor; the call interface of the predictor is used for redirecting to the display page of the result data; the calling prophetic agent obtains result data of the target task, including:
redirecting to a display page of the result data based on a call interface of the predictor, and reading the result data from the display page;
invoking the predictor to write the result data to the blockchain based on an address of the predictor.
4. A method as claimed in any one of claims 1 to 3, wherein the method is performed by invoking a task contract deployed on a blockchain; the task contract comprises task information of the target task; the method further comprises the steps of:
And carrying out safety verification on the task participation request according to the task information.
5. The method of claim 4, wherein the task information includes a task validity period; the security verification for the task participation request according to the task information comprises the following steps:
checking whether the receiving time of the task participation request is positioned in the task effective period;
if the receiving time of the task participation request is in the effective period of the task, the task participation request is successfully checked, and the call propulsor is triggered to be executed to acquire the result data of the target task;
if the receiving time of the task participation request exceeds the effective period of the task, the verification of the task participation request fails, and target task participation failure prompt information is output.
6. The method of claim 4, wherein the task information includes a number of task participation times; the security verification for the task participation request according to the task information comprises the following steps:
acquiring the number of historical task participation requests submitted by the object aiming at the target task;
if the number is greater than or equal to the number of task participation times, the task participation request fails to check, and target task participation failure prompt information is output;
And if the number is smaller than the task participation times, the task participation request is successfully checked, and the call prophetic machine is triggered to be executed to acquire the result data of the target task.
7. The method of claim 4, wherein the mission information includes a fuel value that needs to be consumed for each mission engagement; the security verification for the task participation request according to the task information comprises the following steps:
acquiring a residual fuel value of the object;
if the residual fuel value is greater than or equal to the fuel value required to be consumed by each task participation, the task participation request is successfully checked, and the call predictor is triggered to be executed to acquire the result data of the target task;
if the residual fuel value is smaller than the fuel value required to be consumed by each task participation, the task participation request fails to check, and target task participation failure prompt information is output.
8. The method of claim 1, wherein the number of task participation requests received is N, N being a positive integer; a task participation request corresponds to an object; the determining the task completion of the object based on the execution data and the result data includes:
Comparing the result data with the execution data in each task participation request respectively;
and in the N task participation requests, if the execution data of any task participation request and the result data meet a preset condition, judging that the object corresponding to the any task participation request completes the task.
9. The method of claim 8, wherein a resource management contract is deployed on the blockchain, the resource management contract for managing digital collections associated with the target task; the transferring the digital collection to the account of the object according to the task completion condition of the object comprises the following steps:
and transferring the digital collection to an account of the object completing the task by calling the resource management contract.
10. The method of claim 9, wherein there are M objects of the N objects that complete a task, M is a positive integer and M is less than or equal to N; the resource management contract comprises the total amount of the digital collection allowed to be transferred for the target task and the unit amount of the digital collection allowed to be transferred for the target task; the transferring the digital collection to the account of the object completing the task by calling the resource management contract comprises the following steps:
According to the unit amount, calculating a required amount for transferring the digital collection to accounts of M objects completing the task;
and if the required amount is smaller than or equal to the total amount allowed to be transferred, invoking the resource management contract to transfer the digital collection of the unit amount to each account of the object completing the task.
11. The method of claim 10, wherein the method further comprises:
if the required amount is greater than the total amount allowed to be transferred, selecting part of objects from the M objects completing the task according to the sequence of the receiving time of the task participation request;
and calling the resource management contract to transfer the digital collection of the unit amount to the selected accounts of the objects respectively, wherein the total transfer amount of the digital collection transferred to the accounts of all the selected objects is smaller than or equal to the total amount allowed to be transferred.
12. The method of any of claims 8-11, wherein the method is performed by invoking a task contract deployed on a blockchain; the task contract comprises a challenge period of the target task; the resource management contract comprises a mortgage resource of the target task; the method further comprises the steps of:
If a challenge request for the result data is received in the challenge period, judging the challenge request, wherein the challenge request is used for challenging the correctness of the result data;
if the challenge is judged to be successful, calling the resource management contract to set the digital collection transferred to the account of the object completing the task into an inactive state; the method comprises the steps of,
and calling the resource management contract to allocate the mortgage resource to an account of an object completing the task and an account of a challenge object corresponding to the challenge request.
13. The method of claim 12, wherein the method further comprises:
and if the challenge is judged to fail, or if the challenge request for the result data is not received in the challenge period, invoking the resource management contract to set the digital collection transferred to the account of the object completing the task into an active state.
14. A blockchain-based data processing device, comprising:
the receiving module is used for receiving a task participation request submitted by an object, wherein the task participation request comprises execution data generated by the object for executing a target task;
the acquisition module is used for calling a prophetic machine to acquire result data of the target task;
The determining module is used for determining the task completion condition of the object based on the execution data and the result data;
and the transfer module is used for transferring the digital collection to the account of the object according to the task completion condition of the object.
15. A computer device, comprising: a processor, a memory, and a network interface;
the processor is connected to the memory and the network interface, wherein the network interface is used for providing network communication functions, the memory is used for storing program codes, and the processor is used for calling the program codes to execute the block chain-based data processing method of any one of claims 1 to 13.
16. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, performs the blockchain-based data processing method of any of claims 1 to 13.
17. A computer program product, characterized in that the computer program product comprises a computer program which, when executed by a processor, implements the steps of the blockchain-based data processing method of any of claims 1 to 13.
CN202210688066.9A 2022-06-17 2022-06-17 Block chain-based data processing method and related products Pending CN117294701A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210688066.9A CN117294701A (en) 2022-06-17 2022-06-17 Block chain-based data processing method and related products

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210688066.9A CN117294701A (en) 2022-06-17 2022-06-17 Block chain-based data processing method and related products

Publications (1)

Publication Number Publication Date
CN117294701A true CN117294701A (en) 2023-12-26

Family

ID=89246822

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210688066.9A Pending CN117294701A (en) 2022-06-17 2022-06-17 Block chain-based data processing method and related products

Country Status (1)

Country Link
CN (1) CN117294701A (en)

Similar Documents

Publication Publication Date Title
JP7407895B2 (en) Blockchain for general calculations
US20230299984A1 (en) Blockchain-based data processing method, apparatus and device, and storage medium
US20190268139A1 (en) Data authentication using a blockchain approach
CN109936457A (en) Block chain witnesses method, apparatus, equipment and computer readable storage medium in many ways
TW201840159A (en) Method and system for secure data record distribution using a blockchain
CN112541758A (en) Multi-round voting type fault-tolerant sequencing consensus mechanism and method based on block chain
CN108769230B (en) Transaction data storage method, device, server and storage medium
CN109493056A (en) A kind of block chain common recognition mechanism based on supply chain Ecological Information scene
CN108876669B (en) Course notarization system and method applied to multi-platform education resource sharing
EP3788757B1 (en) Controlling transactions on a network
JP2023076628A (en) Computer-implemented systems and methods relating to binary blockchain comprising one pair of coupled blockchains
US11265162B2 (en) System and method for providing privacy and security protection in blockchain-based private transactions
CN108831001B (en) Block chain-based node random selection method, system, node and electronic equipment
CN110990790B (en) Data processing method and equipment
CN113342838B (en) Data processing method, device and equipment based on block chain and readable storage medium
CN111694895A (en) Block chain remote data auditing method and system
CN115499129A (en) Multimode trust cross-chain consensus method, system, medium, equipment and terminal
US20200202344A1 (en) Private asset transactions
CN112565370B (en) Method and system for verifying calculation result based on wireless communication and block chain scene
CN117294701A (en) Block chain-based data processing method and related products
CN116233139A (en) Data processing method, device, medium and electronic equipment of block chain system
CN116186786A (en) Block chain-based service processing method and device, electronic equipment and readable medium
CN110675257B (en) Block group chain construction method and device
WO2020058655A1 (en) Group collaborative decision-making by decentralized network nodes
Guo Cypherium: a scalable and permissionless smart contract platform

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