WO2022142436A1 - Data processing method and apparatus based on block chain, device, and storage medium - Google Patents

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

Info

Publication number
WO2022142436A1
WO2022142436A1 PCT/CN2021/116248 CN2021116248W WO2022142436A1 WO 2022142436 A1 WO2022142436 A1 WO 2022142436A1 CN 2021116248 W CN2021116248 W CN 2021116248W WO 2022142436 A1 WO2022142436 A1 WO 2022142436A1
Authority
WO
WIPO (PCT)
Prior art keywords
risk
user
contact
data
server
Prior art date
Application number
PCT/CN2021/116248
Other languages
French (fr)
Chinese (zh)
Inventor
宋轩
庄湛
张浩然
云沐晟
林贵旭
Original Assignee
南方科技大学
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 南方科技大学 filed Critical 南方科技大学
Publication of WO2022142436A1 publication Critical patent/WO2022142436A1/en

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/30ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for calculating health indices; for individual health risk assessment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/80ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for detecting, monitoring or modelling epidemics or pandemics, e.g. flu

Definitions

  • the embodiments of the present application relate to the field of computer technologies, and in particular, to a method, apparatus, device, and storage medium for data processing based on blockchain.
  • the present application provides a blockchain-based data processing method, device, device and storage medium, which can improve the accuracy and reliability of the data processing process when there is a risk event.
  • an embodiment of the present application provides a blockchain-based data processing method, which is executed by a server, and the method includes:
  • the risk value of the contact object of the risk user is updated.
  • the embodiments of the present application provide a blockchain-based data processing method, which is executed by a client, and the method includes:
  • the contact data acquisition request of the risk user In response to the contact data acquisition request of the risk user sent by the server, acquire the contact data of the risk user; wherein, the contact data acquisition request is generated after the server responds to the risk event processing request;
  • the value-at-risk update is performed on the close object.
  • an embodiment of the present application provides a blockchain-based data processing device, the device includes: a first response module, a close data request module, and a risk value update module; wherein,
  • the first response module configured to determine a risk user and modify the risk value of the risk user in response to a risk event processing request
  • the contact data request module is configured to send the contact data acquisition request of the risk user to the user terminal of the risk user, so as to instruct the user terminal to feed back the contact data of the risk user;
  • the risk value update module is configured to update the risk value of the risk user's contact object according to the obtained contact data of the risk user and the contact certificate of the risk user stored in the blockchain network.
  • an embodiment of the present application provides a blockchain-based data processing device, the device includes: a second response module and a feedback module; wherein,
  • the second response module is configured to obtain the contact data of the risk user in response to the contact data acquisition request of the risk user sent by the server; wherein, the contact data acquisition request is generated after the server responds to the risk event processing request;
  • the feedback module is configured to feed back the secret data of the risk user to the server, so as to instruct the server to instruct the server according to the secret data of the risk user and the secret certificate of the risk user stored in the blockchain network , and update the risk value of the close contact object of the risk user.
  • an embodiment of the present application provides an electronic device, the electronic device comprising:
  • processors one or more processors
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the blockchain-based data processing method according to any embodiment of the present invention.
  • an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the blockchain-based data processing described in any embodiment of the present invention method.
  • the embodiments of the present application provide a blockchain-based data processing method, device, device, and storage medium.
  • a risk user is determined, and its risk value is modified; the risk user is sent to the risk user's client.
  • the user's access data acquisition request to instruct the client to feed back the risk user's access data; according to the obtained risk user's access data and the risk user's access credentials stored in the blockchain network, the risk user's access target will be processed. VaR update.
  • the server can interact with the client, relying on the blockchain network, to automatically determine the risk user's contact object and modify the risk value of the contact object, with higher accuracy and reliability.
  • the present application uses the risk user's contact credentials stored in the blockchain network to determine the risk user's real contact object, which prevents the risk user from providing false contact data, resulting in incorrect identification of the contact object.
  • FIG. 1 is a first schematic flowchart of a blockchain-based data processing method provided by an embodiment of the present application
  • FIG. 2 is a second schematic flowchart of the blockchain-based data processing method provided by the embodiment of the present application.
  • FIG. 3 is a third schematic flowchart of the blockchain-based data processing method provided by the embodiment of the present application.
  • FIG. 4 is a fourth schematic flowchart of the blockchain-based data processing method provided by the embodiment of the present application.
  • FIG. 5 is a fifth schematic flowchart of the blockchain-based data processing method provided by the embodiment of the present application.
  • 6A is a signaling diagram of a blockchain-based data processing method provided by an embodiment of the present application.
  • FIG. 6B is a system flow diagram of a blockchain-based data processing method provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a first structure of a blockchain-based data processing apparatus provided by an embodiment of the present application.
  • FIG. 8 is a second schematic structural diagram of a blockchain-based data processing apparatus provided by an embodiment of the present application.
  • FIG. 9 is a block diagram of an electronic device used to implement the blockchain-based data processing method according to the embodiment of the present application.
  • the embodiments of this application are mainly suitable for preventing and controlling the spread of risk events.
  • a distributed storage system is used to closely connect users.
  • the blockchain of the embodiment of this application is essentially a decentralized database, which has good immutability and authenticity.
  • a smart contract is a self-checking, self-executing and tamper-resistant machine-readable code running on a blockchain platform, which is autonomous, distributed, traceable and irreversible.
  • the smart contract has the function of determining the close connection event, the function of retrospecting the value at risk, and the function of restoring the account.
  • FIG. 1 is a first schematic flowchart of a blockchain-based data processing method provided by an embodiment of the present application.
  • This embodiment can be applied to the situation where the server uses the distributed storage system to analyze the dense data based on the blockchain and smart contracts.
  • the blockchain-based data processing method provided in this embodiment may be executed by the blockchain-based data processing apparatus or electronic device provided in Embodiment 6 of this application, and the device or electronic device may be implemented by software and/or hardware.
  • the method is implemented and integrated in the server that executes this application.
  • the server in the embodiment of the present application may be a blockchain node, which can invoke the risk value backtracking function of the smart contract of the blockchain network to perform the following operation steps in the embodiment of the present application.
  • the method of this embodiment includes but is not limited to the following steps:
  • a risk user refers to a user infected with an infectious disease.
  • a risk event refers to an event in which a new user at risk is added or a new user is at risk of contracting an infectious disease.
  • the risk event processing request can be generated by the risk user after learning that he is infected and sent to the server through his client, or it can be detected by third-party institutions such as hospitals, government agencies, and CDCs.
  • third-party institutions such as hospitals, government agencies, and CDCs.
  • a risk event processing request is generated and sent to the server.
  • the client or a third-party institution sends a risk event processing request to the server, indicating that the risk user has contracted an infectious disease or is at risk of contracting an infectious disease.
  • a risk event processing request is sent to the server through the user terminal or a third-party organization.
  • the server After receiving the risk event processing request, the server will start the risk event of the smart contract The condition for the automatic execution of the value backtracking function.
  • Respond to the risk event processing request obtain the risk user from the risk event processing request, and modify the risk value of the risk user according to the risk value modification requirements specified by the risk retrospective function.
  • the risk value of the risky user may be set to the highest risk value.
  • the risk value refers to the user's risk value of contracting an infectious disease.
  • the server may maintain a user risk value data table in the local database. At this time, the server may increase the risk value of the risk user to the maximum value in the user risk value data table.
  • the user risk value data table contains at least the user address and the risk value. For example, as shown in Table 1 below.
  • S120 Send a request for obtaining the contact data of the risk user to the client of the risk user, so as to instruct the client to feed back the contact data of the risk user.
  • the user installs the close contact application on the mobile terminal (wherein, the close contact application can be regarded as the user's client terminal), when the close contact applications between users detect each other's Bluetooth signals, they can It is regarded as a close event between users.
  • the client will obtain the contact information of the contact event; encrypt the contact information with the public keys of the users on both sides of the contact, and obtain the contact certificate; generate an on-chain transaction request including the contact certificate and send it to the server, so that the server can make the contact certificate.
  • the credential is stored on the chain, and the index address of the blockchain that stores the secret credential is returned from the server.
  • the client will also use the obtained secret information and blockchain index address as secret data, and store it in the local database of the client.
  • the contact time is the time when the contact event currently occurs; other users and risk users are called the contact object after the contact event occurs; the address of the contact object refers to the physical address of the contact object; the public key is generated when the user registers the contact application. ;
  • the block index address refers to the serial number of the block to be produced in the next period.
  • the server after determining the risk user and modifying the risk value of the risk user, the server will send the risk user's close data acquisition request to the risk user's client, requesting that the risk user be stored in the local database. All contact data within the incubation period of the epidemic. Among them, the incubation period of the epidemic can be half a month.
  • the secret credential can be a number or a string.
  • the secret data contains the block index address, there are many secret certificates in a block, and these secret certificates are arranged. Therefore, when the server in this embodiment of the present application searches for the user's secret certificate from the blockchain, it may search for the corresponding block according to the block index address contained in the secret data, and within the block, a binary search method may be used to search for the corresponding block.
  • the secret certificate corresponding to the secret object may be used to search for the corresponding block.
  • the server after obtaining all the contact data within the scope of the epidemic incubation period of the risk user, the server includes the contact time, the address of the contact object, and the public key of the contact object for each piece of contact data. Generate a prediction credential based on the piece of concatenated data (that is, the generation method is the same as the way that the client generates the concatenated credential based on the concatenated data), which is compared with the concatenated credential obtained from the blockchain network.
  • the encryption certificate obtained from the blockchain network does not contain the prediction certificate, it means that the encryption data has been tampered with, ignore the encryption data, and update the risk value of the encryption object based on the encryption data; otherwise It indicates that this piece of contact data is real and effective, and it can be determined that there is a contact event between the risk user and the contact object, and the contact object has the risk of being infected with disease. Therefore, the risk value corresponding to the contact object is updated.
  • a specific way of updating the risk value may be preset, for example, it may be to increase the preset risk value.
  • update the risk value of the access object of the risk user including: according to the obtained access data of the risk user and the block Update the risk value of the risk user's contact object with the stored risk user's secret certificate in the chain network; take the contact object as a new risk user, and return to perform the operation of updating the risk value of the new risk user's contact object until Complete the VaR iteration requirement. That is, the risk value backtracking is performed on the direct contact object and the indirect contact object of the risk user.
  • the specific process is as follows: according to the obtained contact data of the risk user, determine the contact object, contact information and block index address of the risk user; use the public key of the contact object and the public key of the risk user to encrypt the contact information to obtain the prediction certificate ; Determine the target block according to the block index address, and determine whether there is a close-contact certificate matching the predicted certificate in the target block; if there is, update the risk value of the close-contact object.
  • take the contact object of the risk user as a new risk user send the contact data acquisition request to the new risk user, and repeat the execution according to the acquired contact data of the new risk user.
  • the value-at-risk of the new risky user's encrypted credentials stored in the blockchain network is updated, and so on, so as to iteratively update the risky value of the risky user's closet object.
  • the iteration requirement may be the number of iterations required, and in general, two to three iterations are sufficient.
  • risk user 1 is diagnosed with an infectious disease. If the prediction credentials of risk user 1 and the close contact data of close contact object 1 are consistent with the close contact certificate, that is, contact object 1 is the first-level contact object of risk user 1, then according to the above intelligence
  • the risk value retrospective function method of the contract updates the risk value of risk user 1 and close object 1. Take the contact object 1 as the new risk user 2, if the prediction credential of the contact data of the risk user 2 and the contact object 2 is the same as the contact certificate, that is, the contact object 2 is the second level contact object of the risk user 1, then according to the above smart contract
  • the risk value retrospective function method updates the risk value of risk user 2 and close contact object 2.
  • the direct contact objects and the indirect contact objects of the risk user are sequentially updated multiple times iteratively.
  • the number of iterations is preset, and the number of iterations may be two, three or more. It is understandable that a risk user can have multiple contact objects.
  • the risk value of the second level contact object is modified less than that of the first level contact object. For example, when the risk value of the first level contact object is updated, its risk value is changed. Increase by 8; when the second-level close contact object updates the risk value, its risk value is increased by 5.
  • a risk user in response to a risk event processing request, a risk user is determined and its risk value is modified; a request for obtaining the contact data of the risk user is sent to the risk user's client to instruct the client to feedback the risk user's data.
  • Contact data According to the acquired contact data of the risk user and the contact credentials of the risk user stored in the blockchain network, update the risk value of the contact object of the risk user.
  • the server when there is a risk event, the server interacts with the client, and relying on the blockchain network, the determination of the close object of the target object and the modification of the risk value of the close object can be performed automatically, with higher accuracy and reliability.
  • the present application determines the real contact object of the risk user based on the contact credentials of the risk user stored in the blockchain network, which prevents the risk user from providing false contact data, resulting in an error in the determination of the contact object.
  • FIG. 2 is a second schematic flowchart of the blockchain-based data processing method provided by the embodiment of the present application.
  • the embodiment of the present application is based on the above-mentioned embodiment, and this embodiment provides a detailed explanation of the specific execution process of the server responding to the up-chain transaction request including the concatenated credential when there is a concatenated event.
  • the close connection certificate is obtained by encrypting the close connection information of the two users of the close connection by using the public keys of the two users of the close connection when the close connection event is detected.
  • the close contact application of the close contact application and the close contact application of its close contact object detect each other's Bluetooth signals, it is determined that the user and the close contact object have a close contact event.
  • the contact application will generate a block of contact information and encrypt it as a contact certificate.
  • the contact information includes at least the combination of public keys and the contact time of both users of the contact, and may also include the address of the contact object.
  • the secret application generates an on-chain transaction request containing the secret certificate and sends it to the server.
  • the server responds to the on-chain transaction request containing the secret certificate, obtains the secret certificate, and stores the secret certificate in the blockchain.
  • the specific on-chain transaction refers to the server sorting and packaging the secret certificate sent by the client, and writing it into the block.
  • S220 Obtain the block index address for storing the secret certificate, and feed back the block index address to the client that sends the on-chain transaction request.
  • the server feeds back the block index address where the secret certificate is stored to the client that sends the on-chain transaction request.
  • the client side saves the block index address and the obtained concatenation information together as concatenated data in the user risk value data table maintained by the local database.
  • the blockchain index address may be a block serial number, a block identifier, or the like.
  • the server can determine the identity information of the two parties according to the obtained password. Since the server maintains a user risk value data table locally, the risk value of the two parties can be obtained from the user risk value data table for comparison. When the risk value of the two parties is different, the risk value of the two parties will be updated at the same time through the smart contract. For example, it is possible to compare the value-at-risk of both parties in close contact, select a higher value of risk, and update the value of risk of both parties to the higher value of risk.
  • the updated risk value may also be fed back to the corresponding user terminal.
  • S260 Update the risk value of the risk user's close contact object according to the obtained risk user's close contact data and the risk user's close contact credentials stored in the blockchain network.
  • the processes from S210 to S230 in the embodiments of the present application are related operations performed by the server in response to an up-chain transaction request including a secure credentials when a secure event exists.
  • S240-S260 are related operations performed by the server in response to a risk event processing request when a risk event exists.
  • the two are two independent execution processes, and there is no prior order. They may be executed according to the order of the above-mentioned embodiment, or S240-S260 may be executed first, and then S210-S230 may be executed, which is not carried out in this embodiment. limited.
  • the technical solution of the embodiment of the present application is to obtain the encrypted data and store it in the blockchain after responding to a request for an up-chain transaction including the encrypted certificate, and at the same time update the risk value of both parties.
  • the embodiment of the application stores the encrypted certificate in the blockchain network.
  • the access data of the risk user can be obtained, and the access certificate can be used to verify the accuracy of the obtained access data of the risk user, to prevent the risk user from forging and tampering with the access data, and to ensure the integrity of the access data. true reliability.
  • the server interacts with the client, relying on the blockchain network to automatically determine the target object's close object and modify the risk value of the close object, with higher accuracy and reliability.
  • FIG. 3 is a schematic flowchart of a third process of the blockchain-based data processing method provided by the embodiment of the present application.
  • the embodiment of the present application is based on the above-mentioned embodiment, and this embodiment provides a detailed explanation of the account recovery function process of the smart contract.
  • the method of this embodiment includes but is not limited to the following steps:
  • S320 Send a request for obtaining the contact data of the risk user to the client of the risk user, so as to instruct the client to feed back the contact data of the risk user.
  • the user when the account becomes invalid due to the replacement of the mobile phone number or the loss of the SIM card, the user can create a second account through the new mobile phone number, and use the private key of the first account to request to restore the first account
  • the risk value reaches the conditions for the automatic execution of the account recovery function of the smart contract. For example, there is an option to restore the risk value of the first account on the user interface. Click this option and enter the private key of the first account to trigger the account recovery function.
  • the user triggers the first account recovery request on the user interface.
  • the client In response to the first account recovery request, the client generates a first account encryption request and sends it to the server.
  • the server receives and responds to the first account encryption request, and uses the public key of the first account to encrypt the preset data to obtain an encryption result.
  • the preset data may be preset fixed data or randomly generated data.
  • the purpose of encrypting the preset data by using the public key of the first account is to verify whether the user's private key is correct.
  • the server uses the public key of the first account to encrypt the preset data, and after obtaining the encryption result, the server feeds back the encryption result to the client that sent the encryption request of the first account .
  • the client uses the private key of the first line number to decrypt and analyze the encrypted result data to verify whether the private key of the first account included in the account recovery request is correct. And feedback the verification result to the server.
  • the client verifies the private key of the first account, and if the verification result is passed, the verification result is fed back to the server. If the verification result is passed, the server restores the risk value of the first account, that is, the risk value of the first account is taken as the risk value of the current login account of the client. If the verification result is not passed, the user terminal may not feed back the verification result to the server; it may also be fed back to the server, but the server detects that the verification result is not passed, and does not perform the operation of risk value recovery.
  • not only the risk value of the first account but also the concatenated data of the first account can be restored.
  • the obtained contiguous data is stored in the local database, so as to realize the recovery of the contiguous data.
  • S310-S330 of the present application when there is a risk event, the server performs related operations in response to the risk event processing request.
  • the process from S340 to S370 is the relevant operation performed by the server in response to the first account encryption request when the user needs to restore the account risk value and the encrypted data.
  • the two are two independent execution processes, and there is no prior order. According to the sequence of the above embodiments, S340-S370 may also be executed first, and then S310-S330 are executed, which is not limited in this embodiment.
  • the server in response to the first account encryption request, uses the public key of the first account to encrypt the preset data to obtain an encryption result.
  • the encryption result is fed back to the client that sent the encryption request for the first account, so as to instruct the client to feed back the verification result after verifying the first account according to the encryption result. If the received verification result is passed, the risk value of the first account is taken as the risk value of the current login account of the client, and the concatenated data of the first account can also be taken as the concatenated data of the current account.
  • the account recovery function of the smart contract by using the account recovery function of the smart contract, the problem of account invalidation caused by the replacement of the mobile phone number or the loss of the SIM card can be solved, the user's risk value and the security of the contact data can be restored, and the integrity of the contact application function can be guaranteed.
  • FIG. 4 is a fourth schematic flowchart of the blockchain-based data processing method provided by the embodiment of the present application. This embodiment can be applied to the situation where the user terminal analyzes and processes the dense data based on the smart contract based on the blockchain.
  • the blockchain-based data processing method provided in the seventh embodiment of the present application may be executed by the blockchain-based data processing apparatus or electronic device provided in the embodiment of the present application, and the device or electronic device may be implemented by software and/or hardware. The method is implemented and integrated in the client that executes the present application.
  • the method of this embodiment includes but is not limited to the following steps:
  • the close data acquisition request is generated after the server responds to the risk event processing request.
  • the specific generation method has been introduced in the above embodiment, and is not described in this embodiment here.
  • a risk event processing request is sent to the server through the user terminal or a third-party organization, and the server responds to the risk event processing request.
  • the server will increase the risk value of the risk user to the maximum value in the data table maintained in the local database.
  • the data table at least contains the time of the close connection, the address of the close connection object, the risk value and the block index address.
  • the server sends the risk user's contact data acquisition request to the risk user's client, requesting to obtain all the contact data stored in the local database by the risk user within the scope of the epidemic incubation period.
  • the client of the risk user responds to the request for obtaining the close contact data of the risk user sent by the server, and obtains all the close contact data of the risk user within the scope of the epidemic incubation period from the local database.
  • the incubation period of the epidemic can be half a month.
  • S420 Feed back the risk user's contact data to the server, so as to instruct the server to update the risk value of the risk user's contact object according to the risk user's contact data and the risk user's secret certificate stored in the blockchain network.
  • the client terminal of the risk user after acquiring the contact data of the risk user stored in the local database, the client terminal of the risk user feeds back the contact data of the risk user to the server. It instructs the server to determine the real contact object of the risk user according to the contact data of the risk user and the contact credentials of the risk user that have been stored in the blockchain network, and to update the risk value.
  • the specific execution process has been described above. The embodiment is introduced, and is not repeated in this embodiment.
  • the client of the risk user responds to the request for obtaining the contact data of the risk user sent by the server, obtains the contact data of the risk user, and feeds it back to the server, so as to instruct the server to obtain the contact data of the risk user according to the block chain.
  • Update the risk value of the risk user's contact object based on the secret certificate of the risk user that has been stored in the network.
  • the client when there is a risk event, the client interacts with the server, and based on the risk user's secret data sent by the client and the secret certificate stored in the blockchain network, the client sends the risk user's secret link. The data is verified to ensure the accuracy of the determined contact object, which solves the problem of preventing forgery and tampering with the contact data, resulting in inaccurate determination of the contact object, thereby ensuring the accuracy of updating the risk value of the contact object.
  • FIG. 5 is a fifth schematic flowchart of the blockchain-based data processing method provided by the embodiment of the present application.
  • the embodiment of the present application applies the data processing method based on the block chain to the user terminal on the basis of the above-mentioned embodiment, and the data processing process is explained in detail in this embodiment.
  • the method of this embodiment includes but is not limited to the following steps:
  • the user's close application that is, the user terminal of any user
  • the close application of its close object detect each other's Bluetooth signals
  • the contact application obtains the contact information of the contact event.
  • the contact information includes at least the combination of public keys and the contact time of both users of the contact, and may also include the address of the contact object.
  • judging that there is a close contact event between the risk user and the close contact object may be that the user terminal of the risk user detects that there is a Bluetooth signal with a strength greater than a certain threshold around, and considers that the user corresponding to the Bluetooth signal is the close contact object of the risk user.
  • the address of the contact object in the contact information may be obtained through Bluetooth, or may be obtained by calculation through the public key of the contact object.
  • the public key of the contact object in the contact information can be obtained through Bluetooth, or obtained from the server after determining the contact object.
  • acquiring the close contact information of the close contact event includes: if the close contact event is detected and the close contact event is not a repeated close contact event, acquiring the close contact information of the close contact event.
  • the close connection time may be in days. If the risk user is paired with the close contact object for the first time on that day and it is determined that a close contact event occurs with the close contact object, then the acquisition of the close contact information of the close contact event is performed at this time. Otherwise, even if the user performs Bluetooth pairing with the contact object on that day, the operation of acquiring the contact information of the contact event will not be performed.
  • the encryption information is encrypted by using the public keys of the users of both parties to obtain the encryption certificate.
  • the encryption method for the encryption information may be an asymmetric encryption method, so that the encrypted content will not be leaked, and the user encryption data can be completely protected.
  • the address of the contact object in the contact information may be obtained through Bluetooth, or may be obtained by calculation through the public key of the contact object.
  • the public key of the contact object in the contact information can be obtained through Bluetooth, or obtained from the server after determining the contact object.
  • the secret credential can be a number or a string.
  • S530 Generate and send an on-chain transaction request including the secret credential to the server, so as to instruct the server to store the secret credential on the chain.
  • the client sends an on-chain transaction request containing the secret certificate to the server, and the server responds to the on-chain transaction request containing the secret certificate, obtains the secret certificate, and stores the secret certificate in the blockchain.
  • the specific chaining process has been described in detail in the above embodiment, and will not be repeated here.
  • the server after the server has stored the secret certificate on the chain, it will feed back the block index address where the secret certificate is stored to the client that sent the transaction request on the chain. At this time, the client obtains the feedback from the server. The index address of the block where the encryption certificate is stored.
  • the user terminal saves the contact information and the block index address as the contact data in the contact data table maintained by the local database, as shown in Table 2 below.
  • S570 Feed back the risk user's contact data to the server, so as to instruct the server to update the risk value of the risk user's contact object according to the risk user's contact data and the risk user's secret certificate stored in the blockchain network.
  • the client terminal In response to an account registration request triggered by the user, the client terminal generates account information of the user, wherein the account information includes: the public key, private key, account address and initial risk value of the account.
  • the private key is generated by encrypting the mobile phone number information combined with a cryptographically secure random source; the public key is calculated by the private key through elliptic curve multiplication; the address is hashed once by the public key and the RIPEMD160 hash value is calculated, Then it is obtained after Bases8Check coding; when the account is registered, the user sets the disease risk value to be initially set to zero.
  • the client can send the generated public key and disease risk value to the server to instruct the server to store the information on the chain or in a local database for other users to query.
  • the private key value generated by the client is stored in the local database.
  • the user can create a second account through the new mobile phone number, and use the private key of the first account to request the restoration of the risk value of the first account.
  • the conditions for the automatic execution of the account recovery function of the smart contract For example, there is an option to restore the risk value of the first account on the user interface. Click this option and enter the private key of the first account to trigger the account recovery function. The user sends a first account recovery request on the user interface.
  • the client In response to the account recovery request triggered by the user, the client generates a first account encryption request and sends it to the server to instruct the server to encrypt the preset data with the public key of the first account, and feed back the encryption result; use the private key of the first account to verify the service
  • the encrypted result is fed back, and the verification result is fed back to the server, so as to instruct the server to perform the account data recovery operation based on the verification result.
  • the contact information of the contact event is obtained by detecting the contact event; the contact information is encrypted by the public keys of the users of both parties to obtain the contact certificate; the client generates an upload transaction request including the contact certificate and sends it to The server instructs the server to store the secret certificate on the chain and update the risk value of the users on both sides of the secret; the client obtains the block index address of the secret certificate returned by the server, and stores the secret information and block index address as secret data in the Local; the client obtains the contact data of the risk user in response to the request for obtaining the contact data of the risk user sent by the server.
  • the server Feedback the risk user's contact data to the server to instruct the server to update the risk value of the risk user's contact object according to the risk user's contact data and the risk user's secret certificate stored in the blockchain network.
  • the user's encrypted data is stored locally on the user end, and the encrypted data's encrypted credentials are stored in the blockchain network, so as to prevent the user's encrypted data from being leaked and ensure the security and privacy of the encrypted data. Even if the user sends his own forged or tampered data to the value server, the server can identify it based on the encrypted data stored in the blockchain network, which greatly improves the confidentiality and accuracy of information during the processing of the encrypted data.
  • FIG. 6A is a signaling diagram of the blockchain-based data processing method provided by the embodiment of the present application
  • FIG. 6B is a system flowchart of the blockchain-based data processing method provided by the embodiment of the present application.
  • the embodiment of the present application provides a preferred example of mutual data processing between the client and the server based on the blockchain. Specifically, this embodiment includes the following steps:
  • the first user terminal uses the public keys of the users of both sides of the close connection to encrypt the close connection information to obtain a close connection certificate.
  • the first client generates an on-chain transaction request including the secret credential and sends it to the server.
  • the server obtains the secret certificate in response to the on-chain transaction request including the secret certificate, and stores the secret certificate in the blockchain.
  • the server obtains the block index address for storing the encryption certificate, and feeds back the block index address to the first client that sends the on-chain transaction request.
  • the first client obtains the block index address of the storage secret credential fed back by the server.
  • the first user terminal stores the concatenation information and the block index address locally as concatenated data.
  • the server updates the risk value of the users of both parties in the close connection.
  • S601-S608 is a process for the server to update the risk value of both users of the close connection when there is a close connection event between the risk users.
  • the close connection applications between user A and user B detect each other's Bluetooth signals, it can be regarded as a close connection event between users.
  • the first client in this case, both the contact applications of user A and user B can be used as the first client
  • the contact information includes at least the combination of public keys and the contact time of both users of the contact (i.e., user A and user B), and may also include the address of the contact object.
  • the first client uses the public keys of the users of both parties to encrypt the contact information, and obtains a certificate for the contact information, which is used to verify whether the contact information is authentic.
  • the first client generates an on-chain transaction request including the secret credential and sends it to the server, and the server packages the secret credential, sorts it according to the hash value, and writes it into the blockchain.
  • the server obtains the block index address where the secret certificate is stored, and feeds it back to the first client.
  • the first user terminal stores the concatenation information and the block index address locally as concatenated data.
  • the server updates the risk value of users on both sides of the connection.
  • the server determines the risk user in response to the risk event processing request, and modifies the risk value of the risk user.
  • the server sends a request for obtaining the contact data of the risk user to the client of the risk user.
  • the client terminal of the risk user in response to the request for obtaining the contact data of the risk user sent by the server, acquires the contact data of the risk user.
  • the client of the risk user feeds back the close data of the risk user to the server.
  • the server updates the risk value of the risk user's contact object according to the obtained contact data of the risk user and the contact certificate of the risk user stored in the blockchain network.
  • S609-S613 is a process in which the server modifies the risk value of the risk user and the risk value of the close contact object of the risk user when a user becomes a risk user after changing an infectious disease.
  • a professional institution such as a hospital detects that a patient has been diagnosed, it sends a risk event processing request to the server through the user terminal or a third-party institution.
  • the server determines the risk user and modifies the risk User's value at risk.
  • the server After the server receives the risk event processing request, it will activate the conditions for the automatic execution of the risk value backtracking function of the smart contract.
  • the server requests to obtain all the contact data of the risk user's client within the scope of the epidemic incubation period, and generates a prediction certificate based on each contact data.
  • the risk value of the user's contact object is updated.
  • the second client terminal generates account information of the user in response to the account registration request triggered by the user.
  • the account information includes: the public key, private key, account address and initial risk value of the account.
  • the third client terminal In response to the account recovery request triggered by the user, the third client terminal generates a first account encryption request and sends the request to the server.
  • the server in response to the first account encryption request, encrypts the preset data by using the public key of the first account to obtain an encryption result.
  • S617 The server feeds back the encryption result to the client that sent the first account encryption request.
  • the third client uses the private key of the first account to verify the encryption result fed back by the service, and feeds back the verification result to the server.
  • the server uses the concatenated data of the first account as the concatenated data of the current account.
  • S614 is the first time the user uses the close connection application to register an account.
  • S615-S620 is to use the account recovery function to restore the contact information of the first account when the account becomes invalid due to the replacement of the user's mobile phone number or the loss of the SIM card.
  • the first user terminal, the second user terminal, the third user terminal, and the user terminal of the risk user in the embodiment of the present application may be the user terminal of the same user or the user terminal of different users. This embodiment will not describe redundantly.
  • the servers involved in the embodiments of the present application may be determined from at least two candidate servers based on a Byzantine consensus mechanism.
  • the server in this embodiment of the present application is not a centralized server, but a server cluster composed of multiple candidate servers.
  • the consensus mechanism can be proof of work (PoW), proof of stake (PoS), and Practical Byzantine Fault Tolerance (PBFT).
  • the consensus mechanism preferably adopted in the embodiment is PBFT.
  • Byzantine behavior can be detected and automatically recovered to avoid program crash caused by master node abnormality.
  • practical Byzantine fault-tolerant algorithms can work in an asynchronous environment, and improve the response performance of early Byzantine fault-tolerant algorithms by more than an order of magnitude.
  • FIG. 7 is a schematic diagram of a first structure of a blockchain-based data processing apparatus provided by an embodiment of the present application. As shown in FIG. 7 , the apparatus 700 may include:
  • the first response module 710 is configured to, in response to a risk event processing request, determine a risk user, and modify the risk value of the risk user.
  • the contact data request module 720 is configured to send the contact data acquisition request of the risk user to the client terminal of the risk user, so as to instruct the client terminal to feed back the contact data of the risk user.
  • the risk value updating module 730 is configured to update the risk value of the risk user's contact object according to the obtained contact data of the risk user and the risk user's secret certificate stored in the blockchain network.
  • the above-mentioned risk value update module 730 is specifically configured to, according to the obtained close contact data of the risk user and the close contact credentials of the risk user stored in the blockchain network, perform a close contact operation on the risk user's close contact object. Risk value update; take the contact object as a new risk user, and return to perform the operation of updating the risk value of the contact object of the new risk user until the risk value iteration requirement is completed. Further, the above-mentioned risk value update module 730 is specifically configured to, according to the obtained contact data of the risk user, determine the contact object, contact information and block index address of the risk user; adopt the public key of the contact object.
  • the above-mentioned blockchain-based data processing device may further include: an on-chain transaction request module 740 (not shown in the figure), configured to obtain the encrypted connection in response to an upper-chain transaction request including a certificate, and store the close connection certificate in the blockchain, wherein the close connection certificate is obtained by using the public keys of the users of both sides of the close connection to encrypt the close connection information of the users of both sides of the close connection when a close connection event is detected; update The risk value of the users on both sides of the close connection. Acquiring the block index address that stores the secret certificate, and feeding back the block index address to the client that sent the on-chain transaction request.
  • an on-chain transaction request module 740 configured to obtain the encrypted connection in response to an upper-chain transaction request including a certificate, and store the close connection certificate in the blockchain, wherein the close connection certificate is obtained by using the public keys of the users of both sides of the close connection to encrypt the close connection information of the users of both sides of the close connection when a close connection event is detected; update The risk
  • the above-mentioned blockchain-based data processing device may further include: a first account recovery module 750 (not shown in the figure), for responding to the first account encryption request, using the first account
  • the public key is used to encrypt the preset data to obtain an encryption result; the encryption result is fed back to the client that sent the first account encryption request to instruct the client to verify the first account according to the encryption result. Then, the verification result is fed back; if the received verification result is passed, the risk value of the first account is used as the risk value of the current login account of the user terminal.
  • the concatenated data of the first account is used as the concatenated data of the current account.
  • the server is determined from at least two candidate servers based on a Byzantine consensus mechanism.
  • the blockchain-based data processing apparatus provided in this embodiment is applicable to the blockchain-based data processing method provided by any of the above embodiments, and has corresponding functions and beneficial effects.
  • FIG. 8 is a second schematic structural diagram of a blockchain-based data processing apparatus provided by an embodiment of the present application. As shown in FIG. 8 , the apparatus 800 may include:
  • the second response module 810 is configured to obtain the contact data of the risk user in response to the contact data acquisition request of the risk user sent by the server; wherein the contact data acquisition request is generated by the server in response to the risk event processing request.
  • the feedback module 820 is configured to feed back the contact data of the risk user to the server, so as to instruct the server to instruct the server according to the contact data of the risk user and the secret certificate of the risk user stored in the blockchain network,
  • the risk value update is performed on the close object of the risk user.
  • the above-mentioned blockchain-based data processing device may further include: a response to an uplink transaction request module 830 (not shown in the figure), configured to obtain the close connection of the close connection event if a close connection event is detected. use the public keys of the users of both parties to encrypt the secret information to obtain the secret certificate; generate an on-chain transaction request including the secret certificate and send it to the server to instruct the server to store the secret certificate on the chain, And update the risk value of the users on both sides of the close connection.
  • a close contact event is detected, and the close contact event is not a repeated close contact event, then the contact information of the close contact event is acquired.
  • the above-mentioned blockchain-based data processing device may further include: a close data storage module 840 (not shown in the figure) for obtaining the block index address fed back by the server for storing the close pass certificate;
  • the concatenation information and the block index address are stored locally as concatenated data.
  • the above-mentioned blockchain-based data processing device may also include: a response account registration request module 850 (not shown in the figure), for generating an account of the user in response to an account registration request triggered by a user information, wherein the account information includes: the public key, private key, account address and initial risk value of the account.
  • a response account registration request module 850 (not shown in the figure), for generating an account of the user in response to an account registration request triggered by a user information, wherein the account information includes: the public key, private key, account address and initial risk value of the account.
  • the above-mentioned blockchain-based data processing device may further include: a first account recovery request module 860 (not shown in the figure), configured to generate a first account in response to an account recovery request triggered by a user
  • the encryption request is sent to the server to instruct the server to use the public key of the first account to encrypt the preset data, and feed back the encryption result; use the private key of the first account to verify the encryption result fed back by the service, and feed back to the server
  • the verification result is used to instruct the server to perform an account data recovery operation based on the verification result.
  • the blockchain-based data processing apparatus provided in this embodiment is applicable to the blockchain-based data processing method provided by any of the above embodiments, and has corresponding functions and beneficial effects.
  • the present application further provides an electronic device and a readable storage medium.
  • FIG. 9 it is a block diagram of an electronic device of a blockchain-based data processing method according to an embodiment of the present application.
  • Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers.
  • Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices.
  • the components shown herein, their connections and relationships, and their functions are by way of example only, and are not intended to limit implementations of the application described and/or claimed herein.
  • the electronic device includes: one or more processors 910, a memory 920, and interfaces for connecting various components, including a high-speed interface and a low-speed interface.
  • the various components are interconnected using different buses and may be mounted on a common motherboard or otherwise as desired.
  • the processor may process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface.
  • multiple processors and/or multiple buses may be used with multiple memories and multiple memories, if desired.
  • multiple electronic devices may be connected, each providing some of the necessary operations (eg, as a server array, a group of blade servers, or a multiprocessor system).
  • a processor 910 is taken as an example in FIG. 9 .
  • the memory 920 is the non-transitory computer-readable storage medium provided by the present application.
  • the memory stores instructions executable by at least one processor, so that the at least one processor executes the blockchain-based data processing method provided by the present application.
  • the non-transitory computer-readable storage medium of the present application stores computer instructions, and the computer instructions are used to cause the computer to execute the blockchain-based data processing method provided by the present application.
  • the memory 920 can be used to store non-transitory software programs, non-transitory computer-executable programs and modules, such as a program corresponding to a blockchain-based data processing method in the embodiments of the present application Instructions/modules (eg, the first response module 710, the contact data request module 720, and the risk value update module 730 shown in FIG. 7; the second response module 810, the feedback module 820 shown in FIG. 8).
  • the processor 910 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions and modules stored in the memory 920, that is, implementing a blockchain-based data processing method in the above method embodiments .
  • the memory 920 may include a storage program area and a storage data area, wherein the storage program area may store an operating system and an application program required by at least one function; the storage data area may store data of an electronic device according to a blockchain-based data processing. Use the created data, etc. Additionally, memory 920 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 920 may optionally include memory located remotely from the processor 910, and these remote memories may be connected via a network to a blockchain-based data processing electronic device. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the electronic device based on the block chain data processing method may further include: an input device 930 and an output device 940 .
  • the processor 910, the memory 920, the input device 930, and the output device 940 may be connected by a bus or in other ways, and the connection by a bus is taken as an example in FIG. 9 .
  • the input device 930 can receive input numerical or character information, and generate key signal input related to user settings and function control of a blockchain-based data processing electronic device, such as a touch screen, keypad, mouse, trackpad, Input devices such as touchpads, pointing sticks, one or more mouse buttons, trackballs, joysticks, etc.
  • the output device 940 may include a display device, auxiliary lighting devices (eg, LEDs), haptic feedback devices (eg, vibration motors), and the like.
  • the display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
  • a processor which may be a special purpose or general-purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device output device.
  • machine-readable medium and “computer-readable medium” refer to any computer program product, apparatus, and/or apparatus for providing machine instructions and/or data to a programmable processor ( For example, magnetic disks, optical disks, memories, programmable logic devices (PLDs), including machine-readable media that receive machine instructions as machine-readable signals.
  • machine-readable signal refers to any signal used to provide machine instructions and/or data to a programmable processor.
  • the systems and techniques described herein may be implemented on a computer having a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user ); and a keyboard and pointing device (eg, a mouse or trackball) through which a user can provide input to the computer.
  • a display device eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor
  • a keyboard and pointing device eg, a mouse or trackball
  • Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (eg, visual feedback, auditory feedback, or tactile feedback); and can be in any form (including acoustic input, voice input, or tactile input) to receive input from the user.
  • the systems and techniques described herein may be implemented on a computing system that includes back-end components (eg, as a data server), or a computing system that includes middleware components (eg, an application server), or a computing system that includes front-end components (eg, a user's computer having a graphical user interface or web browser through which a user may interact with implementations of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system.
  • the components of the system may be interconnected by any form or medium of digital data communication (eg, a communication network). Examples of communication networks include: Local Area Networks (LANs), Wide Area Networks (WANs), the Internet, and blockchain networks.
  • a computer system can include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.
  • the server can be a cloud server, also known as a cloud computing server or a cloud host. It is a host product in the cloud computing service system to solve the traditional physical host and VPS services, which are difficult to manage and weak in business scalability. defect.
  • the server in response to the risk event processing request, determines the risk user, and modifies its risk value; and sends the risk user's close data acquisition request to the risk user's client to instruct the client to feedback the risk user.
  • the risk user's contact data according to the obtained risk user's contact data and the risk user's secret certificate stored in the blockchain network, the risk value of the risk user's contact object is updated.
  • the server when there is a risk event, the server interacts with the client, and relying on the blockchain network, the determination of the close object of the target object and the modification of the risk value of the close object can be performed automatically, with higher accuracy and reliability.
  • the present application determines the real contact object of the risk user based on the contact credentials of the risk user stored in the blockchain network, which prevents the risk user from providing false contact data, resulting in an error in the determination of the contact object.

Abstract

A data processing method and apparatus based on a block chain, a device, and a storage medium. When being executed by a server, the method comprises: in response to a risk event processing request, determining a risk user, and modifying a risk value of the risk user (S110); sending a close contact data obtaining request of the risk user to a user terminal of the risk user, so as to instruct the user terminal to feed back close contact data of the risk user (S120); and performing risk value updating on the close contact object of the risk user according to the obtained close contact data of the risk user and a close contact certificate of the risk user already stored in a block chain network (S130). The method can improve the accuracy and reliability of a data processing process when there is a risk event.

Description

基于区块链的数据处理方法、装置、设备及存储介质Blockchain-based data processing method, device, equipment and storage medium 技术领域technical field
本申请实施例涉及计算机技术领域,尤其涉及一种基于区块链的数据处理方法、装置、设备及存储介质。The embodiments of the present application relate to the field of computer technologies, and in particular, to a method, apparatus, device, and storage medium for data processing based on blockchain.
背景技术Background technique
为了防控风险事件(如疾病)的蔓延,追踪风险用户的密切接触者并调整其与密切接触者的风险值,是防控风险蔓延的重要途径。目前,存在风险事件时,通常由工作人员根据监控数据或者走访用户获取的密接数据来分析并追踪风险用户的密切接触者,并调整其风险值。整个过程受人为因素影响较大,准确性和可靠性较低,亟需改进。In order to prevent and control the spread of risk events (such as diseases), tracking the close contacts of risk users and adjusting their risk values with close contacts is an important way to prevent and control the spread of risks. At present, when there is a risk event, the staff usually analyzes and tracks the close contacts of the risk user based on the monitoring data or the close contact data obtained by visiting the user, and adjusts the risk value. The whole process is greatly affected by human factors, the accuracy and reliability are low, and it is in urgent need of improvement.
技术问题technical problem
本申请提供一种基于区块链的数据处理方法、装置、设备及存储介质,可提高存在风险事件时,数据处理过程的准确性和可靠性。The present application provides a blockchain-based data processing method, device, device and storage medium, which can improve the accuracy and reliability of the data processing process when there is a risk event.
技术解决方案technical solutions
第一方面,本申请实施例提供了一种基于区块链的数据处理方法,由服务端执行,所述方法包括:In the first aspect, an embodiment of the present application provides a blockchain-based data processing method, which is executed by a server, and the method includes:
响应于风险事件处理请求,确定风险用户,并修改所述风险用户的风险值;In response to a risk event processing request, determining a risk user, and modifying the risk value of the risk user;
向所述风险用户的用户端发送所述风险用户的密接数据获取请求,以指示所述用户端反馈所述风险用户的密接数据;sending a request for obtaining the contact data of the risk user to the client of the risk user to instruct the client to feed back the contact data of the risk user;
根据获取的所述风险用户的密接数据和区块链网络中已存储的所述风险用户的密接凭证,对所述风险用户的密接对象进行风险值更新。According to the obtained contact data of the risk user and the secret certificate of the risk user stored in the blockchain network, the risk value of the contact object of the risk user is updated.
第二方面,本申请实施例提供了一种基于区块链的数据处理方法,由用户端执行,所述方法包括:In the second aspect, the embodiments of the present application provide a blockchain-based data processing method, which is executed by a client, and the method includes:
响应于服务器发送的风险用户的密接数据获取请求,获取所述风险用户的密接数据;其中,所述密接数据获取请求是服务器响应风险事件处理请求后生成的;In response to the contact data acquisition request of the risk user sent by the server, acquire the contact data of the risk user; wherein, the contact data acquisition request is generated after the server responds to the risk event processing request;
将所述风险用户的密接数据反馈至所述服务器,以指示所述服务器根据所述风险用户的密接数据和区块链网络中已存储的所述风险用户的密接凭证,对所述风险用户的密接对象进行风险值更新。Feedback the risk user's secret data to the server, so as to instruct the server to determine the risk user's secret according to the risk user's secret data and the risk user's secret credentials stored in the blockchain network. The value-at-risk update is performed on the close object.
第三方面,本申请实施例提供了一种基于区块链的数据处理装置,所述装置包括:第一响应模块、密接数据请求模块和风险值更新模块;其中,In a third aspect, an embodiment of the present application provides a blockchain-based data processing device, the device includes: a first response module, a close data request module, and a risk value update module; wherein,
所述第一响应模块,用于响应于风险事件处理请求,确定风险用户,并修改所述风险用户的风险值;the first response module, configured to determine a risk user and modify the risk value of the risk user in response to a risk event processing request;
所述密接数据请求模块,用于向所述风险用户的用户端发送所述风险用户的密接数据获取请求,以指示所述用户端反馈所述风险用户的密接数据;The contact data request module is configured to send the contact data acquisition request of the risk user to the user terminal of the risk user, so as to instruct the user terminal to feed back the contact data of the risk user;
所述风险值更新模块,用于根据获取的所述风险用户的密接数据和区块链网络中已存储的所述风险用户的密接凭证,对所述风险用户的密接对象进行风险值更新。The risk value update module is configured to update the risk value of the risk user's contact object according to the obtained contact data of the risk user and the contact certificate of the risk user stored in the blockchain network.
第四方面,本申请实施例提供了一种基于区块链的数据处理装置,所述装置包括:第二响应模块和反馈模块;其中,In a fourth aspect, an embodiment of the present application provides a blockchain-based data processing device, the device includes: a second response module and a feedback module; wherein,
所述第二响应模块,用于响应于服务器发送的风险用户的密接数据获取请求,获取所述风险用户的密接数据;其中,所述密接数据获取请求是服务器响应风险事件处理请求后生成的;The second response module is configured to obtain the contact data of the risk user in response to the contact data acquisition request of the risk user sent by the server; wherein, the contact data acquisition request is generated after the server responds to the risk event processing request;
所述反馈模块,用于将所述风险用户的密接数据反馈至所述服务器,以指示所述服务器根据所述风险用户的密接数据和区块链网络中已存储的所述风险用户的密接凭证,对所述风险用户的密接对象进行风险值更新。The feedback module is configured to feed back the secret data of the risk user to the server, so as to instruct the server to instruct the server according to the secret data of the risk user and the secret certificate of the risk user stored in the blockchain network , and update the risk value of the close contact object of the risk user.
第五方面,本申请实施例提供了一种电子设备,所述电子包括:In a fifth aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:
一个或多个处理器;one or more processors;
存储装置,用于存储一个或多个程序,storage means for storing one or more programs,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本发明任一实施例所述的基于区块链的数据处理方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the blockchain-based data processing method according to any embodiment of the present invention.
第六方面,本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本发明任一实施例所述的基于区块链的数据处理方法。In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the blockchain-based data processing described in any embodiment of the present invention method.
有益效果beneficial effect
本申请实施例提供了一种基于区块链的数据处理方法、装置、设备及存储介质,响应于风险事件处理请求,确定风险用户,并修改其风险值;向风险用户的用户端发送该风险用户的密接数据获取请求,以指示用户端反馈该风险用户的密接数据;根据获取的风险用户的密接数据和区块链网络中已存储的风险用户的密接凭证,对该风险用户的密接对象进行风险值更新。本申请实施例能够在存在风险事件时,由服务器与用户端进行交互,依靠区块链网络,自动进行风险用户的密接对象的确定以及密接对象风险值的修改,准确性和可靠性更高。此外,本申请借助区块链网络中存储的风险用户的密接凭证,来确定风险用户真正的密接对象,避免了风险用户提供虚假密接数据,导致密接对象确定有误的情况出现。The embodiments of the present application provide a blockchain-based data processing method, device, device, and storage medium. In response to a risk event processing request, a risk user is determined, and its risk value is modified; the risk user is sent to the risk user's client. The user's access data acquisition request to instruct the client to feed back the risk user's access data; according to the obtained risk user's access data and the risk user's access credentials stored in the blockchain network, the risk user's access target will be processed. VaR update. In the embodiment of the present application, when there is a risk event, the server can interact with the client, relying on the blockchain network, to automatically determine the risk user's contact object and modify the risk value of the contact object, with higher accuracy and reliability. In addition, the present application uses the risk user's contact credentials stored in the blockchain network to determine the risk user's real contact object, which prevents the risk user from providing false contact data, resulting in incorrect identification of the contact object.
应当理解,本部分所描述的内容并非旨在标识本申请的实施例的关键或重要特征,也不用于限制本申请的范围。本申请的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify key or critical features of the embodiments of the application, nor is it intended to limit the scope of the application. Other features of the present application will become readily understood from the following description.
附图说明Description of drawings
附图用于更好地理解本方案,不构成对本申请的限定。其中:The accompanying drawings are used for better understanding of the present solution, and do not constitute a limitation to the present application. in:
图1为本申请实施例提供的基于区块链的数据处理方法的第一流程示意图;FIG. 1 is a first schematic flowchart of a blockchain-based data processing method provided by an embodiment of the present application;
图2为本申请实施例提供的基于区块链的数据处理方法的第二流程示意图;FIG. 2 is a second schematic flowchart of the blockchain-based data processing method provided by the embodiment of the present application;
图3为本申请实施例提供的基于区块链的数据处理方法的第三流程示意图;FIG. 3 is a third schematic flowchart of the blockchain-based data processing method provided by the embodiment of the present application;
图4为本申请实施例提供的基于区块链的数据处理方法的第四流程示意图;FIG. 4 is a fourth schematic flowchart of the blockchain-based data processing method provided by the embodiment of the present application;
图5为本申请实施例提供的基于区块链的数据处理方法的第五流程示意图;FIG. 5 is a fifth schematic flowchart of the blockchain-based data processing method provided by the embodiment of the present application;
图6A为本申请实施例提供的基于区块链的数据处理方法的信令图;6A is a signaling diagram of a blockchain-based data processing method provided by an embodiment of the present application;
图6B为本申请实施例提供的基于区块链的数据处理方法的系统流程图;FIG. 6B is a system flow diagram of a blockchain-based data processing method provided by an embodiment of the present application;
图7为本申请实施例提供的基于区块链的数据处理装置的第一结构示意图;7 is a schematic diagram of a first structure of a blockchain-based data processing apparatus provided by an embodiment of the present application;
图8为本申请实施例提供的基于区块链的数据处理装置的第二结构示意图;FIG. 8 is a second schematic structural diagram of a blockchain-based data processing apparatus provided by an embodiment of the present application;
图9是用来实现本申请实施例的基于区块链的数据处理方法的电子设备的框图。FIG. 9 is a block diagram of an electronic device used to implement the blockchain-based data processing method according to the embodiment of the present application.
本发明的实施方式Embodiments of the present invention
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all the structures related to the present application.
在介绍本申请实时之前,先对本申请实施例的使用场景进行介绍,本申请实施例主要适用于防控风险事件的蔓延,基于区块链和智能合约,使用分布式存储系统对用户间的密接数据进行分析的场景,本申请实施例的区块链本质上是去中心化的数据库,具有很好的不可篡改性以及真实性。智能合约是运行在区块链平台上的自校验、自执行以及抗篡改的机器可读代码,其有自主的、分布式、可追踪和不可逆转的特点。本申请实施例中,智能合约具有密接事件判定功能、风险值回溯功能和账号恢复功能。接下来,基于上述介绍,对本申请实施例的具体实现方式进行详细介绍。Before introducing the real-time application of this application, the use scenarios of the embodiments of this application are introduced first. The embodiments of this application are mainly suitable for preventing and controlling the spread of risk events. Based on blockchain and smart contracts, a distributed storage system is used to closely connect users. In the scenario of data analysis, the blockchain of the embodiment of this application is essentially a decentralized database, which has good immutability and authenticity. A smart contract is a self-checking, self-executing and tamper-resistant machine-readable code running on a blockchain platform, which is autonomous, distributed, traceable and irreversible. In the embodiment of the present application, the smart contract has the function of determining the close connection event, the function of retrospecting the value at risk, and the function of restoring the account. Next, based on the above introduction, the specific implementation manner of the embodiment of the present application is introduced in detail.
实施例一Example 1
图1为本申请实施例提供的基于区块链的数据处理方法的第一流程示意图。本实施例可适用于服务端基于区块链和智能合约,使用分布式存储系统对密接数据进行分析的情况。本实施例提供的一种基于区块链的数据处理方法可以由本申请实施例六提供的基于区块链的数据处理装置或者电子设备来执行,该装置或者电子设备可以通过软件和/或硬件的方式实现,并集成在执行本申请的服务端中。可选的,本申请实施例的 服务端可以是区块链节点,其可调用区块链网络的智能合约的风险值回溯功能来执行本申请实施例下述操作步骤。FIG. 1 is a first schematic flowchart of a blockchain-based data processing method provided by an embodiment of the present application. This embodiment can be applied to the situation where the server uses the distributed storage system to analyze the dense data based on the blockchain and smart contracts. The blockchain-based data processing method provided in this embodiment may be executed by the blockchain-based data processing apparatus or electronic device provided in Embodiment 6 of this application, and the device or electronic device may be implemented by software and/or hardware. The method is implemented and integrated in the server that executes this application. Optionally, the server in the embodiment of the present application may be a blockchain node, which can invoke the risk value backtracking function of the smart contract of the blockchain network to perform the following operation steps in the embodiment of the present application.
参见图1,本实施例的方法包括但不限于如下步骤:Referring to FIG. 1, the method of this embodiment includes but is not limited to the following steps:
S110、响应于风险事件处理请求,确定风险用户,并修改风险用户的风险值。S110. In response to the risk event processing request, determine a risk user, and modify the risk value of the risk user.
在本申请的具体实施例中,风险用户是指感染了传染疾病的用户。风险事件是指有新增风险用户或者有新用户存在患传染病风险的事件。风险事件处理请求可以是由风险用户在得知自己被传染后,生成风险事件处理请求并通过其用户端发送至服务端,也可以是由医院、政府机构、疾控中心等第三方机构在检测到有新增风险用户或者有新用户存在患传染病风险时,生成风险事件处理请求并发送至服务端。用户端或者第三方机构向服务端发送风险事件处理请求,表明该风险用户已经患了传染病或者存在患传染病的风险。In a specific embodiment of the present application, a risk user refers to a user infected with an infectious disease. A risk event refers to an event in which a new user at risk is added or a new user is at risk of contracting an infectious disease. The risk event processing request can be generated by the risk user after learning that he is infected and sent to the server through his client, or it can be detected by third-party institutions such as hospitals, government agencies, and CDCs. When there is a new risk user or a new user is at risk of contracting an infectious disease, a risk event processing request is generated and sent to the server. The client or a third-party institution sends a risk event processing request to the server, indicating that the risk user has contracted an infectious disease or is at risk of contracting an infectious disease.
在本申请的具体实施例中,若某用户被确诊患了传染病,通过用户端或者第三方机构向服务端发送风险事件处理请求,服务器接收到风险事件处理请求后,会启动智能合约的风险值回溯功能的自动执行的条件。响应风险事件处理请求,从该风险事件处理请求中获取风险用户,并依据风险回溯功能指定的风险值修改要求,修改该风险用户的风险值。例如,可以是将风险用户的风险值设置为最高风险值。风险值是指用户患传染病的风险值。In the specific embodiment of this application, if a user is diagnosed with an infectious disease, a risk event processing request is sent to the server through the user terminal or a third-party organization. After receiving the risk event processing request, the server will start the risk event of the smart contract The condition for the automatic execution of the value backtracking function. Respond to the risk event processing request, obtain the risk user from the risk event processing request, and modify the risk value of the risk user according to the risk value modification requirements specified by the risk retrospective function. For example, the risk value of the risky user may be set to the highest risk value. The risk value refers to the user's risk value of contracting an infectious disease.
可选的,服务端会在本地数据库维护的一个用户风险值数据表格,此时服务器可以在该用户风险值数据表格中将该风险用户的风险值提高到最大值。其中,该用户风险值数据表格至少包含用户地址和风险值。例如,如下表1所示。Optionally, the server may maintain a user risk value data table in the local database. At this time, the server may increase the risk value of the risk user to the maximum value in the user risk value data table. Wherein, the user risk value data table contains at least the user address and the risk value. For example, as shown in Table 1 below.
表1、用户风险值数据表格Table 1. User risk value data table
用户地址1User address 1 风险值1VaR1
用户地址2User address 2 风险值2VaR2
用户地址3User address 3 风险值3VaR3
S120、向风险用户的用户端发送风险用户的密接数据获取请求,以指示用户端反馈风险用户的密接数据。在本申请的具体实施例中,用户在移动终端上安装了密接应用(其中,该密接应用即可看作用户的用户端),当用户之间的密接应用检测到彼此的蓝牙信号时,可以看作用户之间存在密接事件。此时用户端会获取密接事件的密接信息;采用密接双方用户的公钥对密接信息进行加密,得到密接凭证;生成包含所述密接凭证的上链事务请求发送至服务器,以使服务器将该密接凭证上链存储,并获取服务器反馈的存储该密接凭证的区块链索引地址。同时用户端还会将获取的密接信息和区块链索引地址作为密接数据,并存储在用户端的本地数据库中,密接数据包含密接时间、密接对象地址、密接对象的公钥以及区块索引地址。其中,密接时间为当前发生密接事件的时间;其他用户与风险用户发生密接事件之后被称为密接对象;密接对象地址是指密接对象的物理地址;公钥是用户在注册密接应用时所生成的;区块索引地址是指下一时段待出块区块的序号。S120: Send a request for obtaining the contact data of the risk user to the client of the risk user, so as to instruct the client to feed back the contact data of the risk user. In the specific embodiment of the present application, the user installs the close contact application on the mobile terminal (wherein, the close contact application can be regarded as the user's client terminal), when the close contact applications between users detect each other's Bluetooth signals, they can It is regarded as a close event between users. At this time, the client will obtain the contact information of the contact event; encrypt the contact information with the public keys of the users on both sides of the contact, and obtain the contact certificate; generate an on-chain transaction request including the contact certificate and send it to the server, so that the server can make the contact certificate. The credential is stored on the chain, and the index address of the blockchain that stores the secret credential is returned from the server. At the same time, the client will also use the obtained secret information and blockchain index address as secret data, and store it in the local database of the client. Among them, the contact time is the time when the contact event currently occurs; other users and risk users are called the contact object after the contact event occurs; the address of the contact object refers to the physical address of the contact object; the public key is generated when the user registers the contact application. ; The block index address refers to the serial number of the block to be produced in the next period.
在本申请的具体实施例中,服务端在确定风险用户,并修改风险用户端风险值后,会向风险用户的用户端发送风险用户的密接数据获取请求,请求获取风险用户存储在本地数据库中的疫情潜伏期范围内的全部密接数据。其中,疫情潜伏期可以是半个月。In the specific embodiment of this application, after determining the risk user and modifying the risk value of the risk user, the server will send the risk user's close data acquisition request to the risk user's client, requesting that the risk user be stored in the local database. All contact data within the incubation period of the epidemic. Among them, the incubation period of the epidemic can be half a month.
S130、根据获取的风险用户的密接数据和区块链网络中已存储的风险用户的密接凭证,对风险用户的密接对象进行风险值更新。S130. Update the risk value of the risk user's close contact object according to the obtained risk user's close contact data and the risk user's close contact credentials stored in the blockchain network.
在本申请的具体实施例中,区块链网络存储风险用户的密接凭证的具体过程将在后续实施例进行相似介绍。In the specific embodiments of the present application, the specific process of storing the confidential credentials of risk users in the blockchain network will be similarly described in subsequent embodiments.
可选的,密接凭证可以是一个数字或者一个字符串。Optionally, the secret credential can be a number or a string.
可选的,密接数据中包含区块索引地址,在一个区块中有许多的密接凭证,并且这些密接凭证是经过排列过的。因此,本申请实施例服务器从区块链中查找用户的密接凭证时,可以是依据密接数据中包含的区块索引地址搜索到对应的区块,在该区块内可以采用二分查找法搜索与密接对象相对应的密接凭证。Optionally, the secret data contains the block index address, there are many secret certificates in a block, and these secret certificates are arranged. Therefore, when the server in this embodiment of the present application searches for the user's secret certificate from the blockchain, it may search for the corresponding block according to the block index address contained in the secret data, and within the block, a binary search method may be used to search for the corresponding block. The secret certificate corresponding to the secret object.
在本申请的具体实施例中,服务器根据获取到的风险用户疫情潜伏期范围内的全部密接数据后,针对每一条密接数据包含密接时间、密接对象地址和密接对象的公钥。根据该条密接数据生成一个预测凭证(即生成方式与用户端根据密接数据生成密接凭证的方式一致),与从区块链网络中获取的密接凭证相对比。若 从区块链网络中获取的密接凭证中不包含该预测凭证,则表明此条密接数据被篡改过,忽略此条密接数据,不基于该密接数据,对密接对象的风险值进行更新;否则表明此条密接数据是真实有效的,可以确定风险用户和密接对象存在密接事件,该密接对象有被传染患病的风险,因此,将该密接对象所对应的风险值进行更新。具体的风险值更新方式可以是预先设置好的,例如,可以是都增加预设风险值。In the specific embodiment of the present application, after obtaining all the contact data within the scope of the epidemic incubation period of the risk user, the server includes the contact time, the address of the contact object, and the public key of the contact object for each piece of contact data. Generate a prediction credential based on the piece of concatenated data (that is, the generation method is the same as the way that the client generates the concatenated credential based on the concatenated data), which is compared with the concatenated credential obtained from the blockchain network. If the encryption certificate obtained from the blockchain network does not contain the prediction certificate, it means that the encryption data has been tampered with, ignore the encryption data, and update the risk value of the encryption object based on the encryption data; otherwise It indicates that this piece of contact data is real and effective, and it can be determined that there is a contact event between the risk user and the contact object, and the contact object has the risk of being infected with disease. Therefore, the risk value corresponding to the contact object is updated. A specific way of updating the risk value may be preset, for example, it may be to increase the preset risk value.
进一步的,根据获取的风险用户的密接数据和区块链网络中已存储的风险用户的密接凭证,对风险用户的密接对象进行风险值更新,包括:根据获取的风险用户的密接数据和区块链网络中已存储的风险用户的密接凭证,对风险用户的密接对象进行风险值更新;将密接对象作为新的风险用户,返回执行对新的风险用户的密接对象进行风险值更新的操作,直到完成风险值迭代要求。也就是,对风险用户的直接接触对象和间接接触对象进行风险值回溯。具体过程为:根据获取的风险用户的密接数据,确定风险用户的密接对象、密接信息和区块索引地址;采用密接对象的公钥和风险用户的公钥,对密接信息进行加密,得到预测凭证;根据区块索引地址确定目标区块,并确定目标区块中是否存在与预测凭证匹配的密接凭证;若存在,则更新密接对象的风险值。在对风险用户的所有密接数据分析完成后,再将风险用户的密接对象作为新的风险用户,向新的风险用户发送密接数据获取请求,并重复执行根据获取的新的风险用户的密接数据和区块链网络中已存储的新的风险用户的密接凭证,对新的风险用户的密接对象进行风险值更新,依次类推,以实现对风险用户的密接对象的风险值进行迭代更新。可选的,该迭代要求可以是需要迭代的次数,通常情况下,迭代两到三次即可。Further, according to the obtained access data of the risk user and the stored access credentials of the risk user in the blockchain network, update the risk value of the access object of the risk user, including: according to the obtained access data of the risk user and the block Update the risk value of the risk user's contact object with the stored risk user's secret certificate in the chain network; take the contact object as a new risk user, and return to perform the operation of updating the risk value of the new risk user's contact object until Complete the VaR iteration requirement. That is, the risk value backtracking is performed on the direct contact object and the indirect contact object of the risk user. The specific process is as follows: according to the obtained contact data of the risk user, determine the contact object, contact information and block index address of the risk user; use the public key of the contact object and the public key of the risk user to encrypt the contact information to obtain the prediction certificate ; Determine the target block according to the block index address, and determine whether there is a close-contact certificate matching the predicted certificate in the target block; if there is, update the risk value of the close-contact object. After the analysis of all the contact data of the risk user is completed, take the contact object of the risk user as a new risk user, send the contact data acquisition request to the new risk user, and repeat the execution according to the acquired contact data of the new risk user. The value-at-risk of the new risky user's encrypted credentials stored in the blockchain network is updated, and so on, so as to iteratively update the risky value of the risky user's closet object. Optionally, the iteration requirement may be the number of iterations required, and in general, two to three iterations are sufficient.
示例性的,风险用户1确诊换了传染病,若风险用户1和密接对象1的密接数据的预测凭证和密接凭证一致,即密接对象1是风险用户1的一级密接对象,则根据上述智能合约的风险值回溯功能方法,更新风险用户1和密接对象1的风险值。将密接对象1作为新的风险用户2,若风险用户2和密接对象2的密接数据的预测凭证和密接凭证一致,即密接对象2是风险用户1的二级密接对象,则根据上述智能合约的风险值回溯功能方法,更新风险用户2和密接对象2的风险值。依照此方法,依次对风险用户的直接接触对象和间接接触对象进行多次迭代更新。可选的,迭代的次数是预先设定的,迭代次数可以是两次、三次或者多次。可以理解的,一个风险用户可以有多个密接对象,更新风险值时,二级密接对象比一级密接对象的风险值修改幅度小,例如,一级密接对象更新风险值时,对其风险值增加8;二级密接对象更新风险值时,对其风险值增加5。Exemplarily, risk user 1 is diagnosed with an infectious disease. If the prediction credentials of risk user 1 and the close contact data of close contact object 1 are consistent with the close contact certificate, that is, contact object 1 is the first-level contact object of risk user 1, then according to the above intelligence The risk value retrospective function method of the contract updates the risk value of risk user 1 and close object 1. Take the contact object 1 as the new risk user 2, if the prediction credential of the contact data of the risk user 2 and the contact object 2 is the same as the contact certificate, that is, the contact object 2 is the second level contact object of the risk user 1, then according to the above smart contract The risk value retrospective function method updates the risk value of risk user 2 and close contact object 2. According to this method, the direct contact objects and the indirect contact objects of the risk user are sequentially updated multiple times iteratively. Optionally, the number of iterations is preset, and the number of iterations may be two, three or more. It is understandable that a risk user can have multiple contact objects. When updating the risk value, the risk value of the second level contact object is modified less than that of the first level contact object. For example, when the risk value of the first level contact object is updated, its risk value is changed. Increase by 8; when the second-level close contact object updates the risk value, its risk value is increased by 5.
本实施例提供的技术方案,响应于风险事件处理请求,确定风险用户,并修改其风险值;向风险用户的用户端发送该风险用户的密接数据获取请求,以指示用户端反馈该风险用户的密接数据;根据获取的风险用户的密接数据和区块链网络中已存储的风险用户的密接凭证,对该风险用户的密接对象进行风险值更新。本申请实施例能够在存在风险事件时,由服务器与用户端进行交互,依靠区块链网络,自动进行目标对象的密接对象的确定以及密接对象风险值的修改,准确性和可靠性更高。此外,本申请根据借助区块链网络中存储的风险用户的密接凭证,来确定风险用户真正的密接对象,避免了风险用户提供虚假密接数据,导致密接对象确定有误的情况出现。In the technical solution provided by this embodiment, in response to a risk event processing request, a risk user is determined and its risk value is modified; a request for obtaining the contact data of the risk user is sent to the risk user's client to instruct the client to feedback the risk user's data. Contact data: According to the acquired contact data of the risk user and the contact credentials of the risk user stored in the blockchain network, update the risk value of the contact object of the risk user. In the embodiment of the present application, when there is a risk event, the server interacts with the client, and relying on the blockchain network, the determination of the close object of the target object and the modification of the risk value of the close object can be performed automatically, with higher accuracy and reliability. In addition, the present application determines the real contact object of the risk user based on the contact credentials of the risk user stored in the blockchain network, which prevents the risk user from providing false contact data, resulting in an error in the determination of the contact object.
实施例二Embodiment 2
图2为本申请实施例提供的基于区块链的数据处理方法的第二流程示意图。本申请实施例是在上述实施例的基础上,本实施例是对存在密接事件时,服务器响应于包含密接凭证的上链事务请求的具体执行过程进行详细的解释说明。FIG. 2 is a second schematic flowchart of the blockchain-based data processing method provided by the embodiment of the present application. The embodiment of the present application is based on the above-mentioned embodiment, and this embodiment provides a detailed explanation of the specific execution process of the server responding to the up-chain transaction request including the concatenated credential when there is a concatenated event.
S210、响应于包含密接凭证的上链事务请求,获取密接凭证,并将密接凭证存储在区块链中。S210. In response to the on-chain transaction request including the secret certificate, obtain the secret certificate, and store the secret certificate in the blockchain.
其中,所述密接凭证是检测到密接事件时,采用密接双方用户的公钥,对所述密接双方用户的密接信息进行加密得到。具体的生成过程将在后续实施例进行详细介绍。Wherein, the close connection certificate is obtained by encrypting the close connection information of the two users of the close connection by using the public keys of the two users of the close connection when the close connection event is detected. The specific generation process will be described in detail in subsequent embodiments.
在本申请的具体实施例中,对于注册有密接应用的任意一个用户,其密接应用和其密接对象的密接应用检测到彼此的蓝牙信号,则判定该用户与密接对象存在密接事件,此时达到智能合约的密切接触判定功能自动执行的条件。密接应用将生成一段密接信息,并对其进行加密作为密接凭证。其中,密接信息至少包括密接双方用户的公钥组合和密接时间,还可以包括密接对象地址。密接应用生成包含密接凭证的上链事务请求发送至服务器,服务端响应于包含密接凭证的上链事务请求,获取密接凭证,并将密接凭证存储在区 块链中。其中,具体的上链事务是指服务器对用户端发送的密接凭证进行排序、打包,并写入区块中。In the specific embodiment of the present application, for any user registered with the close contact application, the close contact application of the close contact application and the close contact application of its close contact object detect each other's Bluetooth signals, it is determined that the user and the close contact object have a close contact event. The conditions for the automatic execution of the close contact determination function of the smart contract. The contact application will generate a block of contact information and encrypt it as a contact certificate. The contact information includes at least the combination of public keys and the contact time of both users of the contact, and may also include the address of the contact object. The secret application generates an on-chain transaction request containing the secret certificate and sends it to the server. The server responds to the on-chain transaction request containing the secret certificate, obtains the secret certificate, and stores the secret certificate in the blockchain. Among them, the specific on-chain transaction refers to the server sorting and packaging the secret certificate sent by the client, and writing it into the block.
S220、获取存储密接凭证的区块索引地址,并将区块索引地址反馈至发送上链事务请求的用户端。S220: Obtain the block index address for storing the secret certificate, and feed back the block index address to the client that sends the on-chain transaction request.
在本申请的具体实施例中,服务端将储存该密接凭证的区块索引地址反馈至发送上链事务请求的用户端。In the specific embodiment of the present application, the server feeds back the block index address where the secret certificate is stored to the client that sends the on-chain transaction request.
用户端将区块索引地址与获取的密接信息一并作为密接数据保存在本地数据库维护的用户风险值数据表格中。可选的,该区块链索引地址可以是区块序号、区块标识等。The client side saves the block index address and the obtained concatenation information together as concatenated data in the user risk value data table maintained by the local database. Optionally, the blockchain index address may be a block serial number, a block identifier, or the like.
S230、更新密接双方用户的风险值。S230. Update the risk value of the users of both parties in the close connection.
可选的,服务器根据获取的密接凭证可以确定密接双方的身份信息,由于服务器本地维护有用户风险值数据表格,所以可以从该用户风险值数据表格中获取密接双方的风险值进行比较,如果密接双方的风险值不同时,将通过智能合约同时对密接双方风险值进行更新。例如,可以是对比密接双方两者的风险值大小,选出较高的风险值数值,将密接双方两者的风险值都更新为较高的风险值数值。Optionally, the server can determine the identity information of the two parties according to the obtained password. Since the server maintains a user risk value data table locally, the risk value of the two parties can be obtained from the user risk value data table for comparison. When the risk value of the two parties is different, the risk value of the two parties will be updated at the same time through the smart contract. For example, it is possible to compare the value-at-risk of both parties in close contact, select a higher value of risk, and update the value of risk of both parties to the higher value of risk.
可选的,将该密接对象所对应的风险值进行更新之后,还可以将更新后的风险值反馈给对应的用户端。Optionally, after the risk value corresponding to the close contact object is updated, the updated risk value may also be fed back to the corresponding user terminal.
S240、响应于风险事件处理请求,确定风险用户,并修改风险用户的风险值。S240. In response to the risk event processing request, determine the risk user, and modify the risk value of the risk user.
S250、向风险用户的用户端发送风险用户的密接数据获取请求,以指示用户端反馈风险用户的密接数据。S250. Send a request for obtaining the contact data of the risk user to the client terminal of the risk user, so as to instruct the client terminal to feed back the contact data of the risk user.
S260、根据获取的风险用户的密接数据和区块链网络中已存储的风险用户的密接凭证,对风险用户的密接对象进行风险值更新。S260: Update the risk value of the risk user's close contact object according to the obtained risk user's close contact data and the risk user's close contact credentials stored in the blockchain network.
需要说明的是,本申请实施例S210-S230的过程是存在密接事件时,服务器响应于包含密接凭证的上链事务请求时执行的相关操作。S240-S260是存在风险事件时,服务器响应风险事件处理请求时执行的相关操作。两者是两个独立的执行过程,没有先有顺序之分,可以是按照上述实施例的顺序执行,还可以是先执行S240-S260,再执行S210-S230,对此,本实施例不进行限定。It should be noted that, the processes from S210 to S230 in the embodiments of the present application are related operations performed by the server in response to an up-chain transaction request including a secure credentials when a secure event exists. S240-S260 are related operations performed by the server in response to a risk event processing request when a risk event exists. The two are two independent execution processes, and there is no prior order. They may be executed according to the order of the above-mentioned embodiment, or S240-S260 may be executed first, and then S210-S230 may be executed, which is not carried out in this embodiment. limited.
本申请实施例的技术方案,响应与包含密接凭证的上链事务请求后,获取密接数据存在区块链中,同时更新密接双方的风险值,本申请实施例在区块链网络中存储密接凭证可在后续响应于风险事件处理请求的过程中,获取风险用户的密接数据,用该密接凭证验证获取的风险用户的密接数据的准确性,防止风险用户伪造和篡改其密接数据,保证密接数据的真实可靠性。获取存储密接凭证的区块索引地址,反馈至发送上链事务请求的用户端进行存储,以便后续根据风险用户发送的密接数据在区块链网络中快速查找该密接数据对应的密接凭证。在存在风险事件时,由服务器与用户端进行交互,依靠区块链网络,自动进行目标对象的密接对象的确定以及密接对象风险值的修改,准确性和可靠性更高。The technical solution of the embodiment of the present application is to obtain the encrypted data and store it in the blockchain after responding to a request for an up-chain transaction including the encrypted certificate, and at the same time update the risk value of both parties. The embodiment of the application stores the encrypted certificate in the blockchain network. In the subsequent process of responding to the risk event processing request, the access data of the risk user can be obtained, and the access certificate can be used to verify the accuracy of the obtained access data of the risk user, to prevent the risk user from forging and tampering with the access data, and to ensure the integrity of the access data. true reliability. Obtain the block index address where the secret certificate is stored, and feed it back to the client that sends the transaction request on the chain for storage, so that the secret certificate corresponding to the secret data can be quickly searched in the blockchain network according to the secret data sent by the risk user. When there is a risk event, the server interacts with the client, relying on the blockchain network to automatically determine the target object's close object and modify the risk value of the close object, with higher accuracy and reliability.
实施例三Embodiment 3
图3为本申请实施例提供的基于区块链的数据处理方法的第三流程示意图。本申请实施例是在上述实施例的基础上,本实施例对智能合约的账号恢复功能过程进行详细的解释说明。FIG. 3 is a schematic flowchart of a third process of the blockchain-based data processing method provided by the embodiment of the present application. The embodiment of the present application is based on the above-mentioned embodiment, and this embodiment provides a detailed explanation of the account recovery function process of the smart contract.
参见图3,本实施例的方法包括但不限于如下步骤:Referring to FIG. 3, the method of this embodiment includes but is not limited to the following steps:
S310、响应于风险事件处理请求,确定风险用户,并修改风险用户的风险值。S310. In response to the risk event processing request, determine the risk user, and modify the risk value of the risk user.
S320、向风险用户的用户端发送风险用户的密接数据获取请求,以指示用户端反馈风险用户的密接数据。S320. Send a request for obtaining the contact data of the risk user to the client of the risk user, so as to instruct the client to feed back the contact data of the risk user.
S330、根据获取的风险用户的密接数据和区块链网络中已存储的风险用户的密接凭证,对风险用户的密接对象进行风险值更新。S330. Update the risk value of the risk user's close contact object according to the obtained risk user's close contact data and the risk user's close contact credentials stored in the blockchain network.
S340、响应于第一账号加密请求,采用第一账号的公钥,对预设数据进行加密,得到加密结果。S340. In response to the first account encryption request, use the public key of the first account to encrypt the preset data to obtain an encryption result.
在本申请的具体实施例中,当因手机号更换或SIM卡遗失导致的账号失效时,用户可以通过新的手机号创建第二账户,并利用第一账号的私钥请求恢复第一账号的风险值,此时达到智能合约的账号恢复功能自动执行的条件。例如,用户端界面上有恢复第一账号风险值这个选项,点击该选项,输入第一账的私钥就可以触发账号恢复功能。用户在用户端界面上触发第一账号恢复请求。用户端响应该第一账号恢复请求,会生成第一账号加密请求发送至服务端。服务端接收并响应该第一账号加密请求,采用第一账号的公钥,对预设数据进行加密,得到加密结果。可选的,预设数据可以是预先设置的固定数据,或者随机生成的数据。采用第一账号的公钥对预设数据进行加密的目的就是为了验证用户的私钥是否正确。In the specific embodiment of this application, when the account becomes invalid due to the replacement of the mobile phone number or the loss of the SIM card, the user can create a second account through the new mobile phone number, and use the private key of the first account to request to restore the first account The risk value, at this time, reaches the conditions for the automatic execution of the account recovery function of the smart contract. For example, there is an option to restore the risk value of the first account on the user interface. Click this option and enter the private key of the first account to trigger the account recovery function. The user triggers the first account recovery request on the user interface. In response to the first account recovery request, the client generates a first account encryption request and sends it to the server. The server receives and responds to the first account encryption request, and uses the public key of the first account to encrypt the preset data to obtain an encryption result. Optionally, the preset data may be preset fixed data or randomly generated data. The purpose of encrypting the preset data by using the public key of the first account is to verify whether the user's private key is correct.
S350、将加密结果反馈给发送第一账号加密请求的用户端,以指示用户端根据加密结果验证第一账号后,反馈验证结果。S350. Feed back the encryption result to the user terminal that sent the first account encryption request, so as to instruct the user terminal to feed back the verification result after verifying the first account according to the encryption result.
在本申请的具体实施例中,上述步骤中,服务器采用第一账号的公钥,对预设数据进行加密,得到加密结果后,服务端将加密结果反馈给发送第一账号加密请求的用户端。用户端使用第一行号的私钥对加密结果的数据进行解密分析,以验证账号恢复请求中包含的第一账号的私钥是否正确。并向服务端反馈验证结果。In the specific embodiment of the present application, in the above steps, the server uses the public key of the first account to encrypt the preset data, and after obtaining the encryption result, the server feeds back the encryption result to the client that sent the encryption request of the first account . The client uses the private key of the first line number to decrypt and analyze the encrypted result data to verify whether the private key of the first account included in the account recovery request is correct. And feedback the verification result to the server.
S360、若接收到的验证结果为通过,则将第一账号的风险值作为用户端当前登录账号的风险值。S360. If the received verification result is passed, use the risk value of the first account as the risk value of the current login account of the client.
在本申请的具体实施例中,用户端验证第一账号的私钥,若验证结果通过,则向服务端反馈验证结果。若验证结果为通过,则服务器恢复第一账号的风险值,即将第一账号的风险值作为用户端当前登录账号的风险值。若验证结果为不通过,则不用户端可以不向服务端反馈验证结果;也可以是向服务器反馈,但服务器检测到验证结果为不通过,则不执行风险值恢复的操作。In the specific embodiment of the present application, the client verifies the private key of the first account, and if the verification result is passed, the verification result is fed back to the server. If the verification result is passed, the server restores the risk value of the first account, that is, the risk value of the first account is taken as the risk value of the current login account of the client. If the verification result is not passed, the user terminal may not feed back the verification result to the server; it may also be fed back to the server, but the server detects that the verification result is not passed, and does not perform the operation of risk value recovery.
S370、将第一账号的密接数据作为当前账号的密接数据。S370. Use the concatenated data of the first account as the concatenated data of the current account.
在本申请的具体实施例中,不仅可以恢复第一账号的风险值,还可以恢复第一账号的密接数据。使用智能合约的账号恢复功能从第一账号的用户端获取密接数据,然后将获取的密接数据发送至当前账号的用户端(也就是发送第一账号加密请求的客户端),以指示该用户端将获取的密接数据存储在本地数据库中,从而实现密接数据的恢复。In the specific embodiment of the present application, not only the risk value of the first account but also the concatenated data of the first account can be restored. Use the account recovery function of the smart contract to obtain the secret data from the client of the first account, and then send the obtained secret data to the client of the current account (that is, the client that sent the encryption request of the first account) to indicate the client The obtained contiguous data is stored in the local database, so as to realize the recovery of the contiguous data.
需要说明的是,本申请实施例S310-S330是存在风险事件时,服务器响应风险事件处理请求时执行的相关操作。S340-S370的过程是用户需要恢复账户风险值和密接数据时,服务器响应于第一账号加密请求时执行的相关操作,两者是两个独立的执行过程,没有先有顺序之分,可以是按照上述实施例的顺序执行,还可以是先执行S340-S370,再执行S310-S330,对此,本实施例不进行限定。It should be noted that, in the embodiments S310-S330 of the present application, when there is a risk event, the server performs related operations in response to the risk event processing request. The process from S340 to S370 is the relevant operation performed by the server in response to the first account encryption request when the user needs to restore the account risk value and the encrypted data. The two are two independent execution processes, and there is no prior order. According to the sequence of the above embodiments, S340-S370 may also be executed first, and then S310-S330 are executed, which is not limited in this embodiment.
本实施例提供的技术方案,通过服务端响应于第一账号加密请求,采用第一账号的公钥,对预设数据进行加密,得到加密结果。将加密结果反馈给发送第一账号加密请求的用户端,以指示用户端根据加密结果验证第一账号后,反馈验证结果。若接收到的验证结果为通过,则将第一账号的风险值作为用户端当前登录账号的风险值,也可将第一账号的密接数据作为当前账号的密接数据。也就是,通过使用智能合约的账号恢复功能,能够解决了因手机号更换或SIM卡遗失导致的账号失效的问题,恢复用户的风险值和密接数据安全,可以保障密接应用功能的完整性。In the technical solution provided by this embodiment, in response to the first account encryption request, the server uses the public key of the first account to encrypt the preset data to obtain an encryption result. The encryption result is fed back to the client that sent the encryption request for the first account, so as to instruct the client to feed back the verification result after verifying the first account according to the encryption result. If the received verification result is passed, the risk value of the first account is taken as the risk value of the current login account of the client, and the concatenated data of the first account can also be taken as the concatenated data of the current account. That is, by using the account recovery function of the smart contract, the problem of account invalidation caused by the replacement of the mobile phone number or the loss of the SIM card can be solved, the user's risk value and the security of the contact data can be restored, and the integrity of the contact application function can be guaranteed.
实施例四Embodiment 4
图4为本申请实施例提供的基于区块链的数据处理方法的第四流程示意图。本实施例可适用于用户端基于区块链的智能合约,对密接数据进行分析处理的情况。本实施例七提供的一种基于区块链的数据处理方法可以由本申请实施例提供的基于区块链的数据处理装置或者电子设备来执行,该装置或者电子设备可以通过软件和/或硬件的方式实现,并集成在执行本申请的用户端中。FIG. 4 is a fourth schematic flowchart of the blockchain-based data processing method provided by the embodiment of the present application. This embodiment can be applied to the situation where the user terminal analyzes and processes the dense data based on the smart contract based on the blockchain. The blockchain-based data processing method provided in the seventh embodiment of the present application may be executed by the blockchain-based data processing apparatus or electronic device provided in the embodiment of the present application, and the device or electronic device may be implemented by software and/or hardware. The method is implemented and integrated in the client that executes the present application.
参考图4,本实施例的方法包括但不限于如下步骤:4, the method of this embodiment includes but is not limited to the following steps:
S410、响应于服务器发送的风险用户的密接数据获取请求,获取风险用户的密接数据。S410 , in response to the request for obtaining the contact data of the risk user sent by the server, acquire the contact data of the risk user.
其中,所述密接数据获取请求是服务器响应风险事件处理请求后生成的。具体的生成方法在上述实施例中已经介绍,在此本实施例不进行介绍。Wherein, the close data acquisition request is generated after the server responds to the risk event processing request. The specific generation method has been introduced in the above embodiment, and is not described in this embodiment here.
在本申请的具体实施例中,若某用户被确诊患了传染病,通过用户端或者第三方机构向服务端发送风险事件处理请求,服务端响应风险事件处理请求。首先,服务端会在本地数据库维护的数据表格中将该风险用户的风险值提高到最大值。其中,数据表格至少包含密接时间、密接对象地址、风险值以及区块索引地址。此外,服务端向风险用户的用户端发送风险用户的密接数据获取请求,请求获取风险用户存储在本地数据库中的疫情潜伏期范围内的全部密接数据。风险用户的用户端响应服务器发送的风险用户的密接数据获取请求,从本地数据库中获取该风险用户在疫情潜伏期范围内的全部密接数据。其中,疫情潜伏期可以是半个月。In the specific embodiment of this application, if a user is diagnosed with an infectious disease, a risk event processing request is sent to the server through the user terminal or a third-party organization, and the server responds to the risk event processing request. First, the server will increase the risk value of the risk user to the maximum value in the data table maintained in the local database. Wherein, the data table at least contains the time of the close connection, the address of the close connection object, the risk value and the block index address. In addition, the server sends the risk user's contact data acquisition request to the risk user's client, requesting to obtain all the contact data stored in the local database by the risk user within the scope of the epidemic incubation period. The client of the risk user responds to the request for obtaining the close contact data of the risk user sent by the server, and obtains all the close contact data of the risk user within the scope of the epidemic incubation period from the local database. Among them, the incubation period of the epidemic can be half a month.
S420、将风险用户的密接数据反馈至服务器,以指示服务器根据风险用户的密接数据和区块链网络中已存储的风险用户的密接凭证,对风险用户的密接对象进行风险值更新。S420. Feed back the risk user's contact data to the server, so as to instruct the server to update the risk value of the risk user's contact object according to the risk user's contact data and the risk user's secret certificate stored in the blockchain network.
在本申请的具体实施例中,风险用户的用户端获取风险用户存储在本地数据库中的密接数据之后,将风险用户的密接数据反馈至服务端。以指示服务器根据该风险用户的密接数据,结合区块链网络中已存储的该风险用户的密接凭证,确定风险用户的真正密接对象,并对其风险值进行更新,具体的执行过程已在上述 实施例进行介绍,在此本实施例不进行赘述。In the specific embodiment of the present application, after acquiring the contact data of the risk user stored in the local database, the client terminal of the risk user feeds back the contact data of the risk user to the server. It instructs the server to determine the real contact object of the risk user according to the contact data of the risk user and the contact credentials of the risk user that have been stored in the blockchain network, and to update the risk value. The specific execution process has been described above. The embodiment is introduced, and is not repeated in this embodiment.
本实施例提供的技术方案,风险用户的用户端响应于服务器发送的风险用户的密接数据获取请求,获取风险用户的密接数据并反馈至服务器,以指示服务器根据风险用户的密接数据和区块链网络中已存储的风险用户的密接凭证,对风险用户的密接对象进行风险值更新。本实施例的方案,存在风险事件时,用户端与服务器进行交互,基于用户端发送的风险用户的密接数据,和区块链网络中存储的密接凭证,来对用户端发送的风险用户的密接数据进行验证,以保证确定的密接对象的准确性,解决了防止伪造和篡改密接数据,导致密接对象确定不准确的问题,进而保证对密接对象风险值更新的准确性。In the technical solution provided by this embodiment, the client of the risk user responds to the request for obtaining the contact data of the risk user sent by the server, obtains the contact data of the risk user, and feeds it back to the server, so as to instruct the server to obtain the contact data of the risk user according to the block chain. Update the risk value of the risk user's contact object based on the secret certificate of the risk user that has been stored in the network. In the solution of this embodiment, when there is a risk event, the client interacts with the server, and based on the risk user's secret data sent by the client and the secret certificate stored in the blockchain network, the client sends the risk user's secret link. The data is verified to ensure the accuracy of the determined contact object, which solves the problem of preventing forgery and tampering with the contact data, resulting in inaccurate determination of the contact object, thereby ensuring the accuracy of updating the risk value of the contact object.
实施例五Embodiment 5
图5为本申请实施例提供的基于区块链的数据处理方法的第五流程示意图。本申请实施例是在上述实施例的基础上,将基于区块链的数据处理方法应用于用户端,本实施例对数据处理过程进行详细的解释说明。参考图5,本实施例的方法包括但不限于如下步骤:FIG. 5 is a fifth schematic flowchart of the blockchain-based data processing method provided by the embodiment of the present application. The embodiment of the present application applies the data processing method based on the block chain to the user terminal on the basis of the above-mentioned embodiment, and the data processing process is explained in detail in this embodiment. Referring to FIG. 5, the method of this embodiment includes but is not limited to the following steps:
S510、若检测到密接事件,则获取密接事件的密接信息。S510. If a close contact event is detected, acquire contact information of the close contact event.
在本申请的具体实施例中,当用户的密接应用(即任意用户的用户端)和其密接对象的密接应用检测到彼此的蓝牙信号,则判定风险用户与密接对象存在密接事件,此时达到智能合约的密切接触判定功能自动执行的条件。密接应用获取密接事件的密接信息。其中,密接信息至少包括密接双方用户的公钥组合和密接时间,还可以包括密接对象地址。可选的,判定风险用户与密接对象存在密接事件可以是风险用户的用户端检测到周围有强度大于一定阈值的蓝牙信号,就认为该蓝牙信号对应的用户为该风险用户的密接对象。可选的,密接信息中的密接对象地址可以通过蓝牙获取,也可以通过密接对象的公钥进行计算获得。密接信息中的密接对象公钥可以通过蓝牙获取,也可以通过确定密接对象后,从服务端获取。In the specific embodiment of the present application, when the user's close application (that is, the user terminal of any user) and the close application of its close object detect each other's Bluetooth signals, it is determined that there is a close connection event between the risk user and the close object. The conditions for the automatic execution of the close contact determination function of the smart contract. The contact application obtains the contact information of the contact event. The contact information includes at least the combination of public keys and the contact time of both users of the contact, and may also include the address of the contact object. Optionally, judging that there is a close contact event between the risk user and the close contact object may be that the user terminal of the risk user detects that there is a Bluetooth signal with a strength greater than a certain threshold around, and considers that the user corresponding to the Bluetooth signal is the close contact object of the risk user. Optionally, the address of the contact object in the contact information may be obtained through Bluetooth, or may be obtained by calculation through the public key of the contact object. The public key of the contact object in the contact information can be obtained through Bluetooth, or obtained from the server after determining the contact object.
较佳的,若检测到密接事件,则获取密接事件的密接信息,包括:若检测到密接事件,且密接事件不是重复密接事件,则获取密接事件的密接信息。具体的,密接时间可以以天为单位,假如风险用户在当日首次与密接对象通过蓝牙配对判定与其发生密接事件,则此时执行获取密接事件的密接信息。否则当日用户即使与该密接对象进行蓝牙配对,也不执行获取密接事件的密接信息的操作。Preferably, if a close contact event is detected, acquiring the close contact information of the close contact event includes: if the close contact event is detected and the close contact event is not a repeated close contact event, acquiring the close contact information of the close contact event. Specifically, the close connection time may be in days. If the risk user is paired with the close contact object for the first time on that day and it is determined that a close contact event occurs with the close contact object, then the acquisition of the close contact information of the close contact event is performed at this time. Otherwise, even if the user performs Bluetooth pairing with the contact object on that day, the operation of acquiring the contact information of the contact event will not be performed.
S520、采用密接双方用户的公钥对密接信息进行加密,得到密接凭证。S520 , encrypting the information of the close connection by using the public keys of the users of both sides of the close connection to obtain a close connection certificate.
在本申请的具体实施例中,采用密接双方用户的公钥对密接信息进行加密,得到密接凭证。可选的,对密接信息进行加密的方式可以是非对称加密方法,使得加密内容不会被泄露,可以将用户密接数据完全保护。可选的,密接信息中的密接对象地址可以通过蓝牙获取,也可以通过密接对象的公钥进行计算获得。密接信息中的密接对象公钥可以通过蓝牙获取,也可以通过确定密接对象后,从服务端获取。可选的,密接凭证可以是一个数字或者一个字符串。In the specific embodiment of the present application, the encryption information is encrypted by using the public keys of the users of both parties to obtain the encryption certificate. Optionally, the encryption method for the encryption information may be an asymmetric encryption method, so that the encrypted content will not be leaked, and the user encryption data can be completely protected. Optionally, the address of the contact object in the contact information may be obtained through Bluetooth, or may be obtained by calculation through the public key of the contact object. The public key of the contact object in the contact information can be obtained through Bluetooth, or obtained from the server after determining the contact object. Optionally, the secret credential can be a number or a string.
S530、生成包含密接凭证的上链事务请求发送至服务器,以指示服务器将密接凭证上链存储。S530. Generate and send an on-chain transaction request including the secret credential to the server, so as to instruct the server to store the secret credential on the chain.
在本申请的具体实施例中,用户端向服务器发送包含密接凭证的上链事务请求,服务端响应于包含密接凭证的上链事务请求,获取密接凭证,并将密接凭证存储在区块链中。具体的上链过程已在上述实施例进行了详细介绍,在此不进行赘述。In the specific embodiment of the present application, the client sends an on-chain transaction request containing the secret certificate to the server, and the server responds to the on-chain transaction request containing the secret certificate, obtains the secret certificate, and stores the secret certificate in the blockchain. . The specific chaining process has been described in detail in the above embodiment, and will not be repeated here.
S540、获取服务器反馈的存储密接凭证的区块索引地址。S540: Obtain the block index address of the storage secret credential returned by the server.
在本申请的具体实施例中,服务端在将密接凭证上链存出后,会将储存该密接凭证的区块索引地址反馈至发送上链事务请求的用户端,此时用户端获取服务器反馈的存储密接凭证的区块索引地址。In the specific embodiment of this application, after the server has stored the secret certificate on the chain, it will feed back the block index address where the secret certificate is stored to the client that sent the transaction request on the chain. At this time, the client obtains the feedback from the server. The index address of the block where the encryption certificate is stored.
S550、将密接信息和区块索引地址作为密接数据存储在本地。S550. Store the concatenation information and the block index address locally as concatenated data.
在本申请的具体实施例中,用户端将密接信息和区块索引地址作为密接数据保存在本地数据库维护的密接数据表格中,如下表2所示。In the specific embodiment of the present application, the user terminal saves the contact information and the block index address as the contact data in the contact data table maintained by the local database, as shown in Table 2 below.
表2、密接数据表格Table 2. Adhesion data table
Figure PCTCN2021116248-appb-000001
Figure PCTCN2021116248-appb-000001
S560、响应于服务器发送的风险用户的密接数据获取请求,获取风险用户的密接数据。S560, in response to the request for obtaining the contact data of the risk user sent by the server, acquire the contact data of the risk user.
S570、将风险用户的密接数据反馈至服务器,以指示服务器根据风险用户的密接数据和区块链网络中已存储的风险用户的密接凭证,对风险用户的密接对象进行风险值更新。S570. Feed back the risk user's contact data to the server, so as to instruct the server to update the risk value of the risk user's contact object according to the risk user's contact data and the risk user's secret certificate stored in the blockchain network.
进一步的,用户在用户端安装密接应用完成后,用户首次使用该密接应用,需要注册自己的密接账号。用户端响应于用户触发的账号注册请求,生成用户的账户信息,其中账户信息包括:账户的公钥、私钥、账户地址和初始风险值。其中,私钥是通过手机号信息加密结合一个密码学安全的随机源生成的;公钥是由私钥通过椭圆曲线乘法计算得到;地址由公钥进行一次散列计算并计算RIPEMD160散列值,然后进行Bases8Check编码后得到;账号注册时,用户设置患病风险值初始设置为零。Further, after the user installs the close connection application on the user terminal, the user needs to register his own close connection account when using the close connection application for the first time. In response to an account registration request triggered by the user, the client terminal generates account information of the user, wherein the account information includes: the public key, private key, account address and initial risk value of the account. Among them, the private key is generated by encrypting the mobile phone number information combined with a cryptographically secure random source; the public key is calculated by the private key through elliptic curve multiplication; the address is hashed once by the public key and the RIPEMD160 hash value is calculated, Then it is obtained after Bases8Check coding; when the account is registered, the user sets the disease risk value to be initially set to zero.
可选的,用户端可以将生成的公钥和患病风险值发送给服务端,以指示服务端将这些信息进行上链存储或在本地数据库中存储,以供其他用户查询。为保证用户账号信息的安全性,用户端生成的私钥值存储在本地数据库中。Optionally, the client can send the generated public key and disease risk value to the server to instruct the server to store the information on the chain or in a local database for other users to query. To ensure the security of user account information, the private key value generated by the client is stored in the local database.
进一步的,当因手机号更换或SIM卡遗失导致的账号失效时,用户可以通过新的手机号创建第二账户,并利用第一账号的私钥请求恢复第一账号的风险值,此时达到智能合约的账号恢复功能自动执行的条件。例如,用户端界面上有恢复第一账号风险值这个选项,点击该选项,输入第一账号的私钥就可以触发账号恢复功能。用户在用户端界面上发送第一账号恢复请求。用户端响应于用户触发的账号恢复请求,生成第一账号加密请求发送至服务器,以指示服务器采用第一账号的公钥加密预设数据,并反馈加密结果;采用第一账号的私钥验证服务反馈的加密结果,并向服务器反馈验证结果,以指示服务器基于验证结果执行账号数据恢复操作。具体的执行过程已在上述实施例进行了详细介绍,在此本实施例不进行赘述。Further, when the account is invalid due to the replacement of the mobile phone number or the loss of the SIM card, the user can create a second account through the new mobile phone number, and use the private key of the first account to request the restoration of the risk value of the first account. The conditions for the automatic execution of the account recovery function of the smart contract. For example, there is an option to restore the risk value of the first account on the user interface. Click this option and enter the private key of the first account to trigger the account recovery function. The user sends a first account recovery request on the user interface. In response to the account recovery request triggered by the user, the client generates a first account encryption request and sends it to the server to instruct the server to encrypt the preset data with the public key of the first account, and feed back the encryption result; use the private key of the first account to verify the service The encrypted result is fed back, and the verification result is fed back to the server, so as to instruct the server to perform the account data recovery operation based on the verification result. The specific execution process has been described in detail in the foregoing embodiment, and is not repeated in this embodiment here.
本实施例提供的技术方案,通过检测到密接事件,获取密接事件的密接信息;采用密接双方用户的公钥对密接信息进行加密得到密接凭证;用户端生成包含密接凭证的上链事务请求发送至服务器,以指示服务器将密接凭证上链存储,并更新密接双方用户的风险值;用户端获取服务器反馈的存储密接凭证的区块索引地址,并将密接信息和区块索引地址作为密接数据存储在本地;用户端响应于服务器发送的风险用户的密接数据获取请求,获取风险用户的密接数据。并将风险用户的密接数据反馈至服务器,以指示服务器根据风险用户的密接数据和区块链网络中已存储的风险用户的密接凭证,对风险用户的密接对象进行风险值更新。本实施例,用户的密接数据存储在用户端本地,在区块链网络中存储密接数据的密接凭证,防止用户的密接数据被泄漏,保证了密接数据的安全性和隐私性。即使用户将自己伪造或篡改密接数据发送值服务器,服务器可以基于区块链网络中存储的密接凭证将其辨认出来,极大的提高了密接数据处理过程中信息保密性和准确性。In the technical solution provided by this embodiment, the contact information of the contact event is obtained by detecting the contact event; the contact information is encrypted by the public keys of the users of both parties to obtain the contact certificate; the client generates an upload transaction request including the contact certificate and sends it to The server instructs the server to store the secret certificate on the chain and update the risk value of the users on both sides of the secret; the client obtains the block index address of the secret certificate returned by the server, and stores the secret information and block index address as secret data in the Local; the client obtains the contact data of the risk user in response to the request for obtaining the contact data of the risk user sent by the server. Feedback the risk user's contact data to the server to instruct the server to update the risk value of the risk user's contact object according to the risk user's contact data and the risk user's secret certificate stored in the blockchain network. In this embodiment, the user's encrypted data is stored locally on the user end, and the encrypted data's encrypted credentials are stored in the blockchain network, so as to prevent the user's encrypted data from being leaked and ensure the security and privacy of the encrypted data. Even if the user sends his own forged or tampered data to the value server, the server can identify it based on the encrypted data stored in the blockchain network, which greatly improves the confidentiality and accuracy of information during the processing of the encrypted data.
实施例六Embodiment 6
图6A为本申请实施例提供的基于区块链的数据处理方法的信令图;图6B为本申请实施例提供的基于区块链的数据处理方法的系统流程图。本申请实施例在上述实施例的基础上,给出了基于区块链的用户端和服务器端相互进行数据处理的优选实例,具体的,该实施例包括以下步骤:FIG. 6A is a signaling diagram of the blockchain-based data processing method provided by the embodiment of the present application; FIG. 6B is a system flowchart of the blockchain-based data processing method provided by the embodiment of the present application. On the basis of the above-mentioned embodiment, the embodiment of the present application provides a preferred example of mutual data processing between the client and the server based on the blockchain. Specifically, this embodiment includes the following steps:
S601、若第一用户端检测到密接事件,则获取密接事件的密接信息。S601. If the first user terminal detects the close connection event, obtain the close connection information of the close connection event.
S602、第一用户端采用密接双方用户的公钥对密接信息进行加密,得到密接凭证。S602: The first user terminal uses the public keys of the users of both sides of the close connection to encrypt the close connection information to obtain a close connection certificate.
S603、第一用户端生成包含密接凭证的上链事务请求发送至服务器。S603. The first client generates an on-chain transaction request including the secret credential and sends it to the server.
S604、服务器响应于包含密接凭证的上链事务请求,获取密接凭证,并将密接凭证存储在区块链中。S604, the server obtains the secret certificate in response to the on-chain transaction request including the secret certificate, and stores the secret certificate in the blockchain.
S605、服务器获取存储密接凭证的区块索引地址,并将区块索引地址反馈至发送上链事务请求的第一用户端。S605. The server obtains the block index address for storing the encryption certificate, and feeds back the block index address to the first client that sends the on-chain transaction request.
S606、第一用户端获取服务器反馈的存储密接凭证的区块索引地址。S606. The first client obtains the block index address of the storage secret credential fed back by the server.
S607、第一用户端将密接信息和区块索引地址作为密接数据存储在本地。S607: The first user terminal stores the concatenation information and the block index address locally as concatenated data.
S608、服务器更新密接双方用户的风险值。S608, the server updates the risk value of the users of both parties in the close connection.
其中,S601-S608是当风险用户之间存在密接事件时,服务器更新密接双方用户的风险值的过程。如图6B所示,用户A与用户B之间的密接应用检测到彼此的蓝牙信号时,可以看作用户之间存在密接事件。此时,第一用户端(此时用户A和用户B的密接应用都可以作为该第一用户端)会获取密接事件的密接信息。其 中,密接信息至少包括密接双方用户(即用户A和用户B)的公钥组合和密接时间,还可以包括密接对象地址。第一用户端采用密接双方用户的公钥对所述密接信息进行加密,得到密接凭证,用于验证该密接信息是否真实。第一用户端生成包含所述密接凭证的上链事务请求发送至服务器,服务器将密接凭证打包、根据哈希值排序,并写入区块链中。服务器获取存储密接凭证的区块索引地址,并反馈给第一用户端。第一用户端将密接信息和区块索引地址作为密接数据存储在本地。服务器更新密接双方用户的风险值。Wherein, S601-S608 is a process for the server to update the risk value of both users of the close connection when there is a close connection event between the risk users. As shown in FIG. 6B , when the close connection applications between user A and user B detect each other's Bluetooth signals, it can be regarded as a close connection event between users. At this time, the first client (in this case, both the contact applications of user A and user B can be used as the first client) will acquire contact information of the contact event. Wherein, the contact information includes at least the combination of public keys and the contact time of both users of the contact (i.e., user A and user B), and may also include the address of the contact object. The first client uses the public keys of the users of both parties to encrypt the contact information, and obtains a certificate for the contact information, which is used to verify whether the contact information is authentic. The first client generates an on-chain transaction request including the secret credential and sends it to the server, and the server packages the secret credential, sorts it according to the hash value, and writes it into the blockchain. The server obtains the block index address where the secret certificate is stored, and feeds it back to the first client. The first user terminal stores the concatenation information and the block index address locally as concatenated data. The server updates the risk value of users on both sides of the connection.
S609、服务器响应于风险事件处理请求,确定风险用户,并修改风险用户的风险值。S609, the server determines the risk user in response to the risk event processing request, and modifies the risk value of the risk user.
S610、服务器向风险用户的用户端发送风险用户的密接数据获取请求。S610. The server sends a request for obtaining the contact data of the risk user to the client of the risk user.
S611、风险用户的用户端响应于服务器发送的风险用户的密接数据获取请求,获取风险用户的密接数据。S611. The client terminal of the risk user, in response to the request for obtaining the contact data of the risk user sent by the server, acquires the contact data of the risk user.
S612、风险用户的用户端将风险用户的密接数据反馈至服务器。S612. The client of the risk user feeds back the close data of the risk user to the server.
S613、服务器根据获取的所述风险用户的密接数据和区块链网络中已存储的所述风险用户的密接凭证,对所述风险用户的密接对象进行风险值更新。S613. The server updates the risk value of the risk user's contact object according to the obtained contact data of the risk user and the contact certificate of the risk user stored in the blockchain network.
其中,S609-S613是当某用户换了传染疾病成为风险用户时,服务器修改该风险用户的风险值以及该风险用户的密接对象的风险值的过程。如图6B所示,医院等专业机构检测到患者被确诊后,通过用户端或者第三方机构向服务端发送风险事件处理请求,服务器接收到风险事件处理请求后,确定风险用户,并修改该风险用户的风险值。服务器接收到风险事件处理请求后,会启动智能合约的风险值回溯功能的自动执行的条件。服务器请求获取风险用户的用户端在疫情潜伏期范围内的全部密接数据,根据每条密接数据生成一个预测凭证,与从区块链网络中获取的密接凭证相对比,若密接信息真实,则对风险用户的密接对象的风险值进行更新。Wherein, S609-S613 is a process in which the server modifies the risk value of the risk user and the risk value of the close contact object of the risk user when a user becomes a risk user after changing an infectious disease. As shown in Figure 6B, after a professional institution such as a hospital detects that a patient has been diagnosed, it sends a risk event processing request to the server through the user terminal or a third-party institution. After receiving the risk event processing request, the server determines the risk user and modifies the risk User's value at risk. After the server receives the risk event processing request, it will activate the conditions for the automatic execution of the risk value backtracking function of the smart contract. The server requests to obtain all the contact data of the risk user's client within the scope of the epidemic incubation period, and generates a prediction certificate based on each contact data. The risk value of the user's contact object is updated.
S614、第二用户端响应于用户触发的账号注册请求,生成用户的账户信息。其中账户信息包括:账户的公钥、私钥、账户地址和初始风险值。S614. The second client terminal generates account information of the user in response to the account registration request triggered by the user. The account information includes: the public key, private key, account address and initial risk value of the account.
S615、第三用户端响应于用户触发的账号恢复请求,生成第一账号加密请求发送至服务器。S615. In response to the account recovery request triggered by the user, the third client terminal generates a first account encryption request and sends the request to the server.
S616、服务器响应于第一账号加密请求,采用第一账号的公钥,对预设数据进行加密,得到加密结果。S616. The server, in response to the first account encryption request, encrypts the preset data by using the public key of the first account to obtain an encryption result.
S617、服务器将加密结果反馈给发送第一账号加密请求的用户端。S617: The server feeds back the encryption result to the client that sent the first account encryption request.
S618、第三用户端采用第一账号的私钥验证服务反馈的加密结果,并向服务器反馈验证结果。S618. The third client uses the private key of the first account to verify the encryption result fed back by the service, and feeds back the verification result to the server.
S619、服务器若接收到的验证结果为通过,则将第一账号的风险值作为用户端当前登录账号的风险值。S619: If the received verification result is passed, the server uses the risk value of the first account as the risk value of the current login account of the client.
S620、服务器将第一账号的密接数据作为当前账号的密接数据。S620. The server uses the concatenated data of the first account as the concatenated data of the current account.
其中,S614是用户首次使用密接应用,注册账号。S615-S620是当用户手机号更换或SIM卡遗失导致的账号失效时,使用账号恢复功能恢复第一账号的密接信息。Among them, S614 is the first time the user uses the close connection application to register an account. S615-S620 is to use the account recovery function to restore the contact information of the first account when the account becomes invalid due to the replacement of the user's mobile phone number or the loss of the SIM card.
需要说明的是,本申请实施例的第一用户端、第二用户端、第三用户端和风险用户的用户端,可以是同一用户的用户端,也可以是不同用户的用户端,对此本实施例不进行赘述。It should be noted that, the first user terminal, the second user terminal, the third user terminal, and the user terminal of the risk user in the embodiment of the present application may be the user terminal of the same user or the user terminal of different users. This embodiment will not describe redundantly.
需要说明的是,本申请各实施例涉及的服务器可以是基于拜占庭共识机制,从至少两个候选服务器中确定。具体的,本申请实施例的服务器并不是中心化的一个服务器,而是由多个候选服务器构成的服务器集群,在执行上述实施例的操作时,具体选择服务器集群中的哪个服务器来执行,可以通过共识机制来确定,可选的,该共识机制可以是工作量证明(proof of work,PoW)、权益证明(proof of stake,PoS)、实用拜占庭容错算法(Practical Byzantine Fault Tolerance,PBFT),本实施例优选采用的共识机制为PBFT。根据多PBFT共识机制可以检测到拜占庭行为并通过自主恢复以避免主节点异常导致的程序崩溃。与早期拜占庭容错算法只能基于同步系统运行不同,实用拜占庭容错算法可以在异步环境中工作,并且将早期的拜占庭容错算法的响应性能提升了一个数量级以上。It should be noted that the servers involved in the embodiments of the present application may be determined from at least two candidate servers based on a Byzantine consensus mechanism. Specifically, the server in this embodiment of the present application is not a centralized server, but a server cluster composed of multiple candidate servers. When performing the operations in the foregoing embodiments, it is possible to specifically select which server in the server cluster to perform the operations. It is determined by a consensus mechanism. Optionally, the consensus mechanism can be proof of work (PoW), proof of stake (PoS), and Practical Byzantine Fault Tolerance (PBFT). The consensus mechanism preferably adopted in the embodiment is PBFT. According to the multi-PBFT consensus mechanism, Byzantine behavior can be detected and automatically recovered to avoid program crash caused by master node abnormality. Unlike early Byzantine fault-tolerant algorithms that could only run on synchronous systems, practical Byzantine fault-tolerant algorithms can work in an asynchronous environment, and improve the response performance of early Byzantine fault-tolerant algorithms by more than an order of magnitude.
实施例七Embodiment 7
图7为本申请实施例提供的基于区块链的数据处理装置的第一结构示意图,如图7所示,该装置700可以包括:FIG. 7 is a schematic diagram of a first structure of a blockchain-based data processing apparatus provided by an embodiment of the present application. As shown in FIG. 7 , the apparatus 700 may include:
第一响应模块710,用于响应于风险事件处理请求,确定风险用户,并修改所述风险用户的风险值。The first response module 710 is configured to, in response to a risk event processing request, determine a risk user, and modify the risk value of the risk user.
密接数据请求模块720,用于向所述风险用户的用户端发送所述风险用户的密接数据获取请求,以指示所述用户端反馈所述风险用户的密接数据。The contact data request module 720 is configured to send the contact data acquisition request of the risk user to the client terminal of the risk user, so as to instruct the client terminal to feed back the contact data of the risk user.
风险值更新模块730,用于根据获取的所述风险用户的密接数据和区块链网络中已存储的所述风险用户的密接凭证,对所述风险用户的密接对象进行风险值更新。The risk value updating module 730 is configured to update the risk value of the risk user's contact object according to the obtained contact data of the risk user and the risk user's secret certificate stored in the blockchain network.
进一步的,上述风险值更新模块730,具体用于,根据获取的所述风险用户的密接数据和区块链网络中已存储的所述风险用户的密接凭证,对所述风险用户的密接对象进行风险值更新;将所述密接对象作为新的风险用户,返回执行对所述新的风险用户的密接对象进行风险值更新的操作,直到完成风险值迭代要求。进一步的,上述风险值更新模块730,具体用于,根据获取的所述风险用户的密接数据,确定所述风险用户的密接对象、密接信息和区块索引地址;采用所述密接对象的公钥和所述风险用户的公钥,对所述密接信息进行加密,得到预测凭证;根据所述区块索引地址确定目标区块,并确定所述目标区块中是否存在与所述预测凭证匹配的密接凭证;若存在,则更新所述密接对象的风险值。Further, the above-mentioned risk value update module 730 is specifically configured to, according to the obtained close contact data of the risk user and the close contact credentials of the risk user stored in the blockchain network, perform a close contact operation on the risk user's close contact object. Risk value update; take the contact object as a new risk user, and return to perform the operation of updating the risk value of the contact object of the new risk user until the risk value iteration requirement is completed. Further, the above-mentioned risk value update module 730 is specifically configured to, according to the obtained contact data of the risk user, determine the contact object, contact information and block index address of the risk user; adopt the public key of the contact object. and the public key of the risk user, encrypt the contact information, and obtain a prediction certificate; determine a target block according to the block index address, and determine whether there is a match with the prediction certificate in the target block. Contact credentials; if there is, update the risk value of the contact object.
进一步的,上述一种基于区块链的数据处理装置,还可以包括:上链事务请求模块740(图中未示出),用于响应于包含密接凭证的上链事务请求,获取所述密接凭证,并将所述密接凭证存储在区块链中,其中,所述密接凭证是检测到密接事件时,采用密接双方用户的公钥,对所述密接双方用户的密接信息进行加密得到;更新所述密接双方用户的风险值。获取存储所述密接凭证的区块索引地址,并将所述区块索引地址反馈至发送所述上链事务请求的用户端。Further, the above-mentioned blockchain-based data processing device may further include: an on-chain transaction request module 740 (not shown in the figure), configured to obtain the encrypted connection in response to an upper-chain transaction request including a certificate, and store the close connection certificate in the blockchain, wherein the close connection certificate is obtained by using the public keys of the users of both sides of the close connection to encrypt the close connection information of the users of both sides of the close connection when a close connection event is detected; update The risk value of the users on both sides of the close connection. Acquiring the block index address that stores the secret certificate, and feeding back the block index address to the client that sent the on-chain transaction request.
进一步的,上述一种基于区块链的数据处理装置,还可以包括:第一账号恢复模块750(图中未示出),用于响应于第一账号加密请求,采用所述第一账号的公钥,对预设数据进行加密,得到加密结果;将所述加密结果反馈给发送所述第一账号加密请求的用户端,以指示所述用户端根据所述加密结果验证所述第一账号后,反馈验证结果;若接收到的验证结果为通过,则将所述第一账号的风险值作为所述用户端当前登录账号的风险值。将所述第一账号的密接数据作为所述当前账号的密接数据。Further, the above-mentioned blockchain-based data processing device may further include: a first account recovery module 750 (not shown in the figure), for responding to the first account encryption request, using the first account The public key is used to encrypt the preset data to obtain an encryption result; the encryption result is fed back to the client that sent the first account encryption request to instruct the client to verify the first account according to the encryption result. Then, the verification result is fed back; if the received verification result is passed, the risk value of the first account is used as the risk value of the current login account of the user terminal. The concatenated data of the first account is used as the concatenated data of the current account.
可选的,上述任意实施例提供的一种基于区块链的数据处理装置,其中,所述服务器是基于拜占庭共识机制,从至少两个候选服务器中确定。Optionally, in the blockchain-based data processing apparatus provided in any of the foregoing embodiments, the server is determined from at least two candidate servers based on a Byzantine consensus mechanism.
本实施例提供的一种基于区块链的数据处理装置可适用于上述任意实施例提供的一种基于区块链的数据处理方法,具备相应的功能和有益效果。The blockchain-based data processing apparatus provided in this embodiment is applicable to the blockchain-based data processing method provided by any of the above embodiments, and has corresponding functions and beneficial effects.
实施例八Embodiment 8
图8为本申请实施例提供的基于区块链的数据处理装置的第二结构示意图,如图8所示,该装置800可以包括:FIG. 8 is a second schematic structural diagram of a blockchain-based data processing apparatus provided by an embodiment of the present application. As shown in FIG. 8 , the apparatus 800 may include:
第二响应模块810,用于响应于服务器发送的风险用户的密接数据获取请求,获取所述风险用户的密接数据;其中,所述密接数据获取请求是服务器响应风险事件处理请求后生成的。The second response module 810 is configured to obtain the contact data of the risk user in response to the contact data acquisition request of the risk user sent by the server; wherein the contact data acquisition request is generated by the server in response to the risk event processing request.
反馈模块820,用于将所述风险用户的密接数据反馈至所述服务器,以指示所述服务器根据所述风险用户的密接数据和区块链网络中已存储的所述风险用户的密接凭证,对所述风险用户的密接对象进行风险值更新。The feedback module 820 is configured to feed back the contact data of the risk user to the server, so as to instruct the server to instruct the server according to the contact data of the risk user and the secret certificate of the risk user stored in the blockchain network, The risk value update is performed on the close object of the risk user.
进一步的,上述一种基于区块链的数据处理装置,还可以包括:响应上链事务请求模块830(图中未示出),用于若检测到密接事件,则获取所述密接事件的密接信息;采用密接双方用户的公钥对所述密接信息进行加密,得到密接凭证;生成包含所述密接凭证的上链事务请求发送至服务器,以指示所述服务器将所述密接凭证上链存储,并更新所述密接双方用户的风险值。此外,若检测到密接事件,且所述密接事件不是重复密接事件,则获取所述密接事件的密接信息。Further, the above-mentioned blockchain-based data processing device may further include: a response to an uplink transaction request module 830 (not shown in the figure), configured to obtain the close connection of the close connection event if a close connection event is detected. use the public keys of the users of both parties to encrypt the secret information to obtain the secret certificate; generate an on-chain transaction request including the secret certificate and send it to the server to instruct the server to store the secret certificate on the chain, And update the risk value of the users on both sides of the close connection. In addition, if a close contact event is detected, and the close contact event is not a repeated close contact event, then the contact information of the close contact event is acquired.
进一步的,上述一种基于区块链的数据处理装置,还可以包括:密接数据存储模块840(图中未示出),用于获取服务器反馈的存储所述密接凭证的区块索引地址;将所述密接信息和所述区块索引地址作为密接数据存储在本地。Further, the above-mentioned blockchain-based data processing device may further include: a close data storage module 840 (not shown in the figure) for obtaining the block index address fed back by the server for storing the close pass certificate; The concatenation information and the block index address are stored locally as concatenated data.
进一步的,上述一种基于区块链的数据处理装置,还可以包括:响应账号注册请求模块850(图中未示出),用于响应于用户触发的账号注册请求,生成所述用户的账户信息,其中所述账户信息包括:所述账户的公钥、私钥、账户地址和初始风险值。Further, the above-mentioned blockchain-based data processing device may also include: a response account registration request module 850 (not shown in the figure), for generating an account of the user in response to an account registration request triggered by a user information, wherein the account information includes: the public key, private key, account address and initial risk value of the account.
进一步的,上述一种基于区块链的数据处理装置,还可以包括:响应第一账号恢复请求模块860(图中未示出),用于响应于用户触发的账号恢复请求,生成第一账号加密请求发送至服务器,以指示所述服务器 采用所述第一账号的公钥加密预设数据,并反馈加密结果;采用第一账号的私钥验证服务反馈的加密结果,并向所述服务器反馈验证结果,以指示所述服务器基于所述验证结果执行账号数据恢复操作。Further, the above-mentioned blockchain-based data processing device may further include: a first account recovery request module 860 (not shown in the figure), configured to generate a first account in response to an account recovery request triggered by a user The encryption request is sent to the server to instruct the server to use the public key of the first account to encrypt the preset data, and feed back the encryption result; use the private key of the first account to verify the encryption result fed back by the service, and feed back to the server The verification result is used to instruct the server to perform an account data recovery operation based on the verification result.
本实施例提供的一种基于区块链的数据处理装置可适用于上述任意实施例提供的一种基于区块链的数据处理方法,具备相应的功能和有益效果。The blockchain-based data processing apparatus provided in this embodiment is applicable to the blockchain-based data processing method provided by any of the above embodiments, and has corresponding functions and beneficial effects.
实施例九Embodiment 9
根据本申请的实施例,本申请还提供了一种电子设备和一种可读存储介质。According to the embodiments of the present application, the present application further provides an electronic device and a readable storage medium.
如图9所示,是根据本申请实施例的一种基于区块链的数据处理方法的电子设备的框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本申请的实现。As shown in FIG. 9 , it is a block diagram of an electronic device of a blockchain-based data processing method according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are by way of example only, and are not intended to limit implementations of the application described and/or claimed herein.
如图9所示,该电子设备包括:一个或多个处理器910、存储器920,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在其它实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个电子设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。图9中以一个处理器910为例。As shown in FIG. 9, the electronic device includes: one or more processors 910, a memory 920, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or otherwise as desired. The processor may process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used with multiple memories and multiple memories, if desired. Likewise, multiple electronic devices may be connected, each providing some of the necessary operations (eg, as a server array, a group of blade servers, or a multiprocessor system). A processor 910 is taken as an example in FIG. 9 .
存储器920即为本申请所提供的非瞬时计算机可读存储介质。其中,所述存储器存储有可由至少一个处理器执行的指令,以使所述至少一个处理器执行本申请所提供的一种基于区块链的数据处理方法。本申请的非瞬时计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行本申请所提供的一种基于区块链的数据处理方法。The memory 920 is the non-transitory computer-readable storage medium provided by the present application. Wherein, the memory stores instructions executable by at least one processor, so that the at least one processor executes the blockchain-based data processing method provided by the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions, and the computer instructions are used to cause the computer to execute the blockchain-based data processing method provided by the present application.
存储器920作为一种非瞬时计算机可读存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块,如本申请实施例中的一种基于区块链的数据处理方法对应的程序指令/模块(例如,图7所示的第一响应模块710、密接数据请求模块720和风险值更新模块730;图8所示的第二响应模块810、反馈模块820)。处理器910通过运行存储在存储器920中的非瞬时软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例中的一种基于区块链的数据处理方法。As a non-transitory computer-readable storage medium, the memory 920 can be used to store non-transitory software programs, non-transitory computer-executable programs and modules, such as a program corresponding to a blockchain-based data processing method in the embodiments of the present application Instructions/modules (eg, the first response module 710, the contact data request module 720, and the risk value update module 730 shown in FIG. 7; the second response module 810, the feedback module 820 shown in FIG. 8). The processor 910 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions and modules stored in the memory 920, that is, implementing a blockchain-based data processing method in the above method embodiments .
存储器920可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据一种基于区块链的数据处理的电子设备的使用所创建的数据等。此外,存储器920可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些实施例中,存储器920可选包括相对于处理器910远程设置的存储器,这些远程存储器可以通过网络连接至一种基于区块链的数据处理的电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 920 may include a storage program area and a storage data area, wherein the storage program area may store an operating system and an application program required by at least one function; the storage data area may store data of an electronic device according to a blockchain-based data processing. Use the created data, etc. Additionally, memory 920 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 920 may optionally include memory located remotely from the processor 910, and these remote memories may be connected via a network to a blockchain-based data processing electronic device. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
一种基于区块链的数据处理方法的电子设备还可以包括:输入装置930和输出装置940。处理器910、存储器920、输入装置930和输出装置940可以通过总线或者其他方式连接,图9中以通过总线连接为例。输入装置930可接收输入的数字或字符信息,以及产生与一种基于区块链的数据处理的电子设备的用户设置以及功能控制有关的键信号输入,例如触摸屏、小键盘、鼠标、轨迹板、触摸板、指示杆、一个或者多个鼠标按钮、轨迹球、操纵杆等输入装置。输出装置940可以包括显示设备、辅助照明装置(例如,LED)和触觉反馈装置(例如,振动电机)等。该显示设备可以包括但不限于,液晶显示器(LCD)、发光二极管(LED)显示器和等离子体显示器。在一些实施方式中,显示设备可以是触摸屏。The electronic device based on the block chain data processing method may further include: an input device 930 and an output device 940 . The processor 910, the memory 920, the input device 930, and the output device 940 may be connected by a bus or in other ways, and the connection by a bus is taken as an example in FIG. 9 . The input device 930 can receive input numerical or character information, and generate key signal input related to user settings and function control of a blockchain-based data processing electronic device, such as a touch screen, keypad, mouse, trackpad, Input devices such as touchpads, pointing sticks, one or more mouse buttons, trackballs, joysticks, etc. The output device 940 may include a display device, auxiliary lighting devices (eg, LEDs), haptic feedback devices (eg, vibration motors), and the like. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
此处描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、专用ASIC(专用集成电路)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至 少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置和该至少一个输出装置。Various implementations of the systems and techniques described herein can be implemented in digital electronic circuitry, integrated circuit systems, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpretable on a programmable system including at least one programmable processor that A processor, which may be a special purpose or general-purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device output device.
这些计算程序(也称作程序、软件、软件应用、或者代码)包括可编程处理器的机器指令,并且可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。如本文使用的,术语“机器可读介质”和“计算机可读介质”指的是用于将机器指令和/或数据提供给可编程处理器的任何计算机程序产品、设备、和/或装置(例如,磁盘、光盘、存储器、可编程逻辑装置(PLD)),包括,接收作为机器可读信号的机器指令的机器可读介质。术语“机器可读信号”指的是用于将机器指令和/或数据提供给可编程处理器的任何信号。These computational programs (also referred to as programs, software, software applications, or codes) include machine instructions for programmable processors, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages calculation program. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or apparatus for providing machine instructions and/or data to a programmable processor ( For example, magnetic disks, optical disks, memories, programmable logic devices (PLDs), including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)、互联网和区块链网络。To provide interaction with a user, the systems and techniques described herein may be implemented on a computer having a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user ); and a keyboard and pointing device (eg, a mouse or trackball) through which a user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (eg, visual feedback, auditory feedback, or tactile feedback); and can be in any form (including acoustic input, voice input, or tactile input) to receive input from the user. The systems and techniques described herein may be implemented on a computing system that includes back-end components (eg, as a data server), or a computing system that includes middleware components (eg, an application server), or a computing system that includes front-end components (eg, a user's computer having a graphical user interface or web browser through which a user may interact with implementations of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system may be interconnected by any form or medium of digital data communication (eg, a communication network). Examples of communication networks include: Local Area Networks (LANs), Wide Area Networks (WANs), the Internet, and blockchain networks.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务中,存在的管理难度大,业务扩展性弱的缺陷。A computer system can include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or a cloud host. It is a host product in the cloud computing service system to solve the traditional physical host and VPS services, which are difficult to manage and weak in business scalability. defect.
根据本申请实施例的技术方案,服务端响应于风险事件处理请求,确定风险用户,并修改其风险值;向风险用户的用户端发送该风险用户的密接数据获取请求,以指示用户端反馈该风险用户的密接数据;根据获取的风险用户的密接数据和区块链网络中已存储的风险用户的密接凭证,对该风险用户的密接对象进行风险值更新。本申请实施例能够在存在风险事件时,由服务器与用户端进行交互,依靠区块链网络,自动进行目标对象的密接对象的确定以及密接对象风险值的修改,准确性和可靠性更高。此外,本申请根据借助区块链网络中存储的风险用户的密接凭证,来确定风险用户真正的密接对象,避免了风险用户提供虚假密接数据,导致密接对象确定有误的情况出现。According to the technical solutions of the embodiments of the present application, the server, in response to the risk event processing request, determines the risk user, and modifies its risk value; and sends the risk user's close data acquisition request to the risk user's client to instruct the client to feedback the risk user. The risk user's contact data; according to the obtained risk user's contact data and the risk user's secret certificate stored in the blockchain network, the risk value of the risk user's contact object is updated. In the embodiment of the present application, when there is a risk event, the server interacts with the client, and relying on the blockchain network, the determination of the close object of the target object and the modification of the risk value of the close object can be performed automatically, with higher accuracy and reliability. In addition, the present application determines the real contact object of the risk user based on the contact credentials of the risk user stored in the blockchain network, which prevents the risk user from providing false contact data, resulting in an error in the determination of the contact object.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本申请中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本申请公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, the steps described in the present application can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in the present application can be achieved, no limitation is imposed herein.
上述具体实施方式,并不构成对本申请保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本申请的精神和原则之内所作的修改、等同替换和改进等,均应包含在本申请保护范围之内。The above-mentioned specific embodiments do not constitute a limitation on the protection scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of this application shall be included within the protection scope of this application.

Claims (18)

  1. 一种基于区块链的数据处理方法,其特征在于,由服务端执行,所述方法包括:A blockchain-based data processing method, characterized in that it is executed by a server, the method comprising:
    响应于风险事件处理请求,确定风险用户,并修改所述风险用户的风险值;In response to a risk event processing request, determining a risk user, and modifying the risk value of the risk user;
    向所述风险用户的用户端发送所述风险用户的密接数据获取请求,以指示所述用户端反馈所述风险用户的密接数据;sending a request for obtaining the contact data of the risk user to the client of the risk user to instruct the client to feed back the contact data of the risk user;
    根据获取的所述风险用户的密接数据和区块链网络中已存储的所述风险用户的密接凭证,对所述风险用户的密接对象进行风险值更新。According to the obtained contact data of the risk user and the secret certificate of the risk user stored in the blockchain network, the risk value of the contact object of the risk user is updated.
  2. 根据权利要求1所述的方法,其特征在于,根据获取的所述风险用户的密接数据和区块链网络中已存储的所述风险用户的密接凭证,对所述风险用户的密接对象进行风险值更新,包括:The method according to claim 1, characterized in that, according to the obtained contact data of the risk user and the secret certificate of the risk user stored in the blockchain network, the risk user's contact object is subject to risk Value updates, including:
    根据获取的所述风险用户的密接数据和区块链网络中已存储的所述风险用户的密接凭证,对所述风险用户的密接对象进行风险值更新;According to the obtained contact data of the risk user and the contact credentials of the risk user stored in the blockchain network, update the risk value of the contact object of the risk user;
    将所述密接对象作为新的风险用户,返回执行对所述新的风险用户的密接对象进行风险值更新的操作,直到完成风险值迭代要求。The contact object is regarded as a new risk user, and the operation of updating the risk value of the contact object of the new risk user is returned to until the iteration requirement of the risk value is completed.
  3. 根据权利要求1所述的方法,其特征在于,根据获取的所述风险用户的密接数据和区块链网络中已存储的所述风险用户的密接凭证,对所述风险用户的密接对象进行风险值更新,包括:The method according to claim 1, characterized in that, according to the obtained contact data of the risk user and the secret certificate of the risk user stored in the blockchain network, the risk user's contact object is subject to risk Value updates, including:
    根据获取的所述风险用户的密接数据,确定所述风险用户的密接对象、密接信息和区块索引地址;According to the obtained contact data of the risk user, determine the contact object, the contact information and the block index address of the risk user;
    采用所述密接对象的公钥和所述风险用户的公钥,对所述密接信息进行加密,得到预测凭证;Using the public key of the contact object and the public key of the risk user, encrypting the contact information to obtain a prediction certificate;
    根据所述区块索引地址确定目标区块,并确定所述目标区块中是否存在与所述预测凭证匹配的密接凭证;Determine a target block according to the block index address, and determine whether there is a contiguous credential matching the predicted credential in the target block;
    若存在,则更新所述密接对象的风险值。If it exists, update the risk value of the contact object.
  4. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1, further comprising:
    响应于包含密接凭证的上链事务请求,获取所述密接凭证,并将所述密接凭证存储在区块链中,其中,所述密接凭证是检测到密接事件时,采用密接双方用户的公钥,对所述密接双方用户的密接信息进行加密得到;In response to an on-chain transaction request including a close-contact credential, obtain the close-contact credential and store the close-contact credential in the blockchain, wherein the close-contact credential is when a close-contact event is detected, using the public keys of the users on both sides of the close-contact certificate. , and obtains by encrypting the close connection information of the two users of the close connection;
    更新所述密接双方用户的风险值。Update the risk value of the users on both sides of the close contact.
  5. 根据权利要求4所述的方法,其特征在于,将所述密接凭证存储在区块链中之后,还包括:The method according to claim 4, characterized in that after storing the secret credential in the blockchain, the method further comprises:
    获取存储所述密接凭证的区块索引地址,并将所述区块索引地址反馈至发送所述上链事务请求的用户端。Acquiring the block index address that stores the secret certificate, and feeding back the block index address to the client that sent the on-chain transaction request.
  6. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1, further comprising:
    响应于第一账号加密请求,采用所述第一账号的公钥,对预设数据进行加密,得到加密结果;In response to the first account encryption request, using the public key of the first account to encrypt the preset data to obtain an encryption result;
    将所述加密结果反馈给发送所述第一账号加密请求的用户端,以指示所述用户端根据所述加密结果验证所述第一账号后,反馈验证结果;Feeding back the encryption result to the client that sent the first account encryption request, to instruct the client to feed back the verification result after verifying the first account according to the encryption result;
    若接收到的验证结果为通过,则将所述第一账号的风险值作为所述用户端当前登录账号的风险值。If the received verification result is passed, the risk value of the first account is used as the risk value of the current login account of the client.
  7. 根据权利要求6所述的方法,其特征在于,将所述第一账号的风险值作为所述用户端当前登录账号的风险值之后,还包括:The method according to claim 6, wherein after using the risk value of the first account as the risk value of the current login account of the user terminal, the method further comprises:
    将所述第一账号的密接数据作为所述当前账号的密接数据。The concatenated data of the first account is used as the concatenated data of the current account.
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,所述服务器是基于拜占庭共识机制,从至少两个候选服务器中确定。The method according to any one of claims 1-7, wherein the server is determined from at least two candidate servers based on a Byzantine consensus mechanism.
  9. 一种基于区块链的数据处理方法,其特征在于,由用户端执行,所述方法包括:A blockchain-based data processing method, characterized in that it is executed by a client, the method comprising:
    响应于服务器发送的风险用户的密接数据获取请求,获取所述风险用户的密接数据;其中,所述密接数据获取请求是服务器响应风险事件处理请求后生成的;将所述风险用户的密接数据反馈至所述服务器,以指示所述服务器根据所述风险用户的密接数据和区块链网络中已存储的所述风险用户的密接凭证,对所述风险用户的密接对象进行风险值更新。In response to the contact data acquisition request of the risk user sent by the server, acquire the contact data of the risk user; wherein, the contact data acquisition request is generated after the server responds to the risk event processing request; feedback the contact data of the risk user to the server to instruct the server to update the risk value of the risk user's contact object according to the risk user's contact data and the risk user's secret certificate stored in the blockchain network.
  10. 根据权利要求9所述的方法,其特征在于,还包括:The method of claim 9, further comprising:
    若检测到密接事件,则获取所述密接事件的密接信息;If a close contact event is detected, obtain the close contact information of the close contact event;
    采用密接双方用户的公钥对所述密接信息进行加密,得到密接凭证;Using the public keys of the users of both sides of the close connection to encrypt the close connection information to obtain the close connection certificate;
    生成包含所述密接凭证的上链事务请求发送至服务器,以指示所述服务器将所述密接凭证上链存储,并更新所述密接双方用户的风险值。Generating an on-chain transaction request including the secret credential and sending it to the server to instruct the server to store the secret credential on the chain, and to update the risk value of the users on both sides of the secret.
  11. 根据权利要求10所述的方法,其特征在于,生成包含所述密接凭证的上链事务请求发送至服务器之后,还包括;The method according to claim 10, characterized in that after generating and sending the on-chain transaction request including the close credential to the server, the method further comprises:
    获取服务器反馈的存储所述密接凭证的区块索引地址;Obtain the block index address that stores the secret credential fed back by the server;
    将所述密接信息和所述区块索引地址作为密接数据存储在本地。The concatenation information and the block index address are stored locally as concatenated data.
  12. 根据权利要求10所述的方法,其特征在于,若检测到密接事件,则获取所述密接事件的密接信息,包括:The method according to claim 10, wherein if a close contact event is detected, acquiring the close contact information of the close contact event, comprising:
    若检测到密接事件,且所述密接事件不是重复密接事件,则获取所述密接事件的密接信息。If a close contact event is detected, and the close contact event is not a repeated close contact event, then the contact information of the close contact event is acquired.
  13. 根据权利要求9所述的方法,其特征在于,还包括:The method of claim 9, further comprising:
    响应于用户触发的账号注册请求,生成所述用户的账户信息,其中所述账户信息包括:所述账户的公钥、私钥、账户地址和初始风险值。In response to the account registration request triggered by the user, the account information of the user is generated, wherein the account information includes: the public key, the private key, the account address and the initial risk value of the account.
  14. 根据权利要求9所述的方法,其特征在于,还包括:The method of claim 9, further comprising:
    响应于用户触发的账号恢复请求,生成第一账号加密请求发送至服务器,以指示所述服务器采用所述第一账号的公钥加密预设数据,并反馈加密结果;In response to the account recovery request triggered by the user, a first account encryption request is generated and sent to the server to instruct the server to encrypt the preset data with the public key of the first account, and feed back the encryption result;
    采用第一账号的私钥验证服务反馈的加密结果,并向所述服务器反馈验证结果,以指示所述服务器基于所述验证结果执行账号数据恢复操作。Use the private key of the first account to verify the encryption result fed back by the service, and feed back the verification result to the server to instruct the server to perform an account data recovery operation based on the verification result.
  15. 一种基于区块链的数据处理装置,所述装置包括:第一响应模块、密接数据请求模块和风险值更新模块;其中,A data processing device based on blockchain, the device comprises: a first response module, a data request module for close connection and a risk value update module; wherein,
    所述第一响应模块,用于响应于风险事件处理请求,确定风险用户,并修改所述风险用户的风险值;the first response module, configured to determine a risk user and modify the risk value of the risk user in response to a risk event processing request;
    所述密接数据请求模块,用于向所述风险用户的用户端发送所述风险用户的密接数据获取请求,以指示所述用户端反馈所述风险用户的密接数据;The contact data request module is configured to send the contact data acquisition request of the risk user to the user terminal of the risk user, so as to instruct the user terminal to feed back the contact data of the risk user;
    所述风险值更新模块,用于根据获取的所述风险用户的密接数据和区块链网络中已存储的所述风险用户的密接凭证,对所述风险用户的密接对象进行风险值更新。The risk value updating module is configured to update the risk value of the risk user's contact object according to the obtained contact data of the risk user and the contact certificate of the risk user stored in the blockchain network.
  16. 一种基于区块链的数据处理装置,所述装置包括:第二响应模块和反馈模块;其中,A data processing device based on blockchain, the device comprises: a second response module and a feedback module; wherein,
    所述第二响应模块,用于响应于服务器发送的风险用户的密接数据获取请求,获取所述风险用户的密接数据;其中,所述密接数据获取请求是服务器响应风险事件处理请求后生成的;The second response module is configured to obtain the contact data of the risk user in response to the contact data acquisition request of the risk user sent by the server; wherein, the contact data acquisition request is generated after the server responds to the risk event processing request;
    所述反馈模块,用于将所述风险用户的密接数据反馈至所述服务器,以指示所述服务器根据所述风险用户的密接数据和区块链网络中已存储的所述风险用户的密接凭证,对所述风险用户的密接对象进行风险值更新。The feedback module is configured to feed back the secret data of the risk user to the server, so as to instruct the server to instruct the server according to the secret data of the risk user and the secret certificate of the risk user stored in the blockchain network , and update the risk value of the close contact object of the risk user.
  17. 一种电子设备,其特征在于,所述电子包括:An electronic device, characterized in that the electronics include:
    一个或多个处理器;one or more processors;
    存储装置,用于存储一个或多个程序,storage means for storing one or more programs,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-8或9-14中任一所述的基于区块链的数据处理方法。When executed by the one or more processors, the one or more programs cause the one or more processors to implement the blockchain-based blockchain of any one of claims 1-8 or 9-14 data processing method.
  18. 一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如权利要求1-8或9-14中任一所述的基于区块链的数据处理方法。A computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the blockchain-based data processing method according to any one of claims 1-8 or 9-14.
PCT/CN2021/116248 2020-12-30 2021-09-02 Data processing method and apparatus based on block chain, device, and storage medium WO2022142436A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011613850.0A CN112635061A (en) 2020-12-30 2020-12-30 Data processing method, device and equipment based on block chain and storage medium
CN202011613850.0 2020-12-30

Publications (1)

Publication Number Publication Date
WO2022142436A1 true WO2022142436A1 (en) 2022-07-07

Family

ID=75286935

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/116248 WO2022142436A1 (en) 2020-12-30 2021-09-02 Data processing method and apparatus based on block chain, device, and storage medium

Country Status (2)

Country Link
CN (1) CN112635061A (en)
WO (1) WO2022142436A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112635061A (en) * 2020-12-30 2021-04-09 南方科技大学 Data processing method, device and equipment based on block chain and storage medium
CN112735602A (en) * 2021-01-07 2021-04-30 南方科技大学 Block chain risk value management method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111460335A (en) * 2020-02-28 2020-07-28 山东爱城市网信息技术有限公司 Epidemic situation prevention and control information management method, device and medium based on block chain
CN111462918A (en) * 2020-03-29 2020-07-28 北京天仪百康科贸有限公司 Epidemic situation monitoring method and system based on block chain
WO2020197990A1 (en) * 2019-03-22 2020-10-01 Nephron Pharmaceuticals Corporation Blockchain systems and methods for remote monitoring
CN112635061A (en) * 2020-12-30 2021-04-09 南方科技大学 Data processing method, device and equipment based on block chain and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069542A (en) * 2020-09-09 2020-12-11 北京清数智能科技有限公司 Method and device for tracking close contact person, storage medium and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020197990A1 (en) * 2019-03-22 2020-10-01 Nephron Pharmaceuticals Corporation Blockchain systems and methods for remote monitoring
CN111460335A (en) * 2020-02-28 2020-07-28 山东爱城市网信息技术有限公司 Epidemic situation prevention and control information management method, device and medium based on block chain
CN111462918A (en) * 2020-03-29 2020-07-28 北京天仪百康科贸有限公司 Epidemic situation monitoring method and system based on block chain
CN112635061A (en) * 2020-12-30 2021-04-09 南方科技大学 Data processing method, device and equipment based on block chain and storage medium

Also Published As

Publication number Publication date
CN112635061A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
US11526487B2 (en) Database world state integrity validation
US11750396B2 (en) Private data processing method, device and medium
US20230046965A1 (en) Reduced-step blockchain verification of media file
US10410018B2 (en) Cryptographic assurances of data integrity for data crossing trust boundaries
CN111460429B (en) Task processing method, device, equipment and medium based on trusted execution environment
WO2018076760A1 (en) Block chain-based transaction processing method, system, electronic device, and storage medium
US11394584B2 (en) Asynchronous processing of blockchain blocks
US10917249B2 (en) Processing data elements stored in blockchain networks
US20210351938A1 (en) Method and apparatus for sharing data based on blockchain network, device, and medium
US20200267187A1 (en) Security platform for multi-component system and services thereof
US20200382279A1 (en) Approximate hash verification of unused blockchain output
WO2022142436A1 (en) Data processing method and apparatus based on block chain, device, and storage medium
US10108605B1 (en) Natural language processing system and method
TW202111568A (en) Shared blockchain data storage based on error correction coding in trusted execution environments
Xu et al. Spdl: A blockchain-enabled secure and privacy-preserving decentralized learning system
CN111310204B (en) Data processing method and device
US11354198B2 (en) Snapshot for world state recovery
KR102295593B1 (en) Automatically generating certification documents
US11789929B2 (en) Method, apparatus, device and medium for performing review based on blockchain
CN111033491A (en) Storing shared blockchain data based on error correction coding
WO2022143298A1 (en) Blockchain-based data processing method and apparatus
CN111400743B (en) Transaction processing method, device, electronic equipment and medium based on blockchain network
CN114398678A (en) Registration verification method and device for preventing electronic file from being tampered, electronic equipment and medium
Wang et al. Cloud data integrity verification algorithm based on data mining and accounting informatization
WO2022126720A1 (en) Blockchain-based information shielding method and apparatus, device, and readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21913183

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21913183

Country of ref document: EP

Kind code of ref document: A1