Data processing method and device, electronic equipment and storage medium
By creating and publishing target data catalogs on the blockchain and using the blockchain proxy gateway to approve data processing tasks and pull data, the problem of poor practicality of data processing in the existing technology is solved, decentralized, trustworthy and traceable data sharing is realized, and the stability and convenience of data processing are improved.
Patent Information
- Application Number
- CN202311466105.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-03
- Publication Date
- 2025-05-06
AI Technical Summary
The existing technology is poor in the process of data processing, especially in data interaction scenarios, which require offline communication, direct provision of databases or self-built centralized platforms, resulting in high costs, difficulty in authority control and huge development work.
Through blockchain technology, users can create and publish target data catalogs on the blockchain, and approve data processing tasks and pull data through proxy gateways on the blockchain, realizing decentralized, trustworthy and traceable data sharing.
It improves the stability and convenience of the data processing process, enhances the practicality of data processing, and ensures the authenticity, credibility and traceability of data.
Smart Images

Figure CN119945697A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to network technology fields such as blockchain, cloud technology, and big data. The present application relates to a data processing method, device, electronic device, and storage medium. Background Art
[0002] With the rapid development of network technology, more and more data are stored in network platforms. In some data interaction scenarios, data providers need to provide data to data users.
[0003] In the related technology, the provider may provide the data directly in the form of an offline file, or the provider and the user may provide the data through system connection; for example, the provider may directly provide the user with the database login method, or the provider may build a centralized platform or customize the interface for authorized users to obtain data.
[0004] However, providing offline files requires offline communication, which is costly; directly providing a database means that users can log in to the database without restrictions to read data, which makes it difficult to control permissions; and building a centralized platform or customizing interfaces requires a lot of development work and huge docking work. Therefore, the practicality of the above data processing methods is poor. Summary of the invention
[0005] The present application provides a data processing method, device, electronic device and storage medium, which can solve the problem of poor practicality in related technologies. The technical solution is as follows:
[0006] In one aspect, a data processing method is provided, the method comprising:
[0007] Receiving a data processing task initiated by a first client on a blockchain, wherein the data processing task indicates that the first user requests to obtain target data corresponding to a target data directory of a second user;
[0008] The target data directory is created and published on the blockchain by the second user who provides the target data; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway;
[0009] Sending an approval request for the data processing task to the second client, and receiving an approval result returned by the second client, wherein the approval request instructs the second user to perform permission approval for the data processing task;
[0010] If the approval result indicates that the second user approves the data processing task, the data processing task is sent to the first gateway, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user.
[0011] On the other hand, a data processing method is provided, the method being applied to a first client, the method comprising:
[0012] Obtain at least one data directory published on the blockchain where the first user is located, wherein the at least one data directory includes a target data directory;
[0013] The target data directory is created and published on the blockchain by the second user who provides the target data; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway;
[0014] Initiating a data processing task for the target data directory on the blockchain, so that the blockchain node in the blockchain sends an approval request for the data processing task to the second client;
[0015] The data processing task instructs the first user to request to obtain the target data corresponding to the target data directory of the second user; the approval request instructs the second user to perform permission approval for the data processing task;
[0016] If the approval result indicates that the second user approves the data processing task, the data processing task is executed through the first gateway, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user.
[0017] On the other hand, a data processing method is provided, the method being applied to a second client, the method comprising:
[0018] Initiate a creation request for a target data directory on the blockchain where the second user is located, wherein the creation request instructs the second user to create and publish the target data directory on the blockchain;
[0019] Receive approval requests for data processing tasks sent by blockchain nodes in the blockchain;
[0020] The data processing task is a task initiated by the first client on the blockchain, and the data processing task instructs the first user to request to obtain the target data corresponding to the target data directory of the second user;
[0021] Performing permission approval for the data processing task and returning the approval result to the blockchain node; so that the blockchain node sends the data processing task to the first gateway when the approval result indicates approval, and the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user;
[0022] Among them, the approval request instructs the second user to approve the permission for the data processing task; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway.
[0023] In another aspect, a data processing device is provided, the device comprising:
[0024] A first receiving module is used to receive a data processing task initiated by a first client on the blockchain, wherein the data processing task indicates that the first user requests to obtain target data corresponding to a target data directory of a second user;
[0025] The target data directory is created and published on the blockchain by the second user who provides the target data; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway;
[0026] A first sending module is used to send an approval request for the data processing task to the second client, and receive an approval result returned by the second client, wherein the approval request instructs the second user to perform permission approval for the data processing task;
[0027] The second sending module is used to send the data processing task to the first gateway if the approval result indicates that the second user approves the data processing task, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user.
[0028] In a possible implementation, before receiving the data processing task initiated by the first client on the blockchain, the device further includes:
[0029] A creation request receiving module, configured to receive a creation request initiated by a second client on the blockchain, wherein the creation request instructs the second user to create and publish the target data directory on the blockchain;
[0030] a creation module, configured to create the target data directory on the blockchain based on the creation request, and store creation information of the target data directory, wherein the creation information includes a user identifier of the second user and a gateway identifier of the second gateway;
[0031] A publishing module is used to publish the target data directory and its creation information in the data market of the blockchain.
[0032] In a possible implementation, after receiving the data processing task initiated by the first client on the blockchain, the device further includes:
[0033] A task storage module, used to store the data processing task in the blockchain;
[0034] An approval status recording module, used to record that the approval status of the data processing task is not approved;
[0035] After receiving the approval result returned by the second client, the device further includes:
[0036] The approval status updating module is used to update the approval status of the data processing task from unapproved to approved if the approval result indicates that the data processing task is approved.
[0037] In a possible implementation, after sending the data processing task to the first gateway, the apparatus further includes:
[0038] A verification request receiving module, configured to receive a verification request sent by the second gateway in response to a pull request from the first gateway, wherein the verification request indicates whether the first user has permission to use the target data directory;
[0039] The pull request instructs the first user to pull the target data corresponding to the target data directory;
[0040] The verification pass message sending module is used to send a verification pass message indicating that the first user has the right to use the target data directory to the second gateway if the approval status of the data processing task is approved.
[0041] In one possible implementation, the device further includes:
[0042] A termination request storage module, configured to store a termination request on the blockchain if a termination request initiated by the first client or the second client on the blockchain is received during the process of the first gateway pulling the target data based on the second gateway; the termination request indicates the termination of the data processing task;
[0043] The termination event sending module is used to send a task termination event corresponding to the termination request to the second gateway, so that the second gateway terminates the process of sending the target data to the first gateway.
[0044] In a possible implementation, if a termination request initiated by the first client or the second client on the blockchain is received, after the blockchain stores the termination request, the device further includes:
[0045] A termination status recording module, used to record the termination status of the data processing task as pending termination;
[0046] After sending the task termination event corresponding to the termination request to the second gateway, the device further includes:
[0047] The termination status updating module is used to update the termination status of the data processing task from pending termination to terminated.
[0048] In one possible implementation, the target data directory includes at least one of the following information:
[0049] A data login configuration indicating a login method of a data source where the target data is located;
[0050] Indicates the database instance name of the database instance corresponding to the data source of the target data;
[0051] Indicates the database name of the database corresponding to the target data in the database instance;
[0052] Indicates the data table name of the data table corresponding to the target data in the database;
[0053] Indicates the field name of each field contained in the data table;
[0054] The permission mode of the data corresponding to the target data directory.
[0055] In one possible implementation, the data processing task carries at least one of the following information:
[0056] The directory identifier of the target data directory;
[0057] The specified field name in the target data directory;
[0058] The identification information of the first user, the first gateway identification, and the storage directory for storing the target data;
[0059] The identification information of the second user and the second gateway identification.
[0060] In another aspect, a data processing device is provided, the device being applied to a first client, the device comprising:
[0061] A first acquisition module, configured to acquire at least one data directory published on the blockchain where the first user is located, wherein the at least one data directory includes a target data directory;
[0062] The target data directory is created and published on the blockchain by the second user who provides the target data; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway;
[0063] A first initiating module, configured to initiate a data processing task for the target data directory on the blockchain, so that a blockchain node in the blockchain sends an approval request for the data processing task to a second client;
[0064] The data processing task instructs the first user to request to obtain the target data corresponding to the target data directory of the second user; the approval request instructs the second user to perform permission approval for the data processing task;
[0065] The execution module is used to execute the data processing task through the first gateway if the approval result indicates that the second user has approved the data processing task, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user.
[0066] In another aspect, a data processing device is provided, the device being applied to a second client, the device comprising:
[0067] A second initiating module is used to initiate a creation request for a target data directory on the blockchain where the second user is located, wherein the creation request instructs the second user to create and publish the target data directory on the blockchain;
[0068] A second receiving module is used to receive an approval request for a data processing task sent by a blockchain node in the blockchain;
[0069] The data processing task is a task initiated by the first client on the blockchain, and the data processing task instructs the first user to request to obtain the target data corresponding to the target data directory of the second user;
[0070] An approval module is used to perform permission approval for the data processing task and return the approval result to the blockchain node; so that the blockchain node sends the data processing task to the first gateway when the approval result indicates that the approval is passed, and the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user;
[0071] Among them, the approval request instructs the second user to approve the permission for the data processing task; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway.
[0072] On the other hand, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the above-mentioned data processing method.
[0073] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned data processing method is implemented.
[0074] On the other hand, a computer program product is provided, comprising a computer program, wherein the computer program implements the above data processing method when executed by a processor.
[0075] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0076] The data processing method provided in the embodiment of the present application receives a data processing task initiated by a first client on a blockchain, wherein the task instructs the first user to request to obtain target data corresponding to a target data directory of a second user, and the target data directory is created and published on the blockchain by the second user who provides the target data; and sends an approval request to the second client to instruct the second user to perform permission approval for the task; since each user on the blockchain corresponds to a respective proxy gateway, if the approval result indicates that the second user has approved it, the data processing task can be sent to the first gateway of the first user, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user; in the above-mentioned data sharing process, since the control flows such as data application, approval, authorization, and task issuance are triggered and stored through the blockchain, authenticity, credibility, and traceability are ensured; and the data flows of data pulling and data sending are realized through the interaction between the respective independent proxy gateways, thereby decoupling the control flow from the data flow; this helps to improve the stability and convenience of the data processing process, thereby improving the practicality of data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in describing the embodiments of the present application.
[0078] Figure 1 A schematic diagram of a system architecture of a data processing method provided in an embodiment of the present application;
[0079] Figure 2 A schematic diagram of a blockchain network provided for an embodiment of the present application;
[0080] Figure 3 A flowchart of a data processing method provided in an embodiment of the present application;
[0081] Figure 4A schematic diagram of a target data directory provided in an embodiment of the present application;
[0082] Figure 5 A schematic diagram of a page for creating a new shared task provided in an embodiment of the present application;
[0083] Figure 6 A flowchart of a data processing task provided in an embodiment of the present application;
[0084] Figure 7 A flowchart of another data processing task provided in an embodiment of the present application;
[0085] Figure 8 A signaling interaction diagram of a data processing method provided in an embodiment of the present application;
[0086] Fig. 9 A schematic diagram of a data processing task flow provided in an embodiment of the present application;
[0087] Fig.10 A schematic diagram of a task termination process provided in an embodiment of the present application;
[0088] Fig.11 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;
[0089] Fig.12 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;
[0090] Fig.13 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;
[0091] Fig.14 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0092] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.
[0093] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said", and "the" used herein may also include plural forms. The terms "include" and "comprise" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, and operations, but do not exclude the implementation as other features, information, data, steps, operations, etc. supported by the technical field.
[0094] It is understandable that in the specific implementation of the present application, when the above embodiments of the present application are applied to specific products or technologies, any user-related data such as the target data directory, the user ID of the first user, the user ID of the second user, the first gateway ID, the second gateway ID, the target data, etc., need to obtain user permission or consent, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions. In other words, if any user-related data in the above techniques is involved in the embodiments of the present application, these data need to be obtained with the authorization and consent of the user and in compliance with the relevant laws, regulations and standards of the country and region.
[0095] Figure 1 A schematic diagram of the system architecture of a data processing method provided in this application. Figure 1 As shown, the system architecture includes: a blockchain 10, a first client 11, a second client 12, a first gateway 13, and a second gateway 14.
[0096] Among them, the blockchain 10 may include multiple blockchain nodes, such as blockchain node 101, blockchain node 102, blockchain node 103,..., blockchain node 104.
[0097] The users on the blockchain 10 include a first user and a second user; wherein the first user may be a data user, and the second user may be a data provider. The first client 11 and the second client 12 are the clients of the first user and the second user, respectively.
[0098] The client where each user is located provides a data trusted sharing function; for example, the first client or the second client can be a blockchain trusted computing platform (Blockchain Confidential Computing, BCC) that supports the data trusted sharing function; the blockchain trusted computing platform supports sharing of data corresponding to the data directory published on the blockchain, and utilizes the decentralized, tamper-proof, and traceable characteristics of the blockchain to provide trusted collaboration and management capabilities for data providers and data users to share data trustedly.
[0099] In a possible scenario example, a first user and a second user interact with the blockchain through their respective clients.
[0100] The second user may initiate a creation request on the blockchain 10 through the second client 12 to upload and publish the target data directory. For example, the target data directory and its creation information may be stored on a corresponding blockchain node in the blockchain 10.
[0101] Among them, the first user can initiate a data processing task on the blockchain 10 through the first client 11, and the data processing task instructs the first user to request to obtain the target data corresponding to the target data directory of the second user. The blockchain 10 can send an approval request for the data processing task to the second client 12 through the corresponding blockchain node to instruct the second user to perform permission approval for the data processing task.
[0102] Each user on the blockchain 10 corresponds to a respective proxy gateway; the first user corresponds to the first gateway 13, and the second user corresponds to the second gateway 14.
[0103] After the blockchain node sends an approval request to the second client 12 , if the approval result indicates that the second user has approved the data processing task, the blockchain node may send the data processing task to the first gateway 13 .
[0104] The first gateway 13 interacts with the second gateway of the second user to fetch target data.
[0105] Among them, the first gateway 13 may send a pull request to the second gateway 14. The second gateway 14 may send a verification request to the blockchain node based on the pull request to verify whether the first user has the right to use the target data directory through the blockchain 10; if the blockchain node returns a verification pass message, the second gateway 14 may pull the target data from the data source corresponding to the second user and send the target data to the first gateway 13. The first gateway 13 may store the target data in the database corresponding to the first user.
[0106] It should be noted that blockchain node: a network node in a blockchain distributed system is an electronic device connected through a network, such as a server, terminal, etc.
[0107] The device where the first client 11 and the second client 12 are located may be a server or a terminal. Figure 1 Only the server is used as an example for explanation.
[0108] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server or server cluster that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, digital broadcast receiver, desktop computer, vehicle-mounted terminal (such as vehicle-mounted navigation terminal, vehicle-mounted computer, etc.), smart speaker, smart watch, etc. The terminal and the server can be directly or indirectly connected by wired or wireless communication, and can also be determined based on the actual application scenario requirements, which is not limited here.
[0109] The method provided in the embodiment of the present application may involve blockchain technology, cloud technology, big data and other technologies. For example, the target data directory of the second user is uploaded to the blockchain and published using blockchain technology. The control flow-related processes such as data application, approval, and task issuance are processed through nodes in the blockchain.
[0110] It is understandable that blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc., with the characteristics of decentralization, tamper-proof, and traceability. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. In the blockchain, data can no longer be stored in a centralized hardware or management agency, but is jointly maintained by blockchain nodes with equal rights and obligations. Transaction data can be transmitted to each node through the network. The node can verify the validity of the transaction and count the corresponding block into its local blockchain if the verification is passed. Once the data is verified and added to the blockchain, it can be permanently stored. The consensus algorithm and hash chain data storage can be used to achieve data non-tampering in time, thereby ensuring the security and authenticity of the data.
[0111] For example, in Figure 2 The blockchain network 200 shown may include multiple nodes 201, and the multiple nodes 201 may be various electronic devices forming the blockchain network. Each node 201 can receive input information when performing normal work, and maintain the shared data in the blockchain network based on the received input information. In order to ensure the information intercommunication within the blockchain network, there may be an information connection between each node in the blockchain network, and information can be transmitted between nodes through the above information connection. For example, when any node in the blockchain network receives input information, other nodes in the blockchain network obtain the input information according to the consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes in the blockchain network are consistent.
[0112] Each node in the blockchain network has a corresponding node identifier, and each node in the blockchain network can store the node identifiers of other nodes, so that the generated blocks can be broadcast to other nodes in the blockchain network according to the node identifiers of other nodes.
[0113] It is understandable that cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model, which can form a resource pool and be used on demand, flexibly and conveniently. Cloud computing technology will become an important support. Cloud storage is a new concept extended and developed from the concept of cloud computing. Distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide data storage and business access functions to the outside world.
[0114] Figure 3 The following is a flow chart of a data processing method provided in an embodiment of the present application. The method is applied to a blockchain node, and the method can be specifically executed by an electronic device where the blockchain node is located. The following takes the execution subject as the electronic device as an example to illustrate the steps of the method. Figure 3 As shown, the method includes the following steps.
[0115] Step 301: The electronic device receives a data processing task initiated by a first client on the blockchain.
[0116] The data processing task instructs the first user to request to obtain target data corresponding to the target data directory of the second user.
[0117] Among them, the target data directory is created and published on the blockchain by the second user who provides the target data; each user on the blockchain corresponds to their own proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway.
[0118] In this application, each organization on the blockchain may correspond to its own independent control console, each control console may correspond to its own independent user, and each user may be a data provider or a data user. Exemplarily, the first client may be the control console where the first user is located. In this application, the first user may be a data user and the second user may be a data provider.
[0119] In this application, the second user may publish the data directory of the data provided by the second user on the blockchain in advance. In one possible implementation, before step 301, the second user may create and publish the target data directory on the blockchain, and the process includes the following steps A1-A3:
[0120] Step A1: The electronic device receives a creation request initiated by a second client on the blockchain.
[0121] The creation request instructs the second user to create and publish the target data directory on the blockchain. The creation request may carry the target data directory and creation information.
[0122] The creation information includes the user identification of the second user and the gateway identification of the second gateway. The creation information may also include the user signature of the second user.
[0123] Step A2: The electronic device creates the target data directory on the blockchain based on the creation request and stores the creation information of the target data directory.
[0124] For example, a data directory and creation information can be associated and stored on a blockchain node.
[0125] Step A3: The electronic device publishes the target data directory and its creation information in the data market of the blockchain.
[0126] Exemplarily, each user can subscribe to data in the data market through their own client; for example, a first user can subscribe to required data through a first client, so that when the required data is published on the data market, a corresponding data processing task can be initiated to apply for permission to use the required data.
[0127] It should be noted that the target data directory and its creation information stored on the blockchain can be published to the data market, so that data users on various control desks can browse through the data market which data providers have provided which data.
[0128] In one possible manner, the target data directory includes at least one of the following information:
[0129] A data login configuration indicating a login method of a data source where the target data is located;
[0130] Indicates the database instance name of the database instance corresponding to the data source of the target data;
[0131] Indicates the database name of the database corresponding to the target data in the database instance;
[0132] Indicates the data table name of the data table corresponding to the target data in the database;
[0133] Indicates the field names of each field contained in the data table;
[0134] The permission mode of the data corresponding to the target data directory.
[0135] Exemplarily, the data login configuration may be login configuration information for logging into a data source corresponding to the second user; the data source is a data source that stores the target data of the second user. The data source includes at least one database instance, each database instance may include at least one database, each database may include at least one data table, and each data table may include multiple fields. Based on this, the target data directory may be used to indicate the directory of fields included in the data source, database instance, database, data table, and data table in sequence. The target data directory does not include the actual data corresponding to the directory in the data source.
[0136] Figure 4 Schematic diagram of a target data directory provided by an embodiment of the present application. Figure 4 As shown, the target data directory may include basic information and metadata information. Among them, the basic information may include the directory identifier of the target data directory, such as the directory number; it may also include the permission mode, which can be configured as needed. For example, the permission mode may include a mode that requires application for permission or a mode that does not require application for permission. Of course, it may also include a permission range. Users within the permission range do not need to apply for permission, and users outside the range need to apply for permission. In addition, the basic information may also include the creation time, directory description, visible range, computing alliance to which it belongs, etc. Among them, the metadata information may include: database address, database instance, data table, field name, field type, field description of each field in the data table, etc., and of course, it may also include format type, database type, data connection, etc.
[0137] After the electronic device processes the above-mentioned target data directory on the chain, it can also publish the target data directory and its creation information, that is, the user identifier of the second user and the second gateway identifier corresponding to the second user, to the data market for other users to apply on demand.
[0138] In a possible implementation, the data processing task carries at least one of the following information:
[0139] The directory identifier of the target data directory;
[0140] The specified field name in the target data catalog;
[0141] The identification information of the first user, the first gateway identification, and the storage directory for storing the target data;
[0142] The identification information of the second user and the second gateway identification.
[0143] The directory identifier may be the number of the target data directory. In addition, the first user may also specify the field names of some fields required in the target data directory, that is, specify the field names. The storage directory refers to a directory in the database corresponding to the first user for storing the target data. The storage directory may include a database and a data table specified by the first user, for example, stored in a data table A1 under a database A specified by the first user.
[0144] It should be noted that the first user can initiate the data acquisition request on the first client to trigger the first client to create the data acquisition task on the blockchain. The data acquisition request can be a request for creating a new shared task, which refers to a task for sharing data corresponding to the data directory published by the blockchain.
[0145] Figure 5 1 is a schematic diagram of a page for creating a new shared task provided in an embodiment of the present application. The page may be a page in a first client. The first client may be a blockchain trusted sharing platform. Figure 5 As shown, the following information of the new shared task can be configured on this page: task name, alliance, task type, synchronization type, task description, etc. Among them, the alliance can be the name of the alliance chain where the user is located; the task type can include ordinary tasks, scheduled tasks, etc. The synchronization type can be the type of shared data, which can include full synchronization or non-full synchronization, etc. Full synchronization means synchronizing the full data under the target data directory, that is, all fields in the data table; if the user selects non-full, the required partial fields under the target data directory can be further specified. The task description can be the task details information for further notes on the task.
[0146] like Figure 5 As shown, task data and shared agent configuration can also be performed on this page. Among them, when configuring for the data provider, you can specifically select the user ID of the data provider, the ID of the required directory, the gateway ID of the proxy gateway, etc. When configuring for the data user, you can specifically select the user ID of the data user, the connection ID, and which data table to store in the database. Of course, you can also specify which field of data in the provider's data directory is required; in addition, you can also select the user's gateway ID. Among them, the connection ID can be an ID indicating a data connection, and the data connection can be a data connection created by the first user for receiving data. For example, the type of the connection can be a database, and the connection ID can be the IP address of the database. Of course, the database type corresponding to the connection can also be configured, such as MySQL, Oracle, etc. Furthermore, you can also add configurations for other dimensions of the data user by adding buttons, such as configuring the time to pull data, the update cycle, etc.; this application does not limit this.
[0147] Figure 5 After completing the configuration on this page, you can click the confirmation button to create a data trusted sharing task on the blockchain trusted sharing platform so that the platform can initiate the task on the blockchain.
[0148] In one possible implementation, the second user may first review the data processing task of the first user, and only after the review is passed, the target data is transmitted to the first gateway through the second gateway. Therefore, after receiving the data processing task initiated by the first client on the blockchain, the approval status of the task may also be recorded on the blockchain. Accordingly, the process may include: the electronic device stores the data processing task on the blockchain, and records the approval status of the data processing task as unapproved.
[0149] Step 302: The electronic device sends an approval request for the data processing task to the second client, and receives an approval result returned by the second client.
[0150] The approval request instructs the second user to perform permission approval for the data processing task.
[0151] In this step, the electronic device may send an approval request to the second client so that the second user can perform permission approval through the second client. When the second user completes the approval, the second client may return the approval result to the electronic device.
[0152] The approval result may include: the second user approves the data processing task, or the second user disapproves the data processing task. If approved, that is, the second user authorizes the first user to use the target data directory; if disapproved, that is, the second user does not authorize the first user to use the target data directory.
[0153] Exemplarily, the electronic device may publish a data usage authorization event for the data processing task on the blockchain based on the contract; the second user may perform an on-chain event detection process through the second client to obtain the data usage authorization event to be processed by the second user.
[0154] Among them, the on-chain event detection process may include: the second client subscribes to the data use authorization event on the blockchain, and if the data provider corresponding to the data use authorization event published on the blockchain is not the second user, the data use authorization event is discarded; if the data provider corresponding to the data use authorization event published on the blockchain is the second user, the data provider, that is, the second user, is notified to process the data use authorization event; when it is detected that the second user has completed the processing of the data use authorization event, the second client may send a message to the electronic device to update the authorization status. For example, if the second user authorizes the first user to have the right to use the target data directory, the electronic device updates the approval status of the data processing task on the blockchain to authorized.
[0155] In a possible implementation, the approval status of the task is also recorded on the blockchain. Accordingly, after receiving the approval result returned by the second client, the electronic device may further perform the following steps to update the approval status:
[0156] If the approval result indicates that the data processing task is approved, the electronic device updates the approval status of the data processing task from unapproved to approved.
[0157] If the approval result indicates that the first user has not approved the data processing task, the electronic device updates the approval status of the data processing task from not approved to not approved.
[0158] Step 303: If the approval result indicates that the second user approves the data processing task, the electronic device sends the data processing task to the first gateway, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user.
[0159] In this step, the electronic device may send the data processing task to be processed that is marked as authorized to the first gateway corresponding to the first user, and the first gateway will execute the data pulling process.
[0160] For example, the first gateway receives the data processing task, and sends a pull request to the second gateway based on the data processing task. The second gateway sends the target data to the first gateway based on the pull request.
[0161] Exemplarily, after the electronic device updates the approval status of the data processing task to authorized, the blockchain has authorized pending data processing tasks. The first gateway can subscribe to the pending data processing tasks in the authorized state on the blockchain, that is, the approved data processing tasks; the first gateway can further determine, for example, if it is determined that the data user corresponding to the data processing task is not the first user, then discard the data processing task; if it is determined that the data user corresponding to the data processing task is the first user, then send a pull request to the second gateway.
[0162] In a possible implementation, the second gateway may also first perform a permission check on the first user on the data link, and only transmit data to the first gateway after the verification is passed. Accordingly, after the electronic device sends the data processing task to the first gateway, the electronic device may also interact with the second gateway to complete the permission verification process triggered by the second gateway. The process includes the following steps B1-B2:
[0163] Step B1: The electronic device receives a verification request sent by the second gateway in response to a pull request from the first gateway.
[0164] The verification request indicates whether the first user has the permission to use the target data directory; the pull request instructs the first user to pull the target data corresponding to the target data directory.
[0165] Step B2: If the approval status of the data processing task is approved, the electronic device sends a verification pass message to the second gateway indicating that the first user has the right to use the target data directory.
[0166] The verification pass message indicates that the second user has authorized the first user to use the target data directory; that is, the second user has approved the data processing task, and the first user has the right to use the target data directory.
[0167] Among them, if the approval status of the data processing task is rejected, the electronic device sends a verification failed message to the second gateway, and the verification failed message indicates that the first user does not have the right to use the target data directory; that is, the second user does not authorize the first user to have the right to use the target data directory.
[0168] It should be noted that in the above data sharing process, the creation and application of the data directory are completed on the blockchain, that is, the control flow is executed on the blockchain; the acquisition of shared data is carried out through a bypass proxy gateway, that is, the data flow runs on the proxy gateway. Since the control flows such as data application, approval, authorization, and task issuance are triggered and stored through the blockchain, authenticity, credibility, and traceability are ensured; and the data flow of data pulling and data sending is separated from the control flow of the client through the interaction between the independent proxy gateways, that is, the decoupling of the control flow and the data flow is realized; it helps to improve the stability and maintainability of the platform, and thus improve the practicality of data processing.
[0169] In one possible approach, the proxy gateway to be used can be configured according to the attributes of each task to execute the data flow corresponding to the task. For example, the second gateway can be determined from multiple candidate gateways corresponding to the second user based on the data volume of the target data corresponding to the data processing task; the first gateway can also be determined from multiple candidate gateways corresponding to the first user based on the data volume; for example, the larger the data volume, the better the performance of the gateway. Based on this, the scalability of the platform can be enhanced, thereby improving the practicality of data processing.
[0170] Figure 6 This is a flowchart of a data processing task provided by an embodiment of the present application. The data processing task can be a trusted task initiated on the blockchain for data sharing, and the data processing task can also be called a trusted data sharing task. Specifically, it includes the creation, approval, issuance, execution, collaboration and control process of trusted data sharing tasks. Figure 6 As shown in the figure, each organization can have its own independent control console, each control console has its own independent users, each user can be a data provider or a data user, the control console can be connected to a MySQL database, and the control console can use Redis for local caching; each user can complete the creation of data directories and application for usage permissions on the blockchain based on the control console, that is, the control flow is executed on the blockchain, specifically, Figure 6 As shown, the process may include the following steps:
[0171] ① The data source provider provides a data directory: The data source provider can publish its own data directory information on the chain through the control console;
[0172] ②The data user creates a permission application task, that is, a task to apply for permission to use the required data directory and its fields.
[0173] ③ The data source provider approves: If the approval is passed, the data source provider can submit the approval result to the blockchain through the control console; for example, if the approval is passed, there is already a successfully approved data processing task to be processed on the blockchain;
[0174] ④ The proxy gateway of the data user can pull the successfully approved data processing tasks that need to be processed by the current proxy gateway;
[0175] ⑤ The data user's proxy gateway pulls the authorized required data through the data source provider's proxy gateway;
[0176] ⑥ The proxy gateway of the data source provider can first verify on the chain whether the proxy gateway of the data user has the authority to pull data; if the data user has the authority, the proxy gateway of the data source provider can pull data from the data source DB corresponding to the provider and forward the pulled data to the proxy gateway of the data user;
[0177] ⑦ The data user's proxy gateway receives the data source provider's proxy gateway and writes the data into the result user's database.
[0178] In some embodiments, during the process of the first gateway pulling target data from the second gateway, the first user or the second user may also trigger the termination of the data processing task, that is, the data pulling process is terminated. The process may include the following steps C1-C2:
[0179] Step C1: During the process of the first gateway pulling the target data based on the second gateway, if the electronic device receives a termination request initiated by the first client or the second client on the blockchain, the termination request is stored in the blockchain; the termination request indicates the termination of the data processing task;
[0180] Step C2: The electronic device sends a task termination event corresponding to the termination request to the second gateway, so that the second gateway terminates the process of sending the target data to the first gateway.
[0181] It should be noted that, through the above steps 301-303, after the data trusted sharing task is executed, the proxy gateway of the data user can continuously pull the authorized data through the proxy gateway of the data provider until the data pulling is completed.
[0182] During the data pulling process, if it is necessary to terminate the data trusted sharing task in advance, that is, to terminate the data processing task in advance, any party related to the task, including the data provider or the data user, can initiate a termination request for the data processing task.
[0183] Based on the termination request, the electronic device may send a termination event to the second gateway to trigger the second gateway to terminate sending the target data corresponding to the target data processing task.
[0184] In a possible implementation, the electronic device may also store the termination status corresponding to the data processing task on the blockchain. Accordingly, in step C1, after the electronic device receives the termination request initiated by the first client or the second client on the blockchain, the electronic device may record the termination status of the data processing task as pending termination, so as to mark the termination status of the data processing task in the blockchain. Accordingly, after the electronic device sends a task termination event corresponding to the termination request to the second gateway, the electronic device may update the termination status of the data processing task from pending termination to terminated.
[0185] Exemplarily, when the electronic device receives a termination request, it can trigger a task termination event on the blockchain according to the contract. The second gateway corresponding to the data provider can subscribe to the task termination event on the blockchain; the second gateway further determines, for example, if it determines that it is the proxy gateway where the data provider of the data processing task is located, then the data processing task is terminated, that is, it stops sending data to the gateway where the data user of the data processing task is located, that is, it stops sending data to the first gateway.
[0186] Figure 7 It is a flowchart of a data processing task provided by an embodiment of the present application. Specifically, it includes a data trusted sharing task termination management process. After the data trusted sharing task is executed, the proxy gateway of the data user will continuously pull the authorized data through the proxy gateway of the data provider until the data is pulled. If the data trusted sharing task needs to be terminated in advance, any party related to the task can initiate the termination of the data trusted sharing task.
[0187] like Figure 7 As shown, the process of terminating the trusted data sharing task may include the following steps:
[0188] ① The data provider or data user terminates the trusted data sharing task: The data provider or data user initiates a "Terminate trusted data sharing task" blockchain transaction, which marks the trusted data sharing task as "pending termination" and triggers a blockchain contract event;
[0189] ② The proxy gateway of the data source provider subscribes to the termination event: All data proxy gateways can subscribe to this contract event, but only the data provider of the task has the right to process it. The data proxy gateways of other data users will ignore the event.
[0190] ③After subscribing to the event, the data provider’s data proxy gateway will stop pushing data to the data user’s data proxy gateway and mark the task status as “terminated” on the chain.
[0191] The data processing method provided in the embodiment of the present application receives a data processing task initiated by a first client on a blockchain, wherein the task instructs the first user to request to obtain target data corresponding to a target data directory of a second user, and the target data directory is created and published on the blockchain by the second user who provides the target data; and sends an approval request to the second client to instruct the second user to perform permission approval for the task; since each user on the blockchain corresponds to a respective proxy gateway, if the approval result indicates that the second user has approved it, the data processing task can be sent to the first gateway of the first user, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user; in the above-mentioned data sharing process, since the control flows such as data application, approval, authorization, and task issuance are triggered and stored through the blockchain, authenticity, credibility, and traceability are ensured; and the data flows of data pulling and data sending are realized through the interaction between the respective independent proxy gateways, thereby decoupling the control flow from the data flow; this helps to improve the stability and convenience of the data processing process, thereby improving the practicality of data processing.
[0192] Figure 8 Schematic diagram of signaling interaction of a data processing method provided by this application. Figure 8 As shown, the data processing method can be implemented by interaction between the blockchain node, the first client, and the second client. The signaling interaction process includes the following steps:
[0193] Step 801: The second client initiates a creation request for a target data directory on the blockchain where the second user is located, and the creation request instructs the second user to create and publish the target data directory on the blockchain;
[0194] Step 802: The blockchain node receives a creation request initiated by the second client on the blockchain, creates the target data directory on the blockchain based on the creation request, and stores creation information of the target data directory.
[0195] The creation request instructs the second user to create and publish the target data directory on the blockchain; the creation information includes a user identifier of the second user and a gateway identifier of the second gateway.
[0196] Step 803: The blockchain node publishes the target data directory and its creation information in the data market of the blockchain.
[0197] Step 804: The first client obtains at least one data directory published on the blockchain where the first user is located, and the at least one data directory includes a target data directory;
[0198] The target data directory is created and published on the blockchain by the second user who provides the target data; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway;
[0199] Step 805: The first client initiates a data processing task for the target data directory on the blockchain;
[0200] Step 806: The blockchain node receives a data processing task initiated by the first client on the blockchain, where the data processing task indicates that the first user requests to obtain target data corresponding to the target data directory of the second user;
[0201] The target data directory is created and published on the blockchain by the second user who provides the target data; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway;
[0202] Step 807: The blockchain node sends an approval request for the data processing task to the second client, where the approval request instructs the second user to perform permission approval for the data processing task.
[0203] Step 808: The second client receives an approval request for the data processing task sent by the blockchain node in the blockchain;
[0204] The data processing task is a task initiated by the first client on the blockchain, and the data processing task instructs the first user to request to obtain the target data corresponding to the target data directory of the second user;
[0205] Step 809: The second client performs permission approval for the data processing task and returns the approval result to the blockchain node;
[0206] Step 810: The blockchain node receives the approval result returned by the second client.
[0207] Step 811: If the approval result indicates that the second user has approved the data processing task, the blockchain node sends the data processing task to the first gateway, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user.
[0208] Correspondingly, corresponding to the first client side, if the approval result indicates that the second user has approved the data processing task, the blockchain node can be executed through step 811 to send the data processing task to the first gateway, so that the first client can execute the data processing task through the first gateway, so that the first gateway can pull the target data corresponding to the target data directory based on the second gateway of the second user.
[0209] The process in which the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user may include the following steps:
[0210] The first gateway receives the data processing task, and the second gateway sends a pull request;
[0211] The second gateway sends a verification request to the blockchain node based on the pull request of the first gateway; if the verification is successful, the target data is sent to the first gateway; wherein the verification request indicates whether the first user has the right to use the target data directory;
[0212] The first gateway receives the target data, and stores the target data in a result database corresponding to the first user.
[0213] It should be noted that through the above steps 801-811, the decentralized, tamper-proof and traceable characteristics of the blockchain itself are effectively utilized to provide trusted collaboration and management capabilities for data providers and data users to share data in a trusted manner. By putting the directory of available target data on the chain and publishing it on the data market, data users can apply for data on the blockchain according to their needs, and data providers can review and approve it; after approval, data users can use their own data proxy gateway to obtain the approved data from the data provider's proxy gateway; in this process, the entire process of data application, approval, authorization, task execution, data acquisition, etc., is triggered by the blockchain and leaves traces on the blockchain throughout the process, which is traceable.
[0214] The following is the Fig. 9 The process shown in FIG. 8 further introduces the process of steps 801-811 above. Fig. 9 As shown, Fig. 9 The process shown in the figure mainly includes: creating a data directory on the blockchain, applying for and approving data usage rights, and issuing and executing data trusted sharing tasks. Fig. 9 As shown, the second client corresponding to the data provider can be control station A, and the control station B corresponding to the data user can be a blockchain trusted computing platform. These processes may include the following processes:
[0215] like Fig. 9 As shown, the data directory creation process may include the following steps 1-2:
[0216] 1. The data source provider provides a data directory: The data source provider can create a data directory on the control console A;
[0217] 2. Control desk A can upload the data directory to the chain and publish it to the data market;
[0218] like Fig. 9 As shown, the application and approval process for data usage rights may include the following steps 3-13:
[0219] 3. The data user applies for data permissions at control station B;
[0220] 4. Control station B creates a permission application task on the regional chain, that is, a task to apply for permission to use the required data directory and its fields.
[0221] 5. The blockchain node triggers a data use authorization event;
[0222] Console A can subscribe to on-chain events and perform the following steps 6-7 based on the subscription:
[0223] 6. Control station A subscribes to the data use authorization event on the blockchain;
[0224] 7. If the data provider is not the current console user, discard the event; if so, continue to execute the subsequent steps;
[0225] 8. Control station A notifies the data provider to handle the data use authorization event;
[0226] 9. The data provider handles the data use authorization event;
[0227] 10. The processing result may be to refuse authorization or to agree to authorization;
[0228] 11. If the authorization is agreed, the data usage permission task is authorized, and the authorization status of the data usage permission task is updated on the blockchain;
[0229] The data user's proxy gateway, that is, the agency B proxy gateway, can subscribe to the on-chain event and perform the following steps 12-13 based on the subscription:
[0230] 12. The proxy gateway of institution B can subscribe to the data processing tasks to be processed in the authorized state on the blockchain;
[0231] 13. If it is determined that the data user corresponding to the data processing task is not the user of the current control console, the data processing task is discarded; if so, continue to execute the subsequent steps;
[0232] 14. The proxy gateway of organization B can send a pull request to the proxy gateway of the data provider, which is the proxy gateway of organization A;
[0233] 15. The proxy gateway of Institution A verifies the identity of the data pull initiator;
[0234] 16. If the verification is successful, the proxy gateway of institution A verifies from the chain whether the proxy gateway of the data user has the authority to pull data;
[0235] 17. If the data user does not have the authority, that is, is not authorized, no processing will be done; if authorized, that is, the data user has the authority, proceed to step 18;
[0236] 18. The proxy gateway of Institution A pulls data from the database of the data source;
[0237] 19. The proxy gateway of organization A pushes the pulled data to the proxy gateway of organization B;
[0238] 20. The proxy gateway of Institution B receives the data and stores it in the database designated by the user.
[0239] In addition, the first client or the second client may also trigger the termination of the data processing task.
[0240] Below Fig.10 The process shown in the figure further introduces the above-mentioned step termination process. Fig.10 As shown, Fig.10 The process shown mainly includes the data trusted sharing task termination process. The process may include the following processes:
[0241] 1. The data provider initiates a task termination request on control console A;
[0242] 2. Control Station A will terminate the task transaction on the chain;
[0243] 3. The blockchain node triggers the termination task;
[0244] The termination can also be initiated by the data user, and steps 1 and 2 can be replaced by: the data user initiates a task termination request at control station B; control station B uploads the task termination transaction to the chain;
[0245] 4. The proxy gateway of institution A corresponding to the data provider can subscribe to the task termination event on the blockchain;
[0246] 5. If the proxy gateway of institution A determines that it is not the gateway corresponding to the data provider corresponding to the task, it will discard the task termination event; if it is, it will continue to execute the subsequent steps;
[0247] 6. The proxy gateway of institution A terminates all data push for this task.
[0248] Fig.11 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application. Fig.11 As shown, the device comprises:
[0249] The first receiving module 1101 is used to receive a data processing task initiated by the first client on the blockchain, where the data processing task indicates that the first user requests to obtain target data corresponding to the target data directory of the second user;
[0250] The target data directory is created and published on the blockchain by the second user who provides the target data; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway;
[0251] The first sending module 1102 is used to send an approval request for the data processing task to the second client, and receive an approval result returned by the second client, wherein the approval request instructs the second user to perform permission approval for the data processing task;
[0252] The second sending module 1103 is used to send the data processing task to the first gateway if the approval result indicates that the second user approves the data processing task, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user.
[0253] In a possible implementation, before receiving the data processing task initiated by the first client on the blockchain, the device further includes:
[0254] A creation request receiving module, configured to receive a creation request initiated by a second client on the blockchain, wherein the creation request instructs the second user to create and publish the target data directory on the blockchain;
[0255] a creation module, configured to create the target data directory on the blockchain based on the creation request, and store creation information of the target data directory, the creation information including a user identifier of the second user and a gateway identifier of the second gateway;
[0256] The publishing module is used to publish the target data directory and its creation information in the data market of the blockchain.
[0257] In a possible implementation, after receiving the data processing task initiated by the first client on the blockchain, the device further includes:
[0258] A task storage module, used to store the data processing task in the blockchain;
[0259] The approval status recording module is used to record that the approval status of the data processing task is not approved;
[0260] After receiving the approval result returned by the second client, the device further includes:
[0261] The approval status update module is used to update the approval status of the data processing task from unapproved to approved if the approval result indicates that the data processing task is approved.
[0262] In a possible implementation, after sending the data processing task to the first gateway, the apparatus further includes:
[0263] A verification request receiving module, configured to receive a verification request sent by the second gateway in response to the pull request of the first gateway, the verification request indicating whether the first user has permission to use the target data directory;
[0264] The pull request instructs the first user to pull the target data corresponding to the target data directory;
[0265] The verification pass message sending module is used to send a verification pass message indicating that the first user has the right to use the target data directory to the second gateway if the approval status of the data processing task is approved.
[0266] In one possible implementation, the device further includes:
[0267] A termination request storage module, configured to store a termination request in the blockchain if a termination request initiated by the first client or the second client on the blockchain is received during the process of the first gateway pulling the target data based on the second gateway; the termination request indicates the termination of the data processing task;
[0268] The termination event sending module is used to send a task termination event corresponding to the termination request to the second gateway, so that the second gateway terminates the process of sending the target data to the first gateway.
[0269] In a possible implementation, if a termination request initiated by the first client or the second client on the blockchain is received, after the termination request is stored on the blockchain, the device further includes:
[0270] A termination status recording module, used to record the termination status of the data processing task as pending termination;
[0271] After sending the task termination event corresponding to the termination request to the second gateway, the device further includes:
[0272] The termination status updating module is used to update the termination status of the data processing task from pending termination to terminated.
[0273] In a possible implementation, the target data directory includes at least one of the following information:
[0274] A data login configuration indicating a login method of a data source where the target data is located;
[0275] Indicates the database instance name of the database instance corresponding to the data source of the target data;
[0276] Indicates the database name of the database corresponding to the target data in the database instance;
[0277] Indicates the data table name of the data table corresponding to the target data in the database;
[0278] Indicates the field names of each field contained in the data table;
[0279] The permission mode of the data corresponding to the target data directory.
[0280] In a possible implementation, the data processing task carries at least one of the following information:
[0281] The directory identifier of the target data directory;
[0282] The specified field name in the target data catalog;
[0283] The identification information of the first user, the first gateway identification, and the storage directory for storing the target data;
[0284] The identification information of the second user and the second gateway identification.
[0285] The data processing method provided in the embodiment of the present application receives a data processing task initiated by a first client on a blockchain, wherein the task instructs the first user to request to obtain target data corresponding to a target data directory of a second user, and the target data directory is created and published on the blockchain by the second user who provides the target data; and sends an approval request to the second client to instruct the second user to perform permission approval for the task; since each user on the blockchain corresponds to a respective proxy gateway, if the approval result indicates that the second user has approved it, the data processing task can be sent to the first gateway of the first user, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user; in the above-mentioned data sharing process, since the control flows such as data application, approval, authorization, and task issuance are triggered and stored through the blockchain, authenticity, credibility, and traceability are ensured; and the data flows of data pulling and data sending are realized through the interaction between the respective independent proxy gateways, thereby decoupling the control flow from the data flow; this helps to improve the stability and convenience of the data processing process, thereby improving the practicality of data processing.
[0286] Fig.12 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application. Fig.12 As shown, the device comprises:
[0287] A first acquisition module 1201 is used to acquire at least one data directory published on the blockchain where the first user is located, and the at least one data directory includes a target data directory;
[0288] The target data directory is created and published on the blockchain by the second user who provides the target data; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway;
[0289] A first initiating module 1202 is used to initiate a data processing task for the target data directory on the blockchain, so that the blockchain node in the blockchain sends an approval request for the data processing task to the second client;
[0290] The data processing task instructs the first user to request to obtain the target data corresponding to the target data directory of the second user; the approval request instructs the second user to perform permission approval for the data processing task;
[0291] The execution module 1203 is used to execute the data processing task through the first gateway if the approval result indicates that the second user approves the data processing task, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user.
[0292] The data processing method provided in the embodiment of the present application receives a data processing task initiated by a first client on a blockchain, wherein the task instructs the first user to request to obtain target data corresponding to a target data directory of a second user, and the target data directory is created and published on the blockchain by the second user who provides the target data; and sends an approval request to the second client to instruct the second user to perform permission approval for the task; since each user on the blockchain corresponds to a respective proxy gateway, if the approval result indicates that the second user has approved it, the data processing task can be sent to the first gateway of the first user, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user; in the above-mentioned data sharing process, since the control flows such as data application, approval, authorization, and task issuance are triggered and stored through the blockchain, authenticity, credibility, and traceability are ensured; and the data flows of data pulling and data sending are realized through the interaction between the respective independent proxy gateways, thereby decoupling the control flow from the data flow; this helps to improve the stability and convenience of the data processing process, thereby improving the practicality of data processing.
[0293] Fig.13 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application. Fig.13 As shown, the device comprises:
[0294] The second initiating module 1301 is used to initiate a creation request for a target data directory on the blockchain where the second user is located, and the creation request instructs the second user to create and publish the target data directory on the blockchain;
[0295] The second receiving module 1302 is used to receive an approval request for a data processing task sent by a blockchain node in the blockchain;
[0296] The data processing task is a task initiated by the first client on the blockchain, and the data processing task instructs the first user to request to obtain the target data corresponding to the target data directory of the second user;
[0297] The approval module 1303 is used to perform permission approval for the data processing task and return the approval result to the blockchain node; so that the blockchain node sends the data processing task to the first gateway when the approval result indicates that the approval is passed, and the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user;
[0298] Among them, the approval request instructs the second user to approve the permission for the data processing task; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway.
[0299] The data processing method provided in the embodiment of the present application receives a data processing task initiated by a first client on a blockchain, wherein the task instructs the first user to request to obtain target data corresponding to a target data directory of a second user, and the target data directory is created and published on the blockchain by the second user who provides the target data; and sends an approval request to the second client to instruct the second user to perform permission approval for the task; since each user on the blockchain corresponds to a respective proxy gateway, if the approval result indicates that the second user has approved it, the data processing task can be sent to the first gateway of the first user, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user; in the above-mentioned data sharing process, since the control flows such as data application, approval, authorization, and task issuance are triggered and stored through the blockchain, authenticity, credibility, and traceability are ensured; and the data flows of data pulling and data sending are realized through the interaction between the respective independent proxy gateways, thereby decoupling the control flow from the data flow; this helps to improve the stability and convenience of the data processing process, thereby improving the practicality of data processing.
[0300] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.
[0301] Fig.14 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.14 As shown, the electronic device includes: a memory, a processor and a computer program stored in the memory, and the processor executes the above computer program to implement the steps of the data processing method. Compared with the related art, it can achieve:
[0302] The data processing method provided in the embodiment of the present application receives a data processing task initiated by a first client on a blockchain, wherein the task instructs the first user to request to obtain target data corresponding to a target data directory of a second user, and the target data directory is created and published on the blockchain by the second user who provides the target data; and sends an approval request to the second client to instruct the second user to perform permission approval for the task; since each user on the blockchain corresponds to a respective proxy gateway, if the approval result indicates that the second user has approved it, the data processing task can be sent to the first gateway of the first user, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user; in the above-mentioned data sharing process, since the control flows such as data application, approval, authorization, and task issuance are triggered and stored through the blockchain, authenticity, credibility, and traceability are ensured; and the data flows of data pulling and data sending are realized through the interaction between the respective independent proxy gateways, thereby decoupling the control flow from the data flow; this helps to improve the stability and convenience of the data processing process, thereby improving the practicality of data processing.
[0303] In an alternative embodiment, an electronic device is provided, such as Fig.14 As shown, Fig.14 The electronic device 1400 shown includes: a processor 1401 and a memory 1403. The processor 1401 and the memory 1403 are connected, such as through a bus 1402. Optionally, the electronic device 1400 may also include a transceiver 1404, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 1404 is not limited to one, and the structure of the electronic device 1400 does not constitute a limitation on the embodiments of the present application.
[0304] Processor 1401 may be a CPU (Central Processing Unit), a general purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 1401 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0305] The bus 1402 may include a path to transmit information between the above components. The bus 1402 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 1402 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.14 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0306] The memory 1403 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage medium\other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.
[0307] The memory 1403 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 1401. The processor 1401 is used to execute the computer program stored in the memory 1403 to implement the steps shown in the above method embodiment.
[0308] Among them, electronic equipment includes but is not limited to: servers, terminals or cloud computing center equipment, etc.
[0309] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.
[0310] The embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor.
[0311] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said", and "the" used herein may also include plural forms. The terms "include" and "comprise" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, and operations, but do not exclude the implementation as other features, information, data, steps, operations, etc. supported by the technical field.
[0312] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in the drawings.
[0313] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.
[0314] The above is only an optional implementation method for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.
Claims
1. A data processing method, characterized in that: The method comprises: Receiving a data processing task initiated by a first client on a blockchain, wherein the data processing task indicates that the first user requests to obtain target data corresponding to a target data directory of a second user; The target data directory is created and published on the blockchain by the second user who provides the target data; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway; Sending an approval request for the data processing task to the second client, and receiving an approval result returned by the second client, wherein the approval request instructs the second user to perform permission approval for the data processing task; If the approval result indicates that the second user approves the data processing task, the data processing task is sent to the first gateway, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user.
2. The method according to claim 1, characterized in that Before receiving the data processing task initiated by the first client on the blockchain, the method further includes: Receiving a creation request initiated by a second client on the blockchain, wherein the creation request instructs the second user to create and publish the target data directory on the blockchain; Based on the creation request, create the target data directory on the blockchain, and store creation information of the target data directory, wherein the creation information includes a user identifier of the second user and a gateway identifier of the second gateway; The target data directory and its creation information are published in the data market of the blockchain.
3. The method according to claim 1, characterized in that After receiving the data processing task initiated by the first client on the blockchain, the method further includes: Storing the data processing task in the blockchain, and recording the approval status of the data processing task as unapproved; After receiving the approval result returned by the second client, the method further includes: If the approval result indicates that the data processing task is approved, the approval status of the data processing task is updated from unapproved to approved.
4. The method according to claim 3, characterized in that: After sending the data processing task to the first gateway, the method further includes: receiving a verification request sent by the second gateway in response to the pull request of the first gateway, the verification request indicating whether the first user has permission to use the target data directory; The pull request instructs the first user to pull the target data corresponding to the target data directory; If the approval status of the data processing task is approved, a verification pass message is sent to the second gateway, indicating that the first user has the right to use the target data directory.
5. The method according to claim 1, characterized in that The method further comprises: In the process of the first gateway pulling the target data based on the second gateway, if a termination request initiated by the first client or the second client on the blockchain is received, the termination request is stored in the blockchain; the termination request indicates the termination of the data processing task; A task termination event corresponding to the termination request is sent to the second gateway, so that the second gateway terminates the process of sending the target data to the first gateway.
6. The method according to claim 5, characterized in that If a termination request initiated by the first client or the second client on the blockchain is received, after the blockchain stores the termination request, the method further includes: Recording the termination status of the data processing task as pending termination; After sending the task termination event corresponding to the termination request to the second gateway, the method further includes: The termination status of the data processing task is updated from pending termination to terminated.
7. The method according to any one of claims 1 to 6, characterized in that The target data directory includes at least one of the following information: A data login configuration indicating a login method of a data source where the target data is located; Indicates the database instance name of the database instance corresponding to the data source of the target data; Indicates the database name of the database corresponding to the target data in the database instance; Indicates the data table name of the data table corresponding to the target data in the database; Indicates the field name of each field contained in the data table; The permission mode of the data corresponding to the target data directory.
8. The method according to any one of claims 1 to 6, characterized in that The data processing task carries at least one of the following information: The directory identifier of the target data directory; The specified field name in the target data directory; The identification information of the first user, the first gateway identification, and the storage directory for storing the target data; The identification information of the second user and the second gateway identification.
9. A data processing method, characterized in that: The method is applied to a first client, and the method includes: Obtain at least one data directory published on the blockchain where the first user is located, wherein the at least one data directory includes a target data directory; The target data directory is created and published on the blockchain by the second user who provides the target data; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway; Initiating a data processing task for the target data directory on the blockchain, so that the blockchain node in the blockchain sends an approval request for the data processing task to the second client; The data processing task instructs the first user to request to obtain the target data corresponding to the target data directory of the second user; the approval request instructs the second user to perform permission approval for the data processing task; If the approval result indicates that the second user approves the data processing task, the data processing task is executed through the first gateway, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user.
10. A data processing method, characterized in that: The method is applied to a second client, and the method includes: Initiate a creation request for a target data directory on the blockchain where the second user is located, wherein the creation request instructs the second user to create and publish the target data directory on the blockchain; Receive approval requests for data processing tasks sent by blockchain nodes in the blockchain; The data processing task is a task initiated by the first client on the blockchain, and the data processing task instructs the first user to request to obtain the target data corresponding to the target data directory of the second user; Performing permission approval for the data processing task and returning the approval result to the blockchain node; so that the blockchain node sends the data processing task to the first gateway when the approval result indicates approval, and the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user; Among them, the approval request instructs the second user to approve the permission for the data processing task; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway.
11. A data processing device, characterized in that: The device comprises: A first receiving module is used to receive a data processing task initiated by a first client on the blockchain, wherein the data processing task indicates that the first user requests to obtain target data corresponding to a target data directory of a second user; The target data directory is created and published on the blockchain by the second user who provides the target data; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway; A first sending module is used to send an approval request for the data processing task to the second client, and receive an approval result returned by the second client, wherein the approval request instructs the second user to perform permission approval for the data processing task; The second sending module is used to send the data processing task to the first gateway if the approval result indicates that the second user approves the data processing task, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user.
12. A data processing device, characterized in that: The device is applied to a first client, and the device includes: A first acquisition module, configured to acquire at least one data directory published on the blockchain where the first user is located, wherein the at least one data directory includes a target data directory; The target data directory is created and published on the blockchain by the second user who provides the target data; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway; A first initiating module, configured to initiate a data processing task for the target data directory on the blockchain, so that a blockchain node in the blockchain sends an approval request for the data processing task to a second client; The data processing task instructs the first user to request to obtain the target data corresponding to the target data directory of the second user; the approval request instructs the second user to perform permission approval for the data processing task; The execution module is used to execute the data processing task through the first gateway if the approval result indicates that the second user has approved the data processing task, so that the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user.
13. A data processing device, characterized in that: The device is applied to a second client, and the device includes: A second initiating module is used to initiate a creation request for a target data directory on the blockchain where the second user is located, wherein the creation request instructs the second user to create and publish the target data directory on the blockchain; A second receiving module is used to receive an approval request for a data processing task sent by a blockchain node in the blockchain; The data processing task is a task initiated by the first client on the blockchain, and the data processing task instructs the first user to request to obtain the target data corresponding to the target data directory of the second user; An approval module is used to perform permission approval for the data processing task and return the approval result to the blockchain node; so that the blockchain node sends the data processing task to the first gateway when the approval result indicates that the approval is passed, and the first gateway pulls the target data corresponding to the target data directory based on the second gateway of the second user; Among them, the approval request instructs the second user to approve the permission for the data processing task; each user on the blockchain corresponds to a respective proxy gateway; the first user corresponds to the first gateway, and the second user corresponds to the second gateway.
14. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the data processing method according to any one of claims 1 to 10.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data processing method according to any one of claims 1 to 10 is implemented.