WO2021027505A1 - Smart contract-based data processing method, and related device - Google Patents

Smart contract-based data processing method, and related device Download PDF

Info

Publication number
WO2021027505A1
WO2021027505A1 PCT/CN2020/103258 CN2020103258W WO2021027505A1 WO 2021027505 A1 WO2021027505 A1 WO 2021027505A1 CN 2020103258 W CN2020103258 W CN 2020103258W WO 2021027505 A1 WO2021027505 A1 WO 2021027505A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
processed
intercepted
business
smart contract
Prior art date
Application number
PCT/CN2020/103258
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 WO2021027505A1 publication Critical patent/WO2021027505A1/en

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/60Protecting data
    • G06F21/606Protecting data by securing the transmission between two devices or processes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • This application relates to the field of blockchain technology, and in particular to a data processing method and related devices based on smart contracts.
  • business parties can establish smart contracts on the basis of mutual trust, so that business data can be processed automatically according to the content of the smart contract Take the appropriate action.
  • the bank and the customer trust each other and sign a credit card automatic repayment contract.
  • the bank can deduct the corresponding amount from the associated savings card, without the customer’s manual operation, thereby improving efficiency.
  • the embodiments of the application provide a data processing method and related devices based on smart contracts, which can intercept received business data to be processed and processed business data based on smart contracts, improve data processing capabilities, and have high applicability.
  • an embodiment of the present application provides a data processing method based on a smart contract, and the method includes.
  • the service data to be processed includes the data to be intercepted.
  • the business data to be processed includes the data to be intercepted, the business data to be processed is intercepted based on the first smart contract. If the business data to be processed does not include the data to be intercepted, the business data to be processed is processed based on the first smart contract. Business data is processed for business data.
  • the processed business data contains the data to be intercepted, the processed business data is intercepted, and if the processed business data does not contain the data to be intercepted, the processed business data is sent to the data recipient.
  • an embodiment of the present application provides a data processing device based on a smart contract, and the data processing device includes.
  • the receiving unit is used to receive the service data to be processed sent by the data sender.
  • the determining unit is configured to determine whether the service data to be processed includes the data to be intercepted based on the first smart contract.
  • the processing unit is configured to intercept the business data to be processed based on the first smart contract when the business data to be processed contains the data to be intercepted, and to intercept the business data to be processed based on the first smart contract when the business data to be processed does not contain the data to be intercepted
  • the contract performs business data processing on the above pending business data.
  • the above determining unit is used to determine whether the processed business data contains the above data to be intercepted.
  • the processing unit is configured to intercept the processed business data when the processed business data contains the data to be intercepted, and when the processed business data does not contain the data to be intercepted, the processed business data The data is sent to the data recipient.
  • an embodiment of the present application provides a terminal device.
  • the terminal device includes a memory and a processor, and the processor and the memory are connected to each other, wherein the memory is used to store a computer program, and the computer
  • the program includes program instructions, and the processor is used to execute the program instructions of the memory, wherein.
  • the to-be-processed business data includes the to-be-intercepted data
  • the to-be-processed business data is intercepted based on the first smart contract, and if the to-be-processed business data does not include the to-be-intercepted data, then based on the first smart contract
  • a smart contract performs business data processing on the business data to be processed.
  • the processed business data contains the data to be intercepted, then the processed business data is intercepted, and if the processed business data does not contain the data to be intercepted, then the processed business data is Send to the data recipient.
  • an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program includes program instructions that are used when executed by a processor Implement the following steps.
  • the to-be-processed business data includes the to-be-intercepted data
  • the to-be-processed business data is intercepted based on the first smart contract, and if the to-be-processed business data does not include the to-be-intercepted data, then based on the first smart contract
  • a smart contract performs business data processing on the business data to be processed.
  • the processed business data contains the data to be intercepted, then the processed business data is intercepted, and if the processed business data does not contain the data to be intercepted, then the processed business data is Send to the data recipient.
  • the business data to be processed containing the data to be intercepted can be intercepted, which improves the intelligence Data processing capabilities of the contract.
  • the ability to intercept data based on smart contracts can be further improved, with higher adaptability.
  • Fig. 1 is a schematic flowchart of a data processing method based on a smart contract provided by an embodiment of the present application.
  • Fig. 2 is a schematic flowchart of a method for intercepting pending business data based on a smart contract provided by an embodiment of the present application.
  • Fig. 3 is a schematic structural diagram of a data processing device based on a smart contract provided by an embodiment of the present application.
  • Fig. 4 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • the data processing method based on the smart contract provided in the embodiment of the present application (for convenience of description, the method provided in the embodiment of the present application may be referred to as the method).
  • the method provided in the embodiments of the present application can be applied to any blockchain node server, and can also be applied to other node servers or related network nodes, and is not limited here. Taking a certain blockchain node server as an example, the method provided by the embodiment of the present application will be described with reference to FIGS. 1 to 4.
  • Fig. 1 is a schematic flowchart of a data processing method based on a smart contract provided by an embodiment of the present application.
  • the method provided in the embodiment of the present application may include the following steps 101-105.
  • a blockchain node can deploy designated data content that meets the conditions for invoking the smart contract in any storage area connected to it.
  • the service data to be processed When receiving the service data to be processed from the data sender, it can be determined whether the specified data content in any of the above storage areas contains the data identifier of the service data to be processed. If it contains the data identifier of the service data to be processed, the data is determined
  • the sender is the contract participant.
  • the smart contract can be called and executed to perform business data processing on the above-mentioned pending business data.
  • the above-mentioned data senders include but are not limited to transaction initiators, identity verification initiators, and product supply chain providers, etc., which are not limited here. It should be noted that the above specified data content and the above data identifier are only used to determine whether the business data to be processed meets the conditions for invoking the smart contract.
  • the specific data expression form can be one or more combinations of numbers, letters, and symbols. There is no restriction.
  • any of the above-mentioned storage areas includes, but is not limited to, storage devices in the blockchain network, or cloud storage and hard disks connected to blockchain nodes, and there is no restriction here.
  • the general smart contract exists in the form of computer-readable code, and the smart contract itself does not have the ability to intercept data, before determining whether the above-mentioned service data to be processed includes the above-mentioned data to be intercepted,
  • the first smart contract with the ability to intercept data needs to be generated.
  • the second smart contract for processing the above-mentioned service data to be processed may be determined according to the service data to be processed sent by the data sender, and the contract code of the above-mentioned second smart contract may be obtained.
  • the interception code is generated according to the data to be intercepted, and generated in combination with the contract code of the second smart contract.
  • the above-mentioned first smart contract has the same business data processing capabilities as the above-mentioned second smart contract, and at the same time, it can intercept the pending business data that meets the interception conditions.
  • the to-be-processed data can be verified before executing the first smart contract. Whether the service data includes the above-mentioned data to be intercepted, so as to determine whether to intercept the above-mentioned service data to be processed based on the above-mentioned first smart contract.
  • the business data to be processed can be matched with the data to be intercepted to determine whether the business data to be processed includes the data to be intercepted.
  • the business data to be processed will not be sent by the data sender in a fixed data format. Therefore, for the two different formats of data, it is impossible to determine Whether data in one format contains data in another format. Based on the foregoing reasons, before matching the foregoing business data to be processed and the foregoing data to be intercepted, the data format of the foregoing data to be intercepted and the data format of the foregoing business data to be processed may be acquired first. At this time, it can be determined whether the data format of the data to be intercepted is consistent with the data format of the business data to be processed.
  • the data to be intercepted can be directly matched with the business to be processed, and when the business to be processed is When there is a data segment consistent with the data to be intercepted, it can be determined that the business data to be processed includes the data to be intercepted.
  • the above-mentioned pending data is The business data contains the data segment "0111" that is consistent with the data to be intercepted, so it can be determined that the business data to be processed contains the data to be intercepted.
  • the data format of the data to be intercepted is inconsistent with the data format of the business data to be processed
  • the data format of the data to be intercepted and/or the data format of the business data to be processed can be modified to make the data format of the data to be intercepted and
  • the data format of the business data to be processed is the same.
  • the data to be intercepted is binary data and the amateur data to be processed is decimal data
  • the data to be intercepted can be processed to modify the data to be intercepted into decimal data. It is also possible to perform data processing on the service data to be processed to modify the service data to be processed into binary data.
  • the to-be-processed data cannot be determined. Whether the business data contains data that has the same semantics as the above-mentioned data to be intercepted but has a different data presentation form.
  • the first smart contract can be used to intercept the business data to be processed containing "paper invoices"
  • the business data to be processed contains "non-electronic "Invoice”
  • the above-mentioned first smart contract will determine that the above-mentioned pending business data does not contain the to-be-intercepted data, which in turn leads to the intelligent interception of pending business data containing "paper invoices” based on the above-mentioned first smart contract, and cannot be intercepted.
  • "Non-electronic invoice” pending business data is data representing "paper invoices”
  • At least one target data that is semantically consistent with the data to be intercepted and whose data expression format is different from the data to be intercepted can be determined from the preset database.
  • the data in the above-mentioned preset database can be common intercepted data obtained from the Internet, big data platforms or other storage spaces, or can be intercepted data pre-designated by the data sender, data receiver, and smart contract manager ,
  • the specific source is not restricted.
  • it can be determined whether there is a data segment consistent with any one of the at least one target data in the service data to be processed, so as to expand the first intelligence.
  • the scope of the contract's identification of the above-mentioned pending business data When there is a data segment consistent with any one of the at least one target data in the above-mentioned service data to be processed, it can be determined that the above-mentioned service data to be processed includes the above-mentioned data to be intercepted.
  • the data format of any data in the preset database is consistent with the data format of the data to be intercepted, and in the process of matching the business data to be processed with the at least one target data, the data format of the business data to be processed is The data format needs to be consistent with the data format of the data to be intercepted above, and will not be repeated here.
  • the service data to be processed sent by the data sender is data that has been processed through encryption, compression, etc., it is necessary to decrypt and decompress the service data to be processed to obtain the complete service data to be processed. , And then obtain the data format of the service data to be processed, which will not be repeated here.
  • the service data to be processed includes the data to be intercepted, the service data to be processed is intercepted based on the first smart contract. If the service data to be processed does not include the data to be intercepted, the data to be intercepted is processed based on the first smart contract.
  • the business data to be processed is processed for business data.
  • the service data to be processed does not include the data to be intercepted
  • business data processing is performed on the service data to be processed based on the first smart contract.
  • the company, institution, product and other information in the data provided by the supply chain provider can be verified based on the corresponding smart contract, so that the supply chain data remains accurate and effective at every link.
  • the transaction request can be verified based on the corresponding smart contract, which further simplifies the transaction process and reduces data errors.
  • the service data to be processed can be intercepted at this time.
  • the aforementioned pending business data can be deleted to prevent the aforementioned first smart contract from performing business data processing on the aforementioned pending business data, or while the aforementioned pending business data is deleted, a deletion notification can be generated and based on the aforementioned pending data. Send the deletion notice to the data sender, so that the data sender modifies the pending service data and resends the revised pending service information after receiving the deletion notice.
  • the method for intercepting service data to be processed based on a smart contract may include the following steps 201-203.
  • the number of data segments between the to-be-processed business data and the data to be intercepted or any target data can be determined, and then the risk level of the to-be-processed business data can be determined according to the number of data segments.
  • the larger the number of data segments the higher the risk of the business data to be processed, and the smaller the number of data segments, the lower the risk of the business data to be processed.
  • the data sender can take different influence measures according to the risk level of the service data to be processed.
  • the above-mentioned risk level may reflect the severity of the security risk of the data sender itself and the service data to be processed.
  • the above-mentioned risk level can reflect the degree of data management norms of the data sender and the data to be processed, which can be combined with specific The application scenarios and the types of data to be intercepted determine different response measures.
  • alarm information may be generated based on the intercepted service data to be processed and sent to the data sender.
  • the alarm information generated based on the intercepted service data to be processed may include the data to be intercepted, so that the data sender can respond to the alarm to be intercepted after receiving the alarm information.
  • different alarming methods can be determined according to different risk levels, so that different alarming methods are used to send the alarm information to the data sender.
  • a faster warning method instant alarm, telephone notification, etc.
  • the alarm method email, SMS, etc.
  • a slower alarm speed can be used to send the alarm information to the data sender so that the data sender can take countermeasures according to the actual situation.
  • the implementation of the specific alarm method is not limited here.
  • the sending method of the alarm information can be determined based on the risk level of the business data to be processed, so that the alarm information corresponding to different risk levels has different alarm methods, making the alarm of the business risk data more targeted and flexible , High applicability.
  • the process of executing the smart contract is a process of data verification and processing
  • data changes in the process of performing business data processing on the business data to be processed based on the first smart contract cause
  • the processed business data may contain the aforementioned data to be intercepted. That is to say, after performing business data processing on the business data to be processed through the first smart contract, business data to be processed that does not originally need to be intercepted needs to be intercepted because the data to be intercepted is generated. Therefore, after the processed business data is obtained, it is necessary to determine again whether the processed business data includes the data to be intercepted.
  • the specific determination method is as shown in step 102, which will not be repeated here.
  • the data type of the processed business data can also be obtained, and the data processing tool that processes the corresponding data type is used to determine the processed business data according to different data types. Does your business data contain the aforementioned data to be intercepted? For example, when the processed business data is image data, an image processing tool can be used to determine whether the image data contains the data to be intercepted. For another example, when the processed service data is audio data, an audio processing tool can be used to determine whether the audio data contains the data to be intercepted.
  • the above-mentioned processed service data includes multiple types of data (for example, both image data and audio data)
  • multiple data processing tools may be used at the same time to determine whether the processed service data contains data to be intercepted .
  • the above-mentioned first smart contract can directly call the relevant interface of the third-party processing platform to enable third-party data processing
  • the platform can receive and determine whether the processed business data contains the aforementioned data to be intercepted, and the specific implementation method is not limited here.
  • the above-mentioned processed business data contains the above-mentioned data to be intercepted, intercept the above-mentioned processed business data, and if the above-mentioned processed business data does not contain the above-mentioned data to be intercepted, then send the above-mentioned processed business data to the data receiver square.
  • the processed business data when the processed business data includes the intercepted data, the processed business data can be intercepted.
  • the specific interception method is as shown in step 103, which will not be repeated here.
  • the processed service data needs to be sent to the data receiver.
  • the above-mentioned data receivers include but are not limited to transaction accounting platforms, product distribution systems, and data distribution platforms, etc., which are not limited here.
  • the above-mentioned processed business data can be intercepted and sent to the data receiver at the same time.
  • Interception notification information may also be generated to inform the data receiver that the above-mentioned processed business data has been intercepted, so as to avoid unnecessary losses.
  • the smart contract with data interception function is generated based on the data to be intercepted, so that when the service to be processed is processed based on the smart contract, the data to be intercepted can be intercepted.
  • Processing business data improves the data processing capabilities of smart contracts.
  • the ability to intercept data based on smart contracts can be further improved, with higher adaptability.
  • it can provide the data sender and data receiver with corresponding alarm methods. Not only can the data sender and data receiver take timely response measures, but also further eliminate the data Security risks.
  • FIG. 3 is a schematic structural diagram of a data processing device based on a smart contract provided by an embodiment of the present application.
  • the data processing device provided by the embodiment of the present application includes.
  • the receiving unit 31 is configured to receive service data to be processed sent by the data sender.
  • the determining unit 32 is configured to determine whether the service data to be processed includes the data to be intercepted based on the first smart contract.
  • the processing unit 33 is configured to, when the service data to be processed includes the data to be intercepted, intercept the service data to be processed based on the first smart contract, and when the service data to be processed does not include the data to be intercepted, based on the first
  • the smart contract performs business data processing on the above pending business data.
  • the above determining unit 32 is configured to determine whether the processed service data includes the above data to be intercepted.
  • the processing unit 33 is configured to intercept the processed business data when the processed business data contains the data to be intercepted, and when the processed business data does not contain the data to be intercepted, the processed business data The data is sent to the data recipient.
  • the aforementioned determining unit 32 is also used for.
  • the above-mentioned data processing device also includes.
  • the generating unit 34 is further configured to generate a first smart contract for business data processing and capable of intercepting business data based on the data to be intercepted and the second smart contract.
  • the above-mentioned data processing device further includes.
  • the obtaining unit 35 is also used to obtain the data format of the data to be intercepted and the data format of the service data to be processed.
  • the processing unit 33 is further configured to modify the data format of the data to be intercepted and/or the data format of the business data to be processed when the data format of the data to be intercepted is inconsistent with the data format of the business data to be processed to Based on the data to be intercepted and the business data to be processed in the same data format, it is determined whether the business data to be processed includes the data to be intercepted.
  • the above-mentioned data processing device includes.
  • the matching unit 36 is configured to match the data to be intercepted with the service data to be processed.
  • the determining unit 32 is configured to determine that the service data to be processed includes the data to be intercepted when the service data to be processed includes a data segment that is consistent with the data to be intercepted.
  • the aforementioned determining unit 32 is used.
  • the data format of any data in the above-mentioned preset database is the same as that of the above-mentioned data to be intercepted.
  • the data format is consistent.
  • the matching unit 36 is configured to match the at least one target data with the service data to be processed.
  • the determining unit 32 is configured to determine that the service data to be processed includes the data to be intercepted when the service data to be processed includes a data segment that is consistent with any target data in the at least one target data.
  • the aforementioned determining unit 32 is also used for.
  • the alarm mode and alarm information corresponding to the service data to be processed are determined based on the risk level.
  • the processing unit 33 is further configured to send the alarm information and the service data to be processed to the data sender based on the alarm mode.
  • the above-mentioned smart contract-based data processing device can execute the implementation manners provided in the steps in Figures 1 to 2 through various built-in modules and/units.
  • the foregoing receiving unit 31 may be configured to receive implementation manners such as to-be-processed service data sent by the data sender.
  • the determination unit 32 may be configured to determine whether the service data to be processed includes the data to be intercepted and other implementation methods based on the first smart contract. For details, please refer to the implementation methods provided in each step above, which will not be repeated here.
  • the processing unit 33 can be used to implement the method for intercepting the business data to be processed based on the first smart contract when the business data to be processed includes the data to be intercepted.
  • the generating unit 34 can be used to generate a first smart contract for business data processing and capable of intercepting business data according to the data to be intercepted and the second smart contract.
  • the acquisition unit 35 may be used to acquire the data format of the data to be intercepted and the data format of the business data to be processed.
  • the matching unit 36 can be used to match the data to be intercepted with the service data to be processed and other implementation methods. For details, please refer to the implementation methods provided in the above steps, which will not be repeated here.
  • the business data to be processed containing the data to be intercepted can be intercepted, which improves the intelligence Data processing capabilities of the contract.
  • the ability to intercept data based on smart contracts can be further improved, with higher adaptability.
  • FIG. 4 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • the terminal device in this embodiment may include.
  • One or more processors 41 and memory 42 are connected by a bus 43.
  • the memory 42 is used to store a computer program, and the computer program includes program instructions.
  • the processor 41 is used to execute the program instructions stored in the memory 42 to perform the following operations.
  • the service data to be processed includes the data to be intercepted.
  • the business data to be processed includes the data to be intercepted, the business data to be processed is intercepted based on the first smart contract. If the business data to be processed does not include the data to be intercepted, the business data to be processed is processed based on the first smart contract. Business data is processed for business data.
  • the processed business data contains the data to be intercepted, the processed business data is intercepted, and if the processed business data does not contain the data to be intercepted, the processed business data is sent to the data recipient.
  • the aforementioned processor 41 is also used for.
  • a first smart contract used for business data processing and capable of intercepting business data is generated.
  • the aforementioned processor 41 is also used for.
  • the data format of the data to be intercepted is inconsistent with the data format of the business data to be processed
  • the data format of the data to be intercepted and/or the data format of the business data to be processed is modified to be based on the data to be intercepted in the same data format
  • the above-mentioned service data to be processed to determine whether the above-mentioned service data to be processed includes the above-mentioned data to be intercepted.
  • the aforementioned processor 41 is used.
  • the service data to be processed has a data segment consistent with the data to be intercepted, it is determined that the service data to be processed includes the data to be intercepted.
  • the aforementioned processor 41 is used.
  • the data format of any data in the above-mentioned preset database is the same as that of the above-mentioned data to be intercepted.
  • the data format is consistent.
  • the service data to be processed has a data segment that is consistent with any target data in the at least one target data, it is determined that the service data to be processed includes the data to be intercepted.
  • the aforementioned processor 41 is used.
  • the alarm mode and alarm information corresponding to the service data to be processed are determined based on the risk level.
  • the above warning information and the above pending service data are sent to the data sender.
  • the aforementioned processor 41 may be a central processing unit (CPU), and the processor 41 may also be other general-purpose processors, digital signal processors (digital signal processors) processor, DSP), application specific integrated circuit (application specific integrated circuit, ASIC), ready-made programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 41 may include a read-only memory and a random access memory, and provides instructions and data to the processor 41.
  • a part of the memory 42 may also include a non-volatile random access memory.
  • the memory can also store device type data.
  • the above-mentioned terminal device can execute the implementation manners provided in the steps in Figures 1 to 2 through its built-in functional modules.
  • the implementation manners provided in the above-mentioned steps which will not be repeated here.
  • the business data to be processed containing the data to be intercepted can be intercepted, which improves the intelligence Data processing capabilities of the contract.
  • the ability to intercept data based on smart contracts can be further improved, with higher adaptability.
  • the embodiments of the present application also provide a computer-readable storage medium, which stores a computer program and is executed by a processor to implement the method provided in each step in FIG. 1 to FIG. 2. For details, see each step above The implementation method provided will not be repeated here.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the foregoing computer-readable storage medium may be the task processing apparatus provided in any of the foregoing embodiments or the internal storage unit of the foregoing terminal device, such as a hard disk or memory of an electronic device.
  • the computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (secure digital, SD) card, flash card, etc.
  • the above-mentioned computer-readable storage medium may also include a magnetic disk, an optical disk, a read-only memory (read-only memory, ROM) or a random access memory (random access memory, RAM), etc.
  • the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device.
  • the computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device.
  • the computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A smart contract-based data processing method and a related device. The method can be implemented in a blockchain smart contract. The method comprises: receiving service data to be processed that is sent by a data sending party (101); determining, on the basis of a first smart contract, whether the service data comprises data to be intercepted (102); if so, intercepting the service data on the basis of the first smart contract, and if not, performing service data processing on the service data on the basis of the first smart contract (103); determining whether the processed service data comprises the data to be intercepted (104); and if so, intercepting the processed service data, and if not, sending the processed service data to a data receiving party (105). The method enables intercepting specified data on the basis of a smart contract, improves the data processing capability for smart contracts, and has wide applicability.

Description

基于智能合约的数据处理方法及相关装置Data processing method and related device based on smart contract
本申请要求于2019年08月15日提交中国专利局、申请号为201910751683.7,发明名称为“基于智能合约的数据处理方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on August 15, 2019, with the application number 201910751683.7 and the invention title "Smart Contract-based Data Processing Method and Related Devices", the entire content of which is incorporated by reference In this application.
技术领域Technical field
本申请涉及区块链技术领域,尤其涉及一种基于智能合约的数据处理方法及相关装置。This application relates to the field of blockchain technology, and in particular to a data processing method and related devices based on smart contracts.
背景技术Background technique
通常情况下,不同企业、单位或者个人之间建立业务关系时,为了节省时间、提升效率,业务双方可在互相信任的基础上建立智能合约,使得在处理业务数据时,可根据智能合约内容自动执行相应操作。例如,银行与客户互相信任,签订信用卡自动还款合约,在还款日,银行可从关联的储蓄卡中扣除相应的金额,中间无需客户手动操作,从而提升了效率。Normally, when establishing business relationships between different companies, units or individuals, in order to save time and improve efficiency, business parties can establish smart contracts on the basis of mutual trust, so that business data can be processed automatically according to the content of the smart contract Take the appropriate action. For example, the bank and the customer trust each other and sign a credit card automatic repayment contract. On the repayment day, the bank can deduct the corresponding amount from the associated savings card, without the customer’s manual operation, thereby improving efficiency.
发明人意识到,由于智能合约只能按照数字化的合约代码完成业务数据的处理过程,不能确保业务数据的数据安全,进而导致用户信息泄露,甚至被黑客攻击或者篡改,影响业务数据的安全性以及准确性。The inventor realized that because smart contracts can only complete the processing of business data in accordance with the digital contract code, they cannot ensure the data security of business data, which in turn leads to user information leakage, even hacker attacks or tampering, and affects the security of business data. accuracy.
技术问题technical problem
本申请实施例提供一种基于智能合约的数据处理方法及相关装置,可基于智能合约对接收到的待处理业务数据和处理后的业务数据进行拦截,提高数据处理能力,适用性高。The embodiments of the application provide a data processing method and related devices based on smart contracts, which can intercept received business data to be processed and processed business data based on smart contracts, improve data processing capabilities, and have high applicability.
技术解决方案Technical solutions
第一方面,本申请实施例提供一种基于智能合约的数据处理方法,该方法包括。In the first aspect, an embodiment of the present application provides a data processing method based on a smart contract, and the method includes.
接收数据发送方发送的待处理业务数据。Receive the pending business data sent by the data sender.
基于第一智能合约确定上述待处理业务数据是否包含待拦截数据。Based on the first smart contract, it is determined whether the service data to be processed includes the data to be intercepted.
若上述待处理业务数据包含上述待拦截数据,则基于上述第一智能合约拦截上述待处理业务数据,若上述待处理业务数据不包含上述待拦截数据,则基于上述第一智能合约对上述待处理业务数据进行业务数据处理。If the business data to be processed includes the data to be intercepted, the business data to be processed is intercepted based on the first smart contract. If the business data to be processed does not include the data to be intercepted, the business data to be processed is processed based on the first smart contract. Business data is processed for business data.
确定处理后的业务数据是否包含上述待拦截数据。Determine whether the processed business data contains the aforementioned data to be intercepted.
若上述处理后的业务数据包含上述待拦截数据,则拦截上述处理后的业务数据,若上述处理后的业务数据不包含上述待拦截数据,则将上述处理后的业务数据发送至数据接收方。If the processed business data contains the data to be intercepted, the processed business data is intercepted, and if the processed business data does not contain the data to be intercepted, the processed business data is sent to the data recipient.
第二方面,本申请实施例提供了一种基于智能合约的数据处理装置,该数据处理装置包括。In the second aspect, an embodiment of the present application provides a data processing device based on a smart contract, and the data processing device includes.
接收单元,用于接收数据发送方发送的待处理业务数据。The receiving unit is used to receive the service data to be processed sent by the data sender.
确定单元,用于基于第一智能合约确定上述待处理业务数据是否包含待拦截数据。The determining unit is configured to determine whether the service data to be processed includes the data to be intercepted based on the first smart contract.
处理单元,用于当上述待处理业务数据包含上述待拦截数据时,基于上述第一智能合约拦截上述待处理业务数据,当上述待处理业务数据不包含上述待拦截数据时,基于上述第一智能合约对上述待处理业务数据进行业务数据处理。The processing unit is configured to intercept the business data to be processed based on the first smart contract when the business data to be processed contains the data to be intercepted, and to intercept the business data to be processed based on the first smart contract when the business data to be processed does not contain the data to be intercepted The contract performs business data processing on the above pending business data.
上述确定单元,用于确定处理后的业务数据是否包含上述待拦截数据。The above determining unit is used to determine whether the processed business data contains the above data to be intercepted.
所述处理单元,用于当上述处理后的业务数据包含上述待拦截数据时,拦截上述处理后的业务数据,当上述处理后的业务数据不包含上述待拦截数据时,将上述处理后的业务数据发送至数据接收方。The processing unit is configured to intercept the processed business data when the processed business data contains the data to be intercepted, and when the processed business data does not contain the data to be intercepted, the processed business data The data is sent to the data recipient.
第三方面,本申请实施例提供了一种终端设备,该终端设备包括存储器和处理器,所述处理器、和所述存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器用于执行所述存储器的所述程序指令,其中。In a third aspect, an embodiment of the present application provides a terminal device. The terminal device includes a memory and a processor, and the processor and the memory are connected to each other, wherein the memory is used to store a computer program, and the computer The program includes program instructions, and the processor is used to execute the program instructions of the memory, wherein.
接收数据发送方发送的待处理业务数据。Receive the pending business data sent by the data sender.
基于第一智能合约确定所述待处理业务数据是否包含待拦截数据。Based on the first smart contract, it is determined whether the service data to be processed includes data to be intercepted.
若所述待处理业务数据包含所述待拦截数据,则基于所述第一智能合约拦截所述待处理业务数据,若所述待处理业务数据不包含所述待拦截数据,则基于所述第一智能合约对所述待处理业务数据进行业务数据处理。If the to-be-processed business data includes the to-be-intercepted data, then the to-be-processed business data is intercepted based on the first smart contract, and if the to-be-processed business data does not include the to-be-intercepted data, then based on the first smart contract A smart contract performs business data processing on the business data to be processed.
确定处理后的业务数据是否包含所述待拦截数据。It is determined whether the processed business data contains the data to be intercepted.
若所述处理后的业务数据包含所述待拦截数据,则拦截所述处理后的业务数据,若所述处理后的业务数据不包含所述待拦截数据,则将所述处理后的业务数据发送至数据接收方。If the processed business data contains the data to be intercepted, then the processed business data is intercepted, and if the processed business data does not contain the data to be intercepted, then the processed business data is Send to the data recipient.
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,用于实现以下步骤。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program includes program instructions that are used when executed by a processor Implement the following steps.
接收数据发送方发送的待处理业务数据。Receive the pending business data sent by the data sender.
基于第一智能合约确定所述待处理业务数据是否包含待拦截数据。Based on the first smart contract, it is determined whether the service data to be processed includes data to be intercepted.
若所述待处理业务数据包含所述待拦截数据,则基于所述第一智能合约拦截所述待处理业务数据,若所述待处理业务数据不包含所述待拦截数据,则基于所述第一智能合约对所述待处理业务数据进行业务数据处理。If the to-be-processed business data includes the to-be-intercepted data, then the to-be-processed business data is intercepted based on the first smart contract, and if the to-be-processed business data does not include the to-be-intercepted data, then based on the first smart contract A smart contract performs business data processing on the business data to be processed.
确定处理后的业务数据是否包含所述待拦截数据。It is determined whether the processed business data contains the data to be intercepted.
若所述处理后的业务数据包含所述待拦截数据,则拦截所述处理后的业务数据,若所述处理后的业务数据不包含所述待拦截数据,则将所述处理后的业务数据发送至数据接收方。If the processed business data contains the data to be intercepted, then the processed business data is intercepted, and if the processed business data does not contain the data to be intercepted, then the processed business data is Send to the data recipient.
有益效果Beneficial effect
在本申请实施例中,通过基于待拦截数据生成具有数据拦截功能的智能合约,使得在基于智能合约对待处理业务进行业务数据处理时,可以拦截包含有待拦截数据的待处理业务数据,提高了智能合约的数据处理能力。此外,通过对处理后的业务数据进行拦截,可进一步提升基于智能合约的数据拦截能力,适应性更高。In the embodiment of the present application, by generating a smart contract with data interception function based on the data to be intercepted, when the business data processing of the business to be processed is performed based on the smart contract, the business data to be processed containing the data to be intercepted can be intercepted, which improves the intelligence Data processing capabilities of the contract. In addition, by intercepting the processed business data, the ability to intercept data based on smart contracts can be further improved, with higher adaptability.
附图说明Description of the drawings
图1是本申请实施例提供的基于智能合约的数据处理方法的流程示意图。Fig. 1 is a schematic flowchart of a data processing method based on a smart contract provided by an embodiment of the present application.
图2是本申请实施例提供的基于智能合约拦截待处理业务数据方法的流程示意图。Fig. 2 is a schematic flowchart of a method for intercepting pending business data based on a smart contract provided by an embodiment of the present application.
图3是本申请实施例提供的基于智能合约的数据处理装置的结构示意图。Fig. 3 is a schematic structural diagram of a data processing device based on a smart contract provided by an embodiment of the present application.
图4是本申请实施例提供的终端设备的结构示意图。Fig. 4 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
本发明的实施方式Embodiments of the invention
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请实施例提供的基于智能合约的数据处理方法(为方便描述,可简称本申请实施例提供的方法)。本申请实施例提供的方法可应用于任一区块链节点服务器,也可应用于其他节点服务器或相关网络节点,在此不做限制。下面可以某一区块链节点服务器为例,结合图1至图4对本申请实施例提供的方法进行说明。The data processing method based on the smart contract provided in the embodiment of the present application (for convenience of description, the method provided in the embodiment of the present application may be referred to as the method). The method provided in the embodiments of the present application can be applied to any blockchain node server, and can also be applied to other node servers or related network nodes, and is not limited here. Taking a certain blockchain node server as an example, the method provided by the embodiment of the present application will be described with reference to FIGS. 1 to 4.
参见图1,图1是本申请实施例提供的基于智能合约的数据处理方法的流程示意图。本申请实施例提供的方法可包括如下步骤101-105。Refer to Fig. 1, which is a schematic flowchart of a data processing method based on a smart contract provided by an embodiment of the present application. The method provided in the embodiment of the present application may include the following steps 101-105.
101、接收数据发送方发送的待处理业务数据。101. Receive service data to be processed sent by the data sender.
在一些可行的实施方式中,由于智能合约是在合约参与方达成一致的协议基础之上对数据进行验证或执行合约内容对数据进行处理,因此在接收数据发送方发送的待处理业务数据时,需要验证数据发送方是否为合约参与方,也就是说需要验证数据发送方发送的待处理业务数据是否满足调用智能合约的触发条件,以调用智能合约对接收到的待处理业务数据进行业务数据处理。具体实现中,区块链节点可在与之连接的任一存储区域中部署符合调用智能合约条件的指定数据内容。当数据发送方发送待处理业务数据时,可在待处理业务数据中添加与上述指定数据内容对应的数据标识。当接收到数据发送方发送的待处理业务数据时,可确定上述任一存储区域中的指定数据内容中是否包含待处理业务数据的数据标识,若包含待处理业务数据的数据标识,则确定数据发送方为合约参与方。此时可调用智能合约并执行智能合约对上述待处理业务数据进行业务数据处理。其中,上述数据发送方包括但不限于交易发起方、身份验证发起方以及产品供应链提供方等,在此不做限制。需要特别说明的是,上述指定数据内容和上述数据标识仅用于确定待处理业务数据是否满足调用智能合约的条件,具体数据表现形式可以是数字、字母以及符号的一种或多种组合,在此不做限制。同时,上述任一存储区域包括但不限于区块链网络中的存储设备,或者与区块链节点连接的云存储、硬盘等,在此也不做限制。In some feasible implementations, since the smart contract verifies data or executes the content of the contract to process the data based on the agreement reached by the contract participants, when receiving the pending business data sent by the data sender, It is necessary to verify whether the data sender is a contract participant, that is to say, it is necessary to verify whether the pending business data sent by the data sender meets the trigger condition of invoking the smart contract, so as to call the smart contract to perform business data processing on the received pending business data . In specific implementation, a blockchain node can deploy designated data content that meets the conditions for invoking the smart contract in any storage area connected to it. When the data sender sends the service data to be processed, the data identifier corresponding to the specified data content can be added to the service data to be processed. When receiving the service data to be processed from the data sender, it can be determined whether the specified data content in any of the above storage areas contains the data identifier of the service data to be processed. If it contains the data identifier of the service data to be processed, the data is determined The sender is the contract participant. At this time, the smart contract can be called and executed to perform business data processing on the above-mentioned pending business data. Among them, the above-mentioned data senders include but are not limited to transaction initiators, identity verification initiators, and product supply chain providers, etc., which are not limited here. It should be noted that the above specified data content and the above data identifier are only used to determine whether the business data to be processed meets the conditions for invoking the smart contract. The specific data expression form can be one or more combinations of numbers, letters, and symbols. There is no restriction. At the same time, any of the above-mentioned storage areas includes, but is not limited to, storage devices in the blockchain network, or cloud storage and hard disks connected to blockchain nodes, and there is no restriction here.
102、基于第一智能合约确定上述待处理业务数据是否包含待拦截数据。102. Determine, based on the first smart contract, whether the service data to be processed includes the data to be intercepted.
在一些可行的实施方式中,由于一般智能合约是以计算机可读的代码形式存在,且智能合约本身不具有待拦截数据的能力,因此在确定上述待处理业务数据是否包含上述待拦截数据之前,需要生成具备拦截数据能力的第一智能合约。具体实现中,可根据数据发送方发送的待处理业务数据确定用于处理上述待处理业务数据的第二智能合约,并获取上述第二智能合约的合约代码。同时在基于上述数据发送方及处理数据发送方发送的待处理业务数据时的具体应用场景确定出待拦截数据后,根据该待拦截数据生成拦截代码,并结合上述第二智能合约的合约代码生成上述第一智能合约。其中,上述第一智能合约具备与上述第二智能合约相同的业务数据处理能力,同时可实现对符合拦截条件的待处理业务数据进行拦截。In some feasible implementations, since the general smart contract exists in the form of computer-readable code, and the smart contract itself does not have the ability to intercept data, before determining whether the above-mentioned service data to be processed includes the above-mentioned data to be intercepted, The first smart contract with the ability to intercept data needs to be generated. In specific implementation, the second smart contract for processing the above-mentioned service data to be processed may be determined according to the service data to be processed sent by the data sender, and the contract code of the above-mentioned second smart contract may be obtained. At the same time, after the data to be intercepted is determined based on the specific application scenarios when processing the business data sent by the data sender and the data sender, the interception code is generated according to the data to be intercepted, and generated in combination with the contract code of the second smart contract. The first smart contract mentioned above. Wherein, the above-mentioned first smart contract has the same business data processing capabilities as the above-mentioned second smart contract, and at the same time, it can intercept the pending business data that meets the interception conditions.
在一些可行的实施方式中,在接收到数据发送方发送的待处理业务数据之后,且上述待处理业务数据能够调用上述第一智能合约时,可在执行上述第一智能合约之前验证上述待处理业务数据中是否包含上述待拦截数据,从而确定是否基于上述第一智能合约拦截上述待处理业务数据。具体实现中,由于上述第一智能合约中包含待拦截数据,因此可将上述待处理业务数据与所述待拦截数据进行匹配以确定上述待处理业务数据中是否包含上述待拦截数据。但是由于数据发送方发送的待处理业务数据所采用的数据处理方式不同,待处理业务数据并不会以固定的数据格式被数据发送方发送,因此对于两种不同格式的数据而言,无法确定一种格式的数据是否包含另一种格式的数据。基于上述原因,在对上述待处理业务数据和上述待拦截数据进行匹配之前,可先获取上述待拦截数据的数据格式和上述待处理业务数据的数据格式。此时可确定上述待拦截数据的数据格式和上述待处理业务数据的数据格式是否一致,如果两者一致,则可直接将上述待拦截数据与上述待处理业务进行匹配,并且当上述待处理业务数据中存在与上述待拦截数据一致的数据段时,可确定上述待处理业务数据中包含上述待拦截数据。例如,当上述待处理业务数据和上述待拦截数据的数据格式均为二进制数据时,且上述待处理业务数据的部分数据为“000101010001001011100”,上述待拦截数据为“0111”,此时上述待处理业务数据中包含与上述待拦截数据一致的数据段“0111”,因此可确定上述待处理业务数据中包含上述待拦截数据。如果上述待拦截数据的数据格式和上述待处理业务数据的数据格式不一致时,可修改上述待拦截数据的数据格式和/或上述待处理业务数据的数据格式以使上述待拦截数据的数据格式和上述待处理业务数据的数据格式一致。例如,当上述待拦截数据为二进制数据,上述待处理业余数据为十进制数据时,可将上述待拦截数据进行数据处理以将上述待拦截数据修改为十进制数据。也可对上述待处理业务数据进行数据处理以将上述待处理业务数据修改为二进制数据。还可以同时对上述待处理业务数据和上述待拦截数据进行数据处理以将上述待处理业务数据和上述待拦截数据修改为除二进制和十进制外的任一进制数据,具体实现方式在此不做限制。In some feasible implementation manners, after receiving the to-be-processed business data sent by the data sender, and the to-be-processed business data can call the first smart contract, the to-be-processed data can be verified before executing the first smart contract. Whether the service data includes the above-mentioned data to be intercepted, so as to determine whether to intercept the above-mentioned service data to be processed based on the above-mentioned first smart contract. In specific implementation, since the first smart contract contains the data to be intercepted, the business data to be processed can be matched with the data to be intercepted to determine whether the business data to be processed includes the data to be intercepted. However, due to the different data processing methods used by the data sender to process the business data to be processed, the business data to be processed will not be sent by the data sender in a fixed data format. Therefore, for the two different formats of data, it is impossible to determine Whether data in one format contains data in another format. Based on the foregoing reasons, before matching the foregoing business data to be processed and the foregoing data to be intercepted, the data format of the foregoing data to be intercepted and the data format of the foregoing business data to be processed may be acquired first. At this time, it can be determined whether the data format of the data to be intercepted is consistent with the data format of the business data to be processed. If the two are consistent, the data to be intercepted can be directly matched with the business to be processed, and when the business to be processed is When there is a data segment consistent with the data to be intercepted, it can be determined that the business data to be processed includes the data to be intercepted. For example, when the data format of the above-mentioned service data to be processed and the above-mentioned data to be intercepted are both binary data, and the partial data of the above-mentioned service data to be processed is "000101010001001011100", and the above-mentioned data to be intercepted is "0111", then the above-mentioned pending data is The business data contains the data segment "0111" that is consistent with the data to be intercepted, so it can be determined that the business data to be processed contains the data to be intercepted. If the data format of the data to be intercepted is inconsistent with the data format of the business data to be processed, the data format of the data to be intercepted and/or the data format of the business data to be processed can be modified to make the data format of the data to be intercepted and The data format of the business data to be processed is the same. For example, when the data to be intercepted is binary data and the amateur data to be processed is decimal data, the data to be intercepted can be processed to modify the data to be intercepted into decimal data. It is also possible to perform data processing on the service data to be processed to modify the service data to be processed into binary data. It is also possible to perform data processing on the service data to be processed and the data to be intercepted at the same time to modify the service data to be processed and the data to be intercepted into any hexadecimal data except binary and decimal. The specific implementation is not done here. limit.
在一些可行的实施方式中,在根据上述待处理业务数据中包含与上述待拦截数据一致的数据段来在确定上述待处理业务数据中否包含上述待拦截数据的过程中,不能确定上述待处理业务数据中是否包含与上述待拦截数据语义一致但是数据表现形式不一样的数据。例如当上述待拦截数据为表示“纸质发票”的数据,也就是说上述第一智能合约可用于拦截包含“纸质发票”的待处理业务数据时,如果待处理业务数据中包含“非电子发票”,上述第一智能合则会确定上述待处理业务数据中不包含待拦截数据,进而导致基于上述第一智能合约智能拦截包含“纸质发票”的待处理业务数据,而不能拦截包含“非电子发票”的待处理业务数据。为改善上述情况,在确定出待拦截数据之后,可从预设数据库中确定出与上述待拦截数据语义一致,且数据表述形式与上述待拦截数据不同的至少一个目标数据。其中,上述预设数据库中的数据可以是基于互联网、大数据平台或者其他存储空间中获取的常见的拦截数据,也可以是由数据发送方、数据接收方以及智能合约管理方预先指定的拦截数据,具体来源不做限制。在确定上述待处理业务数据中是否包含上述待拦截数据的过程中,可确定上述待处理业务数据中是否存在与上述至少一个目标数据中任一目标数据一致的数据段,以扩大上述第一智能合约对上述待处理业务数据的识别范围。当上述待处理业务数据中存在与上述至少一个目标数据中任一目标数据一致的数据段时,可确定上述待处理业务数据中包含上述待拦截数据。其中,上述预设数据库中的任一数据的数据格式与上述待拦截数据的数据格式一致,且在将上述待处理业务数据与上述至少一个目标数据进行匹配的过程中,上述待处理业务数据的数据格式需要与上述待拦截数据的数据格式保持一致,在此不再赘述。需要特别说明的是,如果数据发送方发送的待处理业务数据为经过加密、压缩等方式处理的数据时,需要对上述待处理业务数据进行解密、解压等方式进行处理得到完整的待处理业务数据,进而获取待处理业务数据的数据格式,在此不再赘述。In some feasible implementation manners, in the process of determining whether the to-be-intercepted data is included in the to-be-processed business data based on the data segment that is consistent with the to-be-intercepted data, the to-be-processed data cannot be determined. Whether the business data contains data that has the same semantics as the above-mentioned data to be intercepted but has a different data presentation form. For example, when the data to be intercepted is data representing "paper invoices", that is to say, the first smart contract can be used to intercept the business data to be processed containing "paper invoices", if the business data to be processed contains "non-electronic "Invoice", the above-mentioned first smart contract will determine that the above-mentioned pending business data does not contain the to-be-intercepted data, which in turn leads to the intelligent interception of pending business data containing "paper invoices" based on the above-mentioned first smart contract, and cannot be intercepted. "Non-electronic invoice" pending business data. In order to improve the above situation, after the data to be intercepted is determined, at least one target data that is semantically consistent with the data to be intercepted and whose data expression format is different from the data to be intercepted can be determined from the preset database. Among them, the data in the above-mentioned preset database can be common intercepted data obtained from the Internet, big data platforms or other storage spaces, or can be intercepted data pre-designated by the data sender, data receiver, and smart contract manager , The specific source is not restricted. In the process of determining whether the service data to be processed includes the data to be intercepted, it can be determined whether there is a data segment consistent with any one of the at least one target data in the service data to be processed, so as to expand the first intelligence. The scope of the contract's identification of the above-mentioned pending business data. When there is a data segment consistent with any one of the at least one target data in the above-mentioned service data to be processed, it can be determined that the above-mentioned service data to be processed includes the above-mentioned data to be intercepted. Wherein, the data format of any data in the preset database is consistent with the data format of the data to be intercepted, and in the process of matching the business data to be processed with the at least one target data, the data format of the business data to be processed is The data format needs to be consistent with the data format of the data to be intercepted above, and will not be repeated here. It should be noted that if the service data to be processed sent by the data sender is data that has been processed through encryption, compression, etc., it is necessary to decrypt and decompress the service data to be processed to obtain the complete service data to be processed. , And then obtain the data format of the service data to be processed, which will not be repeated here.
103、若上述待处理业务数据包含上述待拦截数据,则基于上述第一智能合约拦截上述待处理业务数据,若上述待处理业务数据不包含上述待拦截数据,则基于上述第一智能合约对上述待处理业务数据进行业务数据处理。103. If the service data to be processed includes the data to be intercepted, the service data to be processed is intercepted based on the first smart contract. If the service data to be processed does not include the data to be intercepted, the data to be intercepted is processed based on the first smart contract. The business data to be processed is processed for business data.
在一些可行的实施方式中,如果上述待处理业务数据不包含上述待拦截数据,则基于上述第一智能合约对上述待处理业务数据进行业务数据处理。例如,对于供应链提供方来说,可基于相应的智能合约验证供应链提供方提供的数据中的公司、机构、产品等信息,使得供应链数据在每个环节保持准确和有效。再例如,对于交易发起方来说,可基于相应的智能合约验证交易请求,进一步简化交易流程,减少数据错误。In some feasible implementation manners, if the service data to be processed does not include the data to be intercepted, business data processing is performed on the service data to be processed based on the first smart contract. For example, for the supply chain provider, the company, institution, product and other information in the data provided by the supply chain provider can be verified based on the corresponding smart contract, so that the supply chain data remains accurate and effective at every link. For another example, for the transaction initiator, the transaction request can be verified based on the corresponding smart contract, which further simplifies the transaction process and reduces data errors.
在一些可行的实施方式中,如果上述待处理业务数据包含上述待拦截数据,此时可对上述待处理业务数据进行拦截。具体实现中,可将上述待处理业务数据删除防止上述第一智能合约对上述待处理业务数据进行业务数据处理,也可在删除上述待处理业务数据的同时,根据上述待拦截数据生成删除通知并将上述删除通知发送至数据发送方,以使数据发送方在接收到上述删除通知后对上述待处理业务数据进行修改并重新发送修改后的待处理业务信息。具体可参见图2,图2是本申请实施例提供的基于智能合约拦截待处理业务数据方法的流程示意图。本申请实施例提供的基于智能合约拦截待处理业务数据方法可包括如下步骤201-203。In some feasible implementation manners, if the service data to be processed includes the data to be intercepted, the service data to be processed can be intercepted at this time. In specific implementation, the aforementioned pending business data can be deleted to prevent the aforementioned first smart contract from performing business data processing on the aforementioned pending business data, or while the aforementioned pending business data is deleted, a deletion notification can be generated and based on the aforementioned pending data. Send the deletion notice to the data sender, so that the data sender modifies the pending service data and resends the revised pending service information after receiving the deletion notice. For details, please refer to FIG. 2, which is a schematic flowchart of a method for intercepting service data to be processed based on a smart contract according to an embodiment of the present application. The method for intercepting service data to be processed based on a smart contract provided in the embodiment of the present application may include the following steps 201-203.
201、确定待处理业务数据中与待拦截数据一致的数据段的数量,并基于上述数据段的数量确定上述待处理业务数据的风险等级。201. Determine the number of data segments consistent with the data to be intercepted in the business data to be processed, and determine the risk level of the business data to be processed based on the number of data segments.
在一些可行的实施方式中,在确定出待处理业务数据存在与待拦截数据一致的数据段时,或者,在确定出待处理业务数据存在与上述至少一个目标数据中任一目标数据一致的数据段时,可确定出上述待处理业务数据中与待拦截数据或者任一目标数据的数据段的数量,进而可根据数据段的数量确定出上述待处理业务数据的风险等级。其中,数据段的数量越多,说明上述待处理业务数据的风险性越高,数据段的数量较少,说明上述待处理业务数据的风险性越低。从而数据发送方在接收到告警信息之后,可根据上述待处理业务数据的风险等级采取不用的影响措施。需要特别说明的是,当上述待拦截数据为色情、木马以及病毒等相关不良信息时,上述风险等级可反映出数据发送方自身及其发送的待处理业务数据的安全风险严重程度。当上述待拦截数据为不适用于当前应用场景的信息(如账户、发票等),上述风险等级可反映出数据发送方自身及其发送的待处理业务数据的数据管理规范程度,进而可结合具体应用场景和待拦截数据类型确定不同的响应措施。In some feasible implementation manners, when it is determined that the business data to be processed has a data segment consistent with the data to be intercepted, or when it is determined that the business data to be processed has data that is consistent with any one of the foregoing at least one target data During segment time, the number of data segments between the to-be-processed business data and the data to be intercepted or any target data can be determined, and then the risk level of the to-be-processed business data can be determined according to the number of data segments. Among them, the larger the number of data segments, the higher the risk of the business data to be processed, and the smaller the number of data segments, the lower the risk of the business data to be processed. Therefore, after receiving the alarm information, the data sender can take different influence measures according to the risk level of the service data to be processed. It should be particularly noted that when the above-mentioned data to be intercepted is related bad information such as pornography, Trojan horses, and viruses, the above-mentioned risk level may reflect the severity of the security risk of the data sender itself and the service data to be processed. When the above-mentioned data to be intercepted is information that is not applicable to the current application scenario (such as accounts, invoices, etc.), the above-mentioned risk level can reflect the degree of data management norms of the data sender and the data to be processed, which can be combined with specific The application scenarios and the types of data to be intercepted determine different response measures.
202、基于上述风险等级确定上述待处理业务数据对应的告警方式和告警信息。202. Determine an alarm mode and alarm information corresponding to the service data to be processed based on the risk level.
在一些可行的实施方式中,当基于上述第一智能合约拦截上述待处理业务数据之后,可根据被拦截的待处理业务数据生成告警信息并将其发送至数据发送方。其中,根据被拦截的待处理业务数据生成的告警信息可包括待拦截数据,以使数据发送方在接收到告警信息后针对产生告警的待拦截数据做出相应的告警应急响应。In some feasible implementation manners, after intercepting the above-mentioned service data to be processed based on the above-mentioned first smart contract, alarm information may be generated based on the intercepted service data to be processed and sent to the data sender. Among them, the alarm information generated based on the intercepted service data to be processed may include the data to be intercepted, so that the data sender can respond to the alarm to be intercepted after receiving the alarm information.
203、基于上述告警方式将上述告警信息和上述待处理业务数据发送至数据发送方。203. Send the alarm information and the service data to be processed to the data sender based on the alarm mode.
在一些可行的实施方式中,在确定出上述待处理业务数据的风险等级后,还可依据不同的风险等级确定不同的告警方式,从而采用不同的告警方式将告警信息发送至数据发送方。例如,当上述待处理业务数据的风险等级为高风险等级时,可采用告警速度较快的告警方式(即时警报、电话通知等)将告警信息发送至数据发送方以使数据发送方在第一时间采取应对措施。当上述待处理业务数据的风险等级为低风险等级时,可采用告警速度较慢的告警方式(邮件、短信等)将告警信息发送至数据发送方以使数据发送方根据实际情况采取应对措施,具体告警方式的实现方式在此不做限制。In some feasible implementation manners, after the risk level of the service data to be processed is determined, different alarming methods can be determined according to different risk levels, so that different alarming methods are used to send the alarm information to the data sender. For example, when the risk level of the aforementioned business data to be processed is a high risk level, a faster warning method (instant alarm, telephone notification, etc.) can be used to send the alarm information to the data sender so that the data sender is the first Time to take countermeasures. When the risk level of the above-mentioned business data to be processed is low risk level, the alarm method (email, SMS, etc.) with a slower alarm speed can be used to send the alarm information to the data sender so that the data sender can take countermeasures according to the actual situation. The implementation of the specific alarm method is not limited here.
在本申请实施例中,基于待处理业务数据的风险等级可确定告警信息的发送方式,使得不同风险等级对应的告警信息具有不同的告警方式,使得业务风险数据的告警更加具有针对性和灵活性,适用性高。In the embodiment of the present application, the sending method of the alarm information can be determined based on the risk level of the business data to be processed, so that the alarm information corresponding to different risk levels has different alarm methods, making the alarm of the business risk data more targeted and flexible , High applicability.
104、确定处理后的业务数据是否包含上述待拦截数据。104. Determine whether the processed business data contains the aforementioned data to be intercepted.
在一些可行的实施方式中,由于执行智能合约的过程是一个数据验证和处理的过程,因此在基于上述第一智能合约对上述待处理业务数据进行业务数据处理的过程中存在的数据变化,导致处理后的业务数据中可能包含上述待拦截数据。也就是说,在经过上述第一智能合约对上述待处理业务数据进行业务数据处理之后,原本无需被拦截的待处理业务数据因为产生上述待拦截数据而需要被拦截。因此,在得到处理后的业务数据后,需要再次确定上述处理后的业务数据中是否包含上述待拦截数据,其中,具体的确定方式如步骤102中所示,在此不再赘述。In some feasible implementation manners, since the process of executing the smart contract is a process of data verification and processing, data changes in the process of performing business data processing on the business data to be processed based on the first smart contract cause The processed business data may contain the aforementioned data to be intercepted. That is to say, after performing business data processing on the business data to be processed through the first smart contract, business data to be processed that does not originally need to be intercepted needs to be intercepted because the data to be intercepted is generated. Therefore, after the processed business data is obtained, it is necessary to determine again whether the processed business data includes the data to be intercepted. The specific determination method is as shown in step 102, which will not be repeated here.
在一些可行的实施方式中,在得到处理后的业务数据之后,也可以获取上述处理后的业务数据的数据类型,根据不同的数据类型采用处理相对应的数据类型的数据处理工具来确定处理后的业务数据是否包含上述的待拦截数据。例如,当上述处理后的业务数据为图像数据时,可采用图像处理工具来确定该图像数据中是否包含上述待拦截数据。再例如,当上述处理后的业务数据为音频数据时,可采用音频处理工具来确定该音频数据中是否包含上述待拦截数据。可选的,当上述处理后的业务数据包括多种类型的数据(如同时包含图像数据和音频数据)时,可同时采用多种数据处理工具来确定处理后的业务数据中是否包含待拦截数据。另外,还可以通过调用具有数据分析、识别以及拦截能力的第三方数据处理平台,在产生处理后的业务数据时,上述第一智能合约可直接调用第三方处理平台的相关接口使得第三方数据处理平台能够接收并确定处理后的业务数据是否包含上述待拦截数据,具体实现方式在此不做限制。In some feasible implementation manners, after the processed business data is obtained, the data type of the processed business data can also be obtained, and the data processing tool that processes the corresponding data type is used to determine the processed business data according to different data types. Does your business data contain the aforementioned data to be intercepted? For example, when the processed business data is image data, an image processing tool can be used to determine whether the image data contains the data to be intercepted. For another example, when the processed service data is audio data, an audio processing tool can be used to determine whether the audio data contains the data to be intercepted. Optionally, when the above-mentioned processed service data includes multiple types of data (for example, both image data and audio data), multiple data processing tools may be used at the same time to determine whether the processed service data contains data to be intercepted . In addition, by calling a third-party data processing platform with data analysis, identification and interception capabilities, when the processed business data is generated, the above-mentioned first smart contract can directly call the relevant interface of the third-party processing platform to enable third-party data processing The platform can receive and determine whether the processed business data contains the aforementioned data to be intercepted, and the specific implementation method is not limited here.
105、若上述处理后的业务数据包含上述待拦截数据,则拦截上述处理后的业务数据,若上述处理后的业务数据不包含上述待拦截数据,则将上述处理后的业务数据发送至数据接收方。105. If the above-mentioned processed business data contains the above-mentioned data to be intercepted, intercept the above-mentioned processed business data, and if the above-mentioned processed business data does not contain the above-mentioned data to be intercepted, then send the above-mentioned processed business data to the data receiver square.
在一些可行的实施方式中,当上述处理后的业务数据包含上述拦截数据时,可拦截上述处理后的业务数据,具体拦截方式如步骤103中所示,在此不再赘述。可选的,由于基于上述第一智能合约对上述待处理业务数据进行业务数据处理后,需要将上述处理后的业务数据发送至数据接收方。其中,上述数据接收方包括但不限于交易核算平台、产品分配系统以及数据分发平台等,在此不做限制。当上述处理后的业务数据被拦截时,为了避免数据接收方因为接收不到处理后的业务数据造成数据接收方产生告警等负面影响,可在拦截上述处理后的业务数据的同时向数据接收方发送告警信息,具体实现方式可参见步骤103所示,也可生成拦截通知信息以告知数据接收方上述处理后的业务数据已被拦截,避免造成不必要的损失。In some feasible implementation manners, when the processed business data includes the intercepted data, the processed business data can be intercepted. The specific interception method is as shown in step 103, which will not be repeated here. Optionally, after the service data to be processed is processed based on the first smart contract, the processed service data needs to be sent to the data receiver. Among them, the above-mentioned data receivers include but are not limited to transaction accounting platforms, product distribution systems, and data distribution platforms, etc., which are not limited here. When the above-mentioned processed business data is intercepted, in order to avoid the data receiver’s failure to receive the processed business data and cause the data receiver to generate alarms and other negative effects, the above-mentioned processed business data can be intercepted and sent to the data receiver at the same time. For sending alarm information, refer to step 103 for a specific implementation manner. Interception notification information may also be generated to inform the data receiver that the above-mentioned processed business data has been intercepted, so as to avoid unnecessary losses.
在本申请实施例中,在本申请实施例中,通过基于待拦截数据生成具有数据拦截功能的智能合约,使得在基于智能合约对待处理业务进行业务数据处理时,可以拦截包含有待拦截数据的待处理业务数据,提高了智能合约的数据处理能力。此外,通过对处理后的业务数据进行拦截,可进一步提升基于智能合约的数据拦截能力,适应性更高。与此同时,在实现对待处理业务信息进行拦截的同时,可为数据发送方和数据接收方提供相应的告警方式,不仅可以是数据发送方和数据接收方及时采取应对措施,也可进一步消除数据安全隐患。In the embodiment of the application, in the embodiment of the application, the smart contract with data interception function is generated based on the data to be intercepted, so that when the service to be processed is processed based on the smart contract, the data to be intercepted can be intercepted. Processing business data improves the data processing capabilities of smart contracts. In addition, by intercepting the processed business data, the ability to intercept data based on smart contracts can be further improved, with higher adaptability. At the same time, while realizing the interception of the business information to be processed, it can provide the data sender and data receiver with corresponding alarm methods. Not only can the data sender and data receiver take timely response measures, but also further eliminate the data Security risks.
参见图3,图3是本申请实施例提供的基于智能合约的数据处理装置的结构示意图。本申请实施例提供的数据处理装置包括。Refer to FIG. 3, which is a schematic structural diagram of a data processing device based on a smart contract provided by an embodiment of the present application. The data processing device provided by the embodiment of the present application includes.
接收单元31,用于接收数据发送方发送的待处理业务数据。The receiving unit 31 is configured to receive service data to be processed sent by the data sender.
确定单元32,用于基于第一智能合约确定上述待处理业务数据是否包含待拦截数据。The determining unit 32 is configured to determine whether the service data to be processed includes the data to be intercepted based on the first smart contract.
处理单元33,用于当上述待处理业务数据包含上述待拦截数据时,基于上述第一智能合约拦截上述待处理业务数据,当上述待处理业务数据不包含上述待拦截数据时,基于上述第一智能合约对上述待处理业务数据进行业务数据处理。The processing unit 33 is configured to, when the service data to be processed includes the data to be intercepted, intercept the service data to be processed based on the first smart contract, and when the service data to be processed does not include the data to be intercepted, based on the first The smart contract performs business data processing on the above pending business data.
上述确定单元32,用于确定处理后的业务数据是否包含上述待拦截数据。The above determining unit 32 is configured to determine whether the processed service data includes the above data to be intercepted.
上述处理单元33,用于当上述处理后的业务数据包含上述待拦截数据时,拦截上述处理后的业务数据,当上述处理后的业务数据不包含上述待拦截数据时,将上述处理后的业务数据发送至数据接收方。The processing unit 33 is configured to intercept the processed business data when the processed business data contains the data to be intercepted, and when the processed business data does not contain the data to be intercepted, the processed business data The data is sent to the data recipient.
在一些可行的实施方式中,上述确定单元32还用于。In some feasible implementation manners, the aforementioned determining unit 32 is also used for.
确定待拦截数据和用于处理业务数据的第二智能合约,上述待拦截数据用于确定是否拦截业务数据。Determine the data to be intercepted and the second smart contract used to process the business data. The above data to be intercepted is used to determine whether to intercept the business data.
上述数据处理装置还包括。The above-mentioned data processing device also includes.
生成单元34,还用于根据上述待拦截数据和上述第二智能合约生成用于进行业务数据处理且具备业务数据拦截能力的第一智能合约。The generating unit 34 is further configured to generate a first smart contract for business data processing and capable of intercepting business data based on the data to be intercepted and the second smart contract.
在一些可行的实施方式中,上述数据处理装置还包括。In some feasible implementation manners, the above-mentioned data processing device further includes.
获取单元35,还用于获取待拦截数据的数据格式和上述待处理业务数据的数据格式。The obtaining unit 35 is also used to obtain the data format of the data to be intercepted and the data format of the service data to be processed.
所述处理单元33,还用于当上述待拦截数据的数据格式和上述待处理业务数据的数据格式不一致时,修改上述待拦截数据的数据格式和/或上述待处理业务数据的数据格式,以基于相同数据格式的上述待拦截数据和上述待处理业务数据确定上述待处理业务数据是否包含上述待拦截数据。The processing unit 33 is further configured to modify the data format of the data to be intercepted and/or the data format of the business data to be processed when the data format of the data to be intercepted is inconsistent with the data format of the business data to be processed to Based on the data to be intercepted and the business data to be processed in the same data format, it is determined whether the business data to be processed includes the data to be intercepted.
在一些可行的实施方式中,上述数据处理装置包括。In some feasible implementation manners, the above-mentioned data processing device includes.
匹配单元36,用于将上述待拦截数据与上述待处理业务数据进行匹配。The matching unit 36 is configured to match the data to be intercepted with the service data to be processed.
上述确定单元32,用于当上述待处理业务数据存在与上述待拦截数据一致的数据段时,确定上述待处理业务数据包含上述待拦截数据。The determining unit 32 is configured to determine that the service data to be processed includes the data to be intercepted when the service data to be processed includes a data segment that is consistent with the data to be intercepted.
在一些可行的实施方式中,上述确定单元32用于。In some feasible implementation manners, the aforementioned determining unit 32 is used.
从预设数据库中确定出与上述待拦截数据语义一致,且数据表述形式与上述待拦截数据不同的至少一个目标数据,其中上述预设数据库中的任一数据的数据格式与上述待拦截数据的数据格式一致。Determine from the preset database at least one target data that is consistent in semantics with the above-mentioned data to be intercepted and whose data expression form is different from the above-mentioned data to be intercepted. The data format of any data in the above-mentioned preset database is the same as that of the above-mentioned data to be intercepted. The data format is consistent.
上述匹配单元36,用于将上述至少一个目标数据与上述待处理业务数据进行匹配。The matching unit 36 is configured to match the at least one target data with the service data to be processed.
上述确定单元32,用于当上述待处理业务数据存在与上述至少一个目标数据中任一目标数据一致的数据段时,确定上述待处理业务数据包含上述待拦截数据。The determining unit 32 is configured to determine that the service data to be processed includes the data to be intercepted when the service data to be processed includes a data segment that is consistent with any target data in the at least one target data.
在一些可行的实施方式中,上述确定单元32还用于。In some feasible implementation manners, the aforementioned determining unit 32 is also used for.
确定上述待处理业务数据中与上述待拦截数据一致的数据段的数量,并基于上述数据段的数量确定上述待处理业务数据的风险等级。Determine the number of data segments consistent with the data to be intercepted in the business data to be processed, and determine the risk level of the business data to be processed based on the number of data segments.
基于上述风险等级确定上述待处理业务数据对应的告警方式和告警信息。The alarm mode and alarm information corresponding to the service data to be processed are determined based on the risk level.
上述处理单元33,还用于基于上述告警方式将上述告警信息和上述待处理业务数据发送至数据发送方。The processing unit 33 is further configured to send the alarm information and the service data to be processed to the data sender based on the alarm mode.
具体实现中,上述基于智能合约的数据处理装置可通过其内置的各个模块和/单元执行如上图1至图2中各个步骤所提供的实现方式。例如,上述接收单元31可用于接收数据发送方发送的待处理业务数据等实现方式,具体可参见上述各个步骤所提供的实现方式,在此不再赘述。上述确定单元32可用于基于第一智能合约确定上述待处理业务数据是否包含待拦截数据等实现方式,具体可参见上述各个步骤所提供的实现方式,在此不再赘述。上述处理单元33可用于当上述待处理业务数据包含上述待拦截数据时,基于上述第一智能合约拦截上述待处理业务数据等实现方式,具体可参见上述各个步骤所提供的实现方式,在此不再赘述。上述生成单元34可用于根据上述待拦截数据和上述第二智能合约生成用于进行业务数据处理且具备业务数据拦截能力的第一智能合约将等实现方式,具体可参见上述各个步骤所提供的实现方式,在此不再赘述。上述获取单元35可用于获取待拦截数据的数据格式和上述待处理业务数据的数据格式等实现方式,具体可参见上述各个步骤所提供的实现方式,在此不再赘述。上述匹配单元36可用于将上述待拦截数据与上述待处理业务数据进行匹配等实现方式,具体可参见上述各个步骤所提供的实现方式,在此不再赘述。In specific implementation, the above-mentioned smart contract-based data processing device can execute the implementation manners provided in the steps in Figures 1 to 2 through various built-in modules and/units. For example, the foregoing receiving unit 31 may be configured to receive implementation manners such as to-be-processed service data sent by the data sender. For details, please refer to the implementation manners provided in the foregoing steps, and details are not described herein again. The determination unit 32 may be configured to determine whether the service data to be processed includes the data to be intercepted and other implementation methods based on the first smart contract. For details, please refer to the implementation methods provided in each step above, which will not be repeated here. The processing unit 33 can be used to implement the method for intercepting the business data to be processed based on the first smart contract when the business data to be processed includes the data to be intercepted. For details, please refer to the implementation manners provided in each step above. Repeat it again. The generating unit 34 can be used to generate a first smart contract for business data processing and capable of intercepting business data according to the data to be intercepted and the second smart contract. For details, please refer to the implementation provided in each step above. Ways, I will not repeat them here. The acquisition unit 35 may be used to acquire the data format of the data to be intercepted and the data format of the business data to be processed. For details, please refer to the implementation manners provided in the above steps, which will not be repeated here. The matching unit 36 can be used to match the data to be intercepted with the service data to be processed and other implementation methods. For details, please refer to the implementation methods provided in the above steps, which will not be repeated here.
在本申请实施例中,通过基于待拦截数据生成具有数据拦截功能的智能合约,使得在基于智能合约对待处理业务进行业务数据处理时,可以拦截包含有待拦截数据的待处理业务数据,提高了智能合约的数据处理能力。此外,通过对处理后的业务数据进行拦截,可进一步提升基于智能合约的数据拦截能力,适应性更高。In the embodiment of the present application, by generating a smart contract with data interception function based on the data to be intercepted, when the business data processing of the business to be processed is performed based on the smart contract, the business data to be processed containing the data to be intercepted can be intercepted, which improves the intelligence Data processing capabilities of the contract. In addition, by intercepting the processed business data, the ability to intercept data based on smart contracts can be further improved, with higher adaptability.
参见图4,图4是本申请实施例提供的终端设备的结构示意图。如图4所示,本实施例中的终端设备可以包括。一个或多个处理器41和存储器42。上述处理器41和存储器42通过总线43连接。存储器42用于存储计算机程序,该计算机程序包括程序指令,处理器41用于执行存储器42存储的程序指令,执行如下操作。Refer to FIG. 4, which is a schematic structural diagram of a terminal device provided by an embodiment of the present application. As shown in Figure 4, the terminal device in this embodiment may include. One or more processors 41 and memory 42. The aforementioned processor 41 and memory 42 are connected by a bus 43. The memory 42 is used to store a computer program, and the computer program includes program instructions. The processor 41 is used to execute the program instructions stored in the memory 42 to perform the following operations.
接收数据发送方发送的待处理业务数据。Receive the pending business data sent by the data sender.
基于第一智能合约确定上述待处理业务数据是否包含待拦截数据。Based on the first smart contract, it is determined whether the service data to be processed includes the data to be intercepted.
若上述待处理业务数据包含上述待拦截数据,则基于上述第一智能合约拦截上述待处理业务数据,若上述待处理业务数据不包含上述待拦截数据,则基于上述第一智能合约对上述待处理业务数据进行业务数据处理。If the business data to be processed includes the data to be intercepted, the business data to be processed is intercepted based on the first smart contract. If the business data to be processed does not include the data to be intercepted, the business data to be processed is processed based on the first smart contract. Business data is processed for business data.
确定处理后的业务数据是否包含上述待拦截数据。Determine whether the processed business data contains the aforementioned data to be intercepted.
若上述处理后的业务数据包含上述待拦截数据,则拦截上述处理后的业务数据,若上述处理后的业务数据不包含上述待拦截数据,则将上述处理后的业务数据发送至数据接收方。If the processed business data contains the data to be intercepted, the processed business data is intercepted, and if the processed business data does not contain the data to be intercepted, the processed business data is sent to the data recipient.
在一些可行的实施方式中,上述处理器41还用于。In some feasible implementation manners, the aforementioned processor 41 is also used for.
确定待拦截数据和用于处理业务数据的第二智能合约,上述待拦截数据用于确定是否拦截业务数据。Determine the data to be intercepted and the second smart contract used to process the business data. The above data to be intercepted is used to determine whether to intercept the business data.
根据上述待拦截数据和上述第二智能合约生成用于进行业务数据处理且具备业务数据拦截能力的第一智能合约。According to the above-mentioned data to be intercepted and the above-mentioned second smart contract, a first smart contract used for business data processing and capable of intercepting business data is generated.
在一些可行的实施方式中,上述处理器41还用于。In some feasible implementation manners, the aforementioned processor 41 is also used for.
获取待拦截数据的数据格式和上述待处理业务数据的数据格式。Obtain the data format of the data to be intercepted and the data format of the business data to be processed.
若上述待拦截数据的数据格式和上述待处理业务数据的数据格式不一致,则修改上述待拦截数据的数据格式和/或上述待处理业务数据的数据格式,以基于相同数据格式的上述待拦截数据和上述待处理业务数据确定上述待处理业务数据是否包含上述待拦截数据。If the data format of the data to be intercepted is inconsistent with the data format of the business data to be processed, the data format of the data to be intercepted and/or the data format of the business data to be processed is modified to be based on the data to be intercepted in the same data format And the above-mentioned service data to be processed to determine whether the above-mentioned service data to be processed includes the above-mentioned data to be intercepted.
在一些可行的实施方式中,上述处理器41用于。In some feasible implementation manners, the aforementioned processor 41 is used.
将上述待拦截数据与上述待处理业务数据进行匹配。Match the above-mentioned data to be intercepted with the above-mentioned service data to be processed.
若上述待处理业务数据存在与上述待拦截数据一致的数据段,则确定上述待处理业务数据包含上述待拦截数据。If the service data to be processed has a data segment consistent with the data to be intercepted, it is determined that the service data to be processed includes the data to be intercepted.
在一些可行的实施方式中,上述处理器41用于。In some feasible implementation manners, the aforementioned processor 41 is used.
从预设数据库中确定出与上述待拦截数据语义一致,且数据表述形式与上述待拦截数据不同的至少一个目标数据,其中上述预设数据库中的任一数据的数据格式与上述待拦截数据的数据格式一致。Determine from the preset database at least one target data that is consistent in semantics with the above-mentioned data to be intercepted and whose data expression form is different from the above-mentioned data to be intercepted. The data format of any data in the above-mentioned preset database is the same as that of the above-mentioned data to be intercepted. The data format is consistent.
将上述至少一个目标数据与上述待处理业务数据进行匹配。Match the aforementioned at least one target data with the aforementioned service data to be processed.
若上述待处理业务数据存在与上述至少一个目标数据中任一目标数据一致的数据段,则确定上述待处理业务数据包含上述待拦截数据。If the service data to be processed has a data segment that is consistent with any target data in the at least one target data, it is determined that the service data to be processed includes the data to be intercepted.
在一些可行的实施方式中,上述处理器41用于。In some feasible implementation manners, the aforementioned processor 41 is used.
确定上述待处理业务数据中与上述待拦截数据一致的数据段的数量,并基于上述数据段的数量确定上述待处理业务数据的风险等级。Determine the number of data segments consistent with the data to be intercepted in the business data to be processed, and determine the risk level of the business data to be processed based on the number of data segments.
基于上述风险等级确定上述待处理业务数据对应的告警方式和告警信息。The alarm mode and alarm information corresponding to the service data to be processed are determined based on the risk level.
基于上述告警方式将上述告警信息和上述待处理业务数据发送至数据发送方。Based on the above warning method, the above warning information and the above pending service data are sent to the data sender.
应当理解,在一些可行的实施方式中,上述处理器41可以是中央处理单元 (central processing unit,CPU),该处理器41还可以是其他通用处理器、数字信号处理器 (digital signal processor,DSP)、专用集成电路 (application specific integrated circuit,ASIC)、现成可编程门阵列 (field-programmable gate array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that in some feasible implementation manners, the aforementioned processor 41 may be a central processing unit (CPU), and the processor 41 may also be other general-purpose processors, digital signal processors (digital signal processors) processor, DSP), application specific integrated circuit (application specific integrated circuit, ASIC), ready-made programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
该存储器41可以包括只读存储器和随机存取存储器,并向处理器41提供指令和数据。存储器42的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的数据。The memory 41 may include a read-only memory and a random access memory, and provides instructions and data to the processor 41. A part of the memory 42 may also include a non-volatile random access memory. For example, the memory can also store device type data.
具体实现中,上述终端设备可通过其内置的各个功能模块执行如上述图1至图2中各个步骤所提供的实现方式,具体可参见上述各个步骤所提供的实现方式,在此不再赘述。In specific implementation, the above-mentioned terminal device can execute the implementation manners provided in the steps in Figures 1 to 2 through its built-in functional modules. For details, refer to the implementation manners provided in the above-mentioned steps, which will not be repeated here.
在本申请实施例中,通过基于待拦截数据生成具有数据拦截功能的智能合约,使得在基于智能合约对待处理业务进行业务数据处理时,可以拦截包含有待拦截数据的待处理业务数据,提高了智能合约的数据处理能力。此外,通过对处理后的业务数据进行拦截,可进一步提升基于智能合约的数据拦截能力,适应性更高。In the embodiment of the present application, by generating a smart contract with data interception function based on the data to be intercepted, when the business data processing of the business to be processed is performed based on the smart contract, the business data to be processed containing the data to be intercepted can be intercepted, which improves the intelligence Data processing capabilities of the contract. In addition, by intercepting the processed business data, the ability to intercept data based on smart contracts can be further improved, with higher adaptability.
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,被处理器执行以实现图1至图2中各个步骤所提供的方法,具体可参见上述各个步骤所提供的实现方式,在此不再赘述。其中,所述计算机可读存储介质可以是非易失性,也可以是易失性的。The embodiments of the present application also provide a computer-readable storage medium, which stores a computer program and is executed by a processor to implement the method provided in each step in FIG. 1 to FIG. 2. For details, see each step above The implementation method provided will not be repeated here. Wherein, the computer-readable storage medium may be non-volatile or volatile.
上述计算机可读存储介质可以是前述任一实施例提供的任务处理装置或者上述终端设备的内部存储单元,例如电子设备的硬盘或内存。该计算机可读存储介质也可以是该电子设备的外部存储设备,例如该电子设备上配备的插接式硬盘,智能存储卡(smart media card, SMC),安全数字(secure digital, SD)卡,闪存卡(flash card)等。上述计算机可读存储介质还可以包括磁碟、光盘、只读存储记忆体(read-only memory,ROM)或随机存储记忆体(random access memory,RAM)等。进一步地,该计算机可读存储介质还可以既包括该电子设备的内部存储单元也包括外部存储设备。该计算机可读存储介质用于存储该计算机程序以及该电子设备所需的其他程序和数据。该计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。The foregoing computer-readable storage medium may be the task processing apparatus provided in any of the foregoing embodiments or the internal storage unit of the foregoing terminal device, such as a hard disk or memory of an electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (secure digital, SD) card, flash card, etc. The above-mentioned computer-readable storage medium may also include a magnetic disk, an optical disk, a read-only memory (read-only memory, ROM) or a random access memory (random access memory, RAM), etc. Further, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (20)

  1. 一种基于智能合约的数据处理方法,其中,所述方法包括:A data processing method based on smart contracts, wherein the method includes:
    接收数据发送方发送的待处理业务数据;Receive the pending business data sent by the data sender;
    基于第一智能合约确定所述待处理业务数据是否包含待拦截数据;Determining whether the service data to be processed includes data to be intercepted based on the first smart contract;
    若所述待处理业务数据包含所述待拦截数据,则基于所述第一智能合约拦截所述待处理业务数据,若所述待处理业务数据不包含所述待拦截数据,则基于所述第一智能合约对所述待处理业务数据进行业务数据处理;If the to-be-processed business data includes the to-be-intercepted data, then the to-be-processed business data is intercepted based on the first smart contract, and if the to-be-processed business data does not include the to-be-intercepted data, then based on the first smart contract A smart contract performs business data processing on the to-be-processed business data;
    确定处理后的业务数据是否包含所述待拦截数据;Determining whether the processed business data contains the data to be intercepted;
    若所述处理后的业务数据包含所述待拦截数据,则拦截所述处理后的业务数据,若所述处理后的业务数据不包含所述待拦截数据,则将所述处理后的业务数据发送至数据接收方。If the processed business data contains the data to be intercepted, then the processed business data is intercepted, and if the processed business data does not contain the data to be intercepted, then the processed business data is Send to the data recipient.
  2. 根据权利要求1所述的方法,其中,所述接收数据发送方发送的待处理业务数据之前,所述方法还包括:The method according to claim 1, wherein before said receiving the to-be-processed service data sent by the data sender, the method further comprises:
    确定待拦截数据和用于处理业务数据的第二智能合约,所述待拦截数据用于确定是否拦截业务数据;Determine the data to be intercepted and the second smart contract used to process the business data, where the data to be intercepted is used to determine whether to intercept the business data;
    根据所述待拦截数据和所述第二智能合约生成用于进行业务数据处理且具备业务数据拦截能力的第一智能合约。According to the data to be intercepted and the second smart contract, a first smart contract used for business data processing and capable of intercepting business data is generated.
  3. 根据权利要求2所述的方法,其中,所述基于第一智能合约确定所述待处理业务数据是否包含待拦截数据之前,所述方法还包括:The method according to claim 2, wherein before the determining whether the service data to be processed includes the data to be intercepted based on the first smart contract, the method further comprises:
    获取待拦截数据的数据格式和所述待处理业务数据的数据格式;Acquiring the data format of the data to be intercepted and the data format of the business data to be processed;
    若所述待拦截数据的数据格式和所述待处理业务数据的数据格式不一致,则修改所述待拦截数据的数据格式和/或所述待处理业务数据的数据格式,以基于相同数据格式的所述待拦截数据和所述待处理业务数据确定所述待处理业务数据是否包含所述待拦截数据。If the data format of the data to be intercepted is inconsistent with the data format of the business data to be processed, the data format of the data to be intercepted and/or the data format of the business data to be processed is modified to be based on the same data format. The data to be intercepted and the business data to be processed determine whether the business data to be processed includes the data to be intercepted.
  4. 根据权利要求3所述的方法,其中,所述基于第一智能合约确定所述待处理业务数据是否包含待拦截数据包括:The method according to claim 3, wherein the determining whether the service data to be processed includes data to be intercepted based on the first smart contract comprises:
    将所述待拦截数据与所述待处理业务数据进行匹配;Matching the data to be intercepted with the business data to be processed;
    若所述待处理业务数据存在与所述待拦截数据一致的数据段,则确定所述待处理业务数据包含所述待拦截数据。If the service data to be processed has a data segment consistent with the data to be intercepted, it is determined that the service data to be processed includes the data to be intercepted.
  5. 根据权利要求3所述的方法,其中,所述基于第一智能合约确定所述待处理业务数据是否包含待拦截数据包括:The method according to claim 3, wherein the determining whether the service data to be processed includes data to be intercepted based on the first smart contract comprises:
    从预设数据库中确定出与所述待拦截数据语义一致,且数据表述形式与所述待拦截数据不同的至少一个目标数据,其中所述预设数据库中的任一数据的数据格式与所述待拦截数据的数据格式一致;At least one target data that is consistent with the data to be intercepted in semantics and whose data expression form is different from the data to be intercepted is determined from the preset database, wherein the data format of any data in the preset database is the same as that of the The data format of the data to be intercepted is consistent;
    将所述至少一个目标数据与所述待处理业务数据进行匹配;Matching the at least one target data with the service data to be processed;
    若所述待处理业务数据存在与所述至少一个目标数据中任一目标数据一致的数据段,则确定所述待处理业务数据包含所述待拦截数据。If the service data to be processed has a data segment consistent with any target data in the at least one target data, it is determined that the service data to be processed includes the data to be intercepted.
  6. 根据权利要求4所述的方法,其中,所述基于所述第一智能合约拦截所述待处理业务数据,所述方法包括:The method according to claim 4, wherein said intercepting said service data to be processed based on said first smart contract, said method comprising:
    确定所述待处理业务数据中与所述待拦截数据一致的数据段的数量,并基于所述数据段的数量确定所述待处理业务数据的风险等级;Determining the number of data segments consistent with the data to be intercepted in the business data to be processed, and determining the risk level of the business data to be processed based on the number of data segments;
    基于所述风险等级确定所述待处理业务数据对应的告警方式和告警信息;Determine the alarm mode and alarm information corresponding to the service data to be processed based on the risk level;
    基于所述告警方式将所述告警信息和所述待处理业务数据发送至数据发送方。Send the alarm information and the service data to be processed to the data sender based on the alarm mode.
  7. 一种基于智能合约的数据处理装置,其中,所述数据处理装置包括:A data processing device based on a smart contract, wherein the data processing device includes:
    接收单元,用于接收数据发送方发送的待处理业务数据;The receiving unit is used to receive the to-be-processed service data sent by the data sender;
    确定单元,用于基于第一智能合约确定所述待处理业务数据是否包含待拦截数据;A determining unit, configured to determine whether the service data to be processed includes data to be intercepted based on the first smart contract;
    处理单元,用于当所述待处理业务数据包含所述待拦截数据时,基于所述第一智能合约拦截所述待处理业务数据,当所述待处理业务数据不包含所述待拦截数据时,基于所述第一智能合约对所述待处理业务数据进行业务数据处理;A processing unit, configured to intercept the service data to be processed based on the first smart contract when the service data to be processed includes the data to be intercepted, and when the service data to be processed does not include the data to be intercepted , Performing business data processing on the business data to be processed based on the first smart contract;
    所述确定单元,用于确定处理后的业务数据是否包含所述待拦截数据;The determining unit is configured to determine whether the processed business data includes the data to be intercepted;
    所述处理单元,用于当所述处理后的业务数据包含所述待拦截数据时,拦截所述处理后的业务数据,当所述处理后的业务数据不包含所述待拦截数据时,将所述处理后的业务数据发送至数据接收方。The processing unit is configured to intercept the processed business data when the processed business data contains the data to be intercepted, and when the processed business data does not contain the data to be intercepted, The processed service data is sent to the data receiver.
  8. 根据权利要求7所述的数据处理装置,其中,The data processing device according to claim 7, wherein:
    所述确定单元,还用于确定待拦截数据和用于处理业务数据的第二智能合约,所述待拦截数据用于确定是否拦截业务数据;The determining unit is also used to determine the data to be intercepted and the second smart contract used to process the business data, where the data to be intercepted is used to determine whether to intercept the business data;
    所述数据处理装置还包括:The data processing device further includes:
    生成单元,还用于根据所述待拦截数据和所述第二智能合约生成用于进行业务数据处理且具备业务数据拦截能力的第一智能合约。The generating unit is further configured to generate a first smart contract for business data processing and capable of intercepting business data according to the data to be intercepted and the second smart contract.
  9. 一种终端设备,其中,包括存储器和处理器,所述处理器、和所述存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器用于执行所述存储器的所述程序指令,其中:A terminal device, including a memory and a processor, the processor and the memory are connected to each other, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute The program instructions of the memory, wherein:
    接收数据发送方发送的待处理业务数据;Receive the pending business data sent by the data sender;
    基于第一智能合约确定所述待处理业务数据是否包含待拦截数据;Determining whether the service data to be processed includes data to be intercepted based on the first smart contract;
    若所述待处理业务数据包含所述待拦截数据,则基于所述第一智能合约拦截所述待处理业务数据,若所述待处理业务数据不包含所述待拦截数据,则基于所述第一智能合约对所述待处理业务数据进行业务数据处理;If the to-be-processed business data includes the to-be-intercepted data, then the to-be-processed business data is intercepted based on the first smart contract, and if the to-be-processed business data does not include the to-be-intercepted data, then based on the first smart contract A smart contract performs business data processing on the to-be-processed business data;
    确定处理后的业务数据是否包含所述待拦截数据;Determining whether the processed business data contains the data to be intercepted;
    若所述处理后的业务数据包含所述待拦截数据,则拦截所述处理后的业务数据,若所述处理后的业务数据不包含所述待拦截数据,则将所述处理后的业务数据发送至数据接收方。If the processed business data contains the data to be intercepted, then the processed business data is intercepted, and if the processed business data does not contain the data to be intercepted, then the processed business data is Send to the data recipient.
  10. 根据权利要求9所述的终端设备,其中,所述处理器用于:The terminal device according to claim 9, wherein the processor is configured to:
    确定待拦截数据和用于处理业务数据的第二智能合约,所述待拦截数据用于确定是否拦截业务数据;Determine the data to be intercepted and the second smart contract used to process the business data, where the data to be intercepted is used to determine whether to intercept the business data;
    根据所述待拦截数据和所述第二智能合约生成用于进行业务数据处理且具备业务数据拦截能力的第一智能合约。According to the data to be intercepted and the second smart contract, a first smart contract used for business data processing and capable of intercepting business data is generated.
  11. 根据权利要求10所述的终端设备,其中,所述处理器用于:The terminal device according to claim 10, wherein the processor is configured to:
    获取待拦截数据的数据格式和所述待处理业务数据的数据格式;Acquiring the data format of the data to be intercepted and the data format of the business data to be processed;
    若所述待拦截数据的数据格式和所述待处理业务数据的数据格式不一致,则修改所述待拦截数据的数据格式和/或所述待处理业务数据的数据格式,以基于相同数据格式的所述待拦截数据和所述待处理业务数据确定所述待处理业务数据是否包含所述待拦截数据。If the data format of the data to be intercepted is inconsistent with the data format of the business data to be processed, the data format of the data to be intercepted and/or the data format of the business data to be processed is modified to be based on the same data format. The data to be intercepted and the business data to be processed determine whether the business data to be processed includes the data to be intercepted.
  12. 根据权利要求11所述的终端设备,其中,所述处理器用于:The terminal device according to claim 11, wherein the processor is configured to:
    将所述待拦截数据与所述待处理业务数据进行匹配;Matching the data to be intercepted with the business data to be processed;
    若所述待处理业务数据存在与所述待拦截数据一致的数据段,则确定所述待处理业务数据包含所述待拦截数据。If the service data to be processed has a data segment consistent with the data to be intercepted, it is determined that the service data to be processed includes the data to be intercepted.
  13. 根据权利要求11所述的终端设备,其中,所述处理器用于:The terminal device according to claim 11, wherein the processor is configured to:
    从预设数据库中确定出与所述待拦截数据语义一致,且数据表述形式与所述待拦截数据不同的至少一个目标数据,其中所述预设数据库中的任一数据的数据格式与所述待拦截数据的数据格式一致;At least one target data that is consistent with the data to be intercepted in semantics and whose data expression form is different from the data to be intercepted is determined from the preset database, wherein the data format of any data in the preset database is the same as that of the The data format of the data to be intercepted is consistent;
    将所述至少一个目标数据与所述待处理业务数据进行匹配;Matching the at least one target data with the service data to be processed;
    若所述待处理业务数据存在与所述至少一个目标数据中任一目标数据一致的数据段,则确定所述待处理业务数据包含所述待拦截数据。If the service data to be processed has a data segment consistent with any target data in the at least one target data, it is determined that the service data to be processed includes the data to be intercepted.
  14. 根据权利要求12所述的终端设备,其中,所述处理器用于:The terminal device according to claim 12, wherein the processor is configured to:
    确定所述待处理业务数据中与所述待拦截数据一致的数据段的数量,并基于所述数据段的数量确定所述待处理业务数据的风险等级;Determining the number of data segments consistent with the data to be intercepted in the business data to be processed, and determining the risk level of the business data to be processed based on the number of data segments;
    基于所述风险等级确定所述待处理业务数据对应的告警方式和告警信息;Determine the alarm mode and alarm information corresponding to the service data to be processed based on the risk level;
    基于所述告警方式将所述告警信息和所述待处理业务数据发送至数据发送方。Send the alarm information and the service data to be processed to the data sender based on the alarm mode.
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,用于实现以下步骤:A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, they are used to implement the following steps:
    接收数据发送方发送的待处理业务数据;Receive the pending business data sent by the data sender;
    基于第一智能合约确定所述待处理业务数据是否包含待拦截数据;Determining whether the service data to be processed includes data to be intercepted based on the first smart contract;
    若所述待处理业务数据包含所述待拦截数据,则基于所述第一智能合约拦截所述待处理业务数据,若所述待处理业务数据不包含所述待拦截数据,则基于所述第一智能合约对所述待处理业务数据进行业务数据处理;If the to-be-processed business data includes the to-be-intercepted data, then the to-be-processed business data is intercepted based on the first smart contract, and if the to-be-processed business data does not include the to-be-intercepted data, then based on the first smart contract A smart contract performs business data processing on the to-be-processed business data;
    确定处理后的业务数据是否包含所述待拦截数据;Determining whether the processed business data contains the data to be intercepted;
    若所述处理后的业务数据包含所述待拦截数据,则拦截所述处理后的业务数据,若所述处理后的业务数据不包含所述待拦截数据,则将所述处理后的业务数据发送至数据接收方。If the processed business data contains the data to be intercepted, then the processed business data is intercepted, and if the processed business data does not contain the data to be intercepted, then the processed business data is Send to the data recipient.
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:The computer-readable storage medium according to claim 15, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    确定待拦截数据和用于处理业务数据的第二智能合约,所述待拦截数据用于确定是否拦截业务数据;Determine the data to be intercepted and the second smart contract used to process the business data, where the data to be intercepted is used to determine whether to intercept the business data;
    根据所述待拦截数据和所述第二智能合约生成用于进行业务数据处理且具备业务数据拦截能力的第一智能合约。According to the data to be intercepted and the second smart contract, a first smart contract used for business data processing and capable of intercepting business data is generated.
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:The computer-readable storage medium according to claim 16, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    获取待拦截数据的数据格式和所述待处理业务数据的数据格式;Acquiring the data format of the data to be intercepted and the data format of the business data to be processed;
    若所述待拦截数据的数据格式和所述待处理业务数据的数据格式不一致,则修改所述待拦截数据的数据格式和/或所述待处理业务数据的数据格式,以基于相同数据格式的所述待拦截数据和所述待处理业务数据确定所述待处理业务数据是否包含所述待拦截数据。If the data format of the data to be intercepted is inconsistent with the data format of the business data to be processed, the data format of the data to be intercepted and/or the data format of the business data to be processed is modified to be based on the same data format. The data to be intercepted and the business data to be processed determine whether the business data to be processed includes the data to be intercepted.
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:The computer-readable storage medium according to claim 17, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    将所述待拦截数据与所述待处理业务数据进行匹配;Matching the data to be intercepted with the business data to be processed;
    若所述待处理业务数据存在与所述待拦截数据一致的数据段,则确定所述待处理业务数据包含所述待拦截数据。If the service data to be processed has a data segment consistent with the data to be intercepted, it is determined that the service data to be processed includes the data to be intercepted.
  19. 根据权利要求17所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:The computer-readable storage medium according to claim 17, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    从预设数据库中确定出与所述待拦截数据语义一致,且数据表述形式与所述待拦截数据不同的至少一个目标数据,其中所述预设数据库中的任一数据的数据格式与所述待拦截数据的数据格式一致;At least one target data that is consistent with the data to be intercepted in semantics and whose data expression form is different from the data to be intercepted is determined from the preset database, wherein the data format of any data in the preset database is the same as that of the The data format of the data to be intercepted is consistent;
    将所述至少一个目标数据与所述待处理业务数据进行匹配;Matching the at least one target data with the service data to be processed;
    若所述待处理业务数据存在与所述至少一个目标数据中任一目标数据一致的数据段,则确定所述待处理业务数据包含所述待拦截数据。If the service data to be processed has a data segment consistent with any target data in the at least one target data, it is determined that the service data to be processed includes the data to be intercepted.
  20. 根据权利要求18所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:The computer-readable storage medium according to claim 18, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    确定所述待处理业务数据中与所述待拦截数据一致的数据段的数量,并基于所述数据段的数量确定所述待处理业务数据的风险等级;Determining the number of data segments consistent with the data to be intercepted in the business data to be processed, and determining the risk level of the business data to be processed based on the number of data segments;
    基于所述风险等级确定所述待处理业务数据对应的告警方式和告警信息;Determine the alarm mode and alarm information corresponding to the service data to be processed based on the risk level;
    基于所述告警方式将所述告警信息和所述待处理业务数据发送至数据发送方。Send the alarm information and the service data to be processed to the data sender based on the alarm mode.
PCT/CN2020/103258 2019-08-15 2020-07-21 Smart contract-based data processing method, and related device WO2021027505A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910751683.7A CN110647757A (en) 2019-08-15 2019-08-15 Data processing method based on intelligent contract and related device
CN201910751683.7 2019-08-15

Publications (1)

Publication Number Publication Date
WO2021027505A1 true WO2021027505A1 (en) 2021-02-18

Family

ID=68990455

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/103258 WO2021027505A1 (en) 2019-08-15 2020-07-21 Smart contract-based data processing method, and related device

Country Status (2)

Country Link
CN (1) CN110647757A (en)
WO (1) WO2021027505A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110647757A (en) * 2019-08-15 2020-01-03 深圳壹账通智能科技有限公司 Data processing method based on intelligent contract and related device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108537668A (en) * 2018-04-11 2018-09-14 北京奇虎科技有限公司 Digital cash method of commerce and device, computing device based on intelligent contract
US20180316492A1 (en) * 2017-05-01 2018-11-01 Qbrics, Inc. Distributed System and Method for Encryption of Blockchain Payloads
CN108769173A (en) * 2018-05-21 2018-11-06 阿里体育有限公司 The block chain implementation method and equipment of the intelligent contract of operation
CN110647757A (en) * 2019-08-15 2020-01-03 深圳壹账通智能科技有限公司 Data processing method based on intelligent contract and related device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108270839B (en) * 2017-01-04 2022-03-25 腾讯科技(深圳)有限公司 Access frequency control system and method
CN109219001B (en) * 2018-08-01 2021-11-23 中国联合网络通信集团有限公司 Short message interception method, device, interception platform and storage medium
CN109583891B (en) * 2018-11-14 2021-08-24 咪咕文化科技有限公司 Information processing method, device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180316492A1 (en) * 2017-05-01 2018-11-01 Qbrics, Inc. Distributed System and Method for Encryption of Blockchain Payloads
CN108537668A (en) * 2018-04-11 2018-09-14 北京奇虎科技有限公司 Digital cash method of commerce and device, computing device based on intelligent contract
CN108769173A (en) * 2018-05-21 2018-11-06 阿里体育有限公司 The block chain implementation method and equipment of the intelligent contract of operation
CN110647757A (en) * 2019-08-15 2020-01-03 深圳壹账通智能科技有限公司 Data processing method based on intelligent contract and related device

Also Published As

Publication number Publication date
CN110647757A (en) 2020-01-03

Similar Documents

Publication Publication Date Title
WO2021036440A1 (en) Transaction endorsement method and apparatus in block chain, and block chain network
US10623388B2 (en) Account association systems and methods
CN108932426B (en) Unauthorized vulnerability detection method and device
US10599873B2 (en) Method for rate-limiting interactions based on dynamically calculated values by supplying problems of varying difficulty to be solved
JP6880055B2 (en) Message anti-counterfeiting implementation method and device
CN110597839A (en) Transaction data processing method, device, equipment and storage medium
CN111314172B (en) Block chain-based data processing method, device, equipment and storage medium
US11290256B2 (en) Blockchain-based advertisement monitoring method and apparatus, and electronic device
TWI706362B (en) Data processing method, device and server based on blockchain
WO2019109817A1 (en) Short message verification method, apparatus, storage medium, short message verification system, and terminal
CN105635044B (en) Information synchronization method and device
US10044735B2 (en) System and method for authentication of electronic communications
US11349868B2 (en) Detection of spoofed internally-addressed email using trusted third party's SPF records
CN114245323B (en) Message processing method and device, computer equipment and storage medium
WO2021027505A1 (en) Smart contract-based data processing method, and related device
CN114266680A (en) Block chain-based electronic contract signing method, device and system
WO2024109270A1 (en) Short message processing method and apparatus, device, and readable storage medium
CN110602051B (en) Information processing method based on consensus protocol and related device
CN110381114B (en) Interface request parameter processing method and device, terminal equipment and medium
KR20180028246A (en) Smishing Message Detecting Method And Terminal, Verification Server Of Thereof
US10911434B2 (en) Phone number protection system
WO2020000753A1 (en) Device security monitoring method and apparatus
CN112866265B (en) CSRF attack protection method and device
US20210243036A1 (en) Blockchain network communication management
CN111770093B (en) Transaction monitoring decision method, device, equipment and computer 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: 20853222

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

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 01/08/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20853222

Country of ref document: EP

Kind code of ref document: A1