WO2022141060A1 - 基于区块链的数据上链方法、装置、终端及存储介质 - Google Patents

基于区块链的数据上链方法、装置、终端及存储介质 Download PDF

Info

Publication number
WO2022141060A1
WO2022141060A1 PCT/CN2020/140870 CN2020140870W WO2022141060A1 WO 2022141060 A1 WO2022141060 A1 WO 2022141060A1 CN 2020140870 W CN2020140870 W CN 2020140870W WO 2022141060 A1 WO2022141060 A1 WO 2022141060A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
consensus
security detection
detection result
uploaded
Prior art date
Application number
PCT/CN2020/140870
Other languages
English (en)
French (fr)
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 杭州趣链科技有限公司
Priority to PCT/CN2020/140870 priority Critical patent/WO2022141060A1/zh
Publication of WO2022141060A1 publication Critical patent/WO2022141060A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements

Definitions

  • the present application belongs to the technical field of blockchain, and in particular, relates to a method, device, terminal and storage medium for uploading data to the blockchain based on blockchain.
  • Blockchain as a new type of distributed architecture software, uses a consensus mechanism to ensure that data forms eventually consistent copies in multiple terminals, and due to the block chain structure, it is impossible to modify and delete the data that has already been generated. This feature has become a factor that increases the difficulty of supervision when faced with information content security incidents.
  • the embodiments of the present application provide a blockchain-based data uploading method, device, terminal, and storage medium, so as to solve the problem that the detection and management of information content security events in the prior art are in a very backward position, In addition, there are repeated audits, the management and control efficiency is low, and the timeliness of disposal is poor.
  • a first aspect of the embodiments of the present application provides a blockchain-based data uploading method, including:
  • the first consensus request includes: the first security detection result of the first data to be uploaded;
  • the second consensus request determine whether the locally stored first security detection result includes the target security detection result corresponding to the target data to be uploaded;
  • the first security detection result includes the target security detection result
  • the target data to be uploaded is security data
  • a second aspect of the embodiments of the present application provides a blockchain-based data uploading device, including:
  • the pre-consensus module is used to obtain the first consensus request triggered by any node in the blockchain platform, where the first consensus request includes: the first security detection result of the first data to be uploaded; A consensus request, storing the first security detection result locally, and sending consensus feedback information to the corresponding node;
  • the formal consensus module is used to obtain the second consensus request triggered by the first node in the blockchain platform, and the second consensus request includes the target data to be uploaded on the chain; according to the second consensus request, determine the locally stored Whether the first security detection result includes the target security detection result corresponding to the target data to be uploaded; if it is determined that the first security detection result includes the target security detection result, then based on the When the target security detection result determines that the target data to be linked is safe data, the target data to be linked is stored locally in response to the second consensus request.
  • a third aspect of the embodiments of the present application provides a terminal, including a memory, a processor, and a computer program stored in the memory and running on the processor, which is implemented when the processor executes the computer program The steps of the method according to the first aspect.
  • a fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
  • a fifth aspect of the present application provides a computer program product, which, when the computer program product runs on a terminal, causes the terminal to execute the steps of the method in the above-mentioned first aspect.
  • the security detection result is stored according to the first consensus request by acquiring the first consensus request triggered by any node in the blockchain platform and including the security detection result of the data to be uploaded.
  • obtain the second consensus request triggered by the first node in the blockchain platform that contains the target data to be linked and according to the second consensus request, determine whether the locally stored security test result contains the target data to be linked. If it is judged that the security detection result contains the target security detection result, when the target data to be uploaded is determined to be secure data based on the target security detection result, the second consensus request is responded to and the target is to be uploaded.
  • the chain data is stored locally.
  • pre-consensus is carried out on the security detection results of the data to be linked, so as to realize the judgment of the security of the data to be linked in the formal consensus process based on the pre-consensus results, and realize the information content before the consensus dissemination of the data to be linked.
  • FIG. 1 is a flowchart 1 of a method for uploading data based on a blockchain provided by an embodiment of the present application
  • FIG. 2 is a flowchart 2 of a method for uploading data on a blockchain based on a blockchain provided by an embodiment of the present application;
  • FIG. 3 is a schematic structural diagram of a blockchain unit provided by an embodiment of the present application.
  • FIG. 4 is a structural diagram of a blockchain-based data uploading device provided by an embodiment of the present application.
  • FIG. 5 is a structural diagram of a terminal provided by an embodiment of the present application.
  • the term “if” may be contextually interpreted as “when” or “once” or “in response to determining” or “in response to detecting” .
  • the phrases “if it is determined” or “if the [described condition or event] is detected” may be interpreted, depending on the context, to mean “once it is determined” or “in response to the determination” or “once the [described condition or event] is detected. ]” or “in response to detection of the [described condition or event]”.
  • the terminals described in the embodiments of the present application include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (eg, touch screen displays and/or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but rather a desktop computer with a touch-sensitive surface (eg, a touch screen display and/or a touch pad).
  • a terminal including a display and a touch-sensitive surface is described. It should be understood, however, that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse and/or joystick.
  • the terminal supports various applications such as one or more of the following: drawing applications, presentation applications, word processing applications, website creation applications, disc burning applications, spreadsheet applications, gaming applications, telephony applications programs, video conferencing applications, email applications, instant messaging applications, exercise support applications, photo management applications, digital camera applications, digital video camera applications, web browsing applications, digital music player applications and / or a digital video player application.
  • applications such as one or more of the following: drawing applications, presentation applications, word processing applications, website creation applications, disc burning applications, spreadsheet applications, gaming applications, telephony applications programs, video conferencing applications, email applications, instant messaging applications, exercise support applications, photo management applications, digital camera applications, digital video camera applications, web browsing applications, digital music player applications and / or a digital video player application.
  • Various applications that may be executed on the terminal may use at least one common physical user interface device, such as a touch sensitive surface.
  • a touch sensitive surface One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal may be adjusted and/or changed between applications and/or within respective applications.
  • the common physical architecture of the terminal eg, touch-sensitive surface
  • FIG. 1 is a flowchart 1 of a method for uploading data based on a blockchain provided by an embodiment of the present application.
  • a blockchain-based data uploading method includes the following steps:
  • Step 101 Obtain a first consensus request triggered by any node in the blockchain platform.
  • the first consensus request includes: the first security detection result of the first data to be uploaded.
  • the first consensus request is sent by any node in the blockchain platform.
  • the first consensus request is used for pre-consensus on the first security detection result corresponding to the first data to be uploaded before consensus is performed on the first data to be uploaded.
  • Step 102 according to the first consensus request, store the first security detection result locally, and send consensus feedback information to the corresponding node.
  • the first consensus request enables each node in the blockchain platform to obtain and store the pre-judgment results of the data to be uploaded through the data consensus, so that when a node finds problematic data, the data will be processed on this node.
  • the data security detection results are shared to other nodes to ensure that other blockchain nodes can also shield the information directly based on the security detection results, and avoid repeated audits through information sharing.
  • the node that currently obtains the consensus request can locally establish the security detection result of each data to be linked based on the first security detection result of the first data to be linked carried in the consensus request.
  • Stored content through the security detection results sent by any node in the blockchain platform, the local pre-storage of the security detection results of several data to be linked is realized, so that the corresponding data to be linked can be obtained later.
  • the security detection results can be directly used, and the security of the current data to be uploaded can be judged directly based on the locally stored security detection results, avoiding the repeated detection process of the same data by many nodes in the blockchain node. .
  • the first security detection result is whether the consensus among the blockchain nodes is successful.
  • the security detection link occurs before the information dissemination, so whether there is an information content security risk can be detected in time.
  • Step 103 Obtain a second consensus request triggered by the first node in the blockchain platform.
  • the second consensus request includes the target data to be uploaded to the chain.
  • the sending node of the second consensus request and the sending node of the first consensus request may be the same node, or may be different nodes.
  • the target data to be linked may be one of the first data to be linked, or new data to be linked.
  • the second consensus request is a situation in which consensus is achieved in the blockchain platform with the first security detection result Get it below.
  • each node in the blockchain platform can realize the security judgment of the first to-be-chained data based on the consensus first security detection result.
  • Step 104 determine whether the locally stored first security detection result includes the target security detection result corresponding to the target data to be uploaded to the chain.
  • the first security detection result has the identification code of the first data to be uploaded corresponding to it; the judgment of whether the target security detection result is included may specifically be: comparing the identification code of the target data to be uploaded with the local The identification codes of the first data to be uploaded corresponding to the stored several first security detection results are matched, and a first security matching the identification code in the first security detection result with the identification code of the target data to be uploaded is matched.
  • the sex detection result is used as the target security detection result.
  • This process realizes the utilization of the first security detection result stored locally, compares the data to be uploaded for consensus in the current second consensus request with the security detection result stored locally, and determines whether there is any data to be uploaded to the chain.
  • the corresponding target security test results guide the direct judgment of the security of the data on the chain.
  • Step 105 If it is judged that the first security detection result includes the target security detection result, when it is determined based on the target security detection result that the target data to be uploaded is safe data, the target data to be uploaded is responded to the second consensus request, and the target data to be uploaded is determined. Store to local.
  • the security detection result is specifically a security judgment result that has been pre-judged on the security of the corresponding data to be uploaded, such as having security or not having security.
  • the process of determining whether the target data to be uploaded on the chain is safe data based on the target security detection result is specifically: reading the content of the target security detection result, and when the read content is safe, judging that the target is to be The data on the chain is safe data. When the read content is not safe, it is judged that the target data to be uploaded on the chain is unsafe data.
  • the method further includes:
  • a feedback message of rejecting the consensus is sent to the corresponding node.
  • the first security detection result includes the target security detection result
  • a feedback message of rejecting consensus is sent to the corresponding node.
  • the blockchain nodes enter the formal consensus link.
  • the consensus process first check whether the node stores the detection results of the data to be uploaded locally. If not, the consensus will be rejected. If there is, it will be judged according to the detection results. Whether there is a risk, if there is no risk, the consensus can be continued, otherwise the consensus will be rejected.
  • the security detection result is stored locally, and the obtained A second consensus request triggered by the first node in the blockchain platform that includes the target data to be linked, according to the second consensus request, it is determined whether the locally stored security test result contains the target security corresponding to the target data to be linked In the detection result, if it is determined that the security detection result includes the target security detection result, when the target data to be uploaded is determined to be secure data based on the target security detection result, the target data to be uploaded is stored in response to the second consensus request in response to the second consensus request. local.
  • pre-consensus is carried out on the security detection results of the data to be linked, so as to realize the judgment of the security of the data to be linked in the formal consensus process based on the pre-consensus results, and realize the information content before the consensus dissemination of the data to be linked.
  • Safe early detection and control, and by pre-consensus on the security detection results of the data to be uploaded it ensures that unsafe information can be blocked in time on other clients, avoids repeated review, and improves the efficiency of management, control and disposal. to improve the processing time.
  • FIG. 2 is a second flowchart of a method for uploading data based on a blockchain provided by an embodiment of the present application.
  • a blockchain-based data uploading method includes the following steps:
  • Step 201 Obtain a first consensus request triggered by any node in the blockchain platform.
  • the first consensus request includes: the first security detection result of the first data to be uploaded.
  • Step 202 according to the first consensus request, store the first security detection result locally, and send consensus feedback information to the corresponding node.
  • step 102 The implementation process of this step is the same as the implementation process of step 102 in the foregoing embodiment, and details are not repeated here.
  • Step 203 Obtain a second consensus request triggered by the first node in the blockchain platform.
  • the second consensus request includes the target data to be uploaded to the chain.
  • step 103 The implementation process of this step is the same as the implementation process of step 103 in the foregoing embodiment, and is not repeated here.
  • Step 204 determine whether the locally stored first security detection result includes the target security detection result corresponding to the target data to be uploaded to the chain.
  • step 104 The implementation process of this step is the same as the implementation process of step 104 in the foregoing embodiment, and details are not repeated here.
  • Step 205 if it is determined that the first security detection result includes the target security detection result, then when it is determined based on the target security detection result that the target data to be uploaded is safe data, the target data to be uploaded is responded to the second consensus request, and the target data to be uploaded is determined. Store to local.
  • step 105 The implementation process of this step is the same as the implementation process of step 105 in the foregoing embodiment, and details are not repeated here.
  • the current node in the blockchain platform which is the subject of the method execution in the embodiment of the present application, realizes that the security detection results obtained from the consensus of other nodes in the blockchain platform are stored locally. And based on the security detection results of the local storage, the data processing process of directly judging the security of the data to be uploaded from the consensus of other nodes in the future to avoid repeated detection of data security is realized.
  • the data upload request is sent to the blockchain platform based on the data upload request.
  • Other nodes agree on the security test results of the data to be uploaded carried in the data upload request, and after the consensus on the security test results is completed, the data to be uploaded to other nodes will be agreed to achieve data upload to the chain and avoid data security. The process of repeating the detection.
  • Step 206 obtaining a data uploading request, where the data uploading request includes the second data to be uploaded;
  • Step 207 performing security detection on the second data to be uploaded to obtain a second security detection result
  • the second data to be uploaded is specifically the data carried in the data upload request sent by the client or other terminal.
  • the aforementioned first data to be uploaded is sent by other nodes in the blockchain platform.
  • the second data to be uploaded is different from the first data to be uploaded in the preceding steps.
  • the data uploading request may be triggered by a certain client.
  • the preprocessing module and the pre-consensus module need to perform security detection and analysis on the data to be uploaded, and the security detection results are performed between the blockchain nodes. pre-consensus.
  • Each blockchain node corresponds to a preprocessing module and a pre-consensus module.
  • Blockchain nodes, preprocessing modules and pre-consensus modules together constitute a blockchain unit.
  • the preprocessing module corresponds to the transaction information filtering link, and is responsible for preprocessing the information to determine whether there is a security risk in the information content;
  • the pre-consensus module corresponds to the block consensus link, and is responsible for pre-consensus on the results of the pre-processing.
  • the security detection results are synchronized from this blockchain unit to the pre-consensus modules in other blockchain units, as evidence that information content security risks have been detected and managed.
  • the pre-consensus of the security detection results of the data to be on-chain is achieved between different blockchain nodes through the pre-consensus module.
  • the preprocessing module performs security detection on the second data to be uploaded to obtain a second security detection result.
  • Step 208 Generate a third consensus request according to the second security detection result, and send the third consensus request to other nodes in the blockchain platform.
  • the third consensus request includes: the second security detection result.
  • the pre-consensus module is used to realize the consensus transmission of the second security detection result obtained by the pre-processing module in each node.
  • sequence of occurrence of steps 206 to 208 and the sequence of occurrence of steps 201 to 205 may be interchanged, but not limited thereto.
  • the client sends a request for information on the chain
  • the preprocessing module receives the request and obtains the information to be uploaded
  • the preprocessing module performs security detection on the information to be uploaded to determine whether the information has information content security risks.
  • the pre-processing module generates security detection results after detection, and transmits the security detection results to the pre-consensus module;
  • the pre-consensus module synchronizes the security detection results between nodes, records the information to be linked in the storage medium corresponding to the local pre-consensus module, and synchronizes the detection results to all other blocks in the blockchain network.
  • the pre-consensus modules corresponding to the chain nodes store the results of this security test.
  • the blockchain node enters the formal consensus link.
  • the consensus process first check whether there is a security test result about the block in the pre-consensus module. If there is no, the consensus will be rejected. If there is, it will be directly based on the security test result. Determine whether there is a security risk: if there is no security risk, the consensus can be continued, otherwise the consensus will be rejected;
  • the blockchain node completes the consensus processing of the data to be uploaded, and returns the consensus result to the client.
  • each blockchain node can directly judge the security of the data on the chain based on the security detection results of the consensus of other nodes.
  • it can also perform security detection preprocessing on the on-chain data in this node, and consensus the security detection results obtained by preprocessing to other nodes, so that other nodes can realize the security detection results based on the consensus of this node in the past. Direct judgment on the security of on-chain data.
  • the detection link occurs before information dissemination, which can timely detect whether there is a security risk of information content; on the other hand, due to the newly added pre-consensus module, the detection results will be synchronized once in advance, so it can be avoided that different nodes are dealing with In the case of multiple audits during consensus on the data on the chain, the method in this embodiment can improve the overall data processing efficiency by sharing the results.
  • the process of detection and control occurs before the formal consensus of the blockchain, it is in a very advanced position in the data processing link, and the content can be pre-processed flexibly and timely. Check once whether a pre-consensus has been made to effectively ensure the timeliness of data security disposal.
  • the fourth consensus request includes the second data to be uploaded on the chain.
  • the formal consensus stage of the data to be uploaded can be entered when it is determined based on the consensus feedback information that the second security detection result achieves a consensus in the blockchain platform.
  • the method further includes:
  • the second security detection result is stored locally; when it is determined based on the second security detection result that the second data to be uploaded is safe data, the second data to be uploaded is stored locally.
  • the node implements local preprocessing of the data to be uploaded, and obtains the security detection result, it can respond to the data upload request, and store the data determined to be safe to be uploaded locally, so as to be compatible with other
  • the nodes cooperate to realize the chain consensus of the data to be chained on the blockchain platform.
  • FIG. 4 is a structural diagram of a blockchain-based data uploading device provided by an embodiment of the present application. For convenience of description, only parts related to the embodiment of the present application are shown.
  • the blockchain-based data uploading device 400 includes:
  • the pre-consensus module 401 is configured to obtain a first consensus request triggered by any node in the blockchain platform, where the first consensus request includes: a first security detection result of the first data to be uploaded; a consensus request, storing the first security detection result locally, and sending consensus feedback information to the corresponding node;
  • Formal consensus module 402 configured to obtain a second consensus request triggered by a first node in the blockchain platform, where the second consensus request includes target data to be uploaded to the chain; according to the second consensus request, determine the local storage Whether the target security detection result corresponding to the target data to be uploaded is included in the first security detection result; if it is determined that the target security detection result is included in the first security detection result, based on the When the target security detection result determines that the target data to be linked is safe data, the target data to be linked is stored locally in response to the second consensus request.
  • the device also includes:
  • a preprocessing module configured to obtain a data uploading request, where the data uploading request includes the second data to be uploaded; perform security detection on the second data to be uploaded to obtain a second security detection result;
  • the pre-consensus module is further configured to generate a third consensus request according to the second security detection result, and send the third consensus request to other nodes in the blockchain platform, the The third consensus request includes: the second security detection result.
  • the formal consensus module is also used for:
  • a fourth consensus request is sent to other nodes in the blockchain platform, and the fourth consensus request is sent to other nodes in the blockchain platform.
  • the request includes the second data to be uploaded.
  • the pre-consensus module is further configured to: store the second security detection result locally;
  • the formal consensus module is further configured to: store the second data to be uploaded locally when the second data to be uploaded is determined to be secure data based on the second security detection result.
  • the formal consensus module is also used for:
  • a feedback message of rejecting consensus is sent to the corresponding node.
  • the formal consensus module is also used for:
  • the first security detection result includes the target security detection result
  • a feedback message of rejecting consensus is sent to the corresponding node.
  • the blockchain-based data uploading device provided by the embodiments of the present application can realize the various processes of the above-mentioned blockchain-based data uploading method embodiments, and can achieve the same technical effect. To avoid repetition, details are not repeated here. .
  • FIG. 5 is a structural diagram of a terminal provided by an embodiment of the present application.
  • the terminal 5 of this embodiment includes: at least one processor 50 (only one is shown in FIG. 5 ), a memory 51 , and a memory 51 stored in the memory 51 and available on the at least one processor 50
  • the running computer program 52 when the processor 50 executes the computer program 52, implements the steps in any of the foregoing method embodiments.
  • the terminal 5 may be a computing device such as a desktop computer, a notebook, a palmtop computer and a cloud server.
  • the terminal 5 may include, but is not limited to, a processor 50 and a memory 51 .
  • FIG. 5 is only an example of the terminal 5, and does not constitute a limitation on the terminal 5. It may include more or less components than the one shown in the figure, or combine some components, or different components, such as
  • the terminal may also include input and output devices, network access devices, buses, and the like.
  • the processor 50 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, Digital Signal Processor (Digital Signal Processor, DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array) Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • CPU Central Processing Unit
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • Field-Programmable Gate Array Field-Programmable Gate Array
  • FPGA Field-Programmable Gate Array
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 51 may be an internal storage unit of the terminal 5 , such as a hard disk or a memory of the terminal 5 .
  • the memory 51 may also be an external storage device of the terminal 5, such as a plug-in hard disk equipped on the terminal 5, a smart memory card (Smart Media Card, SMC), Secure Digital (Secure Digital, SD) card, flash memory card (Flash Card), etc.
  • the memory 51 may also include both an internal storage unit of the terminal 5 and an external storage device.
  • the memory 51 is used to store the computer program and other programs and data required by the terminal.
  • the memory 51 can also be used to temporarily store data that has been output or will be output.
  • the disclosed apparatus/terminal and method may be implemented in other manners.
  • the device/terminal embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated modules/units if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing the relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable storage medium, and the computer When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable media Electric carrier signals and telecommunication signals are not included.
  • the present application implements all or part of the processes in the methods of the above embodiments, and can also be implemented through a computer program product.
  • the terminal can implement the steps in the above method embodiments when the terminal executes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请适用于区块链技术领域,提供一种基于区块链的数据上链方法、装置、终端及存储介质,其中方法包括:获取区块链平台中任一节点触发的包括待上链数据的安全性检测结果的第一共识请求;根据第一共识请求,将安全性检测结果存储至本地;获取区块链平台中第一节点触发的包含目标待上链数据的第二共识请求;根据第二共识请求,判断本地存储的安全性检测结果中包含与目标待上链数据对应的目标安全性检测结果,且在基于目标安全性检测结果确定目标待上链数据为安全数据时,将目标待上链数据存储至本地。该方案能够避免重复审核,提升管控处置效率,且检测环节前置,提升处置时效。

Description

基于区块链的数据上链方法、装置、终端及存储介质 技术领域
本申请属于区块链技术领域,尤其涉及一种基于区块链的数据上链方法、装置、终端及存储介质。
背景技术
区块链作为一种新型的分布式架构软件,通过共识机制来保证数据在多个终端形成最终一致性的副本,且由于块链式结构,无法对于已经出块的数据进行修改和删除。这一特点在面对信息内容安全事件时,反而成为了提升监管难度的一个因素。
现有技术对区块链信息内容安全事件的检测和管控的流程通常发生在区块链的数据正事共识过程中,每个进行数据共识的节点均需要对共识内容进行审核,环节上处于非常靠后位置,且出现重复性审核的情况,管控处置效率低下,检测环节过于后置,处置时效性差。
技术问题
有鉴于此,本申请实施例提供了一种基于区块链的数据上链方法、装置、终端及存储介质,以解决现有技术中信息内容安全事件的检测和管控环节处于非常靠后位置,且出现重复性审核的情况,管控处置效率低下,处置时效性差的问题。
技术解决方案
本申请实施例的第一方面提供了一种基于区块链的数据上链方法,包括:
获取区块链平台中任一节点触发的第一共识请求,所述第一共识请求中包括:第一待上链数据的第一安全性检测结果;
根据所述第一共识请求,将所述第一安全性检测结果存储至本地,并发送共识反馈信息至对应节点;
获取所述区块链平台中第一节点触发的第二共识请求,所述第二共识请求中包含目标待上链数据;
根据所述第二共识请求,判断本地存储的所述第一安全性检测结果中是否包含与所述目标待上链数据对应的目标安全性检测结果;
若判断所述第一安全性检测结果中包含所述目标安全性检测结果,则在基于所述目标安全性检测结果确定所述目标待上链数据为安全数据时,响应所述第二共识请求,将所述目标待上链数据存储至本地。
本申请实施例的第二方面提供了一种基于区块链的数据上链装置,包括:
预共识模块,用于获取区块链平台中任一节点触发的第一共识请求,所述第一共识请求中包括:第一待上链数据的第一安全性检测结果;根据所述第一共识请求,将所述第一安全性检测结果存储至本地,并发送共识反馈信息至对应节点;
正式共识模块,用于获取所述区块链平台中第一节点触发的第二共识请求,所述第二共识请求中包含目标待上链数据;根据所述第二共识请求,判断本地存储的第一安全性检测结果中是否包含与所述目标待上链数据对应的目标安全性检测结果;若判断所述第一安全性检测结果中包含所述目标安全性检测结果,则在基于所述目标安全性检测结果确定所述目标待上链数据为安全数据时,响应所述第二共识请求,将所述目标待上链数据存储至本地。
本申请实施例的第三方面提供了一种终端,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如第一方面所述方法的步骤。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面所述方法的步骤。
本申请的第五方面提供了一种计算机程序产品,当所述计算机程序产品在终端上运行时,使得所述终端执行上述第一方面所述方法的步骤。
有益效果
由上可见,本申请实施例中,通过获取区块链平台中任一节点触发的包括待上链数据的安全性检测结果的第一共识请求,根据第一共识请求,将安全性检测结果存储至本地,获取区块链平台中第一节点触发的包含目标待上链数据的第二共识请求,根据第二共识请求,判断本地存储的安全性检测结果中是否包含与目标待上链数据对应的目标安全性检测结果,若判断安全性检测结果中包含目标安全性检测结果,则在基于目标安全性检测结果确定目标待上链数据为安全数据时,响应第二共识请求,将目标待上链数据存储至本地。该过程通过将待上链数据的安全性检测结果进行预共识,以基于预共识结果实现对正式共识过程中待上链数据安全性的判断,在待上链数据进行共识传播之前实现对信息内容安全的提前检测与管控,且通过将待上链数据的安全性检测结果进行预共识,保证在其他客户端也能及时屏蔽掉不安全信息,避免重复审核,提升管控处置效率,且检测环节前置,提升处置时效。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种基于区块链的数据上链方法的流程图一;
图2是本申请实施例提供的一种基于区块链的数据上链方法的流程图二;
图3是本申请实施例提供的区块链单元的结构示意图;
图4是本申请实施例提供的一种基于区块链的数据上链装置的结构图;
图5是本申请实施例提供的一种终端的结构图。
本发明的实施方式
以为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
如在本说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。
具体实现中,本申请实施例中描述的终端包括但不限于诸如具有触摸敏感表面(例如,触摸屏显示器和/或触摸板)的移动电话、膝上型计算机或平板计算机之类的其它便携式设备。还应当理解的是,在某些实施例中,所述设备并非便携式通信设备,而是具有触摸敏感表面(例如,触摸屏显示器和/或触摸板)的台式计算机。
在接下来的讨论中,描述了包括显示器和触摸敏感表面的终端。然而,应当理解的是,终端可以包括诸如物理键盘、鼠标和/或控制杆的一个或多个其它物理用户接口设备。
终端支持各种应用程序,例如以下中的一个或多个:绘图应用程序、演示应用程序、文字处理应用程序、网站创建应用程序、盘刻录应用程序、电子表格应用程序、游戏应用程序、电话应用程序、视频会议应用程序、电子邮件应用程序、即时消息收发应用程序、锻炼支持应用程序、照片管理应用程序、数码相机应用程序、数字摄影机应用程序、web浏览应用程序、数字音乐播放器应用程序和/或数字视频播放器应用程序。
可以在终端上执行的各种应用程序可以使用诸如触摸敏感表面的至少一个公共物理用户接口设备。可以在应用程序之间和/或相应应用程序内调整和/或改变触摸敏感表面的一个或多个功能以及终端上显示的相应信息。这样,终端的公共物理架构(例如,触摸敏感表面)可以支持具有对用户而言直观且透明的用户界面的各种应用程序。
应理解,本实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。
参见图1,图1是本申请实施例提供的一种基于区块链的数据上链方法的流程图一。如图1所示,一种基于区块链的数据上链方法,该方法包括以下步骤:
步骤101,获取区块链平台中任一节点触发的第一共识请求。
该第一共识请求中包括:第一待上链数据的第一安全性检测结果。
该第一共识请求为区块链平台中任一节点所发送。该第一共识请求用于在对第一待上链数据进行共识前,对与第一待上链数据对应的第一安全性检测结果进行预共识。
步骤102,根据第一共识请求,将第一安全性检测结果存储至本地,并发送共识反馈信息至对应节点。
该第一共识请求,能够使区块链平台中各节点通过该数据共识实现对待上链数据的预先判断结果进行获取与存储,使得在某一个节点发现存在问题的数据时,在本节点进行数据的屏蔽处理的同时,将数据安全检测结果共享至其他节点,保证在其他区块链节点也能直接基于安全检测结果屏蔽掉该信息,通过信息共享避免重复审核。
不同节点发送而来的第一待上链数据的第一安全性检测结果在本地存储后累积得到若干个第一待上链数据的第一安全性检测结果。
本步骤中,当前获取到该共识请求的节点,即可基于该共识请求中携带的第一待上链数据的第一安全性检测结果在本地建立起各待上链数据的安全性检测结果的存储内容,通过对区块链平台中任一节点发送的安全性检测结果,实现在本地对若干待上链数据的安全性检测结果的预存储,以在后续获取到相应待上链数据的上链共识请求时,可以直接对安全性检测结果进行利用,直接基于本地存储的安全性检测结果判断当前待上链数据的安全性,避免区块链节点中众多节点对相同数据的重复性检测过程。
在对第一共识请求进行处理,将第一安全性检测结果进行本地存储或拒绝共识后,需要对结果进行反馈,以使共识请求的触发节点基于反馈信息,判断该第一待上链数据的第一安全性检测结果是否在区块链节点中共识成功。
该过程中,安全检测环节发生在信息传播之前,因此能及时检测出是否存在信息内容安全风险。
步骤103,获取区块链平台中第一节点触发的第二共识请求。
该第二共识请求中包含目标待上链数据。
其中,该第二共识请求的发送节点与第一共识请求的发送节点可以是同一节点,也可以是不相同的节点。该目标待上链数据可以是众多第一待上链数据中的一个,或者是新的待上链数据。
若该目标待上链数据为众多第一待上链数据中的一个,则具体地,该第二共识请求,为在与该一个第一安全性检测结果在区块链平台中实现共识的情况下获取得到。以实现在对第一待上链数据进行共识时,区块链平台中各节点能够基于已共识的第一安全性检测结果实现对第一待上链数据的安全性判断。
步骤104,根据第二共识请求,判断本地存储的第一安全性检测结果中是否包含与目标待上链数据对应的目标安全性检测结果。
其中,第一安全性检测结果中具备与其相对应的第一待上链数据的识别码;对是否包含目标安全性检测结果的判断,具体可以是:将目标待上链数据的识别码与本地存储的若干第一安全性检测结果所对应的第一待上链数据的识别码进行匹配,将第一安全性检测结果中识别码与目标待上链数据的识别码相匹配的一个第一安全性检测结果作为目标安全性检测结果。
该过程实现对本地存储的第一安全性检测结果的利用,将当前第二共识请求中请求共识的待上链数据与本地存储的安全性检测结果进行比对,判断是否有与待上链数据对应的目标安全性检测结果,来指导对待上链数据的安全性的直接判断。
步骤105,若判断第一安全性检测结果中包含目标安全性检测结果,则在基于目标安全性检测结果确定目标待上链数据为安全数据时,响应第二共识请求,将目标待上链数据存储至本地。
其中,安全性检测结果具体为对与其相对应的待上链数据的安全性已预判过的安全性判断结果,例如为具备安全性或不具备安全性。
该基于目标安全性检测结果确定目标待上链数据是否为安全数据的过程,具体为:对目标安全性检测结果的内容进行读取,当读取出的内容为具备安全性,则判断目标待上链数据为安全数据,当读取出的内容为不具备安全性,则判断目标待上链数据为不安全数据。
该过程中,通过在本地存储的安全性检测结果实现对与其对应的待上链数据的安全性的直接判断,在确定当前的待上链数据为安全数据时,对第二共识请求进行响应,实现对当前待上链数据进行共识,存储至本地。
其中,在根据第二共识请求,判断本地存储的第一安全性检测结果中是否包含与目标待上链数据对应的目标安全性检测结果之后,还包括:
若判断第一安全性检测结果中不包含目标安全性检测结果,则发送拒绝共识的反馈信息至对应节点。
若判断第一安全性检测结果中包含目标安全性检测结果,则在基于目标安全性检测结果确定目标待上链数据为不安全数据时,发送拒绝共识的反馈信息至对应节点。
该过程中,区块链节点进入正式共识环节,共识过程中,首先检查节点本地是否存储有关于该待上链数据的检测结果,如无,则拒绝本次共识,如有则根据检测结果判断是否存在风险,如无风险则可以继续共识,否则拒绝共识。
本申请实施例中,通过获取区块链平台中任一节点触发的包括待上链数据的安全性检测结果的第一共识请求,根据第一共识请求,将安全性检测结果存储至本地,获取区块链平台中第一节点触发的包含目标待上链数据的第二共识请求,根据第二共识请求,判断本地存储的安全性检测结果中是否包含与目标待上链数据对应的目标安全性检测结果,若判断安全性检测结果中包含目标安全性检测结果,则在基于目标安全性检测结果确定目标待上链数据为安全数据时,响应第二共识请求,将目标待上链数据存储至本地。该过程通过将待上链数据的安全性检测结果进行预共识,以基于预共识结果实现对正式共识过程中待上链数据安全性的判断,在待上链数据进行共识传播之前实现对信息内容安全的提前检测与管控,且通过将待上链数据的安全性检测结果进行预共识,保证在其他客户端也能及时屏蔽掉不安全信息,避免重复审核,提升管控处置效率,且检测环节前置,提升处置时效。
本申请实施例中还提供了基于区块链的数据上链方法的不同实施方式。
参见图2,图2是本申请实施例提供的一种基于区块链的数据上链方法的流程图二。如图2所示,一种基于区块链的数据上链方法,该方法包括以下步骤:
步骤201,获取区块链平台中任一节点触发的第一共识请求。
该第一共识请求中包括:第一待上链数据的第一安全性检测结果。
该步骤的实现过程与前述实施方式中的步骤101的实现过程相同,此处不再赘述。
步骤202,根据第一共识请求,将第一安全性检测结果存储至本地,并发送共识反馈信息至对应节点。
该步骤的实现过程与前述实施方式中的步骤102的实现过程相同,此处不再赘述。
步骤203,获取区块链平台中第一节点触发的第二共识请求。
该第二共识请求中包含目标待上链数据。
该步骤的实现过程与前述实施方式中的步骤103的实现过程相同,此处不再赘述。
步骤204,根据第二共识请求,判断本地存储的第一安全性检测结果中是否包含与目标待上链数据对应的目标安全性检测结果。
该步骤的实现过程与前述实施方式中的步骤104的实现过程相同,此处不再赘述。
步骤205,若判断第一安全性检测结果中包含目标安全性检测结果,则在基于目标安全性检测结果确定目标待上链数据为安全数据时,响应第二共识请求,将目标待上链数据存储至本地。
该步骤的实现过程与前述实施方式中的步骤105的实现过程相同,此处不再赘述。
在步骤201至步骤205中,区块链平台中作为本申请实施例中方法执行主体的当前节点,实现了在获取到区块链平台中其他节点共识而来的安全性检测结果存储至本地,并基于本地存储的安全性检测结果实现对后续其他节点共识来的待上链数据的安全性进行直接判断避免数据安全性重复检测的数据处理过程。
在后续的步骤206至步骤208中,则对应于当本申请实施例中作为方法执行主体的当前节点在获取到客户端发送的数据上链请求,基于该数据上链请求向区块链平台中其他节点对与数据上链请求中携带的待上链数据的安全性检测结果进行共识及在安全性检测结果共识完成之后对待上链数据向其他节点进行共识,实现数据上链,避免数据安全性重复检测的处理过程。
步骤206,获取数据上链请求,该数据上链请求中包含第二待上链数据;
步骤207,对第二待上链数据进行安全性检测,得到第二安全性检测结果;
该第二待上链数据具体为由客户端或其他终端发送的数据上链请求中所携带而来的数据。而前述第一待上链数据为由区块链平台中其他节点发送而来。该第二待上链数据与前述步骤中第一待上链数据不同。
该过程中,结合图3所示,数据上链请求可以是由某个客户端进行的触发。本申请实施例中在区块链节点中进行待上链数据共识之前,需要通过预处理模块及预共识模块对待上链数据进行安全性检测分析及对安全性检测结果在各区块链节点间进行预共识。
每一区块链节点均对应有一个预处理模块及预共识模块。区块链节点、预处理模块及预共识模块共同构成一个区块链单元。
其中,预处理模块对应交易信息过滤环节,负责对信息进行预处理,判断是否存在信息内容安全风险;预共识模块对应区块共识环节,负责对预处理的结果进行预共识,将预处理模块的安全性检测结果从本区块链单元同步到其他区块链单元中的预共识模块,作为已经对信息内容安全风险进行检测和管控的凭证。
不同的区块链节点之间通过预共识模块实现对待上链数据的安全性检测结果的预共识。
本步骤中,通过预处理模块对第二待上链数据进行安全性检测,得到第二安全性检测结果。
步骤208,根据第二安全性检测结果,生成第三共识请求,并将第三共识请求发送至区块链平台中的其他节点。
该第三共识请求中包括:第二安全性检测结果。
本步骤中,通过预共识模块实现对预处理模块处理得到第二安全性检测结果在各节点中进行共识传递。
步骤206至208的发生顺序与步骤201至205的发生顺序可以调换,并不以此为限。
上述各步骤,在具体实现过程中,具体的检测管控流程如下:
1)客户端发送上链信息请求;
2)预处理模块接收到该请求,得到待上链信息;
3)预处理模块对待上链信息进行安全性检测,判断该信息是否存在信息内容安全风险。预处理模块检测后产生安全性检测结果,并将安全性检测结果传递给预共识模块;
4)预共识模块对安全性检测结果在节点间进行同步,在将该待上链信息记录在本地预共识模块对应的存储介质中,同时将检测结果同步到区块链网络中所有其他区块链节点所对应预共识模块中,直至所有区块链节点对应的预共识模块都存储了对本次安全性检测结果。
5)区块链节点进入正式共识环节,共识过程中,首先检查预共识模块中是否有关于该区块的安全性检测结果,如无则拒绝本次共识,如有则直接根据安全性检测结果判断是否存在安全性风险:如无安全性风险则可以继续共识,否则拒绝共识;
6)区块链节点完成对待上链数据的共识处理,返回共识结果至客户端。
上述各步骤中,通过设置对区块链节点进行数据共识进行辅助的两个不同的功能模块,使得各区块链节点在能够基于其他节点共识的安全性检测结果对待上链数据进行直接安全性判断的同时,也能够在本节点中对待上链数据进行安全性检测预处理,并将预处理得到的安全性检测结果共识给其他节点,使其他节点能够基于本节点共识过去的安全性检测结果实现对待上链数据的安全性的直接判断。
该过程中,检测环节发生在信息传播之前,能及时检测出是否存在信息内容安全风险;另一方面,由于新增预共识模块,会对检测结果预先进行一次同步,因此可以避免不同节点在对待上链数据进行共识时出现多处审核的情况,本实施例中方法能够通过共享结果提升整体数据处理效率。此外,由于检测和管控的流程发生在区块链正式共识前,在数据处理环节上处于非常靠前位置,可以灵活及时的对内容先进行一次预处理,在区块链正式共识环节,还会检查一次是否已经做过预共识,有效保证数据安全性处置的及时性。
更进一步地,在将第三共识请求发送至区块链平台中的其他节点之后,还包括:
接收其他节点对第三共识请求的共识反馈信息;在基于共识反馈信息确定第二安全性检测结果在区块链平台中实现共识时,发送第四共识请求至区块链平台中的其他节点,该第四共识请求中包含第二待上链数据。
在将待上链数据的安全性检测结果进行共识请求发送之后,可以在基于共识反馈信息确定第二安全性检测结果在区块链平台中实现共识时,进入待上链数据的正式共识阶段。
对应地,在对第二待上链数据进行安全性检测,得到第二安全性检测结果之后,还包括:
将第二安全性检测结果存储至本地;在基于第二安全性检测结果确定第二待上链数据为安全数据时,将第二待上链数据存储至本地。
该过程中,在本节点实现在本地对待上链数据进行预处理,得到安全性检测结果之后,则可以响应数据上链请求,将确定为安全的待上链数据在本地进行存储,以与其他节点协同实现待上链数据在区块链平台上的上链共识。
该过程,对于存在信息内容安全风险的信息可以提前检测并管控,避免存在内容安全的信息在区块链上完成共识后存储而无法删除的情况。
参见图4,图4是本申请实施例提供的一种基于区块链的数据上链装置的结构图,为了便于说明,仅示出了与本申请实施例相关的部分。
所述基于区块链的数据上链装置400包括:
预共识模块401,用于获取区块链平台中任一节点触发的第一共识请求,所述第一共识请求中包括:第一待上链数据的第一安全性检测结果;根据所述第一共识请求,将所述第一安全性检测结果存储至本地,并发送共识反馈信息至对应节点;
正式共识模块402,用于获取所述区块链平台中第一节点触发的第二共识请求,所述第二共识请求中包含目标待上链数据;根据所述第二共识请求,判断本地存储的第一安全性检测结果中是否包含与所述目标待上链数据对应的目标安全性检测结果;若判断所述第一安全性检测结果中包含所述目标安全性检测结果,则在基于所述目标安全性检测结果确定所述目标待上链数据为安全数据时,响应所述第二共识请求,将所述目标待上链数据存储至本地。
其中,该装置还包括:
预处理模块,用于获取数据上链请求,所述数据上链请求中包含第二待上链数据;对所述第二待上链数据进行安全性检测,得到第二安全性检测结果;
其中,所述预共识模块,还用于根据所述第二安全性检测结果,生成第三共识请求,并将所述第三共识请求发送至所述区块链平台中的其他节点,所述第三共识请求中包括:所述第二安全性检测结果。
该装置中,正式共识模块,还用于:
接收所述其他节点对所述第三共识请求的共识反馈信息;
在基于所述共识反馈信息确定所述第二安全性检测结果在所述区块链平台中实现共识时,发送第四共识请求至所述区块链平台中的其他节点,所述第四共识请求中包含所述第二待上链数据。
该装置中,预共识模块,还用于:将所述第二安全性检测结果存储至本地;
正式共识模块,还用于:在基于所述第二安全性检测结果确定所述第二待上链数据为安全数据时,将所述第二待上链数据存储至本地。
其中,该装置中,正式共识模块,还用于:
若判断所述第一安全性检测结果中不包含所述目标安全性检测结果,则发送拒绝共识的反馈信息至对应节点。
其中,该装置中,正式共识模块,还用于:
若判断所述第一安全性检测结果中包含所述目标安全性检测结果,则在基于所述目标安全性检测结果确定所述目标待上链数据为不安全数据时,发送拒绝共识的反馈信息至对应节点。
本申请实施例提供的基于区块链的数据上链装置能够实现上述基于区块链的数据上链方法的实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
图5是本申请实施例提供的一种终端的结构图。如该图所示,该实施例的终端5包括:至少一个处理器50(图5中仅示出一个)、存储器51以及存储在所述存储器51中并可在所述至少一个处理器50上运行的计算机程序52,所述处理器50执行所述计算机程序52时实现上述任意各个方法实施例中的步骤。
所述终端5可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述终端5可包括,但不仅限于,处理器50、存储器51。本领域技术人员可以理解,图5仅仅是终端5的示例,并不构成对终端5的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端还可以包括输入输出设备、网络接入设备、总线等。
所述处理器50可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器51可以是所述终端5的内部存储单元,例如终端5的硬盘或内存。所述存储器51也可以是所述终端5的外部存储设备,例如所述终端5上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器51还可以既包括所述终端5的内部存储单元也包括外部存储设备。所述存储器51用于存储所述计算机程序以及所述终端所需的其他程序和数据。所述存储器51还可以用于暂时地存储已经输出或者将要输出的数据。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述***中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的实施例中,应该理解到,所揭露的装置/终端和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。
本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序产品来实现,当计算机程序产品在终端上运行时,使得所述终端执行时实现可实现上述各个方法实施例中的步骤。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (14)

  1. 一种基于区块链的数据上链方法,其特征在于,包括:
    获取区块链平台中任一节点触发的第一共识请求,所述第一共识请求中包括:第一待上链数据的第一安全性检测结果;
    根据所述第一共识请求,将所述第一安全性检测结果存储至本地,并发送共识反馈信息至对应节点;
    获取所述区块链平台中第一节点触发的第二共识请求,所述第二共识请求中包含目标待上链数据;
    根据所述第二共识请求,判断本地存储的所述第一安全性检测结果中是否包含与所述目标待上链数据对应的目标安全性检测结果;
    若判断所述第一安全性检测结果中包含所述目标安全性检测结果,则在基于所述目标安全性检测结果确定所述目标待上链数据为安全数据时,响应所述第二共识请求,将所述目标待上链数据存储至本地。
  2. 根据权利要求1所述的数据上链方法,其特征在于,还包括:
    获取数据上链请求,所述数据上链请求中包含第二待上链数据;
    对所述第二待上链数据进行安全性检测,得到第二安全性检测结果;
    根据所述第二安全性检测结果,生成第三共识请求,并将所述第三共识请求发送至所述区块链平台中的其他节点,所述第三共识请求中包括:所述第二安全性检测结果。
  3. 根据权利要求2所述的数据上链方法,其特征在于,所述将所述第三共识请求发送至所述区块链平台中的其他节点之后,还包括:
    接收所述其他节点对所述第三共识请求的共识反馈信息;
    在基于所述共识反馈信息确定所述第二安全性检测结果在所述区块链平台中实现共识时,发送第四共识请求至所述区块链平台中的其他节点,所述第四共识请求中包含所述第二待上链数据。
  4. 根据权利要求2所述的数据上链方法,其特征在于,所述对所述第二待上链数据进行安全性检测,得到第二安全性检测结果之后,还包括:
    将所述第二安全性检测结果存储至本地;
    在基于所述第二安全性检测结果确定所述第二待上链数据为安全数据时,将所述第二待上链数据存储至本地。
  5. 根据权利要求1所述的数据上链方法,其特征在于,所述根据所述第二共识请求,判断本地存储的所述第一安全性检测结果中是否包含与所述目标待上链数据对应的目标安全性检测结果之后,还包括:
    若判断所述第一安全性检测结果中不包含所述目标安全性检测结果,则发送拒绝共识的反馈信息至所述对应节点。
  6. 根据权利要求1所述的数据上链方法,其特征在于,所述根据所述第二共识请求,判断本地存储的所述第一安全性检测结果中是否包含与所述目标待上链数据对应的目标安全性检测结果之后,还包括:
    若判断所述第一安全性检测结果中包含所述目标安全性检测结果,则在基于所述目标安全性检测结果确定所述目标待上链数据为不安全数据时,发送拒绝共识的反馈信息至所述对应节点。
  7. 一种基于区块链的数据上链装置,其特征在于,包括:
    预共识模块,用于获取区块链平台中任一节点触发的第一共识请求,所述第一共识请求中包括:第一待上链数据的第一安全性检测结果;根据所述第一共识请求,将所述第一安全性检测结果存储至本地,并发送共识反馈信息至对应节点;
    正式共识模块,用于获取所述区块链平台中第一节点触发的第二共识请求,所述第二共识请求中包含目标待上链数据;根据所述第二共识请求,判断本地存储的所述第一安全性检测结果中是否包含与所述目标待上链数据对应的目标安全性检测结果;若判断所述第一安全性检测结果中包含所述目标安全性检测结果,则在基于所述目标安全性检测结果确定所述目标待上链数据为安全数据时,响应所述第二共识请求,将所述目标待上链数据存储至本地。
  8. 根据权利要求7所述的数据上链装置,其特征在于,还包括:
    预处理模块,用于获取数据上链请求,所述数据上链请求中包含第二待上链数据;对所述第二待上链数据进行安全性检测,得到第二安全性检测结果;
    其中,所述预共识模块,还用于根据所述第二安全性检测结果,生成第三共识请求,并将所述第三共识请求发送至所述区块链平台中的其他节点,所述第三共识请求中包括:所述第二安全性检测结果。
  9. 根据权利要求8所述的数据上链装置,其特征在于,所述正式共识模块,还用于:
    接收所述其他节点对所述第三共识请求的共识反馈信息;
    在基于所述共识反馈信息确定所述第二安全性检测结果在所述区块链平台中实现共识时,发送第四共识请求至所述区块链平台中的其他节点,所述第四共识请求中包含所述第二待上链数据。
  10. 根据权利要求8所述的数据上链装置,其特征在于,
    所述预共识模块,还用于:将所述第二安全性检测结果存储至本地;
    所述正式共识模块,还用于:在基于所述第二安全性检测结果确定所述第二待上链数据为安全数据时,将所述第二待上链数据存储至本地。
  11. 根据权利要求7所述的数据上链装置,其特征在于,所述正式共识模块,还用于:
    若判断所述第一安全性检测结果中不包含所述目标安全性检测结果,则发送拒绝共识的反馈信息至所述对应节点。
  12. 根据权利要求7所述的数据上链装置,其特征在于,所述正式共识模块,还用于:
    若判断所述第一安全性检测结果中包含所述目标安全性检测结果,则在基于所述目标安全性检测结果确定所述目标待上链数据为不安全数据时,发送拒绝共识的反馈信息至所述对应节点。
  13. 一种终端,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至6任一项所述方法的步骤。
  14. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至6任一项所述方法的步骤。
PCT/CN2020/140870 2020-12-29 2020-12-29 基于区块链的数据上链方法、装置、终端及存储介质 WO2022141060A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/140870 WO2022141060A1 (zh) 2020-12-29 2020-12-29 基于区块链的数据上链方法、装置、终端及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/140870 WO2022141060A1 (zh) 2020-12-29 2020-12-29 基于区块链的数据上链方法、装置、终端及存储介质

Publications (1)

Publication Number Publication Date
WO2022141060A1 true WO2022141060A1 (zh) 2022-07-07

Family

ID=82258751

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/140870 WO2022141060A1 (zh) 2020-12-29 2020-12-29 基于区块链的数据上链方法、装置、终端及存储介质

Country Status (1)

Country Link
WO (1) WO2022141060A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107196900A (zh) * 2017-03-24 2017-09-22 阿里巴巴集团控股有限公司 一种共识校验的方法及装置
US20170344987A1 (en) * 2016-05-24 2017-11-30 Mastercard International Incorporated Method and system for an efficient consensus mechanism for permssioned blockchains using bloom filters and audit guarantees
CN110674217A (zh) * 2019-09-23 2020-01-10 百度在线网络技术(北京)有限公司 区块链数据处理方法、装置、设备和介质
CN111198763A (zh) * 2019-12-25 2020-05-26 平安壹钱包电子商务有限公司 资源重复使用的检测方法、终端和计算机可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170344987A1 (en) * 2016-05-24 2017-11-30 Mastercard International Incorporated Method and system for an efficient consensus mechanism for permssioned blockchains using bloom filters and audit guarantees
CN107196900A (zh) * 2017-03-24 2017-09-22 阿里巴巴集团控股有限公司 一种共识校验的方法及装置
CN110674217A (zh) * 2019-09-23 2020-01-10 百度在线网络技术(北京)有限公司 区块链数据处理方法、装置、设备和介质
CN111198763A (zh) * 2019-12-25 2020-05-26 平安壹钱包电子商务有限公司 资源重复使用的检测方法、终端和计算机可读存储介质

Similar Documents

Publication Publication Date Title
CN110225104B (zh) 数据获取方法、装置及终端设备
CN108038112B (zh) 文件处理方法、移动终端及计算机可读存储介质
WO2021189953A1 (zh) 日志数据处理方法、装置、计算机设备和存储介质
CN108400868B (zh) 种子密钥的存储方法、装置及移动终端
US20190302867A1 (en) Method and apparatus for reducing continuous-wakeup delay of bluetooth loudspeaker, and bluetooth loudspeaker
WO2021056737A1 (zh) 高频业务数据的数据压缩方法、装置、设备及存储介质
CN110244963B (zh) 数据更新方法、装置及终端设备
JP2021149963A (ja) 情報処理方法、装置、電子機器及び記憶媒体
WO2020259515A1 (zh) 一种tcp应用的调用链获取方法及装置
US10630399B2 (en) Testing distributed applications that have an established exchange in an advanced message queuing protocol (AMQP) message broker
CN111144926B (zh) 业务请求处理方法、装置、***、电子设备及可读介质
WO2022142665A1 (zh) 基于数据库集群的数据处理方法、装置及电子设备
US20150026293A1 (en) Method, apparatus, terminal, and server for synchronizing terminal mirror
CN112764817A (zh) 设备功能唤醒方法及装置
CN111611249A (zh) 数据管理方法、装置、设备及存储介质
US11704363B2 (en) System and method for generating highly scalable temporal graph database
CN107317928B (zh) 信息处理方法、移动终端及计算机可读存储介质
KR20220091441A (ko) 데이터 동기화 방법과 장치, 전자 기기, 저장 매체 및 컴퓨터 프로그램
CN117270891A (zh) 一种蓝牙耳机的固件烧录方法、装置、终端及存储介质
WO2022141060A1 (zh) 基于区块链的数据上链方法、装置、终端及存储介质
CN109324843B (zh) 一种指纹处理***、方法及指纹设备
CN107609119B (zh) 文件处理方法、移动终端及计算机可读存储介质
CN110245016B (zh) 数据处理方法、***、装置及终端设备
WO2017129068A1 (zh) 事件执行方法和装置及***
CN112712353B (zh) 一种数字货币兑零支付方法、***及终端

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: 20967408

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: 20967408

Country of ref document: EP

Kind code of ref document: A1