Data processing method, system architecture, device and storage medium
By generating multiple oracle contract tasks in the blockchain system and selecting the target data source system from multiple data source systems for data acquisition and verification, the problem of low oracle data reliability is solved and reliable data transmission and accuracy are achieved.
Patent Information
- Application Number
- CN202311601791.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-28
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2043-11-28
AI Technical Summary
The data provided by existing oracles has low reliability and is susceptible to failure or tampering, leading to errors in the execution of smart contracts.
By receiving the target data acquisition task of the blockchain system, multiple oracle contract tasks are generated, the target data source system is selected from multiple data source systems, the data block is obtained and verified, and the data block is sent to the blockchain system only after the verification is passed.
It improves the reliability of data acquisition by the data source system, prevents single point failures and data tampering, and ensures data accuracy.
Smart Images

Figure CN117591604B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data service technology, and in particular relates to a data processing method, system architecture, device and storage medium. Background Art
[0002] Oracles are a technology used in the blockchain and cryptocurrency space. They provide a mechanism for introducing external data into the blockchain, allowing smart contracts to make decisions or execute actions based on that data. Oracles can retrieve information from external data sources and then convert that information into data on the blockchain, making it accessible and usable for smart contracts.
[0003] However, if the data provided by the oracle is inaccurate or tampered with, it may cause the smart contract to execute incorrect operations. Currently, the reliability of the data provided by the oracle is often low due to failures or delays in the data source. Summary of the Invention
[0004] The embodiments of the present application provide a data processing method, system architecture, device and storage medium, which can solve the problem of low reliability of data provided by existing oracles.
[0005] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:
[0006] Receive target data acquisition tasks sent by the blockchain system;
[0007] Generate multiple oracle contract tasks based on the target data acquisition task;
[0008] Determining a target data source system from a plurality of first data source systems, and sending the plurality of oracle contract tasks to the target data source system, wherein the target data source system is configured to obtain data required by the target data acquisition task and not stored in the blockchain system from an external network, and process the data not stored in the blockchain system into data blocks;
[0009] Receive the data blocks obtained by the target data source system based on the multiple oracle contract tasks, and verify the data blocks;
[0010] If the data block is verified to be successful, the data block is sent to the blockchain system.
[0011] In some embodiments, the oracle system includes multiple first oracle nodes, and before generating multiple oracle contract tasks based on the target data acquisition task, further includes:
[0012] Obtain multiple first characteristic parameter groups of multiple first oracle nodes, wherein each first oracle node corresponds to a first characteristic parameter group, wherein the first characteristic parameter group includes the average task duration, task efficiency, data credibility, and node failure rate of the corresponding first oracle node;
[0013] Determining a target oracle node among the plurality of first oracle nodes based on the plurality of first feature parameter groups;
[0014] The generating of multiple oracle contract tasks based on the target data acquisition task includes:
[0015] A plurality of oracle contract tasks are generated in the target oracle node based on the target data acquisition task.
[0016] In some embodiments, the first feature parameter group includes the average duration of the task,
[0017] The obtaining of multiple first characteristic parameter groups of multiple first oracle nodes includes:
[0018] Obtain n historical data acquisition tasks of a second oracle node, n task durations of the n historical data acquisition tasks, and n first weights of the n historical data acquisition tasks, wherein the second oracle node is any one of the multiple first oracle nodes, the historical data acquisition task is a data acquisition task completed by the second oracle node before the target data acquisition task, n is a positive integer, each historical data acquisition task corresponds to a task duration, and each historical data acquisition task corresponds to a first weight;
[0019] Determine the average task duration of the second oracle node based on the n task durations and the n first weights.
[0020] In some embodiments, the first characteristic parameter group includes task efficiency, data credibility, and node failure rate.
[0021] The obtaining of multiple first characteristic parameter groups of multiple first oracle nodes includes:
[0022] Obtain n historical data acquisition tasks of the second oracle node, n task durations of the n historical data acquisition tasks, n task data volumes of the n historical data acquisition tasks, and n first weights of the n historical data acquisition tasks, where each historical data acquisition task corresponds to one task data volume;
[0023] The task efficiency of the second oracle node is determined based on the n task durations, the n task data volumes and the n first weights.
[0024] In some embodiments, the first characteristic parameter group includes data credibility,
[0025] The obtaining of multiple first characteristic parameter groups of multiple first oracle nodes includes:
[0026] Obtain n historical data acquisition tasks of the second oracle node, n credible data volumes of the n historical data acquisition tasks, and n task data volumes of the n historical data acquisition tasks;
[0027] The data credibility of the second oracle node is determined based on the n trusted data amounts and the n task data amounts.
[0028] In some embodiments, if the data block passes verification, before sending the data block to the blockchain system, the method further includes:
[0029] Receiving a verification request sent by the data source system;
[0030] generating a first verification result corresponding to the verification request according to the generated first value and the data identifier of the target data acquisition task;
[0031] Sending the first value and the data identifier of the target data acquisition task to the data source system;
[0032] receiving a second verification result generated by the data source system based on the first value and the data identifier of the target data acquisition task;
[0033] If the first verification result and the second verification result match, it is determined that the verification of the data block passes.
[0034] In some embodiments, determining a target data source system from a plurality of first data source systems includes:
[0035] Acquire multiple second characteristic parameter groups of multiple first data source systems, wherein each first data source system has one second characteristic parameter group, and the second characteristic parameter group includes a task tracking rate, a return rate, and a reliability of the corresponding first data source system;
[0036] The target data source system is determined among the plurality of first data source systems based on the plurality of second characteristic parameter groups.
[0037] In some embodiments, determining the target data source system from the plurality of first data source systems based on the plurality of second characteristic parameter groups includes:
[0038] determining a plurality of first scores for the plurality of first data source systems based on the plurality of second feature parameter groups for the plurality of first data source systems, wherein each data source system corresponds to a first score;
[0039] determining a second data source system from the plurality of first data source systems based on the plurality of first scores;
[0040] When the credibility of the data to be verified obtained by the second data source system is greater than a first threshold, the second data source system is determined as the target data source system.
[0041] In some embodiments, the second characteristic parameter group includes a return rate,
[0042] The acquiring of a plurality of second characteristic parameter groups of a plurality of first data source systems comprises:
[0043] Obtain k historical data acquisition tasks of a third data source system, k valid return data volumes corresponding to the k historical data acquisition tasks, and k total return data volumes corresponding to the k historical data acquisition tasks, wherein the third data source system is any one of the multiple first data source systems, each historical data acquisition task corresponds to one valid return data volume, and each historical data acquisition task corresponds to one total return data volume;
[0044] A return rate of the third data source system is determined based on the k valid return data amounts and the k total return data amounts.
[0045] In some embodiments, the second characteristic parameter group includes tracking rate,
[0046] The acquiring of a plurality of second characteristic parameter groups of a plurality of first data source systems comprises:
[0047] Obtain k historical data acquisition tasks of a third data source system, k total required data volumes corresponding to the k historical data acquisition tasks, and k total returned data volumes corresponding to the k historical data acquisition tasks, wherein the third data source system is any one of the multiple first data source systems, each historical data acquisition task corresponds to one total required data volume, and each historical data acquisition task corresponds to one total returned data volume;
[0048] A tracking rate of the third data source system is determined based on the k total demand data volumes and the k total return data volumes.
[0049] In some embodiments, the second feature parameter group includes credibility,
[0050] The acquiring of a plurality of second characteristic parameter groups of a plurality of first data source systems comprises:
[0051] Obtain k historical data acquisition tasks of a third data source system, k total on-chain data volumes corresponding to the k historical data acquisition tasks, and k valid on-chain data volumes corresponding to the k historical data acquisition tasks, wherein the third data source system is any one of the multiple first data source systems, each historical data acquisition task corresponds to one valid on-chain data volume, and each historical data acquisition task corresponds to one total on-chain data volume;
[0052] The credibility of the third data source system is determined based on the k total on-link data amounts and the k valid on-link data amounts.
[0053] In some embodiments, determining a plurality of first scores for the plurality of first data source systems based on the plurality of second feature parameter groups of the plurality of first data source systems includes:
[0054] The first score corresponding to the second data source system is determined using a score calculation formula, wherein the score calculation formula is:
[0055]
[0056] Among them, Node_total_score is the first score, i is used to represent the i-th task among k historical data acquisition tasks, k is the total number of historical data acquisition tasks, task_num i The number of data in the task for obtaining historical data for the i-th task, TrackingRate i ReturnRate is the tracking rate of the task for obtaining historical data for the i-th task. i The upload rate for the i-th historical data acquisition task, UploadChainRate i Get the credibility of the task for the i-th historical data.
[0057] In a second aspect, an embodiment of the present application provides a data processing system architecture, the system architecture including:
[0058] The blockchain system is used to generate a target data acquisition task and send the target data acquisition task to the oracle system;
[0059] The oracle system is used to receive target data acquisition tasks sent by the blockchain system;
[0060] The oracle system is further configured to generate a plurality of oracle contract tasks based on the target data acquisition task;
[0061] The oracle system is further configured to determine a target data source system from a plurality of first data source systems, and send the plurality of oracle contract tasks to the target data source system, wherein the target data source system is configured to obtain data required by the target data acquisition task and not stored in the blockchain system from an external network, and process the data not stored in the blockchain system into data blocks;
[0062] The oracle system is further configured to receive data blocks obtained by the target data source system based on the multiple oracle contract tasks, and verify the data blocks;
[0063] The oracle system is further configured to, if the data block passes verification, send the data block to the blockchain system;
[0064] The data source system network is used to obtain the data required by the target data acquisition task but not stored in the blockchain system from an external network, and process the data not stored in the blockchain system into data blocks.
[0065] In a third aspect, an embodiment of the present application provides a data processing device, the device comprising: a processor and a memory storing computer program instructions;
[0066] The above data processing method is implemented when the processor executes computer program instructions.
[0067] In a fourth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, which implement the above data processing method when the computer program instructions are executed by a processor.
[0068] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes computer program instructions, and when the computer program instructions are executed by a processor, the above data processing method is implemented.
[0069] In this application, a target data acquisition task sent by a blockchain system is received; multiple oracle contract tasks are generated based on the target data acquisition task; a target data source system is determined among multiple first data source systems, and multiple oracle contract tasks are sent to the target data source system, wherein the target data source system is used to obtain the data required by the target data acquisition task that is not stored in the blockchain system from the external network, and process the data not stored in the blockchain system into data blocks; the data blocks obtained by the target data source system based on the multiple oracle contract tasks are received, and the data blocks are verified; if the data blocks are verified, the data blocks are sent to the blockchain system. In this way, different data acquisition tasks can be assigned to different first data source systems, and the oracle system is used to verify the data blocks obtained by the first data source system. Only the data blocks that pass the verification can be sent to the blockchain system. By using different first data source systems to obtain data, compared with obtaining data from a single data source system, it can prevent single point failures and the possibility of the data source system being unable to obtain off-chain data or being tampered with after being attacked, thereby improving the reliability of data obtained by the data source system. Verifying the data blocks can also improve the reliability of the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0071] Figure 1 This is a flow chart of a data processing method provided in one embodiment of the present application;
[0072] Figure 2 This is a structural diagram of the system architecture of data processing provided by an embodiment of the present application;
[0073] Figure 3 This is a structural diagram of the system architecture of data processing provided by an embodiment of the present application;
[0074] Figure 4 It is a hardware structure diagram of a data processing device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0075] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.
[0076] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0077] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The embodiments will be described in detail below with reference to the accompanying drawings.
[0078] Specifically, in order to solve the problems of the prior art, the embodiments of the present application provide a data processing method, system architecture, device and storage medium. The data processing method provided by the embodiments of the present application is first introduced below.
[0079] Figure 1 A flow chart of a data processing method provided by one embodiment of the present application is shown. The method is applied to an oracle system and includes the following steps:
[0080] S110, receiving a target data acquisition task sent by the blockchain system.
[0081] In this embodiment, the blockchain system includes multiple blockchain nodes, each of which can execute smart contracts. When the data required by the smart contract executed by the blockchain node in the blockchain system is not stored in the blockchain system, a target data acquisition task can be generated and sent to the oracle system. The oracle system introduces external data outside the blockchain system into the blockchain system to execute the smart contract.
[0082] Specifically, there is a first task queue in the blockchain system. After the target data acquisition task is generated, the target data acquisition task can be stored in the first task queue, and the target data acquisition task can be taken out from the first task queue according to the order of tasks in the first task queue. If the data required by the target data acquisition task is not stored in the blockchain system, the target data acquisition task will be encrypted and the encrypted target data acquisition task will be sent to the oracle system.
[0083] S120, generating multiple oracle contract tasks based on the target data acquisition task.
[0084] In this embodiment, after the oracle system receives the target data acquisition task, it can decompose the target data acquisition task into multiple subtasks based on the different types of the target data acquisition task, and make each subtask generate one or more oracle contract tasks in combination with the oracle contract. The oracle contract is a smart contract adapted to the oracle system. The types of target data acquisition tasks include database type, FTP (File Transfer Protocol) / SFTP (Secure File Transfer Protocol) file server type, Web (HTTP (Hypertext Transfer Protocol) / HTTPS (Hypertext Transfer Protocol Secure)) server message type, etc.
[0085] Specifically, the oracle system includes a second task queue. After the target data acquisition task is decomposed into multiple subtasks, the multiple subtasks can be stored in the second task queue according to specific rules, and each subtask can be taken out in turn according to the order of the subtasks in the second task queue. Each subtask is combined with the oracle contract to generate an oracle contract task. In this way, each target data acquisition task can be converted into multiple oracle contract tasks.
[0086] S130, determining a target data source system from a plurality of first data source systems, and sending the plurality of oracle contract tasks to the target data source system, wherein the target data source system is used to obtain the data required by the target data acquisition task but not stored in the blockchain system from an external network, and process the data not stored in the blockchain system into data blocks.
[0087] In this embodiment, the data source system network includes multiple first data source systems, each of which can be used to obtain external data from an external network. The multiple first data source systems form a distributed architecture. The oracle system can select a target data source system from the multiple first data source systems and then send multiple oracle contract tasks to the target data source system. The target data source system then obtains the data required by the blockchain system from the external network, processes the data into data blocks, and sends the data blocks back to the oracle system.
[0088] For example, the oracle system includes a second task queue, and multiple oracle contract tasks can be added to a third task queue in the oracle system, and then the multiple oracle contract tasks can be sent to the target data source system in the order of the third task queue.
[0089] The target data source system can obtain the data required for the target data acquisition task from the external network based on multiple oracle contract tasks, and then send the acquired data to the first data source system outside the target data source system to verify the acquired data. After the verification is passed, the data can be processed and processed to generate the final required data block, and the data block can be encrypted and transmitted to the oracle system via an encrypted data channel.
[0090] S140, receiving the data blocks obtained by the target data source system based on the multiple oracle contract tasks, and verifying the data blocks.
[0091] In this embodiment, after the target data source system receives multiple oracle contract tasks, it can generate a data block based on the multiple oracle contract tasks and feed the data block back to the oracle system, which can then verify the data block. For example, this verification process can be multi-party data source verification, that is, by comparing and verifying data from multiple data sources outside the target data source system with the data of the target data source system to eliminate the impact of errors, inaccuracies, or tampering of a single data source.
[0092] S150: If the data block passes verification, the data block is sent to the blockchain system.
[0093] In this embodiment, if the oracle system verifies the data block successfully, it can encrypt the data block and feed the encrypted data block back to the blockchain system. After the blockchain system obtains the data block, it can decrypt it and execute the decrypted data block with its corresponding smart contract. After the smart contract is executed, the data in the data block is stored in the blockchain system.
[0094] In this application, a target data acquisition task sent by a blockchain system is received; multiple oracle contract tasks are generated based on the target data acquisition task; a target data source system is determined among multiple first data source systems, and multiple oracle contract tasks are sent to the target data source system, wherein the target data source system is used to obtain the data required by the target data acquisition task that is not stored in the blockchain system from the external network, and process the data not stored in the blockchain system into data blocks; the data blocks obtained by the target data source system based on the multiple oracle contract tasks are received, and the data blocks are verified; if the data blocks are verified, the data blocks are sent to the blockchain system. In this way, different data acquisition tasks can be assigned to different first data source systems, and the oracle system is used to verify the data blocks obtained by the first data source system. Only the data blocks that pass the verification can be sent to the blockchain system. By using different first data source systems to obtain data, compared with obtaining data from a single data source system, it can prevent single point failures and the possibility of the data source system being unable to obtain off-chain data or being tampered with after being attacked, thereby improving the reliability of data obtained by the data source system. Verifying the data blocks can also improve the reliability of the data.
[0095] As an optional embodiment, the oracle system includes multiple first oracle nodes, and before generating multiple oracle contract tasks based on the target data acquisition task, further includes:
[0096] Obtain multiple first characteristic parameter groups of multiple first oracle nodes, wherein each first oracle node corresponds to a first characteristic parameter group, wherein the first characteristic parameter group includes the average task duration, task efficiency, data credibility, and node failure rate of the corresponding first oracle node;
[0097] Determining a target oracle node from among the plurality of first oracle nodes based on the plurality of first feature parameter groups;
[0098] The generating of multiple oracle contract tasks based on the target data acquisition task includes:
[0099] A plurality of oracle contract tasks are generated in the target oracle node based on the target data acquisition task.
[0100] In this embodiment, the oracle system includes multiple first oracle nodes. Before executing a target data acquisition task to obtain off-chain data each time, it is necessary to select a suitable target oracle node from the multiple first oracle nodes to execute the target data acquisition task to obtain off-chain data.
[0101] Specifically, a suitable target oracle node may be selected based on a first characteristic parameter group corresponding to each of the plurality of first oracle nodes. The first characteristic parameter group includes the average task duration, task efficiency, data credibility, and node failure rate of the first oracle node.
[0102] Before executing the target data acquisition task each time, a target oracle node is selected from multiple first oracle nodes to execute the target data acquisition task. A node with better performance can be selected to avoid using a single oracle node, thereby preventing single point failures and attacks, which may cause the inability to obtain off-chain data or the possibility of off-chain data being tampered with.
[0103] As an optional embodiment, the first characteristic parameter group includes an average task duration, including:
[0104] Obtain n historical data acquisition tasks of a second oracle node, n task durations of the n historical data acquisition tasks, and n first weights of the n historical data acquisition tasks, wherein the second oracle node is any one of the multiple first oracle nodes, the historical data acquisition task is a data acquisition task completed by the second oracle node before the target data acquisition task, n is a positive integer, each historical data acquisition task corresponds to a task duration, and each historical data acquisition task corresponds to a first weight;
[0105] Determine the average task duration of the second oracle node based on the n task durations and the n first weights.
[0106] In this embodiment, for the second oracle node, the historical data acquisition task is a data acquisition task that the second oracle node performs before the target data acquisition task, which is to obtain data from an external network for an off-chain task. The duration of each task is the duration consumed by the second oracle node to perform a historical data acquisition task, and each first weight is used to represent the importance of its corresponding historical data acquisition task among all n historical data acquisition tasks.
[0107] The average task duration of the second oracle node can be determined based on n task durations and n first weights using the following first formula:
[0108]
[0109] Among them, Avgtime is the average task duration of the second oracle node, i is used to represent the i-th task among n historical data acquisition tasks, t i The duration of the task for the i-th historical data acquisition task, w i is the first weight of the i-th historical data acquisition task, and n is the total number of historical data acquisition tasks.
[0110] This embodiment can accurately obtain the average task duration of the second oracle node.
[0111] As an optional embodiment, the first characteristic parameter group includes task efficiency, including:
[0112] Obtain n historical data acquisition tasks of the second oracle node, n task durations of the n historical data acquisition tasks, n task data volumes of the n historical data acquisition tasks, and n first weights of the n historical data acquisition tasks, where each historical data acquisition task corresponds to one task data volume;
[0113] The task efficiency of the second oracle node is determined based on the n task durations, the n task data volumes and the n first weights.
[0114] In this embodiment, for the second oracle node, the historical data acquisition task is a data acquisition task that the second oracle node performs before the target data acquisition task, which is to obtain data from an external network for an off-chain task. The duration of each task is the duration consumed by the second oracle node to perform a historical data acquisition task. The data volume of each task is the total size of data acquired by the second oracle node to perform a historical data acquisition task. Each first weight is used to represent the importance of its corresponding historical data acquisition task among all n historical data acquisition tasks.
[0115] The task efficiency of the second oracle node can be determined based on n task durations, n task data volumes, and n first weights using the following second formula:
[0116]
[0117] Among them, ComEffcy is the task efficiency of the second oracle node, i is used to represent the i-th task among n historical data acquisition tasks, t i The duration of the task for the i-th historical data acquisition task, w i Get the first weight of the task for the i-th historical data, task i is the task data volume of the i-th historical data acquisition task, and n is the total number of historical data acquisition tasks.
[0118] This embodiment can accurately obtain the task efficiency of the second oracle node.
[0119] As an optional embodiment, the first characteristic parameter group includes data credibility, including:
[0120] Obtain n historical data acquisition tasks of the second oracle node, n credible data volumes of the n historical data acquisition tasks, and n task data volumes of the n historical data acquisition tasks;
[0121] The data credibility of the second oracle node is determined based on the n trusted data amounts and the n task data amounts.
[0122] In this embodiment, for the second oracle node, the historical data acquisition task is a data acquisition task that the second oracle node performs before the target data acquisition task, which is to obtain data from an external network for an off-chain task. The amount of each trusted data is the size of the trusted data acquired by the second oracle node when it performs one historical data acquisition task, and the amount of each task data is the size of the total data acquired by the second oracle node when it performs one historical data acquisition task.
[0123] The data credibility of the second oracle node can be determined based on the amount of trusted data and the amount of n task data using the following third formula:
[0124]
[0125] Among them, y is the data credibility of the second oracle node, i is used to represent the i-th task in n historical data acquisition tasks, suc i The amount of credible data for the i-th historical data acquisition task, task i is the task data volume of the i-th historical data acquisition task, and n is the total number of historical data acquisition tasks.
[0126] This embodiment can accurately obtain the data credibility of the second oracle node.
[0127] As an optional embodiment, when the data block passes verification, before sending the data block to the blockchain system, the method further includes:
[0128] Receiving a verification request sent by the target data source system;
[0129] generating a first verification result corresponding to the verification request according to the generated first value and the data identifier of the target data acquisition task;
[0130] Sending the first value and the data identifier of the target data acquisition task to the target data source system;
[0131] receiving a second verification result generated by the target data source system based on the first value and the data identifier of the target data acquisition task;
[0132] If the first verification result and the second verification result match, it is determined that the verification of the data block passes.
[0133] In this embodiment, after the target data source system receives multiple oracle contract tasks, it can generate data blocks based on the multiple oracle contract tasks and feed the data blocks back to the oracle system, which can verify the data blocks.
[0134] Specifically, the verification process may be as follows: first, the target data source system generates a verification request and sends the verification request to the oracle system; after the oracle system receives the verification request, it randomly generates a first numerical value; and then generates a first verification result based on the first numerical value and the data identifier of the target data acquisition task. The generation process of the first verification result may be a result obtained by performing an HMAC-SHA1 (Hash-based Message Authentication Code with SHA-1, a message authentication code based on a hash function (HMAC) and SHA-1) operation based on the first numerical value, the data identifier of the target data acquisition task, and the key sent by the target data source system. The data identifier of the target data acquisition task may include at least one of the target oracle node ID, the subtask ID, the requester identifier of the target data acquisition task, the request sequence number, the request timestamp, and the request hash value.
[0135] In addition, the oracle system may also send the first numerical value and the data identifier of the target data acquisition task to the target data source system. The target data source system may generate a second verification result based on the received first numerical value and data identifier. The second verification result may also be obtained by performing an HMAC-SHA1 operation based on the first numerical value, the data identifier of the target data acquisition task, and the key sent by the target data source system.
[0136] If the first verification result and the second verification result are the same, the target data source system can be considered to be a legitimate data source, that is, the data block is considered to have passed verification.
[0137] Through the above method, the reliability of the data source can be verified, thereby enhancing the accuracy of the data.
[0138] As an optional embodiment, determining the target data source system from the plurality of first data source systems includes:
[0139] Acquire multiple second characteristic parameter groups of multiple first data source systems, wherein each first data source system has one second characteristic parameter group, and the second characteristic parameter group includes a task tracking rate, a return rate, and a reliability of the corresponding first data source system;
[0140] The target data source system is determined among the plurality of first data source systems based on the plurality of second characteristic parameter groups.
[0141] In this embodiment, a plurality of first data source systems form a data source system network, which is a distributed network, wherein each first data source system can independently acquire data from an external network.
[0142] Based on the above, a suitable target data source system can be selected based on the second characteristic parameter group corresponding to each of the multiple first data source systems. The second characteristic parameter group includes the task tracking rate, return rate, and credibility of the corresponding first data source system.
[0143] Each time before obtaining off-chain data from the external network, the oracle system can select a target data source system from multiple first data source systems to achieve the acquisition. It can select a target data source system with better performance to avoid relying on a single data source system to obtain data, thereby preventing single point failures and the possibility of the data source system being attacked, resulting in the inability to obtain off-chain data or the possibility of off-chain data being tampered with.
[0144] As an optional embodiment, determining the target data source system from the multiple first data source systems based on the multiple second characteristic parameter groups includes:
[0145] determining a plurality of first scores for the plurality of first data source systems based on the plurality of second feature parameter groups for the plurality of first data source systems, wherein each data source system corresponds to a first score;
[0146] determining a second data source system from the plurality of first data source systems based on the plurality of first scores;
[0147] When the credibility of the data to be verified obtained by the second data source system is greater than a first threshold, the second data source system is determined as the target data source system.
[0148] In this embodiment, after obtaining the second characteristic parameter group corresponding to each first data source system, the corresponding first data source system can be scored based on the second characteristic parameter group to obtain a first score corresponding to each first data source system. Based on the order of the multiple first scores from high to low, a second data source system with a higher first score can be selected from the multiple first data source systems.
[0149] For example, three first data source systems with the highest first scores may be determined first, and then one first data source system is randomly selected from the three first data source systems as the second data source system.
[0150] The second data source system is then used to obtain the data to be verified from the external network. After obtaining the data to be verified, the data to be verified can be sent to all first data source systems other than the second data source system to verify the data to determine the credibility of the data to be verified. For example, the first threshold can be 2 / 3.
[0151] When the verification result of the data to be verified indicates that its credibility is greater than a first threshold, the second data source system is determined as the target data source system.
[0152] As an optional embodiment, the second characteristic parameter group includes a return rate,
[0153] The acquiring of a plurality of second characteristic parameter groups of a plurality of first data source systems comprises:
[0154] Obtain k historical data acquisition tasks of a third data source system, k valid return data volumes corresponding to the k historical data acquisition tasks, and k total return data volumes corresponding to the k historical data acquisition tasks, wherein the third data source system is any one of the multiple first data source systems, each historical data acquisition task corresponds to one valid return data volume, and each historical data acquisition task corresponds to one total return data volume;
[0155] A return rate of the third data source system is determined based on the k valid return data amounts and the k total return data amounts.
[0156] In this embodiment, for the third data source system, a historical data acquisition task is a data acquisition task executed by the third data source system prior to the target data acquisition task, which is to obtain data from an external network for an off-chain task. Each valid return data volume is the amount of valid data generated by the third data source system during a historical data acquisition. Each total return data volume represents the total amount of data for the corresponding historical data acquisition.
[0157] The return rate of the third data source system can be determined based on k total return data amounts and k valid return data amounts using the following fourth formula:
[0158]
[0159] Among them, ReturnRate is the return rate of the third data source system, i is used to represent the i-th of k historical data acquisition tasks, return_valid_num is the amount of valid return data, total_retrun_num is the total amount of return data, and k is the total number of historical data acquisition tasks.
[0160] This embodiment can accurately obtain the return rate of the third data source system.
[0161] As an optional embodiment, the second characteristic parameter group includes tracking rate,
[0162] The acquiring of a plurality of second characteristic parameter groups of a plurality of first data source systems comprises:
[0163] Obtain k historical data acquisition tasks of a third data source system, k total required data volumes corresponding to the k historical data acquisition tasks, and k total returned data volumes corresponding to the k historical data acquisition tasks, wherein the third data source system is any one of the multiple first data source systems, each historical data acquisition task corresponds to one total required data volume, and each historical data acquisition task corresponds to one total returned data volume;
[0164] A tracking rate of the third data source system is determined based on the k total demand data volumes and the k total return data volumes.
[0165] In this embodiment, for the third data source system, the historical data acquisition task is a data acquisition task executed by the third data source system before the target data acquisition task to obtain data from the external network for off-chain tasks. Each total required data volume is the total data volume required by the historical data acquisition task, and each total return data volume is used to represent the total data volume of the corresponding historical data acquisition.
[0166] The tracking rate of the third data source system can be determined based on the k total return data amounts and the k total demand data amounts using the following fifth formula:
[0167]
[0168] Among them, TrackingRate is the tracking rate of the third data source system, i is used to represent the i-th historical data acquisition task among k historical data acquisition tasks, total_transfer_num is the total required data volume, total_retrun_num is the total return data volume, and k is the total number of historical data acquisition tasks.
[0169] This embodiment can accurately obtain the tracking rate of the third data source system.
[0170] As an optional embodiment, the second characteristic parameter group includes credibility,
[0171] The acquiring of a plurality of second characteristic parameter groups of a plurality of first data source systems comprises:
[0172] Obtain k historical data acquisition tasks of a third data source system, k total on-chain data volumes corresponding to the k historical data acquisition tasks, and k valid on-chain data volumes corresponding to the k historical data acquisition tasks, wherein the third data source system is any one of the multiple first data source systems, each historical data acquisition task corresponds to one valid on-chain data volume, and each historical data acquisition task corresponds to one total on-chain data volume;
[0173] The credibility of the third data source system is determined based on the k total on-link data amounts and the k valid on-link data amounts.
[0174] In this embodiment, for the third data source system, a historical data acquisition task is a data acquisition task executed by the third data source system prior to the target data acquisition task, which is performed to obtain data from an external network for off-chain tasks. Each total on-chain data volume is the amount of data acquired by the historical data acquisition task that is transmitted back to the blockchain and stored. Each effective on-chain data volume is the amount of data acquired by the historical data acquisition task that is transmitted back to the blockchain and meets the requirements of the historical data acquisition task.
[0175] The credibility of the third data source system can be determined based on the k total on-chain data volumes and the k valid on-chain data volumes using the following sixth formula:
[0176]
[0177] Among them, UploadChainRate is the credibility of the third data source system, i is used to represent the i-th of k historical data acquisition tasks, upload_valid_num is the amount of valid on-chain data, total_upload_num is the total amount of on-chain data, and k is the total number of historical data acquisition tasks.
[0178] This embodiment can accurately obtain the credibility of the third data source system.
[0179] As an optional embodiment, determining the plurality of first scores for the plurality of first data source systems based on the plurality of second feature parameter groups for the plurality of first data source systems includes:
[0180] The first score corresponding to the third data source system is determined using a score calculation formula, wherein the score calculation formula is:
[0181]
[0182] Among them, Node_total_score is the first score, i is used to represent the i-th task among k historical data acquisition tasks, k is the total number of historical data acquisition tasks, task_num iThe number of data in the task for obtaining historical data for the i-th task, TrackingRate i ReturnRate is the tracking rate of the task for obtaining historical data for the i-th task. i The upload rate for the i-th historical data acquisition task, UploadChainRate i Get the credibility of the task for the i-th historical data.
[0183] As an optional embodiment, Figure 2 As shown, there is a blockchain system 210, an oracle system 220, and a data source system network 230 that are sequentially communicatively connected. The blockchain system 210 includes multiple blockchain nodes, the oracle system 220 includes a core scheduling module and multiple first oracle nodes, and the data source system network 230 includes multiple first data source systems.
[0184] Each blockchain node can generate a data acquisition task. After a blockchain node generates a data acquisition task, it can send the data acquisition task to the oracle system 220. The core scheduling module in the oracle system 220 can select a target oracle node from multiple first oracle nodes and forward the data acquisition task to the target oracle node. The target oracle node can split the data acquisition task into multiple subtasks and generate an oracle contract task based on each subtask.
[0185] Then, the oracle system 220 can also select a target first data source system from the multiple first data source systems included in the data source system network 230, and can send the oracle contract task to the interface adaptation layer of the data source system network 230, and forward it to the core task module via the interface adaptation layer. The core task module can assign the oracle contract task to the selected target data source system. The target data source system can obtain the data required by the blockchain node from the external network, and process the obtained data into data blocks, and feed the data blocks back to the target oracle node. The target oracle node can send the data blocks back to the corresponding blockchain node.
[0186] In addition, data transmission between the blockchain system 210, the oracle system 220 and the data source system network 230 all passes through an encrypted transmission channel.
[0187] Based on the data processing methods provided in the above embodiments, this application also provides specific implementations of the data processing system architecture. Please refer to the following embodiments.
[0188] See first Figure 3 The data processing system architecture 300 provided in this embodiment of the present application includes the following modules:
[0189] The blockchain system 301 is configured to generate a target data acquisition task and send the target data acquisition task to the oracle system;
[0190] The oracle system 302 is used to receive the target data acquisition task sent by the blockchain system;
[0191] The oracle system 302 is further configured to generate a plurality of oracle contract tasks based on the target data acquisition task;
[0192] The oracle system 302 is further configured to determine a target data source system from the plurality of first data source systems, and send the plurality of oracle contract tasks to the target data source system, wherein the target data source system is configured to obtain data required by the target data acquisition task but not stored in the blockchain system from an external network, and process the data not stored in the blockchain system into data blocks;
[0193] The oracle system 302 is further configured to receive data blocks obtained by the target data source system based on the multiple oracle contract tasks, and verify the data blocks;
[0194] The oracle system 302 is further configured to, if the data block passes verification, send the data block to the blockchain system;
[0195] The data source system network 303 is used to obtain the data required by the target data acquisition task but not stored in the blockchain system from the external network, and process the data not stored in the blockchain system into data blocks.
[0196] The system architecture can receive a target data acquisition task sent by a blockchain system; generate multiple oracle contract tasks based on the target data acquisition task; determine a target data source system from multiple first data source systems, and send multiple oracle contract tasks to the target data source system, wherein the target data source system is used to obtain the data required by the target data acquisition task that is not stored in the blockchain system from the external network, and process the data not stored in the blockchain system into data blocks; receive the data blocks obtained by the target data source system based on multiple oracle contract tasks, and verify the data blocks; if the data blocks are verified, send the data blocks to the blockchain system. In this way, different data acquisition tasks can be assigned to different first data source systems, and the oracle system is used to verify the data blocks obtained by the first data source system. Only data blocks that pass the verification can be sent to the blockchain system. Using different first data source systems to obtain data can avoid relying on a single data source system to obtain data, thereby preventing single point failures and the possibility of the data source system being attacked, resulting in the inability to obtain off-chain data, or the possibility of off-chain data being tampered with, thereby improving the reliability of data obtained by the data source system. Verifying the data blocks can also improve the reliability of data. As an implementation of the present application, the oracle system 302 is also used to:
[0197] Obtain multiple first characteristic parameter groups of multiple first oracle nodes, wherein each first oracle node corresponds to a first characteristic parameter group, wherein the first characteristic parameter group includes the average task duration, task efficiency, data credibility, and node failure rate of the corresponding first oracle node;
[0198] Determining a target oracle node among the plurality of first oracle nodes based on the plurality of first feature parameter groups;
[0199] A plurality of oracle contract tasks are generated in the target oracle node based on the target data acquisition task.
[0200] As an implementation of the present application, the oracle system 302 is further configured to:
[0201] Obtain n historical data acquisition tasks of a second oracle node, n task durations of the n historical data acquisition tasks, and n first weights of the n historical data acquisition tasks, wherein the second oracle node is any one of the multiple first oracle nodes, the historical data acquisition task is a data acquisition task completed by the second oracle node before the target data acquisition task, n is a positive integer, each historical data acquisition task corresponds to a task duration, and each historical data acquisition task corresponds to a first weight;
[0202] Determine the average task duration of the second oracle node based on the n task durations and the n first weights.
[0203] As an implementation of the present application, the oracle system 302 is further configured to:
[0204] Obtain n historical data acquisition tasks of the second oracle node, n task durations of the n historical data acquisition tasks, n task data volumes of the n historical data acquisition tasks, and n first weights of the n historical data acquisition tasks, where each historical data acquisition task corresponds to one task data volume;
[0205] The task efficiency of the second oracle node is determined based on the n task durations, the n task data volumes and the n first weights.
[0206] As an implementation of the present application, the oracle system 302 is further configured to:
[0207] Obtain n historical data acquisition tasks of the second oracle node, n credible data volumes of the n historical data acquisition tasks, and n task data volumes of the n historical data acquisition tasks;
[0208] The data credibility of the second oracle node is determined based on the n trusted data amounts and the n task data amounts.
[0209] As an implementation of the present application, the oracle system 302 is further used to:
[0210] Receiving a verification request sent by the data source system;
[0211] generating a first verification result corresponding to the verification request according to the generated first value and the data identifier of the target data acquisition task;
[0212] Sending the first value and the data identifier of the target data acquisition task to the data source system;
[0213] receiving a second verification result generated by the data source system based on the first value and the data identifier of the target data acquisition task;
[0214] If the first verification result and the second verification result match, it is determined that the verification of the data block passes.
[0215] As an implementation of the present application, the oracle system 302 is further used to:
[0216] Acquire multiple second characteristic parameter groups of multiple first data source systems, wherein each first data source system has one second characteristic parameter group, and the second characteristic parameter group includes a task tracking rate, a return rate, and a reliability of the corresponding first data source system;
[0217] The target data source system is determined among the plurality of first data source systems based on the plurality of second characteristic parameter groups.
[0218] As an implementation of the present application, the oracle system 302 is further used to:
[0219] determining a plurality of first scores for the plurality of first data source systems based on the plurality of second feature parameter groups for the plurality of first data source systems, wherein each data source system corresponds to a first score;
[0220] determining a second data source system from the plurality of first data source systems based on the plurality of first scores;
[0221] When the credibility of the data to be verified obtained by the second data source system is greater than a first threshold, the second data source system is determined as the target data source system.
[0222] As an implementation of the present application, the oracle system 302 is further used to:
[0223] Obtain k historical data acquisition tasks of a third data source system, k valid return data volumes corresponding to the k historical data acquisition tasks, and k total return data volumes corresponding to the k historical data acquisition tasks, wherein the third data source system is any one of the multiple first data source systems, each historical data acquisition task corresponds to one valid return data volume, and each historical data acquisition task corresponds to one total return data volume;
[0224] A return rate of the third data source system is determined based on the k valid return data amounts and the k total return data amounts.
[0225] As an implementation of the present application, the oracle system 302 is further used to:
[0226] Obtain k historical data acquisition tasks of a third data source system, k total required data volumes corresponding to the k historical data acquisition tasks, and k total returned data volumes corresponding to the k historical data acquisition tasks, wherein the third data source system is any one of the multiple first data source systems, each historical data acquisition task corresponds to one total required data volume, and each historical data acquisition task corresponds to one total returned data volume;
[0227] A tracking rate of the third data source system is determined based on the k total demand data volumes and the k total return data volumes.
[0228] As an implementation of the present application, the oracle system 302 is further configured to:
[0229] Obtain k historical data acquisition tasks of a third data source system, k total on-chain data volumes corresponding to the k historical data acquisition tasks, and k valid on-chain data volumes corresponding to the k historical data acquisition tasks, wherein the third data source system is any one of the multiple first data source systems, each historical data acquisition task corresponds to one valid on-chain data volume, and each historical data acquisition task corresponds to one total on-chain data volume;
[0230] The credibility of the third data source system is determined based on the k total on-link data amounts and the k valid on-link data amounts.
[0231] As an implementation of the present application, the oracle system 302 is further configured to:
[0232] The first score corresponding to the second data source system is determined using a score calculation formula, wherein the score calculation formula is:
[0233]
[0234] Among them, Node_total_score is the first score, i is used to represent the i-th task among k historical data acquisition tasks, k is the total number of historical data acquisition tasks, task_num i The number of data in the task for obtaining historical data for the i-th task, TrackingRate i ReturnRate is the tracking rate of the task for obtaining historical data for the i-th task. i The upload rate for the i-th historical data acquisition task, UploadChainRate i Get the credibility of the task for the i-th historical data.
[0235] The data processing system architecture provided by the embodiment of the present invention can implement each step in the above-mentioned method embodiment, and will not be described again here to avoid repetition.
[0236] Figure 4 A schematic diagram of the hardware structure of a data processing device provided in an embodiment of the present application is shown.
[0237] The data processing device may include a processor 401 and a memory 402 storing computer program instructions.
[0238] Specifically, the processor 401 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0239] Memory 402 may include a large capacity memory for data or instructions. By way of example and not limitation, memory 402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 402 may include removable or non-removable (or fixed) media. Where appropriate, memory 402 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, memory 402 is a non-volatile solid-state memory.
[0240] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0241] The processor 401 implements any one of the data processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 402 .
[0242] In one example, the data processing device may further include a communication interface 403 and a bus 410. Figure 4 As shown, the processor 401 , the memory 402 , and the communication interface 403 are connected via a bus 410 and communicate with each other.
[0243] The communication interface 403 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0244] Bus 410 comprises hardware, software or both, couples the parts of data processing equipment to each other.For example, and not limitation, bus can comprise accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations.In suitable cases, bus 410 can comprise one or more buses.Although the present application embodiment describes and shows specific bus, the application considers any suitable bus or interconnection.
[0245] The data processing device can be based on the above embodiments, thereby realizing the combination of the above data processing method and apparatus.
[0246] In addition, in combination with the data processing method in the above embodiment, the embodiment of the present application may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the data processing methods in the above embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here. Among them, the above-mentioned computer-readable storage medium may include a non-transitory computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc., which is not limited here.
[0247] In addition, an embodiment of the present application further provides a computer program product, including computer program instructions, which, when executed by a processor, can implement the steps and corresponding contents of the aforementioned method embodiment.
[0248] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.
[0249] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0250] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0251] The above reference is according to the flowchart and / or block diagram of the method, device and computer program product of the embodiment of the present disclosure, describes various aspects of the present disclosure.It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions.These computer program instructions can be provided to the processor of the system architecture of a general-purpose computer, a special-purpose computer or other programmable data processing, to produce a kind of machine, so that these instructions executed by the processor of the system architecture of the computer or other programmable data processing enable the realization of the function / action specified in one or more boxes of the flowchart and / or block diagram.Such a processor can be but is not limited to a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It is also understood that each box in the block diagram and / or flowchart and the combination of the boxes in the block diagram and / or flowchart can also be implemented by the dedicated hardware that performs the specified function or action, or can be implemented by the combination of dedicated hardware and computer instructions.
[0252] The above is only a specific implementation method of the present application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited to this. Any technician familiar with this technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the scope of protection of this application.
Claims
1. A data processing method, characterized in that: The method is applied to an oracle system, and the method includes: Receive target data acquisition tasks sent by the blockchain system; Generate multiple oracle contract tasks based on the target data acquisition task; Determining a target data source system from a plurality of first data source systems, and sending the plurality of oracle contract tasks to the target data source system, wherein the target data source system is configured to obtain data required by the target data acquisition task and not stored in the blockchain system from an external network, and process the data not stored in the blockchain system into data blocks; Receive the data blocks obtained by the target data source system based on the multiple oracle contract tasks, and verify the data blocks; If the data block passes verification, sending the data block to the blockchain system; The oracle system includes a plurality of first oracle nodes, and before generating a plurality of oracle contract tasks based on the target data acquisition task, further includes: Obtain multiple first characteristic parameter groups of multiple first oracle nodes, wherein each first oracle node corresponds to a first characteristic parameter group, wherein the first characteristic parameter group includes the average task duration, task efficiency, data credibility, and node failure rate of the corresponding first oracle node; Determining a target oracle node from among the plurality of first oracle nodes based on the plurality of first feature parameter groups; The generating of multiple oracle contract tasks based on the target data acquisition task includes: Generating a plurality of oracle contract tasks in the target oracle node based on the target data acquisition task; The generating of multiple oracle contract tasks based on the target data acquisition task includes: Based on the type of the target data acquisition task, the target data acquisition task is decomposed into multiple subtasks, and each subtask is combined with the oracle contract to generate multiple oracle contract tasks; wherein the type of the target data acquisition task includes a database type, an FTP (File Transfer Protocol) / SFTP (Secure File Transfer Protocol) file server type, and a Web (HTTP (Hypertext Transfer Protocol) / HTTPS (Hypertext Transfer Protocol Secure) server message type.
2. The data processing method according to claim 1, wherein: The obtaining of multiple first characteristic parameter groups of multiple first oracle nodes includes: Obtain n historical data acquisition tasks of a second oracle node, n task durations of the n historical data acquisition tasks, and n first weights of the n historical data acquisition tasks, wherein the second oracle node is any one of the multiple first oracle nodes, the historical data acquisition task is a data acquisition task completed by the second oracle node before the target data acquisition task, n is a positive integer, each historical data acquisition task corresponds to a task duration, and each historical data acquisition task corresponds to a first weight; Determine the average task duration of the second oracle node based on the n task durations and the n first weights.
3. The data processing method according to claim 1, wherein: The obtaining of multiple first characteristic parameter groups of multiple first oracle nodes includes: Obtain n historical data acquisition tasks of the second oracle node, n task durations of the n historical data acquisition tasks, n task data volumes of the n historical data acquisition tasks, and n first weights of the n historical data acquisition tasks, where each historical data acquisition task corresponds to one task data volume; The task efficiency of the second oracle node is determined based on the n task durations, the n task data volumes and the n first weights.
4. The data processing method according to claim 1, wherein: The obtaining of multiple first characteristic parameter groups of multiple first oracle nodes includes: Obtain n historical data acquisition tasks of the second oracle node, n credible data volumes of the n historical data acquisition tasks, and n task data volumes of the n historical data acquisition tasks; The data credibility of the second oracle node is determined based on the n trusted data amounts and the n task data amounts.
5. The data processing method according to claim 1, wherein: When the data block passes verification, before sending the data block to the blockchain system, the method further includes: Receiving a verification request sent by the data source system; generating a first verification result corresponding to the verification request according to the generated first value and the data identifier of the target data acquisition task; Sending the first value and the data identifier of the target data acquisition task to the data source system; receiving a second verification result generated by the data source system based on the first value and the data identifier of the target data acquisition task; If the first verification result and the second verification result match, it is determined that the verification of the data block passes.
6. The data processing method according to claim 1, wherein: The determining of the target data source system from the plurality of first data source systems includes: Acquire multiple second characteristic parameter groups of multiple first data source systems, wherein each first data source system has one second characteristic parameter group, and the second characteristic parameter group includes a task tracking rate, a return rate, and a reliability of the corresponding first data source system; The target data source system is determined among the plurality of first data source systems based on the plurality of second characteristic parameter groups.
7. The data processing method according to claim 6, characterized in that: The determining the target data source system in the plurality of first data source systems based on the plurality of second characteristic parameter groups includes: determining a plurality of first scores for the plurality of first data source systems based on the plurality of second feature parameter groups for the plurality of first data source systems, wherein each data source system corresponds to a first score; determining a second data source system from the plurality of first data source systems based on the plurality of first scores; When the credibility of the data to be verified obtained by the second data source system is greater than a first threshold, the second data source system is determined as the target data source system.
8. The data processing method according to claim 6, characterized in that: The acquiring of a plurality of second characteristic parameter groups of a plurality of first data source systems comprises: Obtain k historical data acquisition tasks of a third data source system, k valid return data volumes corresponding to the k historical data acquisition tasks, and k total return data volumes corresponding to the k historical data acquisition tasks, wherein the third data source system is any one of the multiple first data source systems, each historical data acquisition task corresponds to one valid return data volume, and each historical data acquisition task corresponds to one total return data volume; A return rate of the third data source system is determined based on the k valid return data amounts and the k total return data amounts.
9. The data processing method according to claim 6, characterized in that: The acquiring of a plurality of second characteristic parameter groups of a plurality of first data source systems comprises: Obtain k historical data acquisition tasks of a third data source system, k total required data volumes corresponding to the k historical data acquisition tasks, and k total returned data volumes corresponding to the k historical data acquisition tasks, wherein the third data source system is any one of the multiple first data source systems, each historical data acquisition task corresponds to one total required data volume, and each historical data acquisition task corresponds to one total returned data volume; A tracking rate of the third data source system is determined based on the k total demand data volumes and the k total return data volumes.
10. The data processing method according to claim 6, wherein: The acquiring of a plurality of second characteristic parameter groups of a plurality of first data source systems comprises: Obtain k historical data acquisition tasks of a third data source system, k total on-chain data volumes corresponding to the k historical data acquisition tasks, and k valid on-chain data volumes corresponding to the k historical data acquisition tasks, wherein the third data source system is any one of the multiple first data source systems, each historical data acquisition task corresponds to one valid on-chain data volume, and each historical data acquisition task corresponds to one total on-chain data volume; The credibility of the third data source system is determined based on the k total on-link data amounts and the k valid on-link data amounts.
11. The data processing method according to claim 10, characterized in that: The determining a plurality of first scores for the plurality of first data source systems based on the plurality of second feature parameter groups for the plurality of first data source systems comprises: The first score corresponding to the second data source system is determined using a score calculation formula, wherein the score calculation formula is: ; in, is the first score, i is used to represent the i-th task among k historical data acquisition tasks, and k is the total number of historical data acquisition tasks. The number of data in the task for obtaining historical data for the i-th task, The tracking rate of the task for obtaining the i-th historical data, is the return rate of the i-th historical data acquisition task, Get the credibility of the task for the i-th historical data.
12. A data processing system architecture, characterized in that: The system architecture includes: The blockchain system is used to generate a target data acquisition task and send the target data acquisition task to the oracle system; The oracle system is used to receive target data acquisition tasks sent by the blockchain system; The oracle system is further configured to generate a plurality of oracle contract tasks based on the target data acquisition task; The oracle system is further configured to determine a target data source system from a plurality of first data source systems, and send the plurality of oracle contract tasks to the target data source system, wherein the target data source system is configured to obtain data required by the target data acquisition task and not stored in the blockchain system from an external network, and process the data not stored in the blockchain system into data blocks; The oracle system is further configured to receive data blocks obtained by the target data source system based on the multiple oracle contract tasks, and verify the data blocks; The oracle system is further configured to, if the data block passes verification, send the data block to the blockchain system; A data source system network is used to obtain data required by the target data acquisition task but not stored in the blockchain system from an external network, and process the data not stored in the blockchain system into data blocks; The oracle system is also used to obtain multiple first characteristic parameter groups of multiple first oracle nodes, wherein each first oracle node corresponds to a first characteristic parameter group, wherein the first characteristic parameter group includes the average task duration, task efficiency, data credibility and node failure rate of the corresponding first oracle node; based on the multiple first characteristic parameter groups, determine the target oracle node among the multiple first oracle nodes; generate multiple oracle contract tasks in the target oracle node based on the target data acquisition task; The oracle system is also used to, based on the type of the target data acquisition task, decompose the target data acquisition task into multiple subtasks, and enable each of the subtasks to generate multiple oracle contract tasks in combination with the oracle contract; wherein the type of the target data acquisition task includes a database type, an FTP (File Transfer Protocol) / SFTP (Secure File Transfer Protocol) file server type, and a Web (HTTP (Hypertext Transfer Protocol) / HTTPS (Hypertext Transfer Protocol Secure) server message type.
13. A data processing device, characterized in that: The data processing device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the data processing method according to any one of claims 1 to 11 is implemented.
14. A computer storage medium, characterized in that The computer storage medium stores computer program instructions, which, when executed by a processor, implement the data processing method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Optimization method, device and apparatus of oracle machine interface and storage medium
CN111914299A
Data collection method and device based on hyperledger, and computer system
CN113010561A