Data Processing Method, Apparatus, Device, and Medium
By receiving and verifying data query requests and only sending compliant data, the problem of data leakage on-chain transactions is solved, and the security and privacy protection of blockchain data is improved.
Patent Information
- Application Number
- CN202010820392.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-14
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2040-08-14
AI Technical Summary
The transaction data that has been linked cannot be modified in the blockchain network, resulting in a high risk of transaction data leakage and the existing technology cannot effectively protect data security.
By receiving data query requests and determining that the target transaction data is compliant data, the data will be sent. The compliance status mark value and the supervision system are used for supervision to avoid the leakage of non-compliant data.
It realizes that only sending compliant data is avoided, and the leakage of non-compliant transaction data is improved, and the security and privacy protection of blockchain data is improved.
Smart Images

Figure CN112000713B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to a data processing method, apparatus, device and medium. Background Art
[0002] Blockchain technology is a distributed database technology that uses cryptography and consensus mechanisms to ensure the immutability and non-forgery of data. With the development of computer and Internet technologies, blockchain technology has been highly favored for its advantages of decentralization, openness, transparency, immutability, and trustworthiness, and has been widely applied in many fields such as smart contracts, securities trading, e-commerce, Internet of Things, social communication, file storage, proof of existence, identity verification, and equity crowdfunding.
[0003] To ensure the data security of the blockchain, once data is uploaded to the chain, it cannot be modified. After the transaction-related parties upload the transaction data to the chain, if the uploaded transaction data is not protected, it may cause the leakage of the transaction data of the transaction-related parties. Summary of the Invention
[0004] Embodiments of the present invention provide a data processing method, apparatus, device and medium, which can avoid the leakage of uploaded transaction data.
[0005] In a first aspect, an embodiment of the present invention provides a data processing method, including:
[0006] Receiving a data query request sent by a data query node; wherein, the data query request is used to query target transaction data;
[0007] In response to the data query request, when it is determined that the target transaction data is compliant data, obtaining the target transaction data;
[0008] Sending the target transaction data to the data query node.
[0009] In a second aspect, an embodiment of the present invention provides a data processing apparatus, including:
[0010] A first receiving module, configured to receive a data query request sent by a data query node; wherein, the data query request is used to query target transaction data;
[0011] A first obtaining module, configured to, in response to the data query request, when it is determined that the target transaction data is compliant data, obtain the target transaction data;
[0012] A first sending module, configured to send the target transaction data to the data query node.
[0013] In a third aspect, an embodiment of the present invention provides a data processing device, which includes: a processor and a memory storing computer program instructions;
[0014] When the processor executes the computer program instructions, the data processing method described in the first aspect is implemented.
[0015] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the data processing method described in the first aspect is implemented.
[0016] For the data processing method, apparatus, device, and medium according to the embodiments of the present invention, after receiving a data query request for querying target transaction data sent by a data query node, if it is determined that the target transaction data is compliant data, the target transaction data is obtained and sent to the data query node. Therefore, after receiving the data query request sent by the data query node, only the compliant data can be sent to the data query node, avoiding the leakage of non-compliant transaction data. Description of the Drawings
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required to be used in the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0018] Figure 1 is an architecture diagram of data processing provided by an embodiment of the present invention;
[0019] Figure 2 is an architecture diagram of data processing provided by another embodiment of the present invention;
[0020] Figure 3 is an architecture diagram of data processing provided by still another embodiment of the present invention;
[0021] Figure 4 is an architecture diagram of data processing provided by yet another embodiment of the present invention;
[0022] Figure 5 is a schematic flowchart of the data processing method provided by an embodiment of the present invention;
[0023] Figure 6 is a schematic structural diagram of the data processing apparatus provided by an embodiment of the present invention;
[0024] Figure 7 is a schematic hardware structure diagram of the data processing device provided by an embodiment of the present invention. Detailed Embodiments
[0025] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. To make the objectives, technical solutions, and advantages of the present invention more clear, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by showing examples of the present invention.
[0026] It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, the elements defined by the statement "comprising..." do not exclude the presence of additional identical elements in the process, method, article or device including the said elements.
[0027] The data processing method provided by the present invention can be applied to an architecture such as Figures 1 to 4 and will be described in detail in combination with Figures 1 to 4 specifically.
[0028] Figure 1 FIG. shows an architecture diagram of data processing provided by an embodiment of the present invention. As Figure 1 shown, this architecture can be applied to a blockchain network. The architecture diagram may include a user contract 110 and a regulatory encapsulation interface 120, where the regulatory encapsulation interface 120 includes a call to a regulatory instance 121.
[0029] Among them, the user contract 110 can communicate with a data query node. The data query node can be an electronic device or a server. The electronic device can be a device with a communication function such as a mobile phone, a tablet computer, a desktop computer, a vehicle-mounted terminal, and a wearable device. The server can be a cloud server or a server cluster and other devices with storage and computing functions.
[0030] In some embodiments, the blockchain network can be a Blockchain-based Service Network (BSN).
[0031] Continue to refer to Figure 1, the data query node can respond to a data query instruction issued by a user for querying target transaction data, generate a data query request corresponding to the data query instruction, and call a supervision encapsulation interface 120 through a user contract 110, so that a called supervision instance 121 receives the data query request for querying the target transaction data.
[0032] The called supervision instance 121 can receive the data query request sent by the data query node, and in response to the data query request, when determining that the target transaction data is compliant data, obtain the target transaction data to send the target transaction data to the data query node.
[0033] Therefore, after receiving the data query request sent by the data query node, only the compliant data can be sent to the data query node to avoid the leakage of non-compliant transaction data.
[0034] Figure 2 shows an architecture diagram of data processing provided by another embodiment of the present invention. As Figure 2 shown, the architecture diagram may include a user contract 110, a supervision encapsulation interface 120, and a status database 130. Among them, the supervision encapsulation interface 120 may be formed by encapsulating a called supervision instance 121 and a native data interface 122.
[0035] It should be noted that Figure 2 the principles of the user contract 110 and the called supervision instance 121 in the shown architecture are similar to those of the user contract 110 and the called supervision instance 121 in the Figure 1 shown architecture, and will not be elaborated here.
[0036] The status database 130 may be a database in a distributed ledger. The called supervision instance 121 can communicate with the status database 130 by calling the native data interface 122, so as to implement the acquisition and storage of compliance status marker values.
[0037] The status database 130 may pre-store multiple compliance status marker values. The called supervision instance 121 can call the status database to make the status database query the compliance status marker value corresponding to the target string, and after receiving the compliance status marker value corresponding to the target transaction data, when the received compliance status marker value is the target value, determine that the target transaction data is compliant data.
[0038] Therefore, the compliance status marker value corresponding to each transaction data that has been chained can be stored in the status database, and the compliance status marker value can be used to determine whether each transaction data that has been chained is compliant data.
[0039] Figure 3 shows an architecture diagram of data processing provided by yet another embodiment of the present invention. AsFigure 3 As shown, the architecture diagram may include a user contract 110, a regulatory encapsulation interface 120, a state database 130, and a regulatory contract 140. Among them, the regulatory encapsulation interface 120 may be formed by encapsulating a call regulatory instance 121 and a native data interface 122.
[0040] It should be noted that Figure 3 the principles of the user contract 110, the state database 130, and the call regulatory instance 121 in the architecture shown Figure 2 are similar to those of the user contract 110, the state database 130, and the call regulatory instance 121 in the architecture shown, and will not be elaborated here.
[0041] The call regulatory instance 121 can also communicate with the regulatory contract 140. The call regulatory instance 121 can also communicate with the state database 130 by calling the native data interface 122, so as to realize the acquisition and storage of target transaction data.
[0042] In some embodiments, before storing the target transaction data in the state database 130 through the native data interface 122, the call regulatory instance 121 can also call the regulatory contract 140 to detect the target data in the target transaction data through the regulatory contract 140 to obtain a regulatory result, so that the call regulatory instance 121 can store the compliance status flag value corresponding to the regulatory result and the target transaction data in the state database 130 when the regulatory result is that the target data does not exist in the target transaction data.
[0043] In other embodiments, when the target transaction data is transaction data that has been chained, the call regulatory instance 121 can also call the regulatory contract 140 to detect the target data in the target transaction data through the regulatory contract 140 to obtain a regulatory result, so that the call regulatory instance 121 can store the compliance status flag value corresponding to the regulatory result and the target transaction data in the state database 130.
[0044] Among them, the target data can be a preset keyword, such as a sensitive word.
[0045] Therefore, before or after chaining the transaction data, it is possible to screen for target data such as sensitive words in the transaction data to avoid leakage of the transaction data.
[0046] Figure 4 shows an architecture diagram of data processing provided by still another embodiment of the present invention. As Figure 3As shown in the figure, the architecture diagram may include a user contract 110, a regulatory encapsulation interface 120, a state database 130, and a regulatory system server 150 of an offline regulatory agency. Among them, the regulatory encapsulation interface 120 includes a call regulatory instance 121 and a native data interface 122, and the call regulatory instance 121 is also communicatively connected to the regulatory system server 150.
[0047] It should be noted that Figure 4 The principles of the user contract 110, the state database 130, and the call regulatory instance 121 in the architecture shown are similar to those of the user contract 110, the state database 130, and the call regulatory instance 121 in the architecture shown, and will not be elaborated here. Figure 2 shown, and will not be elaborated here.
[0048] In some embodiments, before storing the target transaction data into the state database 130 through the native data interface 122, the call regulatory instance 121 may also send the target transaction data to the regulatory system server 150, so that the offline regulatory agency can use the regulatory system server 150 for automatic or manual supervision, obtain the supervision result corresponding to the target transaction data, and feedback the supervision result to the call regulatory instance 121. The call regulatory instance 121 may store the compliance status mark value corresponding to the supervision result and the target transaction data into the state database 130 when the supervision result is that the target data does not exist in the target transaction data.
[0049] In other embodiments, when the target transaction data is transaction data that has been chained, the call regulatory instance 121 may send the target transaction data to the regulatory system server 150, so that the offline regulatory agency can use the regulatory system server 150 for automatic or manual supervision, obtain the supervision result corresponding to the target transaction data, and feedback the supervision result to the call regulatory instance 121. The call regulatory instance 121 may determine the compliance status mark value corresponding to the supervision result and store it into the state database.
[0050] Therefore, the offline regulatory agency can be used to supervise the transaction data before or after chaining, and then determine whether the transaction data is compliant data to avoid the leakage of transaction data.
[0051] Figure 5 shows a schematic flowchart of a data processing method provided by an embodiment of the present invention.
[0052] In some embodiments of the present invention, Figure 5 the method shown may be executed by Figures 1 to 4 the call regulatory instance 120 in the architecture shown, or may be executed by a smart contract engine, and is not limited here.
[0053] As Figure 5As shown, the data processing method may include the following steps.
[0054] S510. Receive a data query request sent by a data query node; wherein, the data query request is used to query target transaction data.
[0055] In some embodiments of the present invention, the data query node may call a supervision encapsulation interface through a user contract, so that the called supervision instance receives the data query request through the supervision encapsulation interface.
[0056] S520. In response to the data query request, when it is determined that the target transaction data is compliant data, obtain the target transaction data.
[0057] In some embodiments of the present invention, the target transaction data may be stored in the form of key-value pairs. Wherein, the key of the key-value pair may be a target string, the value of the key-value pair may be the target transaction data, and the target string may be used to index the target transaction data.
[0058] Further, the data query request may carry a target string, and the target string may be associated with a stored compliance status flag value, and the compliance status flag value may be used to determine that the target transaction data is compliant data. When the compliance status flag value is the target value, it can be determined that the target transaction data is compliant data; when the compliance status flag value is not the target value, it can be determined that the target transaction data is not compliant data.
[0059] Taking the target value as 1 as an example, when the compliance status flag value is 1, it can be determined that the target transaction data is compliant data, and when the compliance status flag value is 0, it can be determined that the target transaction data is not compliant data.
[0060] In these embodiments, before S520, the data processing method may further include:
[0061] Parse the data query request to obtain data query request information; wherein, the data query request information includes the target string corresponding to the target transaction data;
[0062] Obtain the compliance status flag value corresponding to the target string;
[0063] Wherein, determining that the target transaction data is compliant data may include:
[0064] When the compliance status flag value is the target value, determine that the target transaction data is compliant data.
[0065] Specifically, after receiving a data query request, the calling supervision instance can parse the data query request to obtain data query request information, and then obtain the target string carried in the data query request from the data query request information. Then, the calling supervision instance can query the compliance status flag value corresponding to the target string, and determine that the target transaction data is compliant data when it is determined that the compliance status flag value is the target value.
[0066] In some embodiments, the target string and the compliance status flag value corresponding to the target string can be associated and stored within the calling supervision instance.
[0067] In other embodiments, the target string and the compliance status flag value corresponding to the target string can be associated and stored within the state database of the distributed ledger.
[0068] In these embodiments, optionally, before obtaining the compliance status flag value corresponding to the target string, the data processing method may further include:
[0069] Call the state database to enable the state database to query the compliance status flag value corresponding to the target string;
[0070] Correspondingly, obtaining the compliance status flag value corresponding to the target string may include:
[0071] Obtain the compliance status flag value corresponding to the target string fed back by the state database.
[0072] Specifically, the calling supervision instance can call the state database according to the target string to enable the state database to query the compliance status flag value corresponding to the target string. The calling supervision instance can receive the compliance status flag value corresponding to the target string fed back by the state database to achieve the acquisition of the compliance status flag value corresponding to the target string.
[0073] Furthermore, the calling supervision instance can call the state database through the native data interface 122 according to the target string.
[0074] In these embodiments, optionally, before obtaining the target transaction data, the data processing method may further include:
[0075] Call the state database to enable the state database to query the target transaction data corresponding to the target string;
[0076] Correspondingly, obtaining the target transaction data may include:
[0077] Obtain the target transaction data fed back by the state database.
[0078] Specifically, the calling supervision instance can call the status database according to the target string, so that the status database indexes the target transaction data corresponding to the target string among multiple pre-stored transaction data, and then feeds back the target transaction data to the calling supervision instance, so that the calling supervision instance receives the target transaction data fed back by the status database.
[0079] Specifically, the calling supervision instance can call the status database through the native data interface 122 according to the target string.
[0080] S530. Send the target transaction data to the data query node.
[0081] In an embodiment of the present invention, after receiving the data query request sent by the data query node for querying the target transaction data, if it is determined that the target transaction data is compliant data, the target transaction data is obtained and sent to the data query node. Therefore, after receiving the data query request sent by the data query node, only the compliant data can be sent to the data query node, avoiding the leakage of non-compliant transaction data.
[0082] In another embodiment of the present invention, in order to further avoid the leakage of transaction data, after S510, the data processing method may further include:
[0083] In response to the data query request, when it is determined that the target transaction data is not compliant data, a first prompt message is sent to the data query node; wherein, the first prompt message is used to prompt that the target transaction data is non-compliant.
[0084] Thus, the calling supervision instance can, when determining that the target transaction data is not compliant data, prompt the user through the first prompt message that the target transaction data to be queried is non-compliant, so as to further avoid the leakage of transaction data.
[0085] Wherein, the first prompt message may include information for characterizing "data violation, unable to query" to prompt the user that the target transaction data to be queried is non-compliant.
[0086] Optionally, the calling supervision instance can send the first prompt message to the data query node through the user contract.
[0087] Further, the calling supervision instance can call the user contract through the supervision encapsulation interface to send the first prompt message to the data query node.
[0088] In some embodiments of the present invention, in order to further avoid the leakage of transaction data, after S510, the data processing method may further include:
[0089] In response to a data query request, when it is determined that the target transaction data is not compliant data, the target transaction data is refused to be sent to the data query node.
[0090] Thus, when it is determined that the target transaction data is not compliant data, the calling supervision instance can refrain from feeding back the target transaction data to the data query node, so as to further avoid the leakage of transaction data.
[0091] In another embodiment of the present invention, when the target transaction data is stored data, that is, when the target transaction data is on-chain transaction data, in order to further avoid the leakage of transaction data, before S510, the data processing method may further include:
[0092] Sending the target transaction data to the supervision system server so that the supervision system server feeds back the supervision result corresponding to the target transaction data;
[0093] Receiving the supervision result fed back by the supervision system server;
[0094] Determining the compliance status flag value corresponding to the supervision result.
[0095] Specifically, if the calling supervision instance is communicatively connected to the supervision system server, the calling supervision instance can send the target transaction data to the supervision system server of the offline supervision agency, so that the offline supervision agency can use the supervision system server for automatic or manual supervision to obtain the supervision result corresponding to the target transaction data, and feed back the supervision result to the calling supervision instance.
[0096] In some embodiments, the supervision system server may input the target transaction data into a pre-trained compliance detection model to obtain the supervision result corresponding to the target transaction data, so as to achieve automatic supervision.
[0097] In other embodiments, the supervision system server may push the target transaction data to the mobile terminal and the web terminal, so that the supervisors of the offline supervision agency can perform manual supervision on the target transaction data to obtain the supervision result corresponding to the target transaction data, so as to achieve manual supervision.
[0098] Specifically, when the supervision result indicates that the target transaction data is compliant data, the calling supervision instance can determine that the compliance status flag value is the target value; when the supervision result indicates that the target transaction data is not compliant data, the calling supervision instance can determine that the compliance status flag value is not the target value.
[0099] In other embodiments, before sending the target transaction data to the supervision system server, the data processing method may further include:
[0100] Generating a target event according to the target transaction data;
[0101] Accordingly, sending the target transaction data to the supervision system server may include:
[0102] Sending the target event to the supervision system server.
[0103] Specifically, the supervision system server may also subscribe to the events in the invoked supervision instance. For example, when the invoked supervision instance detects that there is target transaction data in the on-chain transaction data that has not been supervised, the invoked supervision instance will generate a target event based on the target transaction data and send the target event to the supervision system server, so that the supervision system server can obtain the target transaction data and conduct offline supervision.
[0104] In some other embodiments of the present invention, when the target transaction data is stored data, that is, when the target transaction data is on-chain transaction data, in order to further avoid the leakage of transaction data, before S510, the data processing method may further include:
[0105] Invoking a supervision contract to enable the supervision contract to detect target data in the target transaction data and obtain a supervision result corresponding to the target transaction data;
[0106] Receiving the supervision result fed back by the supervision contract;
[0107] Determining a compliance status flag value corresponding to the supervision result.
[0108] Specifically, if the invoked supervision instance has a callable supervision contract, the invoked supervision instance may call the supervision contract to enable the supervision contract to detect target data in the target transaction data and obtain a supervision result corresponding to the target transaction data. When it is detected that there is no target data in the target transaction data, the supervision result indicates that the target transaction data is compliant data; when it is detected that there is target data in the target transaction data, the supervision result indicates that the target transaction data is not compliant data.
[0109] After the invoked supervision instance receives the detection result fed back by the supervision contract, when the supervision result indicates that the target transaction data is compliant data, it may determine that the compliance status flag value is the target value; when the supervision result indicates that the target transaction data is not compliant data, it may determine that the compliance status flag value is not the target value.
[0110] Therefore, in the embodiments of the present invention, the on-chain transaction data can be supervised. If the transaction data is non-compliant, the non-compliant transaction data is marked by setting the compliance status flag value, thereby restricting the access of the data query node to the non-compliant transaction data. In addition, the supervision behavior is flexibly configurable and can be upgraded or updated at any time.
[0111] In some embodiments, after determining the compliance status flag value corresponding to the supervision result, the data processing method may further include:
[0112] Obtain the target string corresponding to the target transaction data;
[0113] Associate and store the target string and the compliance status flag value in the status database.
[0114] Specifically, after determining the compliance status flag value corresponding to the supervision result, the invoked supervision instance may send it and the target string corresponding to the target transaction data to the status database, so that the status database associates and stores the target string and the compliance status flag value corresponding to the target string in the status database.
[0115] In some other embodiments, after determining the compliance status flag value corresponding to the supervision result, the invoked supervision instance may also associate and store it with the target string corresponding to the target transaction data locally.
[0116] In yet another implementation manner of the present invention, before receiving the data query request sent by the data query node, the data processing method may further include:
[0117] Receive the data storage request sent by the data storage node;
[0118] In response to the data storage request, parse the data storage request to obtain the data storage request information; wherein, the data storage request information includes the target string and the target transaction data;
[0119] Associate and store the target string and the target transaction data in the status database.
[0120] Specifically, after receiving the data storage request sent by the data storage node, the invoked supervision instance may parse the data storage request to obtain the target string and the target transaction data to be stored in the data storage request information, and then associate and store the target string and the target transaction data in the status database.
[0121] In some embodiments of the present invention, in order to further avoid the leakage of transaction data, before associating and storing the target string and the target transaction data in the status database, the data processing method may further include:
[0122] Invoke the supervision contract to enable the supervision contract to detect the target data in the target transaction data to obtain the supervision result corresponding to the target transaction data;
[0123] Receive the supervision result fed back by the supervision contract;
[0124] Determine the compliance status flag value corresponding to the supervision result;
[0125] Correspondingly, associatively storing the target string and the target transaction data in the status database may include:
[0126] When the compliance status flag value corresponding to the supervision result is the target value, associatively store the compliance status flag value and the target transaction data with the target string in the status database respectively.
[0127] Optionally, if the invoked supervision instance has a callable supervision contract, the invoked supervision instance may call the supervision contract, so that the supervision contract detects the target data in the target transaction data based on a preset supervision rule to obtain a supervision result corresponding to the target transaction data. When it is detected that the target data does not exist in the target transaction data, the supervision result indicates that the target transaction data is compliant data; when it is detected that the target data exists in the target transaction data, the supervision result indicates that the target transaction data is not compliant data. After receiving the supervision result fed back by the supervision contract, the invoked supervision instance may determine the compliance status flag value corresponding to the supervision result. When the supervision result indicates that the target transaction data is compliant data, the invoked supervision instance may determine that the compliance status flag value is the target value; when the supervision result indicates that the target transaction data is not compliant data, it may be determined that the compliance status flag value is not the target value. Finally, when the compliance status flag value corresponding to the supervision result is the target value, the invoked supervision instance may associatively store the target string and the target transaction data in the status database, thereby only saving the transaction data initially determined to have no leakage risk by the supervision contract in the status database, thereby avoiding the leakage of transaction data.
[0128] In some other embodiments of the present invention, in order to further avoid the leakage of transaction data, before associatively storing the target string and the target transaction data in the status database, the data processing method may further include:
[0129] Send the target transaction data to the supervision system server so that the supervision system server feeds back the supervision result corresponding to the target transaction data;
[0130] Receive the supervision result fed back by the supervision system server;
[0131] Determine the compliance status flag value corresponding to the supervision result;
[0132] Correspondingly, associatively storing the target string and the target transaction data in the status database may specifically include:
[0133] When the compliance status flag value corresponding to the supervision result is the target value, associatively store the compliance status flag value and the target transaction data with the target string in the status database respectively.
[0134] Optionally, if the invoked supervision instance is communicatively connected to the supervision system server, the invoked supervision instance may send the target transaction data to the supervision system server of the offline supervision agency, so that the offline supervision agency can use the supervision system server for automatic or manual supervision to obtain the supervision result corresponding to the target transaction data, and feedback the supervision result to the invoked supervision instance. When the supervision result indicates that the target transaction data is compliant data, the invoked supervision instance may determine that the compliance status flag value is the target value; when the supervision result indicates that the target transaction data is not compliant data, the invoked supervision instance may determine that the compliance status flag value is not the target value. Finally, when the compliance status flag value corresponding to the supervision result is the target value, the invoked supervision instance may associatively store the target string and the target transaction data in the status database, and then only save the transaction data initially determined to have no leakage risk by the supervision contract in the status database, thereby avoiding the leakage of transaction data.
[0135] Therefore, in the embodiments of the present invention, penetrative and imperceptible supervision can be performed on the transaction data on the chain. The user only needs to invoke the supervision encapsulation interface, the transaction data does not need to be signed, and the user is unaware of the supervision behavior.
[0136] In some embodiments, after determining the compliance status flag value corresponding to the supervision result, the data processing method may further include:
[0137] When the compliance status flag value corresponding to the supervision result is not the target value, feedback a second prompt message to the data storage node; wherein, the second prompt message is used to prompt that the detection of the target transaction data fails.
[0138] Thus, when the invoked supervision instance determines that the compliance status flag value corresponding to the supervision result is not the target value, it can determine that the target transaction data is non-compliant, and then prompt the user through the second prompt message that the target transaction data to be stored is non-compliant, so as to further avoid the leakage of transaction data.
[0139] Wherein, the second prompt message may include information for representing "data violation, unable to be uploaded to the chain" to prompt the user that the target transaction data to be stored is non-compliant.
[0140] In some embodiments, after determining the compliance status flag value corresponding to the supervision result, the data processing method may further include:
[0141] When the compliance status flag value corresponding to the supervision result is not the target value, reject associatively storing the target string and the target transaction data in the status database.
[0142] Thus, when the call supervision instance determines that the detection result is the detection of the target data, it may not upload the target transaction data to the status database to further avoid the leakage of transaction data.
[0143] Figure 6 The structural schematic diagram of the data processing device provided by an embodiment of the present invention is shown.
[0144] In some embodiments of the present invention, Figure 6 The device shown may be disposed in Figures 1 to 4 the call supervision instance 120 in the architecture shown, or may be disposed in the smart contract engine, which is not limited herein.
[0145] Such as Figure 6 shown, the data processing device 600 may include a first receiving module 610, a first obtaining module 620, and a first sending module 630.
[0146] The first receiving module 610 may be configured to receive a data query request sent by a data query node; wherein, the data query request is used to query target transaction data.
[0147] The first obtaining module 620 may be configured to obtain the target transaction data in the case of determining that the target transaction data is compliant data in response to the data query request.
[0148] The first sending module 630 may be configured to send the target transaction data to the data query node.
[0149] In an embodiment of the present invention, after receiving the data query request sent by the data query node for querying the target transaction data, if it is determined that the target transaction data is compliant data, the target transaction data is obtained and sent to the data query node. Therefore, after receiving the data query request sent by the data query node, only the compliant data can be sent to the data query node to avoid the leakage of non-compliant transaction data.
[0150] In some embodiments of the present invention, the data processing device 600 may further include a second sending module, and the second sending module may be configured to send a first prompt message to the data query node in the case of determining that the target transaction data is not compliant data in response to the data query request; wherein, the first prompt message is used to prompt that the target transaction data is non-compliant.
[0151] In some embodiments of the present invention, the data processing device 600 may further include a first processing module, and the first processing module may be configured to refuse to send the target transaction data to the data query node in the case of determining that the target transaction data is not compliant data in response to the data query request.
[0152] In some embodiments of the present invention, the data processing device 600 may further include a first parsing module, a second obtaining module, and a first determining module.
[0153] The first parsing module may be configured to parse the data query request to obtain data query request information; wherein, the data query request information includes a target string corresponding to the target transaction data.
[0154] The second obtaining module may be configured to obtain the compliance status flag value corresponding to the target string.
[0155] The first determining module may be configured to determine that the target transaction data is compliant data when the compliance status flag value is the target value.
[0156] In some embodiments of the present invention, the data processing device 600 may further include a first calling module, and the first calling module may be configured to call the status database to cause the status database to query the compliance status flag value corresponding to the target string.
[0157] Correspondingly, the second obtaining module may be specifically configured to obtain the compliance status flag value corresponding to the target string fed back by the status database.
[0158] In some embodiments of the present invention, the data processing device 600 may further include a second calling module, and the second calling module may be configured to call the status database to cause the status database to query the target transaction data corresponding to the target string.
[0159] Correspondingly, the first obtaining module 620 may be specifically configured to obtain the target transaction data fed back by the status database.
[0160] In some embodiments of the present invention, the data processing device 600 may further include a third sending module, a second receiving module, and a second determining module.
[0161] The third sending module may be configured to send the target transaction data to the supervision system server so that the supervision system server feeds back the supervision result corresponding to the target transaction data.
[0162] The second receiving module may be configured to receive the supervision result fed back by the supervision system server.
[0163] The second determining module may be configured to determine the compliance status flag value corresponding to the supervision result.
[0164] In some embodiments of the present invention, the data processing device 600 may further include a third calling module, a third receiving module, and a third determining module.
[0165] The third calling module may be configured to call the supervision contract to cause the supervision contract to detect the target data in the target transaction data to obtain the supervision result corresponding to the target transaction data.
[0166] The third receiving module can be used to receive the supervision result feedback by the supervision contract.
[0167] The third determining module can be used to determine the compliance status flag value corresponding to the supervision result.
[0168] In some embodiments of the present invention, the data processing device 600 may further include a third obtaining module and a first storage module.
[0169] The third obtaining module can be used to obtain the target string corresponding to the target transaction data.
[0170] The first storage module can be used to associatively store the target string and the compliance status flag value into the status database.
[0171] In some embodiments of the present invention, the data processing device 600 may further include a first generating module, and the first generating module can be used to generate a target event according to the target transaction data.
[0172] Correspondingly, the third sending module can be specifically used to send the target event to the supervision system server.
[0173] In some embodiments of the present invention, the data processing device 600 may further include a fourth receiving module, a second parsing module, and a second storage module.
[0174] The fourth receiving module can be used to receive the data storage request sent by the data storage node.
[0175] The second parsing module can be used to parse the data storage request in response to the data storage request to obtain the data storage request information; wherein, the data storage request information includes the target string and the target transaction data.
[0176] The second storage module can be used to associatively store the target string and the target transaction data into the status database.
[0177] In some embodiments of the present invention, the data processing device 600 may further include a fourth calling module, a fifth receiving module, and a fourth determining module.
[0178] The fourth calling module calls the supervision contract to enable the supervision contract to detect the target data in the target transaction data and obtain the supervision result corresponding to the target transaction data.
[0179] The fifth receiving module can be used to receive the supervision result feedback by the supervision contract.
[0180] The fourth determining module can be used to determine the compliance status flag value corresponding to the supervision result.
[0181] Accordingly, the second storage module may be specifically configured to, when the compliance status flag value corresponding to the supervision result is the target value, store the compliance status flag value and the target transaction data in association with the target string in the status database respectively.
[0182] In some embodiments of the present invention, the data processing device 600 may further include a fourth sending module, a sixth receiving module, and a fifth determining module.
[0183] The fourth sending module may be configured to send the target transaction data to the supervision system server so that the supervision system server feeds back the supervision result corresponding to the target transaction data.
[0184] The sixth receiving module may be configured to receive the supervision result fed back by the supervision system server.
[0185] The fifth determining module may be configured to determine the compliance status flag value corresponding to the supervision result.
[0186] Accordingly, the second storage module may be specifically configured to, when the compliance status flag value corresponding to the supervision result is the target value, store the compliance status flag value and the target transaction data in association with the target string in the status database respectively.
[0187] In some embodiments of the present invention, the data processing device 600 may further include a fifth sending module, and the fifth sending module may be configured to, when the compliance status flag value corresponding to the supervision result is not the target value, feed back a second prompt message to the data storage node; wherein, the second prompt message is used to prompt that the detection of the target transaction data fails.
[0188] In some embodiments of the present invention, the data processing device 600 may further include a second processing module, and the second processing module may be configured to, when the compliance status flag value corresponding to the supervision result is not the target value, refuse to store the target string and the target transaction data in association in the status database.
[0189] It should be noted that Figure 6 the data processing device 600 shown may execute Figure 5 each step in the method embodiment shown and achieve Figure 5 each process and effect in the method embodiment shown, which will not be elaborated here.
[0190] Figure 7 FIG. shows a schematic hardware structure diagram of a data processing device provided in an embodiment of the present invention.
[0191] The data processing device may include a processor 701 and a memory 702 storing computer program instructions.
[0192] Specifically, the above-mentioned processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured as one or more integrated circuits for implementing the embodiments of the present invention.
[0193] The memory 702 may include a mass storage for data or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disc, a magneto-optical disc, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In a suitable case, the memory 702 may include removable or non-removable (or fixed) media. In a suitable case, the memory 702 may be internal or external to the integrated gateway disaster recovery device. In a specific embodiment, the memory 702 is a non-volatile solid-state memory. In a specific embodiment, the memory 702 includes a read-only memory (ROM). In a suitable case, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0194] The processor 701 reads and executes computer program instructions stored in the memory 702 to implement any one of the data processing methods in the above embodiments.
[0195] In one example, the data processing device may further include a communication interface 703 and a bus 710. Among them, as Figure 7 shown, the processor 701, the memory 702, and the communication interface 703 are connected through the bus 710 to complete communication with each other.
[0196] The communication interface 703 is mainly used to implement communication between the modules, devices, units, and / or devices in the embodiments of the present invention.
[0197] Bus 710 includes hardware, software, or both, and couples components of a data processing device to each other. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable bus or a combination of two or more of these. Where appropriate, bus 710 may include one or more buses. Although embodiments of the present invention describe and illustrate specific buses, the present invention contemplates any suitable bus or interconnect.
[0198] The data processing device may execute the information processing method in the embodiments of the present invention, thereby implementing the combination Figure 5 and Figure 6 the data processing method and apparatus described.
[0199] In addition, in combination with the data processing method in the above embodiments, embodiments of the present invention may provide a computer-readable storage medium to implement. Computer program instructions are stored on the computer-readable storage medium; when the computer program instructions are executed by a processor, any one of the data processing device methods in the above embodiments is implemented.
[0200] It should be clear that the present invention is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present invention is not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present invention.
[0201] The functional blocks shown in the above-described structural block diagrams can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, and so on. When implemented in software, the elements of the present invention are programs or code segments for performing the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted via a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and so on. The code segment can be downloaded via a computer network such as the Internet, an intranet, and so on.
[0202] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be executed in the order mentioned in the embodiments, or different from the order in the embodiments, or several steps can be executed simultaneously.
[0203] As described above, the above is only the specific implementation manner of the present invention. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, modules, and units can refer to the corresponding processes in the foregoing method embodiments and will not be repeated here. It should be understood that the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present invention.
Claims
1. A data processing method, comprising: When the target transaction data is stored data, calling a supervision contract to enable the supervision contract to detect target data in the target transaction data and obtain a supervision result corresponding to the target transaction data; Receiving the supervision result fed back by the supervision contract; Determining a compliance status flag value corresponding to the supervision result; Obtaining a target string corresponding to the target transaction data; Associatively storing the target string and the compliance status flag value in a status database; Receiving a data query request sent by a data query node through a supervision encapsulation interface called by a user contract; wherein, the data query request is used to query the target transaction data; In response to the data query request, parsing the data query request to obtain data query request information; wherein, the data query request information includes the target string corresponding to the target transaction data; Calling the status database to enable the status database to query the compliance status flag value corresponding to the target string; Obtaining the compliance status flag value corresponding to the target string fed back by the status database; When the compliance status flag value is a target value, determining that the target transaction data is compliant data, and the compliant data indicates that there is no target data in the target transaction data; Obtaining the target transaction data; Sending the target transaction data to the data query node through the user contract called by the supervision encapsulation interface; Wherein, before receiving the data query request sent by the data query node through the supervision encapsulation interface called by the user contract, the method further includes: Receiving a data storage request sent by a data storage node through the supervision encapsulation interface called by the user contract; In response to the data storage request, parsing the data storage request to obtain data storage request information; wherein, the data storage request information includes the target string and the target transaction data; Calling a supervision contract to enable the supervision contract to detect target data in the target transaction data and obtain a supervision result corresponding to the target transaction data; Receiving the supervision result fed back by the supervision contract; Determining the compliance status flag value corresponding to the supervision result; When the compliance status flag value corresponding to the supervision result is the target value, associatively storing the compliance status flag value and the target transaction data with the target string in the status database.
2. The method according to claim 1, wherein, After receiving the data query request sent by the data query node through the supervision encapsulation interface called by the user contract, the method further includes: In response to the data query request, when it is determined that the target transaction data is not the compliant data, sending a first prompt message to the data query node through the user contract called by the supervision encapsulation interface; wherein, the first prompt message is used to prompt that the target transaction data is non-compliant.
3. The method according to claim 1, wherein, After receiving the data query request sent by the data query node through the supervision encapsulation interface called by the user contract, the method further includes: In response to the data query request, when it is determined that the target transaction data is not the compliant data, the user contract is called through the regulatory encapsulation interface to reject sending the target transaction data to the data query node.
4. The method according to claim 1, wherein Before obtaining the target transaction data, the method further includes: Calling a state database to cause the state database to query the target transaction data corresponding to the target string; Wherein, obtaining the target transaction data includes: Obtaining the target transaction data fed back by the state database.
5. The method according to claim 1, wherein After determining the compliance status flag value corresponding to the supervision result, the method further includes: When the compliance status flag value corresponding to the supervision result is not the target value, calling the user contract through the regulatory encapsulation interface to feedback a second prompt message to the data storage node; wherein, the second prompt message is used to prompt that the detection of the target transaction data fails.
6. The method according to claim 1, wherein, After determining the compliance status flag value corresponding to the supervision result, the method further includes: When the compliance status flag value corresponding to the supervision result is not the target value, calling the user contract through the regulatory encapsulation interface to reject associatively storing the target string and the target transaction data in the state database.
7. The method according to claim 1, wherein The method is implemented by a smart contract engine.
8. A data processing device, comprising: A third calling module, configured to call a supervision contract when the target transaction data is stored data, so that the supervision contract detects target data in the target transaction data to obtain a supervision result corresponding to the target transaction data; A third receiving module, configured to receive the supervision result fed back by the supervision contract; A third determining module, configured to determine the compliance status flag value corresponding to the supervision result; A third obtaining module, configured to obtain a target string corresponding to the target transaction data; A first storage module, configured to associatively store the target string and the compliance status flag value in a state database; A first receiving module, configured to receive a data query request sent by a data query node through a user contract calling a regulatory encapsulation interface; wherein, the data query request is used to query the target transaction data; A first parsing module, configured to parse the data query request in response to the data query request to obtain data query request information; wherein, the data query request information includes a target string corresponding to the target transaction data; A second calling module, configured to call a state database to cause the state database to query the compliance status flag value corresponding to the target string; A second obtaining module, configured to obtain the compliance status flag value corresponding to the target string fed back by the state database; A first determining module, configured to determine that the target transaction data is compliant data when the compliance status flag value is the target value, and the compliant data indicates that there is no target data in the target transaction data; A first obtaining module, configured to obtain the target transaction data when it is determined that the target transaction data is compliant data. A first sending module, configured to send the target transaction data to the data query node by invoking the user contract through the regulatory encapsulation interface; The device further includes: A fourth receiving module, configured to, before receiving a data query request sent by the data query node by invoking the regulatory encapsulation interface through the user contract, receive a data storage request sent by the data storage node by invoking the regulatory encapsulation interface through the user contract; A second parsing module, configured to, in response to the data storage request, parse the data storage request to obtain data storage request information; wherein, the data storage request information includes the target string and the target transaction data; A fourth invoking module, configured to invoke a regulatory contract to enable the regulatory contract to detect target data in the target transaction data to obtain a regulatory result corresponding to the target transaction data; A fifth receiving module, configured to receive the regulatory result fed back by the regulatory contract; A fourth determining module, configured to determine a compliance status flag value corresponding to the regulatory result; A second storage module, configured to, when the compliance status flag value corresponding to the regulatory result is the target value, respectively associate and store the compliance status flag value and the target transaction data with the target string in a state database.
9. A data processing device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the data processing method according to any one of claims 1-7 is implemented.
10. A computer-readable storage medium, characterized in that, Computer program instructions are stored on a computer-readable storage medium, and when the computer program instructions are executed by a processor, the data processing method according to any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Asset transaction platform and digital certification and transaction method for assets
CN105956923A
A public chain information shielding method without influencing credibility
CN109697670A
Block chain supervision method and supervision system
CN109961287A
Data authorization and query method and device based on block chain
CN110060162A
Block chain information management method, device and equipment and storage medium
CN110119428A