CN114978645A - Data processing method and device based on block chain, server and storage medium - Google Patents

Data processing method and device based on block chain, server and storage medium Download PDF

Info

Publication number
CN114978645A
CN114978645A CN202210523000.4A CN202210523000A CN114978645A CN 114978645 A CN114978645 A CN 114978645A CN 202210523000 A CN202210523000 A CN 202210523000A CN 114978645 A CN114978645 A CN 114978645A
Authority
CN
China
Prior art keywords
data
request
privacy
data service
service request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210523000.4A
Other languages
Chinese (zh)
Inventor
王蒙
杨明慧
闫钊
黄海平
薛凌妍
汪文明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210523000.4A priority Critical patent/CN114978645A/en
Publication of CN114978645A publication Critical patent/CN114978645A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The application discloses a data processing method and device based on a block chain, a server and a storage medium, and belongs to the technical field of block chains. Applied to a server, the method comprising: receiving a data service request sent by a requester; determining request information corresponding to the data service request according to the data service request, wherein the request information at least comprises a request priority; uploading the request information to a block chain, so that consensus nodes in the block chain perform consensus audit on the request information according to the consensus speed corresponding to the request priority; and receiving an audit result returned by the block chain, and if the audit result indicates that the consensus audit is passed, performing differential privacy processing on the privacy data corresponding to the data service request. According to the method and the device, consensus audit is carried out based on the request priority, the efficiency of data processing in the block chain is improved, differential privacy processing is carried out on privacy data after the audit is passed, and the safety of data transmission in the block chain is improved.

Description

Data processing method and device based on block chain, server and storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a data processing method and apparatus based on a blockchain, a server, and a storage medium.
Background
With the development of information technology and internet technology, the application of the block chain technology in the fields of car networking, internet and the like is very wide, wherein the basic requirement for providing privacy protection for data in the block chain in the data transmission process is.
For a data service scenario in a blockchain, a requester mostly obtains required data by sending a data obtaining request to a server in the blockchain. In the blockchain, data provided by each data provider is usually protected by using a pseudonym identity, for example, after a server in the blockchain receives a data acquisition request sent by a requester, the server forwards the data acquired by querying the server to the requester by using the pseudonym identity, so that the effect of providing privacy protection in the data transmission process is achieved.
Based on the encryption protection mode of the data, the transmitted data are all real data, the block chain only replaces the identity information of the data, and the problem of low safety protection degree in the transmission process of the data exists.
Disclosure of Invention
In order to solve the problems in the prior art and improve the security of data transmission in a blockchain, embodiments of the present application provide a data processing method and apparatus based on a blockchain, a server, and a storage medium. The technical scheme is as follows:
in one aspect, the present application provides a data processing method based on a blockchain, which is applied to a server, and the method includes:
receiving a data service request sent by a requester;
determining request information corresponding to the data service request according to the data service request, wherein the request information at least comprises a request priority;
uploading the request information to the block chain, so that a consensus node in the block chain performs consensus audit on the request information according to a consensus speed corresponding to the request priority;
and receiving an audit result returned by the block chain, and if the audit result indicates that consensus audit is passed, performing differential privacy processing on the privacy data corresponding to the data service request.
In one aspect, the present application provides a data processing method based on a block chain, which is applied to a terminal device, and the method includes:
sending a data service request to a server, so that the server determines request information corresponding to the data service request according to the data service request and uploads the request information to the block chain, wherein the request information at least comprises a request priority; the request information is used for the consensus node in the block chain to carry out consensus audit on the request information according to the consensus speed corresponding to the request priority; and the server is also used for receiving an audit result returned by the block chain, and if the audit result indicates that consensus audit is passed, performing differential privacy processing on the privacy data corresponding to the data service request.
In one aspect, the present application provides a blockchain-based data processing system, the data processing system comprising: the system comprises a requester, a block chain, a data storage module, an identity verification module and a provider;
the requesting party is used for sending a data service request to a server in the block chain;
the block chain comprises the server and a consensus node;
the server is used for determining request information corresponding to the data service request according to the data service request, wherein the request information at least comprises request priority; uploading the request information to the block chain;
the consensus node is used for performing consensus audit on the request information according to the consensus speed corresponding to the request priority;
the server is further configured to receive an audit result returned by the block chain, and perform differential privacy processing on the privacy data corresponding to the data service request if the audit result indicates that consensus audit is passed;
the data storage module is used for storing the private data of the requester and returning a first hash address corresponding to the private data to the server;
the identity verification module is used for receiving the identity of the requester and the identity of the server sent by the server and authenticating the identity of the requester and the identity of the server;
the provider is used for providing the privacy data of the requester.
In one aspect, the present application provides a data processing apparatus based on a blockchain, applied to a server, the apparatus including:
the first receiving module is used for receiving a data service request sent by a requester;
a first determining module, configured to determine, according to the data service request, request information corresponding to the data service request, where the request information at least includes a request priority;
the first uploading module is used for uploading the request information to the block chain so that the consensus node in the block chain performs consensus audit on the request information according to the consensus speed corresponding to the request priority;
and the data processing module is used for receiving the audit result returned by the block chain, and if the audit result indicates that consensus audit is passed, performing differential privacy processing on the privacy data corresponding to the data service request.
In one aspect, the present application provides a data processing apparatus based on a block chain, which is applied to a terminal device, and the apparatus includes:
a first sending module, configured to send a data service request to a server, so that the server determines, according to the data service request, request information corresponding to the data service request, and uploads the request information to the block chain, where the request information at least includes a request priority; the request information is used for the consensus node in the block chain to carry out consensus audit on the request information according to the consensus speed corresponding to the request priority; and the server is also used for receiving an audit result returned by the block chain, and if the audit result indicates that consensus audit is passed, performing differential privacy processing on the privacy data corresponding to the data service request.
In another aspect, the present application provides a server comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a set of codes, or a set of instructions, and the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the method for processing data based on a blockchain according to the above aspect.
In another aspect, the present application provides a terminal device comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the method for processing data based on a blockchain according to the above aspect.
In another aspect, the present application provides a computer-readable storage medium having at least one instruction, at least one program, a set of codes, or a set of instructions stored therein, which is loaded and executed by a processor to implement the method for blockchain based data processing according to one aspect.
In another aspect, the present application provides a computer-readable storage medium having at least one instruction, at least one program, a set of codes, or a set of instructions stored therein, which is loaded and executed by a processor to implement the method for blockchain based data processing according to one aspect.
In another aspect, the present application provides a computer program product, which when run on a computer, causes the computer to execute the method for processing data based on a block chain according to the above aspect.
In another aspect, an embodiment of the present application provides an application publishing platform, configured to publish a computer program product, where when the computer program product runs on a computer, the computer is caused to execute the method for processing data based on a blockchain according to the above aspect.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
the method comprises the steps of receiving a data service request sent by a requester; determining request information corresponding to the data service request according to the data service request, wherein the request information at least comprises a request priority; uploading the request information to a block chain, so that consensus nodes in the block chain perform consensus audit on the request information according to the consensus speed corresponding to the request priority; receiving an audit result returned by the block chain, and if the audit result indicates that the consensus audit is passed, performing differential privacy processing on the private data corresponding to the data service request, namely, after the server connected with the block chain performs uplink on the determined request information in the application, performing consensus audit on the request information by a consensus node in the block chain according to the consensus speed corresponding to the request priority in the request information, so that the consensus audit can be performed based on the request priority in the block chain, the efficiency of data processing in the block chain is improved, and after the audit is passed, performing differential privacy processing on the private data, so that the security of data transmission in the block chain is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is an interface schematic diagram of a terminal device according to an exemplary embodiment of the present application;
fig. 2 is a flowchart of a method for processing data based on a blockchain according to an exemplary embodiment of the present application;
fig. 3 is a flowchart of a method for processing data based on a blockchain according to an exemplary embodiment of the present application;
fig. 4 is a flowchart of a method for processing data based on a blockchain according to an exemplary embodiment of the present application.
FIG. 5 is a block chain based data processing system to which an exemplary embodiment of the present application relates;
FIG. 6 is a flowchart of a method of an exemplary embodiment of the present application directed to a blockchain based data processing method of FIG. 5;
fig. 7 is a block diagram of a data processing apparatus based on a blockchain according to an exemplary embodiment of the present application;
FIG. 8 is a block diagram of a block chain based data processing apparatus according to an exemplary embodiment of the present application;
fig. 9 is a schematic structural diagram of a terminal device according to an exemplary embodiment of the present application;
fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
The scheme provided by the application can be used in a scenario of data transmission based on a block chain in daily life, and for convenience of understanding, some terms and application architectures related to the embodiments of the application are first briefly described below.
The Blockchain (Blockchain) is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like.
With the rapid development of scientific technology, more and more scenes exist for people to use terminal devices to communicate, for example, in daily life, communication between terminal devices and servers, communication between servers and servers, and the like. The device connection and data scale in the world of everything interconnection reach unprecedented levels, and the first task between terminal devices and between platforms (including cloud ends and server ends) is to establish trusted connection in the background. How to protect the private data of the terminal device becomes a critical issue in the trusted connection and interaction process.
Please refer to fig. 1, which illustrates a schematic structural diagram of a car networking block chain according to an exemplary embodiment of the present application. As shown in fig. 1, each terminal device 101, each server 102, and the in-vehicle network 103 are included therein.
The terminal device 101 may be a terminal device having a communication function, for example, the terminal device 101 may be a user terminal device such as a mobile phone (or referred to as a "cellular" phone) and a computer having a mobile terminal, for example, a portable, pocket, hand-held, computer-embedded or vehicle-mounted mobile apparatus. For example, a Station (STA), a subscriber unit (subscriber unit), a subscriber Station (subscriber Station), a mobile Station (mobile), a remote Station (remote Station), an access point (ap), a remote terminal (remote terminal), an access terminal (access terminal), a user equipment (user terminal), a user agent (user agent), a user equipment (user device), or a user terminal (UE). Specifically, for example, the terminal device 101 may be a mobile terminal such as a smart phone, a tablet computer, an electronic book reader, or may be a smart wearable device such as smart glasses, a smart watch, or a smart band.
Alternatively, the terminal device 101 may be a vehicle-mounted device, for example, a vehicle computer with a wireless communication function, or a wireless communication device externally connected to the vehicle computer.
Alternatively, the terminal device 101 may be a roadside device, for example, a street lamp, a signal lamp or other roadside device having a wireless communication function.
Optionally, the server 102 may be a server, or a plurality of servers, or a virtualization platform, or a cloud computing service center.
The terminal device 101 and the server 102 are connected via a communication network. Alternatively, the communication network may be a wired network or a wireless network.
Optionally, the communication network is a wired network or a wireless network connection, optionally, the wireless network or wired network uses standard communication technologies and/or protocols. The Network is typically the Internet, but may be any Network including, but not limited to, a Local Area Network (LAN), a Metropolitan Area Network (MAN), a Wide Area Network (MAN), any combination of mobile, wired or wireless networks, private networks, or virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including Hypertext Mark-up Language (HTML), Extensible Markup Language (XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec). In other embodiments, custom and/or dedicated data communication techniques may also be used in place of, or in addition to, the data communication techniques described above.
Alternatively, the vehicle-mounted network 103 may be a network composed of other multiple vehicle-mounted terminal devices and a server, and the terminal device 101 may be connected to the vehicle-mounted network, and the server 102 may also be connected to the vehicle-mounted network. The terminal device 101 may serve as a data requester, and initiate a data acquisition request to the server 102, so as to acquire data of other vehicle-mounted terminals in the vehicle-mounted network 103. In the process, the privacy data of the related user is usually protected by setting a pseudonym identity, for example, for the location data of the user a, the server sets the pseudonym identity for the location data of the user a, when other users need to acquire the location data of the user a, a data acquisition request may be sent to the server, and the server uses the pseudonym identity to forward the data to other users, thereby completing the data transmission.
For the process, the data transmitted between the server and the requesting party are all real data, only the identity information of the data is replaced, when the data is stolen, the real data will be leaked, and the problem that the safety protection degree of the data in the transmission process is low exists.
In order to solve the problems in the related art and improve the security of data transmission in a block chain, the application provides a data processing method based on the block chain, which can audit the determined request information through a consensus node in the block chain, and perform differential privacy processing on the data after the audit is passed, so as to prevent data leakage.
Referring to fig. 2, a flowchart of a method for processing data based on a blockchain according to an exemplary embodiment of the present application is shown, where the method for processing data based on a blockchain may be used in a server as shown in fig. 1. As shown in fig. 2, the data processing method based on block chains may include the following steps:
step 201, receiving a data service request sent by a requester.
Wherein the requesting party may be a party that needs to provide the data service. For example, the requesting party may be the terminal device in fig. 1, and when the terminal device needs to acquire data, the requesting party may send a data service request to the server to acquire data required by the requesting party. For example, the data service request may be a request for storing the data of the terminal device, or the data service request may be a request for the terminal device to acquire data from other terminal devices or other servers in the blockchain.
Step 202, determining request information corresponding to the data service request according to the data service request, wherein the request information at least comprises a request priority.
Optionally, in the present application, the server may determine, according to the received data service request, request information corresponding to the data service request, where the request information at least includes a request priority. Wherein the request priority is used to characterize a delay tolerance for processing the data service request. The higher the request priority, the lower the delay tolerance, e.g., 20ms for the requester to process the data service request, the request priority may be level 2, 10ms for the requester to process the data service request, and the request priority may be level 1.
Alternatively, the request information may be data information indicating that the server is required to provide the service. For example, the requesting party is a terminal device, and the terminal device needs to transmit the captured picture information, then the request information may instruct the server to serve the picture information. Or the terminal device needs to transmit its own location information, the request information may instruct the server to serve the terminal device's own location information.
And 203, uploading the request information to the block chain, so that the consensus node in the block chain performs consensus audit on the request information according to the consensus speed corresponding to the request priority.
Alternatively, the server may be regarded as a transmission node in the blockchain, and the server may upload the determined request information to the blockchain. The blockchain comprises a consensus node (another server or terminal equipment) which is used for performing consensus audit on request information transmitted by other transmission nodes by adopting a consensus algorithm based on request priority. Wherein, the consensus algorithm can be written and designed in advance in the consensus node by a developer.
The consensus node can obtain the consensus speed according to the request priority, and perform consensus audit on the request information according to the consensus speed. For example, a corresponding relationship is set between the request priority and the consensus speed, and the consensus node can obtain the corresponding consensus speed according to the request priority, so as to perform consensus audit on the request information. Optionally, in the present application, the consensus audit performed on the request information may be an audit performed on a content format of the request information. For example, in the present application, the content of the request information at least includes a request priority, if the request information includes the request priority, the consensus node performs consensus audit on the request information, and then returns an audit result indicating that the consensus audit is passed to the server, and if the request information does not include the request priority, returns an audit result indicating that the consensus audit is not passed to the server.
And 204, receiving an audit result returned by the block chain, and if the audit result indicates that the consensus audit is passed, performing differential privacy processing on the privacy data corresponding to the data service request.
And the server receives an audit result returned by the consensus node in the block chain, and if the audit result indicates that the consensus audit is passed, a differential privacy processing algorithm is called to perform differential privacy processing on the privacy data corresponding to the data service request. Where the private data may be personal data of the requesting party. For example, the privacy data may be a picture taken by the requestor, a location located by the requestor, user information registered by the requestor, and the like.
In summary, the data service request sent by the requester is received; determining request information corresponding to the data service request according to the data service request, wherein the request information at least comprises a request priority; uploading the request information to a block chain, so that a consensus node in the block chain performs consensus audit on the request information according to a consensus speed corresponding to the request priority; receiving an audit result returned by the block chain, and if the audit result indicates that the consensus audit is passed, performing differential privacy processing on the private data corresponding to the data service request, namely, after the server connected with the block chain performs uplink on the determined request information in the application, performing consensus audit on the request information by a consensus node in the block chain according to the consensus speed corresponding to the request priority in the request information, so that the consensus audit can be performed based on the request priority in the block chain, the efficiency of data processing in the block chain is improved, and after the audit is passed, performing differential privacy processing on the private data, so that the security of data transmission in the block chain is improved.
In a possible implementation manner, the request information further includes a data address and a privacy protection level, where the data address is a storage address of the privacy data, and the privacy protection level is used to indicate a protection level required by the requesting party for the privacy data; the storage pressure in the block chain is reduced through a data address transmission mode, and the data processing efficiency in the block chain and the data transmission safety in the block chain are improved.
Referring to fig. 3, a flowchart of a method for processing data based on a blockchain according to an exemplary embodiment of the present application is shown, where the method for processing data based on a blockchain may be used in a server as shown in fig. 1. As shown in fig. 3, the data processing method based on the blockchain may include the following steps:
step 301, receiving a data service request sent by a requester.
Wherein the requesting party may be a party that needs to provide the data service. For example, the requesting party may be the terminal device in fig. 1, and when the terminal device needs to acquire data, the requesting party may send a data service request to the server to acquire data required by the terminal device. For example, the data service request may be a request for storing the data of the terminal device, or the data service request may be a request for the terminal device to acquire data in other terminal devices or other servers in the blockchain.
For example, for a car networking scenario, the data service request described above may be used to request location services in a car networking scenario. The data service request may be a request that the terminal device needs to acquire location positioning data of other terminal devices in the block chain, or the data service request may also be a request that the terminal device needs to transmit its location positioning data. For a wireless communication scenario, a data service request may be used to request a data transfer service in the wireless communication scenario. The data service request may be a request that the terminal device needs to acquire network data of other terminal devices in the block chain, or the data service request may also be a request that the terminal device needs to transmit its own network data. For a banking network scenario, the data service request may be for requesting a data transfer service in the banking network scenario. The data service request may be a request that the terminal device needs to acquire bank registration data of other users in the block chain, or the data service request may also be a request that the terminal device needs to transmit the bank registration data of the terminal device.
The requester needs to register in the blockchain and sends a data service request to the server according to the identity of the requester. Namely, the server in the application can also receive a registration request sent by a requester, wherein the registration request comprises identity information of the requester; and allocating an identity to the requester according to the identity information of the requester. Optionally, the identity information may be any one or more of an identity number, a mobile phone number, a device number, a Media Access Control (MAC) address of the device, and the like of the user corresponding to the requesting party, and the server may allocate an identity, such as an identity number, to the requesting party according to the identity information.
Optionally, the server may also verify the requester who initiates the data service request, if the requester has already registered, execute step 302, otherwise, show the registration interface in the application interface of the requester, and provide the requester for registration. For example, the server may obtain an identity corresponding to the identity information according to the identity information carried in the data service request sent by the requester, if the identity corresponding to the identity information exists in the server, it is indicated that the requester has been registered, and if the identity corresponding to the identity information does not exist in the server, it is indicated that the requester has not been registered, the server may provide a registration interface for the requester, and provide the requester for registration. Correspondingly, the requesting party may also perform a logoff procedure, i.e. the requesting party sends a logoff request to the server, and the server may delete the identity previously assigned to the requesting party.
Step 302, the identity of the requester and the identity of the server in the data service request are sent to an identity verification module, and the identity verification module is used for authenticating the identity of the requester and the identity of the server.
Optionally, in this application, the server may send the identity of the requestor and the identity of the server in the data service request to the identity verification module, and the identity verification module authenticates the identity of the requestor and the identity of the server. For example, a third-party certification authority is provided outside the blockchain, and the third-party certification authority can perform identity certification on the identity of the requester and the identity of the server.
For example, when the requesting party is a terminal device of a user, the server is a server of an application installed in the terminal device, after the user initiates a data service request to the server through the application in the terminal device, the server sends an identity of the terminal device (denoted by a) and an identity of the server (denoted by S) to a third-party certification authority (denoted by CA), and a and S establish a symmetric key PW through the CA A And PW S Wherein, PW A Is the symmetric key of A and is also the one-way hash function of the password A, and is stored in CA and A. PW (pseudo wire) S Is the symmetric key of A and is also the one-way hash function of the password A, and is stored in CA and S.
Optionally, in the authentication process of the CA, the a and the CA also need to perform data interaction, for example, the a sends a message (a | | S) to the CA, thereby requesting the CA to communicate with the S. CA receiving AAfter the message (A | | S) is sent, the CA randomly selects a multiplication cycle group G with the order of prime number q, wherein G is a generating element of G, and the CA continuously selects random numbers m and n, wherein m and n both belong to a set Z * q Calculating first encryption information M by using M, M being E PWA (g m ) M can be regarded as a secret key PW for CA A For g m And C, sending the first encryption information M obtained by calculation to A by the CA according to the encrypted information. Similarly, the CA calculates the second encryption information N, N ═ E using N PWS (g n ) N can be regarded as a secret key PW for CA S For g n And carrying out encrypted information and sending second encrypted information N to the S. Wherein E is used to indicate the encryption process.
Wherein A receives the first encryption information M and then passes through the set Z * q Selecting a random number a, calculating g m Where q may be sent by CA to a, where the respective results are calculated according to the following formula: g m =D PWA (M),X A =E PWA (g a ),τ AC =H(A||S||PW A I C), wherein X A For using a secret key PW A For g a Information to be encrypted,. tau AC The authentication identifier submitted to the CA for a. A will (A | | X) A ||τ AC ) Sent to the CA. Similarly, the server may receive the second encryption information N, and then perform the second encryption by using the set Z * q In the step (b), a random number b is selected, and g is calculated b Where q may be sent by the CA to S, where the respective results are calculated according to the following formula: g n =D PWS (N),X S =E PWS (g b ),τ SC =H(S||A||PW S C) and will (S | | X) S ||τ SC ) Sent to the CA. Wherein, X S For using a secret key PW S For g to b Information to be encrypted,. tau SC The authentication identifier submitted to the CA for S. Wherein D is used to indicate the decryption process.
CA receives (A | | X) sent by A A ||τ AC ) And receiving (S | | X) sent by S S ||τ SC ) Then, respectively using the secret keys PW A Decrypting X A Secret, secretKey PW S Decrypting X S . By calculating g a =D PWA (X A ),g b =D PWS (X S ) Using g a Verifying the identity of A, using g b The identity of S is verified. If g is a =g m Shows that A passes the identity verification, if g b =g n And the S passes the identity authentication. If g is a Is not equal to g m If A fails authentication, if g b Is not equal to g n Indicating that S fails authentication.
Optionally, after passing this identity verification, the CA also needs to go from set Z * q Selects a random number c and calculates third encryption information X CS =E PWA (g ac ) Fourth encryption information X CA =E PWS (g bc ) And identity authentication result tau CA =H(A||S||PW S ||C),τ CS =H (S||A||PW A | C), where τ is CA For CA to return S identity authentication result to A, tau CS And returning the identity authentication result of the A to the S for the CA. The CA continues to calculate the shared session key sk ═ H for a and S (a | | | S | | C | | | g) abc ) Computing a session key identifier C provided to A S H (sk | | | S), and a session key authenticator C provided to S A H (sk | | a). CA will (C | | X) CA ||τ CA ||C S ) Sending to A, and sending (C | | | X) CS ||τ CS ||C A ) And sending the data to the S.
A receives (C | | X) returned by CA CA ||τ CA ||C S ) Then, use the secret key PW A Decrypting X CA Calculate g bc . I.e., g bc =D PWA (X CA ) By g bc Verifying the identity of the CA, and if the verification is successful, passing tau CA To verify tau AC Whether or not to be associated with τ in A AC The values are consistent, if so, the slave C S Calculates a shared session key sk and calculates an authentication key C A H (sk | | A), mixing C A And sending the data to S. Similarly, S receives (C | | X) back from CA CS ||τ CS ||C A ) Then, using the secret key PW S Decrypting X CS Calculate g ac . I.e., g ac =D PWS (X CS ) By g ac Verifying the identity of the CA, and if the verification is successful, passing tau CS To verify tau SC Whether or not to match tau in S SC The values are consistent, if so, the slave C S A shared session key sk is calculated and an authentication token C is calculated S H (sk | | S), mixing C S And sending the key to A, thereby completing the sharing of the session key, namely completing the identity authentication, and enabling normal communication between the server and the requester.
Optionally, the authentication process may be initiated by the requester to the third-party certificate authority at the same time when the requester sends the data service request, or may be initiated by the requester after sending the data service request and the server, which is not limited in this application.
Step 303, when the identity of the requesting party and the identity of the server both pass the authentication, determining request information corresponding to the data service request according to the data service request.
When the identity of the requester and the identity of the server are authenticated, the data can be transmitted in a symmetric encryption mode, so that the security of data service request transmission is ensured.
Optionally, in the present application, the server may determine, according to the received data service request, request information corresponding to the data service request, where the request information at least includes a request priority. Wherein the request priority is used to characterize a delay tolerance for processing the data service request. The higher the request priority, the lower the delay tolerance, e.g., 20ms for the requester to process the data service request, the request priority may be level 2, 10ms for the requester to process the data service request, and the request priority may be level 1.
Optionally, the request information may be used to indicate data information that the server is required to provide the service. For example, the requesting party is a terminal device, and the terminal device needs to transmit the captured picture information, then the request information may instruct the server to serve the picture information. Or the terminal device needs to transmit its own location information, the request information may instruct the server to serve the terminal device's own location information.
Optionally, the request information further includes a data address and a privacy protection level, where the data address is a storage address of the privacy data, and the privacy protection level is used to indicate a protection level required by the requesting party for the privacy data. In a possible implementation manner, when a requester initiates a data service request, a server may store private data corresponding to the data service request in a storage system, and receive a first hash address returned by a storage module; and taking the first hash address as a data address in the request information.
Alternatively, the private data may be personal data of the requesting party. For example, for a car networking scenario, the private data may be location data, travel data, etc. of the requesting party. Alternatively, the storage System may be independent of the blockchain, for example, the storage System may be an InterPlanetary File System (IPFS). After the identity authentication is passed, the server encrypts and uploads the privacy data of the requester in the Internet of vehicles to the IPFS, and receives a first hash address returned by the IPFS. For example, the location data of the requester in the Internet of vehicles is denoted as r A =(x A ,y A ),(x A ,y A ) Is the position coordinate of the requester and combines the identity Q and the positioning data r of the requester A Encryption as A lcoa . I.e. r A =E(Q,A lcoa ). The server encrypts the data A lcoa Sending the address to an IPFS system, and returning a first hash address A to a server after the IPFS is successfully stored addr =H(A lcoa )。
Optionally, the server may further obtain the privacy protection level selected by the requestor according to the data service request. In one possible implementation, the data service request is parsed to obtain the privacy protection level of the requestor included in the data service request. That is, the data service request sent by the requester carries the privacy protection level and is sent to the server. For example, the terminal device as the requesting party may be provided with a privacy protection level selection interface, and the user may select a corresponding privacy protection level in the selection interface, and when sending the data service request, carry the selected privacy protection level in the data service request, and send the data service request to the server.
Or, the server may also obtain the privacy protection level according to the application scenario to which the data service request belongs. For example, different application scenarios may correspond to different privacy protection levels, and the server obtains the corresponding privacy protection level by obtaining the application scenario to which the data service request belongs. For example, a scene to which the data service request belongs is an automatic driving scene, and a privacy protection level corresponding to the scene is 3 levels, please refer to table 1, which shows a corresponding relationship between an application scene and a privacy protection level according to an example of the present application.
Application scenarios Level of privacy protection
Scene one Level one
Scene two Class two
Scene three Level three
…… ……
TABLE 1
The server may also determine an application scenario to which the data service request belongs according to the data service request, and obtain the privacy protection level corresponding to the application scenario through the lookup table 1, where if the application scenario is scenario one, the privacy protection level obtained by the server is level one.
Optionally, after determining the application scenario to which the data service request belongs according to the data service request, the server may further obtain a request priority according to the application scenario to which the data service request belongs; and determining request information corresponding to the data service request according to the request priority. Wherein the request priority is used to characterize a delay tolerance for processing the data service request. Optionally, the developer may sort the priorities according to the delay tolerance of the application scenario, and set the delay tolerances of different priorities, so that the server in the block chain may find the optimal allocation policy. Optionally, in the application, the terminal device serving as the requester may also identify the current application scenario, and carry the current application scenario in the data service request, so that the server obtains the application scenario to which the data service request belongs.
That is, the server may also obtain the corresponding request priority by obtaining the application scenario to which the data service request belongs. For example, the scenario to which the data service request belongs is an automatic driving scenario, and the request priority corresponding to the scenario is level 1, please refer to table 2, which shows a corresponding relationship between an application scenario and the request priority according to an example of the present application.
Application scenarios Request priority
Scene one Priority one
Scene two Priority two
Scene three Priority three
…… ……
TABLE 2
After determining the application scenario to which the data service request belongs according to the data service request, the server obtains the request priority corresponding to the application scenario through the lookup table 2, and if the application scenario is scenario one, the request priority obtained by the server is priority one.
For example, the priority is an emergency request, the delay tolerance is 0-20 ms, the data volume is small, and the real-time requirement is highest. Therefore, such requests have the highest priority, such as application scenarios like real-time traffic warning, autonomous driving, remote driving, etc. The priority level two is a real-time request, the delay tolerance is 20-200 ms, and the application scenes such as high-definition real-time maps and map navigation are used. Priority three is a general request, the delay tolerance is >200ms, and the application scenarios such as initiating location sharing have a wide range of delay tolerance.
Optionally, the server may determine the request information according to the first hash address, the request priority, and the privacy protection level. For example, the attribute of the request information is a block attribute, and the data address, the request priority, and the privacy protection level are packaged to obtain the request information. For example, the data address is A addr Request priority is U A Privacy protection class is K A The request information finally acquired by the server is A req ={A addr |U A |K A }。
And step 304, uploading the request information to the block chain, so that the consensus node in the block chain performs consensus audit on the request information according to the consensus speed corresponding to the request priority.
Alternatively, the server may be regarded as a transmission node in the blockchain, and the server may upload the determined request information to the blockchain. The blockchain comprises a consensus node (another server or terminal equipment) which is used for performing consensus audit on request information transmitted by other transmission nodes by adopting a consensus algorithm based on request priority. Wherein, the consensus algorithm can be written and designed in advance in the consensus node by a developer.
The consensus node can acquire the consensus speed according to the request priority, and perform consensus audit on the request information according to the consensus speed, so that the data service request is ensured to complete the consensus audit within the delay tolerance range. For example, a corresponding relationship is set between the request priority and the consensus speed, the higher the request priority is, the faster the consensus speed is, and the consensus node can obtain the corresponding consensus speed according to the request priority, thereby performing consensus audit on the request information. Optionally, in the present application, the consensus audit performed on the request information may be an audit performed on a content format of the request information. For example, in the application, the content of the request information includes a data address, a request priority and a privacy protection level, if the request information includes the data address, the request priority and the privacy protection level, the consensus node performs consensus audit on the request information, and then returns an audit result indicating that the consensus audit is passed to the server, and if the request information does not include any parameter of the data address, the request priority and the privacy protection level, then returns an audit result indicating that the consensus audit is not passed to the server.
And 305, receiving an audit result returned by the block chain, and if the audit result indicates that the consensus audit is passed, performing differential privacy processing on the privacy data corresponding to the data service request.
Optionally, the server may receive an audit result returned by the block chain, and perform differential privacy processing on the privacy data corresponding to the data service request when the audit result indicates that the consensus audit is passed. And if the audit result indicates that the consensus audit is not passed, discarding the data service request.
Optionally, the server performs the differential privacy processing on the privacy data corresponding to the data service request in the following manner. The server acquires a privacy budget of the privacy data according to the privacy protection level; calculating sensitivity corresponding to the data service request according to the privacy data; and according to the privacy budget and the sensitivity, noise is added to the privacy data, and the noise-added privacy data is uploaded to the block chain again.
Optionally, the server may invoke a differential privacy processing intelligence contract to perform differential privacy processing on the privacy data. For example, the server may invoke a differential privacy processing intelligent contract to view the privacy protection level K in the request message A Privacy protection level K A Invoking a differential privacy processing intelligence responsive to the privacy budget range selectable for the request randomly selects epsilon within the privacy budget range A As conform to K A The privacy budget.
Optionally, the server may also invoke a differential privacy processing intelligence contract to calculate the sensitivity of the data service request. Wherein the differential privacy processing intelligent contract can calculate the sensitivity according to a formula.
l=max DD′ ‖D-D′‖ 1
Where l represents the sensitivity, D is the private data, D' is the neighborhood of the private data, | · | 1 Representing a first order norm distance.
Optionally, the server may employ a laplacian (Laplace) mechanism to add noise to the private data. For example, for the above positioning data r A In other words, the server may be as follows
Figure RE-GDA0003721689350000091
Adding noise in a mode to obtain data r after noise addition A '。
Wherein, it is provided with
Figure RE-GDA0003721689350000092
Then
Figure RE-GDA0003721689350000093
Is a Laplace distribution with a probability density function of
Figure RE-GDA0003721689350000094
The expected value of x is 0.
Optionally, before obtaining the privacy budget of the privacy data according to the privacy protection level, the server may further query whether the historical information set of the block chain includes information that is the same as the requested information; when the historical information set contains the information which is the same as the request information, obtaining a historical privacy budget corresponding to the information which is the same as the request information, and obtaining the historical privacy budget as the privacy budget of the privacy data; and when the historical information set does not contain the same information as the request information, executing a step of acquiring the privacy budget of the privacy data according to the privacy protection level. That is, the server first searches the history information set of the block chain for whether the same information exists, and whether the privacy protection level corresponding to the information is the same as the privacy protection level of the requested information determined this time (all K are K) A ) If the privacy budget exists, the privacy budget corresponding to the previous information is found and recorded as epsilon A Therefore, the former privacy budget is reused, and the privacy cost is reduced.
Optionally, after the above step is finished, the server may further combine and encrypt the identity of the requestor, the private data, and the private data subjected to the differential privacy processing, to obtain encrypted target data; storing the target data into a storage module, and receiving a second hash address returned by the storage module; and acquiring the second hash address, the privacy protection level and the privacy budget of the privacy data as historical request information, and uploading the historical request information to a historical information set of the block chain.
For example, the server calls a differential privacy processing intelligent contract to obtain the positioning data r before the noise is added by the requester A And the noisy positioning data r A ' and the identity of the requesting party and the positioning data r before the noise is added A And the noisy positioning data r A 'encryption is A' loac . Wherein the content of the first and second substances,
A′ loac =E(A,r A ,r′ A )
optionally, the server is obtaining A' loac Then, A 'may be prepared' loac Uploading the data to the IPFS, and returning the second hash address after the IPFS is successfully stored. A 'for second Hash address' addr It is shown that,
A′ addr =H(A′ loac )
optionally, the server may obtain the history request information a 'according to the second hash address, the privacy protection level, and the privacy budget of the privacy data' req ={A′ addr |K AA And entering a chain for later inquiry.
In summary, the data service request sent by the requester is received; determining request information corresponding to the data service request according to the data service request, wherein the request information at least comprises a request priority; uploading the request information to a block chain, so that consensus nodes in the block chain perform consensus audit on the request information according to the consensus speed corresponding to the request priority; receiving an audit result returned by the block chain, and if the audit result indicates that the consensus audit is passed, performing differential privacy processing on the private data corresponding to the data service request, namely, after a server connected with the block chain performs uplink on the determined request information in the application, performing consensus audit on the request information by a consensus node in the block chain according to the consensus speed corresponding to the request priority in the request information, so that the consensus audit can be performed based on the request priority in the block chain, the efficiency of data processing in the block chain is improved, and after the audit is passed, performing differential privacy processing on the private data, so that the security of data transmission in the block chain is improved.
In addition, the private data of the requester are stored in the IPFS in an encrypted mode, the block chain only stores the hash address of the private data of the requester, the storage pressure of the block chain is effectively reduced, the storage efficiency is improved, the efficient and stable operation of the block chain is guaranteed, and the method and the device are suitable for scenes with high requirements on the real-time performance of the Internet of vehicles.
Taking an example that a requester of an execution subject is a terminal device, the present application provides a data processing method based on a block chain, and please refer to fig. 4, which shows a method flowchart of the data processing method based on the block chain according to an exemplary embodiment of the present application, where the data processing method based on the block chain may be used in the terminal device shown in fig. 1. The data processing method based on the block chain can comprise the following steps:
step 401, sending a data service request to a server, so that the server determines request information corresponding to the data service request according to the data service request, and uploads the request information to a block chain, wherein the request information at least comprises a request priority; the request information is used for the consensus node in the block chain to carry out consensus audit on the request information according to the consensus speed corresponding to the request priority; and the server is also used for receiving the auditing result returned by the block chain, and if the auditing result indicates that the consensus auditing is passed, performing differential privacy processing on the privacy data corresponding to the data service request.
Wherein the terminal device acts as a requester to send a data service request to the server, thereby causing the server to perform the subsequent steps. The details of the server may refer to the description in the embodiment of fig. 2 or fig. 3, and are not described herein again.
In summary, the data service request sent by the requester is received; determining request information corresponding to the data service request according to the data service request, wherein the request information at least comprises a request priority; uploading the request information to a block chain, so that consensus nodes in the block chain perform consensus audit on the request information according to the consensus speed corresponding to the request priority; receiving an audit result returned by the block chain, and if the audit result indicates that the consensus audit is passed, performing differential privacy processing on the private data corresponding to the data service request, namely, after the server connected with the block chain performs uplink on the determined request information in the application, performing consensus audit on the request information by a consensus node in the block chain according to the consensus speed corresponding to the request priority in the request information, so that the consensus audit can be performed based on the request priority in the block chain, the efficiency of data processing in the block chain is improved, and after the audit is passed, performing differential privacy processing on the private data, so that the security of data transmission in the block chain is improved.
Referring to fig. 5, which illustrates a data processing system based on block chains according to an exemplary embodiment of the present application, as shown in fig. 5, the data processing system 500 includes: a requestor 501, a blockchain 502, a data storage module 503, an authentication module 504, and a provider 505.
Wherein the requestor 501 is configured to send a data service request to a server in the blockchain 502. Optionally, the manner in which the requester sends the data service request may refer to the description in step 301, and is not described herein again.
The block chain 502 in the present application includes a server and a consensus node; the server is used for determining request information corresponding to the data service request according to the data service request, wherein the request information at least comprises request priority; uploading the request information into the blockchain 502; the consensus node is used for performing consensus audit according to the consensus speed request information corresponding to the request priority; the server is further configured to receive an audit result returned by the block chain 502, and perform differential privacy processing on the privacy data corresponding to the data service request if the audit result indicates that the consensus audit is passed.
Optionally, details of implementation of the server and the consensus node in the blockchain may also refer to the descriptions in step 302 to step 305, which are not described herein again.
The data storage module 502 is configured to store the private data of the requester 501, and return a first hash address corresponding to the private data to the server. Optionally, details of the implementation of the data storage module may refer to the above IPFS, and are not described herein again.
The identity verification module 504 is configured to receive the identity of the requestor 501 and the identity of the server sent by the server, and authenticate the identity of the requestor 501 and the identity of the server. Optionally, details of the implementation of the identity verification module may refer to the manner of the third-party certification authority CA, which is not described herein again.
The provider 502 is used to provide private data of the requester 501. The provider 502 may be a device in a network that may provide private data to a requestor. For example, the provider 502 may be a vehicle network formed by various vehicle-mounted devices.
In summary, the data service request sent by the requester is received; determining request information corresponding to the data service request according to the data service request, wherein the request information at least comprises a request priority; uploading the request information to a block chain, so that consensus nodes in the block chain perform consensus audit on the request information according to the consensus speed corresponding to the request priority; the checking result returned by the block chain is received, and if the checking result indicates that the consensus checking is passed, the differential privacy processing is performed on the private data corresponding to the data service request, that is, after the determined request information is uplinked through the server in the block chain, the consensus node in the block chain performs the consensus checking on the request information according to the consensus speed corresponding to the request priority in the request information, so that the consensus checking can be performed on the block chain based on the request priority, the efficiency of data processing in the block chain is improved, the differential privacy processing is performed on the private data after the checking is passed, and the security of data transmission in the block chain is improved.
Referring to fig. 6, a flowchart of an exemplary embodiment of the present application is shown, which relates to a method for processing data based on a blockchain of fig. 5, and the method for processing data based on a blockchain may be used in a server as a transport node in a blockchain of fig. 5. As shown in fig. 6, the data processing method based on the blockchain may include the following steps:
step 601, the server detects whether the requester is registered.
If not, go to step 602, and if it is, go to step 603.
Step 602, prompting the requester to register.
Optionally, the manner of registering by the requester may refer to the description in step 301, and is not described herein again.
Step 603, the requester sends a location service request to the server.
The location service request is equivalent to the data service request in the embodiment of fig. 3.
In step 604, the third party certification authority authenticates the identity of the requester and the server.
If the identity authentication between the requester and the server is passed, step 605 is executed, and if the identity authentication between the requester and the server is not passed, the process is ended. Optionally, the manner of performing authentication by the third-party authentication mechanism may refer to the description in step 302, and is not described herein again.
In step 605, the server encrypts and stores the private data in the IPFS.
In step 606, the server receives the hash address of the private data in the IPFS.
In step 607, the server obtains the request priority of the requester.
At step 608, the server obtains the privacy protection level of the requestor.
In step 609, the server obtains the request information.
And step 610, the consensus node performs consensus examination on the request information.
If the examination is passed, step 612 is executed, and if the examination is not passed, step 611 is executed.
In step 611, the server discards the request information. Is that
In step 612, the server will request information uplink.
Step 613, the server calls a differential privacy processing intelligent contract to process the privacy data.
Optionally, the implementation manner in step 606 to step 613 may refer to the description in step 303 to step 305, and is not described herein again.
In summary, the data service request sent by the requester is received; determining request information corresponding to the data service request according to the data service request, wherein the request information at least comprises a request priority; uploading the request information to a block chain, so that consensus nodes in the block chain perform consensus audit on the request information according to the consensus speed corresponding to the request priority; receiving an audit result returned by the block chain, and if the audit result indicates that the consensus audit is passed, performing differential privacy processing on the private data corresponding to the data service request, namely, after the server connected with the block chain performs uplink on the determined request information in the application, performing consensus audit on the request information by a consensus node in the block chain according to the consensus speed corresponding to the request priority in the request information, so that the consensus audit can be performed based on the request priority in the block chain, the efficiency of data processing in the block chain is improved, and after the audit is passed, performing differential privacy processing on the private data, so that the security of data transmission in the block chain is improved.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 7, a block diagram of a data processing apparatus based on a blockchain according to an exemplary embodiment of the present application is shown. The blockchain-based data processing apparatus 700 may be used in a server to perform all or part of the steps of the method provided by the embodiments shown in fig. 2, fig. 3 or fig. 6. The block chain-based data processing apparatus 700 includes:
a first receiving module 701, configured to receive a data service request sent by a requester;
a first determining module 702, configured to determine, according to the data service request, request information corresponding to the data service request, where the request information at least includes a request priority;
a first uploading module 703, configured to upload the request information to the block chain, so that a consensus node in the block chain performs consensus audit on the request information according to a consensus speed corresponding to the request priority;
and the data processing module 704 is configured to receive an audit result returned by the block chain, and perform differential privacy processing on the privacy data corresponding to the data service request if the audit result indicates that consensus audit is passed.
In summary, the data service request sent by the requester is received; determining request information corresponding to the data service request according to the data service request, wherein the request information at least comprises a request priority; uploading the request information to a block chain, so that a consensus node in the block chain performs consensus audit on the request information according to a consensus speed corresponding to the request priority; receiving an audit result returned by the block chain, and if the audit result indicates that the consensus audit is passed, performing differential privacy processing on the private data corresponding to the data service request, namely, after the server connected with the block chain performs uplink on the determined request information in the application, performing consensus audit on the request information by a consensus node in the block chain according to the consensus speed corresponding to the request priority in the request information, so that the consensus audit can be performed based on the request priority in the block chain, the efficiency of data processing in the block chain is improved, and after the audit is passed, performing differential privacy processing on the private data, so that the security of data transmission in the block chain is improved.
Optionally, the first determining module 702 includes: a first determining unit, a first obtaining unit and a second determining unit;
the first determining unit is configured to determine, according to the data service request, an application scenario to which the data service request belongs;
the first obtaining unit is configured to obtain the request priority according to an application scenario to which the data service request belongs;
and the second determining unit is used for determining the request information corresponding to the data service request according to the request priority.
Optionally, the request information further includes a data address and a privacy protection level, where the data address is a storage address of the privacy data, and the privacy protection level is used to indicate a protection level required by the requester for the privacy data;
the device further comprises:
the second receiving module is used for storing the private data corresponding to the data service request into a storage system before the request information corresponding to the data service request is determined according to the request priority, and receiving the first hash address returned by the storage module;
the first acquisition module is used for acquiring the privacy protection level selected by the requester according to the data service request;
the second determining unit is configured to determine the request information according to the first hash address, the request priority, and the privacy protection level.
Optionally, the first obtaining module includes: a first acquisition unit or a second acquisition unit;
the first obtaining unit is configured to analyze the data service request, and obtain a privacy protection level of the requester included in the data service request;
the second obtaining unit is configured to obtain the privacy protection level according to an application scenario to which the data service request belongs.
Optionally, the data processing module 704 includes: the system comprises a first receiving unit, a first calculating unit and a first uploading unit;
the first receiving unit is configured to receive an audit result returned by the block chain, and if the audit result indicates that consensus audit is passed, obtain a privacy budget of the privacy data according to the privacy protection level;
the first calculating unit is used for calculating the sensitivity corresponding to the data service request according to the privacy data;
the first uploading unit is used for adding noise to the privacy data according to the privacy budget and the sensitivity, and uploading the noise-added privacy data to the block chain again.
Optionally, the apparatus further comprises:
a first query module, configured to query whether a history information set of the block chain includes information that is the same as the request information before the privacy budget of the private data is obtained according to the privacy protection level;
the calculating a privacy budget for the private data according to the privacy protection level includes:
when the historical information set contains the same information as the request information, acquiring a historical privacy budget corresponding to the same information as the request information, and acquiring the historical privacy budget as the privacy budget of the privacy data;
and when the historical information set does not contain the same information as the request information, executing the step of acquiring the privacy budget of the privacy data according to the privacy protection level.
Optionally, the apparatus further comprises:
the second obtaining module is used for combining and encrypting the identity of the requester, the private data and the private data subjected to the differential privacy processing after the private data corresponding to the data service request is subjected to the differential privacy processing, so as to obtain encrypted target data;
the second receiving module is used for storing the target data into the storage module and receiving a second hash address returned by the storage module;
and the third acquisition module is used for acquiring the second hash address, the privacy protection level and the privacy budget of the privacy data as historical request information and uploading the historical request information to the historical information set of the block chain.
Optionally, the attribute of the request information is a block attribute, and the second determining unit is configured to determine the block attribute as the block attribute
And packaging the data address, the request priority and the privacy protection level to acquire the request information.
Optionally, the apparatus further comprises:
the first authentication module is used for sending the identity of the requester and the identity of the server in the data service request to an identity verification module before the request information corresponding to the data service request is determined according to the data service request, and the identity verification module is used for authenticating the identity of the requester and the identity of the server;
and the first execution module is used for executing the step of acquiring the request information of the requester according to the data service request when the identity of the requester and the identity of the server are authenticated.
Optionally, the apparatus further comprises:
a third receiving module, configured to receive a registration request sent by the requestor, where the registration request includes identity information of the requestor;
and the first distribution module is used for distributing the identity identification to the requester according to the identity information of the requester.
Optionally, the data service request is used to request a location service in the car networking, and the privacy data includes location positioning data of the requesting party.
Referring to fig. 8, a block diagram of a data processing apparatus based on a blockchain according to an exemplary embodiment of the present application is shown. The data processing apparatus 800 based on block chains may be used in a terminal device to perform all or part of the steps performed by the terminal device in the method provided in the embodiment shown in fig. 4. The block chain-based data processing apparatus 800 includes:
a first sending module 801, configured to send a data service request to a server, so that the server determines, according to the data service request, request information corresponding to the data service request, and uploads the request information to the block chain, where the request information at least includes a request priority; the request information is used for the consensus nodes in the block chain to perform consensus audit on the request information according to the consensus speed corresponding to the request priority; and the server is also used for receiving an audit result returned by the block chain, and if the audit result indicates that consensus audit is passed, performing differential privacy processing on the privacy data corresponding to the data service request.
In summary, the data service request sent by the requester is received; determining request information corresponding to the data service request according to the data service request, wherein the request information at least comprises a request priority; uploading the request information to a block chain, so that consensus nodes in the block chain perform consensus audit on the request information according to the consensus speed corresponding to the request priority; receiving an audit result returned by the block chain, and if the audit result indicates that the consensus audit is passed, performing differential privacy processing on the private data corresponding to the data service request, namely, after a server connected with the block chain performs uplink on the determined request information in the application, performing consensus audit on the request information by a consensus node in the block chain according to the consensus speed corresponding to the request priority in the request information, so that the consensus audit can be performed based on the request priority in the block chain, the efficiency of data processing in the block chain is improved, and after the audit is passed, performing differential privacy processing on the private data, so that the security of data transmission in the block chain is improved.
Referring to fig. 9, a schematic structural diagram of a terminal device according to an exemplary embodiment of the present application is shown, and as shown in fig. 9, the terminal device includes a processor 910, a memory 920, and a display component 930. The memory 920 stores at least one instruction, which is loaded and executed by the processor 910 to implement some or all of the steps performed by the terminal device as a requester in the data processing method based on the blockchain according to the above embodiments.
Referring to fig. 10, a schematic structural diagram of a server according to an embodiment of the present application is shown. The server is configured to implement the data processing method based on the blockchain provided in the foregoing embodiment. Specifically, the method comprises the following steps:
the server 1000 includes a Central Processing Unit (CPU)1001, a system memory 1004 including a Random Access Memory (RAM)1002 and a Read Only Memory (ROM)1003, and a system bus 1005 connecting the system memory 1004 and the central processing unit 1001. The server 1000 also includes a basic input/output system (I/O system) 1006, which facilitates the transfer of information between devices within the computer, and a mass storage device 1007, which stores an operating system 1013, application programs 1014, and other program modules 1015.
The basic input/output system 1006 includes a display 1008 for displaying information and an input device 1009, such as a mouse, keyboard, etc., for inputting information by a user character. Wherein the display 1008 and input device 1009 are connected to the central processing unit 1001 through an input-output controller 1010 connected to the system bus 1005. The basic input/output system 1006 may also include an input/output controller 1010 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input-output controller 1010 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 1007 is connected to the central processing unit 1001 through a mass storage controller (not shown) connected to the system bus 1005. The mass storage device 1007 and its associated computer-readable media provide non-volatile storage for the server 1000. That is, the mass storage device 1007 may include a computer readable medium (not shown) such as a hard disk or CD-ROM drive.
Without loss of generality, the computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 1004 and mass storage device 1007 described above may be collectively referred to as memory.
The server 1000 may also operate as a remote computer connected to a network via a network, such as the internet, according to various embodiments of the present application. That is, the server 1000 may be connected to the network 1012 through the network interface unit 1011 connected to the system bus 1005, or the network interface unit 1011 may be used to connect to another type of network or a remote computer system (not shown).
The mass storage device 1007 has stored therein at least one instruction, at least one program, set of codes, or set of instructions configured to be executed by one or more processors to implement the functions of the various steps performed by the server in the embodiments described above.
The present invention also provides a computer-readable medium, which stores at least one instruction, where the at least one instruction is loaded and executed by the processor to implement all or part of the steps performed by the server in the data processing method based on the blockchain according to the above embodiments.
The present application further provides a computer program product, which stores at least one instruction, where the at least one instruction is loaded and executed by the processor to implement the method for processing data based on a blockchain according to the above embodiments, and all or part of the steps are performed by a server.
It should be noted that: in the device provided in the above embodiment, when information pushing or information displaying is performed, only the division of the function modules is illustrated, and in practical applications, the function distribution may be completed by different function modules according to needs, that is, the internal structure of the device is divided into different function modules, so as to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (19)

1. A data processing method based on a block chain is applied to a server, and the method comprises the following steps:
receiving a data service request sent by a requester;
determining request information corresponding to the data service request according to the data service request, wherein the request information at least comprises a request priority;
uploading the request information to the block chain, so that a consensus node in the block chain performs consensus audit on the request information according to a consensus speed corresponding to the request priority;
and receiving an audit result returned by the block chain, and if the audit result indicates that consensus audit is passed, performing differential privacy processing on the privacy data corresponding to the data service request.
2. The method according to claim 1, wherein the determining request information corresponding to the data service request according to the data service request comprises:
determining an application scene to which the data service request belongs according to the data service request;
acquiring the request priority according to the application scene to which the data service request belongs;
and determining the request information corresponding to the data service request according to the request priority.
3. The method of claim 2, wherein the request information further comprises a data address and a privacy protection level, wherein the data address is a storage address of the privacy data, and the privacy protection level is used for indicating a protection level required by the requester for the privacy data;
before determining the request information corresponding to the data service request according to the request priority, the method further includes:
storing the private data corresponding to the data service request into a storage system, and receiving a first hash address returned by the storage module;
according to the data service request, obtaining the privacy protection level selected by the requester;
the determining the request information corresponding to the data service request according to the request priority includes:
and determining the request information according to the first hash address, the request priority and the privacy protection level.
4. The method of claim 3, wherein obtaining the privacy protection level selected by the requestor based on the data service request comprises:
analyzing the data service request to acquire the privacy protection level of the requester contained in the data service request; alternatively, the first and second electrodes may be,
and acquiring the privacy protection level according to the application scene to which the data service request belongs.
5. The method according to claim 3, wherein the receiving an audit result returned by the block chain, and if the audit result indicates that consensus audit passes, performing differential privacy processing on the private data corresponding to the data service request includes:
receiving an audit result returned by the block chain, and if the audit result indicates that consensus audit is passed, acquiring the privacy budget of the privacy data according to the privacy protection level;
calculating sensitivity corresponding to the data service request according to the privacy data;
and denoising the privacy data according to the privacy budget and the sensitivity, and uploading the denoised privacy data to the block chain again.
6. The method of claim 5, further comprising, prior to the obtaining a privacy budget for the private data according to the privacy protection level:
inquiring whether the historical information set of the block chain contains the same information as the request information;
the calculating a privacy budget for the private data according to the privacy protection level includes:
when the historical information set contains the same information as the request information, acquiring a historical privacy budget corresponding to the same information as the request information, and acquiring the historical privacy budget as the privacy budget of the privacy data;
and when the historical information set does not contain the same information as the request information, executing the step of acquiring the privacy budget of the privacy data according to the privacy protection level.
7. The method according to claim 6, further comprising, after the performing differential privacy processing on the privacy data corresponding to the data service request:
combining and encrypting the identity of the requester, the private data and the private data subjected to the differential privacy processing to obtain encrypted target data;
storing the target data into the storage module, and receiving a second hash address returned by the storage module;
and acquiring the second hash address, the privacy protection level and the privacy budget of the privacy data as historical request information, and uploading the historical request information to the historical information set of the block chain.
8. The method of claim 3, wherein the attribute of the requested information is a block attribute, and wherein determining the requested information according to the data address, the request priority, and the privacy protection level comprises:
and packaging the data address, the request priority and the privacy protection level to acquire the request information.
9. The method according to any one of claims 1 to 8, before said determining, according to the data service request, request information corresponding to the data service request, further comprising:
sending the identity of the requester and the identity of the server in the data service request to an identity verification module, wherein the identity verification module is used for authenticating the identity of the requester and the identity of the server;
and when the identity of the requester and the identity of the server both pass the authentication, executing the step of acquiring the request information of the requester according to the data service request.
10. The method according to any one of claims 1 to 8, further comprising:
receiving a registration request sent by the requester, wherein the registration request comprises identity information of the requester;
and distributing an identity to the requester according to the identity information of the requester.
11. The method according to any of claims 1 to 8, wherein the data service request is for requesting a location service in a car networking, and the privacy data comprises location positioning data of the requesting party.
12. A data processing method based on a block chain is applied to a terminal device, and the method comprises the following steps:
sending a data service request to a server, so that the server determines request information corresponding to the data service request according to the data service request and uploads the request information to the block chain, wherein the request information at least comprises a request priority; the request information is used for the consensus node in the block chain to carry out consensus audit on the request information according to the consensus speed corresponding to the request priority; and the server is also used for receiving an audit result returned by the block chain, and if the audit result indicates that consensus audit is passed, performing differential privacy processing on the privacy data corresponding to the data service request.
13. A blockchain-based data processing system, the data processing system comprising: the system comprises a requester, a block chain, a data storage module, an identity verification module and a provider;
the requesting party is used for sending a data service request to a server in the block chain;
the block chain comprises the server and a consensus node;
the server is used for determining request information corresponding to the data service request according to the data service request, wherein the request information at least comprises request priority; uploading the request information to the block chain;
the consensus node is used for performing consensus auditing on the request information according to the consensus speed corresponding to the request priority;
the server is further configured to receive an audit result returned by the block chain, and perform differential privacy processing on the privacy data corresponding to the data service request if the audit result indicates that consensus audit is passed;
the data storage module is used for storing the private data of the requester and returning a first hash address corresponding to the private data to the server;
the identity verification module is used for receiving the identity of the requester and the identity of the server sent by the server and authenticating the identity of the requester and the identity of the server;
the provider is used for providing the privacy data of the requester.
14. A data processing apparatus based on a blockchain, applied to a server, the apparatus comprising:
the first receiving module is used for receiving a data service request sent by a requester;
a first determining module, configured to determine, according to the data service request, request information corresponding to the data service request, where the request information at least includes a request priority;
the first uploading module is used for uploading the request information to the block chain so that the consensus node in the block chain performs consensus audit on the request information according to the consensus speed corresponding to the request priority;
and the data processing module is used for receiving the audit result returned by the block chain, and if the audit result indicates that consensus audit is passed, performing differential privacy processing on the privacy data corresponding to the data service request.
15. A data processing apparatus based on a block chain, applied to a terminal device, the apparatus comprising:
a first sending module, configured to send a data service request to a server, so that the server determines, according to the data service request, request information corresponding to the data service request, and uploads the request information to the block chain, where the request information at least includes a request priority; the request information is used for the consensus node in the block chain to carry out consensus audit on the request information according to the consensus speed corresponding to the request priority; and the server is also used for receiving an audit result returned by the block chain, and if the audit result indicates that consensus audit is passed, performing differential privacy processing on the privacy data corresponding to the data service request.
16. A server, comprising a processor and a memory, wherein the memory has stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by the processor to implement the blockchain based data processing method according to any one of claims 1 to 11.
17. A terminal device, characterized in that it comprises a processor and a memory, in which at least one instruction, at least one program, a set of codes or a set of instructions is stored, which is loaded and executed by the processor to implement the blockchain based data processing method according to claim 12.
18. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method of blockchain based data processing according to any one of claims 1 to 11.
19. A computer readable storage medium, having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method of blockchain based data processing according to claim 12.
CN202210523000.4A 2022-05-13 2022-05-13 Data processing method and device based on block chain, server and storage medium Pending CN114978645A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210523000.4A CN114978645A (en) 2022-05-13 2022-05-13 Data processing method and device based on block chain, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210523000.4A CN114978645A (en) 2022-05-13 2022-05-13 Data processing method and device based on block chain, server and storage medium

Publications (1)

Publication Number Publication Date
CN114978645A true CN114978645A (en) 2022-08-30

Family

ID=82982415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210523000.4A Pending CN114978645A (en) 2022-05-13 2022-05-13 Data processing method and device based on block chain, server and storage medium

Country Status (1)

Country Link
CN (1) CN114978645A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116707868A (en) * 2023-05-11 2023-09-05 西安理工大学 Block chain-based Internet of vehicles access control algorithm

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190122296A1 (en) * 2017-10-23 2019-04-25 Alibaba Group Holding Limited Data auditing method and device
CN110941856A (en) * 2019-12-04 2020-03-31 广西民族大学 Data differential privacy protection sharing platform based on block chain
CN112507377A (en) * 2020-11-30 2021-03-16 北京理工大学 Block chain enabling supply chain system key information protection method based on differential privacy
CN112527421A (en) * 2020-12-28 2021-03-19 平安普惠企业管理有限公司 Service calling method, device, equipment and storage medium
CN114371917A (en) * 2022-01-07 2022-04-19 中国工商银行股份有限公司 Block chain-based demand processing method and system, storage medium and electronic device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190122296A1 (en) * 2017-10-23 2019-04-25 Alibaba Group Holding Limited Data auditing method and device
CN110941856A (en) * 2019-12-04 2020-03-31 广西民族大学 Data differential privacy protection sharing platform based on block chain
CN112507377A (en) * 2020-11-30 2021-03-16 北京理工大学 Block chain enabling supply chain system key information protection method based on differential privacy
CN112527421A (en) * 2020-12-28 2021-03-19 平安普惠企业管理有限公司 Service calling method, device, equipment and storage medium
CN114371917A (en) * 2022-01-07 2022-04-19 中国工商银行股份有限公司 Block chain-based demand processing method and system, storage medium and electronic device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116707868A (en) * 2023-05-11 2023-09-05 西安理工大学 Block chain-based Internet of vehicles access control algorithm

Similar Documents

Publication Publication Date Title
CN111355745B (en) Cross-domain identity authentication method based on edge computing network architecture
US20190312730A1 (en) Authentication token request with referred application instance public key
US20190207762A1 (en) Communication method, apparatus and system, electronic device, and computer readable storage medium
CN109327314A (en) Access method, device, electronic equipment and the system of business datum
EP3580679A1 (en) Trusted login method, server, and system
Wu et al. Provably secure authentication key exchange scheme using fog nodes in vehicular ad hoc networks
US20120260330A1 (en) User authentication for intermediate representational state transfer (rest) client via certificate authority
US11444752B2 (en) Systems and methods for data encryption and decryption in data transmission
US20180316653A1 (en) Privacy-Preserving Location Corroborations
CN112131021A (en) Access request processing method and device
Soni et al. Energy-effective and secure data transfer scheme for mobile nodes in smart city applications
US11477184B2 (en) Conducting secure interactions utilizing reliability information
US20230396995A1 (en) Vehicle, communication system and communication method using the same
Qin et al. An ECC-based access control scheme with lightweight decryption and conditional authentication for data sharing in vehicular networks
US20240129137A1 (en) Information processing method, information processing program, information processing apparatus, and information processing system
CN114781006B (en) Outsourcing data integrity auditing method and system based on block chain and SGX
Dougherty et al. APECS: A distributed access control framework for pervasive edge computing services
Goswami et al. A blockchain-based authentication scheme for 5g-enabled iot
CN113691508B (en) Data transmission method, system, device, computer equipment and storage medium
CN112446050B (en) Business data processing method and device applied to block chain system
CN114978645A (en) Data processing method and device based on block chain, server and storage medium
CN116074023A (en) Authentication method and communication device
CN113946877A (en) Data security calculation method, system, computer equipment, storage medium and terminal
US11595215B1 (en) Transparently using macaroons with caveats to delegate authorization for access
CN113094735B (en) Privacy model training method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination