CN109670950B - Transaction monitoring method, device, equipment and storage medium based on blockchain - Google Patents

Transaction monitoring method, device, equipment and storage medium based on blockchain Download PDF

Info

Publication number
CN109670950B
CN109670950B CN201811265445.7A CN201811265445A CN109670950B CN 109670950 B CN109670950 B CN 109670950B CN 201811265445 A CN201811265445 A CN 201811265445A CN 109670950 B CN109670950 B CN 109670950B
Authority
CN
China
Prior art keywords
transaction
block
monitoring event
transaction information
blockchain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811265445.7A
Other languages
Chinese (zh)
Other versions
CN109670950A (en
Inventor
程立瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811265445.7A priority Critical patent/CN109670950B/en
Priority to PCT/CN2018/124621 priority patent/WO2020087739A1/en
Publication of CN109670950A publication Critical patent/CN109670950A/en
Application granted granted Critical
Publication of CN109670950B publication Critical patent/CN109670950B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/30Network architectures or network communication protocols for network security for supporting lawful interception, monitoring or retaining of communications or communication related information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present invention relates to the field of data processing technologies, and in particular, to a transaction monitoring method, device, equipment and storage medium based on blockchain. The method comprises the following steps: acquiring transaction information initiated by a client in a blockchain network, and automatically registering a transaction monitoring event for each transaction information; invoking a transaction monitoring event to monitor each transaction message, reporting the transaction message to an intelligent contract of the blockchain network when the transaction message is abnormal, acquiring an alarm rule in the intelligent contract, and feeding back the corresponding processing type to the client; when the transaction information completes the transaction in the blockchain network, the transaction monitoring event is automatically logged off. According to the invention, the transaction abnormal condition is captured in time by registering one transaction monitoring event for each transaction message, so that the blank of real-time automatic processing of the abnormal condition in the block-out monitoring is made up, the normal proceeding of the transaction is ensured, and the processing efficiency of the abnormal condition in the block-out process of the blockchain is improved.

Description

Transaction monitoring method, device, equipment and storage medium based on blockchain
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a transaction monitoring method, device, equipment and storage medium based on blockchain.
Background
The blockchain is a novel application mode of a computer such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like, and the consensus mechanism is a mathematical algorithm for establishing trust and obtaining rights among different nodes in a blockchain system. Transactions in the blockchain form blocks, and only interesting-chain technologies monitor the blocks, and transactions in the blocks.
Some monitoring schemes of interest-chain science and technology research are mainly used for monitoring the total number of blocks, the transaction number, the transaction amount of TPS and TPP, but cannot effectively monitor and warn about abnormal transaction conditions in blocks. In the later stage, when the abnormal conditions of the transaction are processed, the abnormal conditions need to be positioned and analyzed, the abnormal reasons are found out and can be processed, and the abnormal conditions of the transaction cannot be processed in time, so that other risks can be caused.
Disclosure of Invention
In view of this, it is necessary to provide a blockchain-based transaction monitoring method, device, equipment and storage medium for the problem that the transaction abnormality in the block cannot be effectively monitored and an alarm can not be given in time.
A blockchain-based transaction listening method, comprising:
acquiring transaction information initiated by a client in a blockchain network, and automatically registering a corresponding transaction monitoring event for each transaction information;
invoking the transaction monitoring event to monitor each transaction message, reporting the transaction message to an intelligent contract of the blockchain network when the transaction message is abnormal, acquiring an alarm rule in the intelligent contract, and feeding back a processing type corresponding to the alarm rule to the client;
and automatically logging out the transaction monitoring event corresponding to the transaction information after the transaction information completes the transaction in the blockchain network.
In one embodiment, the calling the transaction monitoring event monitors each transaction information, including:
and calling the transaction monitoring event, acquiring the transaction information, calling an abnormal rule in the intelligent contract, matching the transaction information with the abnormal rule, and judging that the transaction information is abnormal in transaction if the transaction information triggers the abnormal rule.
In one embodiment, automatically registering a corresponding transaction listening event for each transaction message includes:
if the transaction information is automatically registered and the corresponding transaction monitoring event fails, registering a corresponding block monitoring event for a block generated by the transaction information in the block chain network, and storing the transaction information in a message queue;
calling the block monitoring event to monitor the block, reporting the transaction information corresponding to the block to the intelligent contract in the message queue when the block is abnormal, acquiring an alarm rule in the intelligent contract, and feeding back a processing type corresponding to the alarm rule to the client;
and when the block completes the uplink in the block chain network, automatically canceling the block monitoring event corresponding to the block.
In one embodiment, the calling the block snoop event to snoop the block includes:
invoking the block monitoring event to acquire the block, calculating transaction information in the block through a hash algorithm to generate a verification hash value, comparing the verification hash value with the hash value of the current block in the block, and judging that the block is abnormal if the verification hash value is inconsistent with the hash value of the current block in the block;
if so, comparing the hash value of the previous block in the blocks, the hash value of the current block with a block chain list, judging whether the hash value of the previous block and the hash value of the current block are connected end to end, and if not, judging that the block is abnormal.
In one embodiment, the obtaining the alarm rule in the intelligent contract, and feeding back the processing type corresponding to the alarm rule to the client includes:
the alarm rule comprises a plurality of alarm triggering conditions, and each alarm triggering condition corresponds to at least one processing type;
when the transaction information triggers any alarm triggering condition, a corresponding processing type is acquired, and the processing type is fed back to the client.
In one embodiment, the alert rule further includes a process execution script corresponding to the process type;
when the transaction information triggers any alarm triggering condition, the processing execution script is called, alarm processing is automatically carried out, and a processing result and the processing type are fed back to the client.
In one embodiment, when a corresponding transaction monitoring event is automatically registered for each transaction message, a preset EventHub event processing center is called to automatically register the transaction monitoring event;
and when the transaction monitoring event corresponding to the transaction information is automatically logged out, invoking an unregisterTxEvent event in the Eventhub to log out the transaction monitoring event.
A blockchain-based transaction listening device, comprising:
the transaction monitoring event registering module is used for acquiring transaction information initiated by a client in the blockchain network and automatically registering a corresponding transaction monitoring event for each transaction information;
the monitoring module is used for calling the transaction monitoring event, monitoring each transaction message, reporting the transaction message to an intelligent contract of the blockchain network when the transaction message is abnormal, acquiring an alarm rule in the intelligent contract, and feeding back a processing type corresponding to the alarm rule to the client;
and the transaction logging-off monitoring event module is used for automatically logging off the transaction monitoring event corresponding to the transaction information after the transaction information completes the transaction in the blockchain network.
A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions that, when executed by the processor, cause the processor to perform the steps of the blockchain-based transaction listening method described above.
A storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the blockchain-based transaction listening method described above.
The transaction monitoring method, the device, the equipment and the storage medium based on the blockchain comprise the steps of obtaining transaction information initiated by a client in a blockchain network, and automatically registering a corresponding transaction monitoring event for each transaction information; invoking the transaction monitoring event to monitor each transaction message, reporting the transaction message to an intelligent contract of the blockchain network when the transaction message is abnormal, acquiring an alarm rule in the intelligent contract, and feeding back a processing type corresponding to the alarm rule to the client; and automatically logging out the transaction monitoring event corresponding to the transaction information after the transaction information completes the transaction in the blockchain network. According to the invention, the transaction abnormal condition is captured in time by registering one transaction monitoring event for each transaction message, so that the blank of real-time automatic processing of the abnormal condition in the block-out monitoring is made up, the normal proceeding of the transaction is ensured, and the processing efficiency of the abnormal condition in the block-out process of the blockchain is improved.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention.
FIG. 1 is a flow chart of a blockchain-based transaction listening method in an embodiment of the present invention;
FIG. 2 is a flow chart of step S4 in one embodiment;
FIG. 3 is a diagram illustrating a determination process of a blockchain-based transaction listening method in accordance with an embodiment of the present invention;
FIG. 4 is a block chain based transaction listening device according to one embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
FIG. 1 is a flowchart of a transaction listening method based on a blockchain in an embodiment of the present invention, as shown in FIG. 1, comprising the steps of:
step S1, registering a transaction monitoring event: and acquiring transaction information initiated by a client in the blockchain network, and automatically registering a corresponding transaction monitoring event for each transaction information.
The blockchain network is a system based on the blockchain technology, also called as a distributed ledger technology, and is an internet database technology. The method is characterized by decentralization, disclosure and transparency, so that each user can participate in maintaining database records. Blockchain networks are a novel application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, and the like. The blockchain network mainly comprises a data layer, an intelligent contract layer and the like, wherein the data layer encapsulates basic data such as a bottom data block, related data encryption, a time stamp and the like and basic algorithms, the bottom data block is presented in a chained structure, namely, the blockchain is a chained data structure formed by combining the data blocks in a sequential connection mode according to a time sequence, and the distributed account book cannot be tampered and counterfeited in a cryptographic manner. Smart contracts are based on these trusted, non-tamperable data that can be automated to execute some predefined rules and terms. For example, user information, including medical information, risk occurrence information, is authentic and automated claims are made based on standardized insurance products in smart contracts.
When any client node in the blockchain network initiates transaction information, the client node is preset with an input interface, the client node acquires the transaction information of each transaction by calling the input interface, the client node comprises a mobile phone client, a computer client or a third party client, and the transaction information comprises an order number, information of both transaction parties, a transaction place and the like. The user uploads transaction information through the client node, the blockchain network acquires the transaction information initiated by the client node, the blockchain network can acquire a plurality of different transaction information initiated by clients with different sources, and the blockchain network automatically registers a corresponding transaction monitoring event for each transaction information.
When a corresponding transaction monitoring event is automatically registered for each transaction message, the step calls a preset Eventhub event processing center to automatically register a transaction monitoring event for each transaction message. The registering process when registering the transaction monitoring event is through the Fabric network structure of the block chain network, an Eventhub event processing center is preset at the bottom layer of the Fabric network structure, and the transaction monitoring event is automatically registered through the Eventhub event processing center.
The Fabric structure in this step is one of the important structures in the blockchain network. The Fabric network architecture provides four services for the blockchain network, namely: identity services, policy services, blockchain services, and intelligent contract services. Identity service: the Fabric network structure is a permission block chain structure, each node participating in the block chain network needs to define identity information, and the node in the block chain network needs to determine the permission level of participating in the transaction in the Fabric network structure. Policy service: the method provides policy configuration and management functions for the blockchain network, realizes access control and authority management, and realizes the registration, verification, privacy, confidentiality, consensus policies and the like of joining or exiting the network by the nodes. Blockchain service: the method provides the capability of constructing the most foundation of the distributed account book, realizes the functions of data transmission, consensus achievement and the like, and provides a management framework for subscribing and publishing events. Intelligent contract service: the distributed transaction program is used for verifying the distributed transaction program running on the node, automatically executing specific business rules and finally updating the state of the account information. The user can construct a distributed ledger of the blockchain network by calling an application interface of the Fabric network structure to realize business application.
The Eventhub event processing center of the Fabric network structure bottom layer is used for monitoring event behaviors, and in the constructor of the Eventhub, monitoring of client adding and deleting events and readable states is established through a monitoring tool INotify and Epoll event mechanism. INotify is a file system change notification mechanism provided by the Linux kernel, and may monitor changes of the file system for an application program, such as file creation, deletion, reading and writing, and the like. The INotify has two basic objects, the INotify object corresponds to a queue, an application program can add a plurality of interception to the INotify object, and when an intercepted event occurs, the event information can be read out from the INotify object through a read () function; the watch object is used to describe the monitoring of the change event of the file system, and is a binary group, comprising a monitoring target and an event mask, wherein the monitoring target is a path of the file system, and can be a file or a folder. Epoll can use the readable/writable state of waiting to snoop multiple descriptors at a time.
The Eventhub event processing center is adopted to automatically register a transaction monitoring event, the registering is simple and convenient, when a large amount of information can be monitored through the transaction monitoring event generated by the Eventhub event processing center, the monitoring efficiency is high, and when a large amount of transaction information is initiated, a blocking event can not occur.
Step S2, monitoring transaction information: and calling a transaction monitoring event to monitor each transaction message, reporting the transaction message to an intelligent contract of the blockchain network when the transaction message is abnormal, acquiring an alarm rule in the intelligent contract, and feeding back a processing type corresponding to the alarm rule to the client.
In one embodiment, this step, when invoking a transaction listening event, listens for each transaction message, includes: and calling a transaction monitoring event, acquiring transaction information, calling an abnormal rule in the intelligent contract, matching the transaction information with the abnormal rule, and judging that the transaction information is abnormal when the transaction information triggers the abnormal rule.
Intelligent contracts are arranged in the block chain network, and abnormal rules, alarm rules, processing types and the like are preset in the intelligent contracts. When monitoring the transaction information and determining whether to send the transaction abnormality, the transaction information is matched with an abnormality rule, wherein the abnormality rule can comprise transaction rules such as whether the transaction amount exceeds the amount, whether the information of both transaction sides exists, whether the transaction place carries out different-place transaction and the like. When the transaction information does not accord with the transaction rule of a normal transaction, the transaction information is defined as triggering the abnormal rule, and the transaction information is judged to be abnormal.
When transaction information is abnormal, reporting the transaction information to an intelligent contract of a blockchain network, and when an alarm rule in the intelligent contract is acquired and a processing type corresponding to the alarm rule is fed back to a client, the method further comprises the following steps: the alarm rule comprises a plurality of alarm triggering conditions, and each alarm triggering condition corresponds to at least one processing type; when any alarm triggering condition is triggered by the transaction information, the corresponding processing type is acquired, and the processing type is fed back to the client.
Because the transaction abnormality reasons of the transaction information are various, the step of the sample is provided with a plurality of alarm triggering conditions and corresponding processing types for each transaction abnormality. For example, the transaction information triggers an alarm triggering condition corresponding to the processing type because the transaction amount exceeds a certain threshold. If the threshold value is exceeded, another alarm triggering condition is triggered, corresponding to another processing type. And the blockchain network acquires the corresponding processing type from the intelligent contract according to the triggered alarm triggering condition and then sends the processing type to the client node. And the client node processes the transaction exception according to the processing type fed back by the blockchain network.
According to the embodiment, the transaction flow is monitored through the transaction monitoring event, the transaction abnormal situation is captured in time, the abnormal situation is processed in time, the delay processing problem that the abnormal situation is located from a new position in the later period and the abnormal reason is found out for processing is solved, the normal transaction can be ensured, and the abnormal risk is reduced.
In one embodiment, the alert rule further includes a process execution script corresponding to the process type; when any alarm triggering condition is triggered by the transaction information, a processing execution script is called, alarm processing is automatically carried out, and a processing result and a processing type are fed back to the client.
The processing execution script corresponding to the processing type is preset in the blockchain network, so that when abnormal conditions occur in the transaction information, the processing execution script is executed according to the alarm triggering condition, the purpose of automatically solving the abnormal conditions is achieved, and a solution is not required to be responded by a client according to the processing type. The processing execution script comprises means for processing and automatically sending short messages, automatically sending mails and the like according to the contact information in the information of the two parties of the transaction. The embodiment realizes automatic transaction exception handling and improves the transaction exception handling efficiency.
Step S3, logging out transaction monitoring events: when the transaction information completes the transaction in the blockchain network, the transaction monitoring event corresponding to the transaction information is automatically logged out.
And when the transaction monitoring event corresponding to the transaction information is automatically logged out, invoking an unregisterTxEvent event in the Eventhub to log out the transaction monitoring event.
When the transaction information completes the transaction in the blockchain network, the block corresponding to the transaction information is defined as being broadcast and verified by nodes in the blockchain network, and the block corresponding to the transaction information completes the uplink. At this time, no need to monitor the transaction information, so this step automatically completes logout through the unregisterTxEvent event of Eventhub.
After logging off the transaction monitoring event, the transaction abnormal information is classified and stored according to a preset classification mode which comprises a mode of classifying according to alarm triggering conditions of the transaction abnormal information and is used as a reference scheme for solving the transaction abnormal subsequently.
In one embodiment, a corresponding transaction listening event is automatically registered for each transaction message, as shown in fig. 2, and further includes step S4:
step S401, register block listens for events: if the automatic registration of the transaction information fails to correspond to the transaction monitoring event, registering a corresponding block monitoring event for a block generated by the transaction information in the blockchain network, and storing the transaction information in a message queue.
In order to cope with the problem that when the automatic registration transaction monitoring event in the step S1 is likely to fail, the real-time monitoring of the transaction information cannot be realized, when the block node registration block monitoring event is generated in the transaction information, a preset Eventhub event processing center is called to automatically register a block monitoring event for each block during registration, and the corresponding transaction information is stored in a message queue.
Step S402, monitor abnormal situation of block: and calling a block monitoring event to monitor the block, reporting transaction information corresponding to the block to the intelligent contract in a message queue when the block is abnormal, acquiring an alarm rule in the intelligent contract, and feeding back a processing type corresponding to the alarm rule to the client.
When the block is monitored, the method comprises the following steps: invoking a block monitoring event to acquire a block, calculating transaction information in the block through a hash algorithm to generate a verification hash value, comparing the verification hash value with the hash value of the current block in the block, and judging that the block is abnormal if the verification hash value is inconsistent with the hash value of the current block in the block; if the hash values of the previous block and the hash values of the current block in the blocks are consistent with each other, comparing the hash values of the previous block and the hash values of the current block with the block chain list, judging whether the hash values of the previous block and the hash values of the current block are connected end to end, and if the hash values of the current block and the hash values of the current block are not connected end to end, judging that the blocks are abnormal.
In the embodiment, when the block is monitored, abnormal verification is performed through two steps, the first step is to perform a hash algorithm again on the transaction information of the block to obtain a verification hash value, compare the verification hash value with the hash value generated in the block header, and if the verification hash value is inconsistent with the hash value, the transaction information in the block is tampered, and the block abnormality is judged to occur. If the hash values are consistent, performing a second step of verification, namely comparing the hash value of the previous block in the block head, the hash value of the current block with the data stored in the block chain list. Typically, all nodes in the blockchain network and the network layer in the blockchain network hold a blockchain list that holds hash values for all blocks that have been processed, and these hash values are connected end-to-end with each other. If the two hash values of the monitored block are not connected end to end, judging that the block is abnormal.
Step S403, cancel block snoop event: when the block completes the uplink in the block chain network, the block monitoring event corresponding to the block is automatically canceled.
When the monitored block is broadcast and all nodes in the blockchain network are verified, and after the uplink is completed, the block does not need to be monitored again, so that the step automatically completes the cancellation of the block monitoring event through the unregisterTxEvent event of Eventhub.
In this embodiment, if the transaction information cannot be directly monitored, the transaction information is monitored by monitoring whether the block is abnormal, and when the block is abnormal, the transaction information in the message queue is matched with the alarm rule in the intelligent contract, and the matching process is the same as step S2.
According to the transaction monitoring method based on the blockchain, as shown in fig. 3, whether abnormal conditions occur in the transaction information or not is monitored in real time by automatically registering a transaction monitoring event for each transaction information initiated by the client, and after the abnormal conditions occur, the corresponding processing types can be fed back to the client in time through an alarm rule, so that the blank of real-time processing abnormal monitoring in the block-out monitoring is made up. In the embodiment, when the registering transaction monitoring event fails, a coping scheme is provided, namely, a block monitoring event is registered for a block, transaction information is monitored again in a block monitoring mode, and when the block is abnormal, the corresponding processing type is fed back to the client through an alarm rule, so that normal operation of the transaction is ensured. Before the processing type is fed back to the client, the embodiment also realizes automatic transaction exception handling by calling the processing execution script for exception conditions, and improves the transaction exception handling efficiency.
In one embodiment, a transaction listening device based on blockchain is provided, as shown in fig. 4, including the following modules:
the transaction monitoring event registering module is used for acquiring transaction information initiated by a client in the blockchain network and automatically registering a corresponding transaction monitoring event for each transaction information;
the monitoring module is used for calling the transaction monitoring event, monitoring each transaction message, reporting the transaction message to an intelligent contract of the blockchain network when the transaction message is abnormal, acquiring an alarm rule in the intelligent contract, and feeding back a processing type corresponding to the alarm rule to the client;
and the transaction logging-off monitoring event module is used for automatically logging off the transaction monitoring event corresponding to the transaction information after the transaction information completes the transaction in the blockchain network.
In one embodiment, a computer device is provided, including a memory and a processor, where the memory stores computer readable instructions that, when executed by the processor, cause the processor to implement the steps in the blockchain-based transaction listening method of the embodiments described above when executing the computer readable instructions.
In one embodiment, a storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps in the blockchain-based transaction listening method of the embodiments described above is presented.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program to instruct related hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above-described embodiments represent only some exemplary embodiments of the invention, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (8)

1. A blockchain-based transaction listening method, comprising:
acquiring transaction information initiated by a client in a blockchain network, and automatically registering a corresponding transaction monitoring event for each transaction information;
invoking the transaction monitoring event to monitor each transaction message, reporting the transaction message to an intelligent contract of the blockchain network when the transaction message is abnormal, acquiring an alarm rule in the intelligent contract, and feeding back a processing type corresponding to the alarm rule to the client;
when the transaction information completes the transaction in the blockchain network, automatically logging out the transaction monitoring event corresponding to the transaction information;
automatically registering a corresponding transaction listening event for each transaction message, comprising:
if the transaction information is automatically registered and the corresponding transaction monitoring event fails, registering a corresponding block monitoring event for a block generated by the transaction information in the block chain network, and storing the transaction information in a message queue;
calling the block monitoring event to monitor the block, reporting the transaction information corresponding to the block to the intelligent contract in the message queue when the block is abnormal, acquiring an alarm rule in the intelligent contract, and feeding back a processing type corresponding to the alarm rule to the client;
when the block completes the uplink in the block chain network, automatically canceling the block monitoring event corresponding to the block;
the calling the block monitoring event to monitor the block comprises the following steps:
invoking the block monitoring event to acquire the block, calculating transaction information in the block through a hash algorithm to generate a verification hash value, comparing the verification hash value with the hash value of the current block in the block, and judging that the block is abnormal if the verification hash value is inconsistent with the hash value of the current block in the block;
if so, comparing the hash value of the previous block in the blocks, the hash value of the current block with a block chain list, judging whether the hash value of the previous block and the hash value of the current block are connected end to end, and if not, judging that the block is abnormal.
2. The blockchain-based transaction listening method of claim 1, wherein the invoking the transaction listening event listens for each piece of transaction information, comprising:
and calling the transaction monitoring event, acquiring the transaction information, calling an abnormal rule in the intelligent contract, matching the transaction information with the abnormal rule, and judging that the transaction information is abnormal in transaction if the transaction information triggers the abnormal rule.
3. The blockchain-based transaction listening method of claim 1, wherein the obtaining the alert rule in the smart contract and feeding back the processing type corresponding to the alert rule to the client includes:
the alarm rule comprises a plurality of alarm triggering conditions, and each alarm triggering condition corresponds to at least one processing type;
when the transaction information triggers any alarm triggering condition, a corresponding processing type is acquired, and the processing type is fed back to the client.
4. The blockchain-based transaction listening method of claim 3, wherein the alert rule further includes a process execution script corresponding to the process type;
when the transaction information triggers any alarm triggering condition, the processing execution script is called, alarm processing is automatically carried out, and a processing result and the processing type are fed back to the client.
5. The blockchain-based transaction monitoring method of claim 1, wherein when a corresponding transaction monitoring event is automatically registered for each transaction message, a preset EventHub event processing center is called to automatically register the transaction monitoring event;
and when the transaction monitoring event corresponding to the transaction information is automatically logged out, invoking an unregisterTxEvent event in the Eventhub to log out the transaction monitoring event.
6. A blockchain-based transaction listening device, comprising:
the transaction monitoring event registering module is used for acquiring transaction information initiated by a client in the blockchain network and automatically registering a corresponding transaction monitoring event for each transaction information;
the monitoring module is used for calling the transaction monitoring event, monitoring each transaction message, reporting the transaction message to an intelligent contract of the blockchain network when the transaction message is abnormal, acquiring an alarm rule in the intelligent contract, and feeding back a processing type corresponding to the alarm rule to the client;
the transaction logging-off monitoring event module is configured to automatically log off the transaction monitoring event corresponding to the transaction information after the transaction information completes the transaction in the blockchain network;
the transaction monitoring event registering module is specifically configured to register a corresponding block monitoring event for a block generated by the transaction information in the blockchain network and store the transaction information in a message queue if the automatic registration of the transaction information fails;
calling the block monitoring event to monitor the block, reporting the transaction information corresponding to the block to the intelligent contract in the message queue when the block is abnormal, acquiring an alarm rule in the intelligent contract, and feeding back a processing type corresponding to the alarm rule to the client;
when the block completes the uplink in the block chain network, automatically canceling the block monitoring event corresponding to the block;
the register transaction monitoring event module is specifically configured to call the block monitoring event, acquire the block, calculate transaction information in the block through a hash algorithm to generate a verification hash value, compare the verification hash value with a hash value of a current block in the block, and if the verification hash value is inconsistent with the hash value of the current block in the block, judge that the block is abnormal;
if so, comparing the hash value of the previous block in the blocks, the hash value of the current block with a block chain list, judging whether the hash value of the previous block and the hash value of the current block are connected end to end, and if not, judging that the block is abnormal.
7. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions that, when executed by the processor, cause the processor to perform the steps of the blockchain-based transaction listening method of any one of claims 1 to 5.
8. A storage medium storing computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the blockchain-based transaction listening method of any of claims 1 to 5.
CN201811265445.7A 2018-10-29 2018-10-29 Transaction monitoring method, device, equipment and storage medium based on blockchain Active CN109670950B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811265445.7A CN109670950B (en) 2018-10-29 2018-10-29 Transaction monitoring method, device, equipment and storage medium based on blockchain
PCT/CN2018/124621 WO2020087739A1 (en) 2018-10-29 2018-12-28 Block chain-based transaction detecting method, apparatus, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811265445.7A CN109670950B (en) 2018-10-29 2018-10-29 Transaction monitoring method, device, equipment and storage medium based on blockchain

Publications (2)

Publication Number Publication Date
CN109670950A CN109670950A (en) 2019-04-23
CN109670950B true CN109670950B (en) 2023-09-15

Family

ID=66141715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811265445.7A Active CN109670950B (en) 2018-10-29 2018-10-29 Transaction monitoring method, device, equipment and storage medium based on blockchain

Country Status (2)

Country Link
CN (1) CN109670950B (en)
WO (1) WO2020087739A1 (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110659142A (en) * 2019-08-02 2020-01-07 平安科技(深圳)有限公司 Message queue processing method and device, electronic equipment and storage medium
CN111127208A (en) * 2019-12-30 2020-05-08 上海金仕达软件科技有限公司 Abnormal transaction real-time monitoring system and calculation method
CN111369221B (en) * 2020-03-09 2023-07-04 浙江大学 Intelligent contract monitoring method and system for block chain supervision
CN111475520B (en) * 2020-04-10 2022-05-13 厦门慢雾科技有限公司 Method and system for automatically monitoring and alarming block data
CN111563002B (en) * 2020-05-15 2023-07-25 中国工商银行股份有限公司 Transaction fault processing method and device, electronic equipment and storage medium
CN111861747A (en) 2020-07-08 2020-10-30 支付宝(杭州)信息技术有限公司 Transaction link exception handling method and device and electronic equipment
CN112949985B (en) * 2021-02-01 2023-08-11 南方电网能源发展研究院有限责任公司 Power grid engineering supervision method and device based on block chain and computer equipment
CN112837155A (en) * 2021-02-10 2021-05-25 中国人民银行数字货币研究所 Method and device for registering and executing intelligent contracts in block chain
CN113282864A (en) * 2021-06-15 2021-08-20 支付宝(杭州)信息技术有限公司 Webpage processing method and system
CN113572812A (en) * 2021-06-21 2021-10-29 中盾创新档案管理(北京)有限公司 File block synchronization method based on distributed cloud platform
CN113760651B (en) * 2021-08-12 2024-04-02 熵链科技(福建)有限公司 Main sub-chain running state collection method, system and storage medium of block chain
CN113761559A (en) * 2021-09-08 2021-12-07 霍普智库(南京)信息科技有限公司 AI training data storage management system based on block chain
CN113722125B (en) * 2021-09-08 2024-01-26 浙江中控技术股份有限公司 Data processing method and system based on distributed subscription and release network
CN113849563A (en) * 2021-09-24 2021-12-28 中国农业银行股份有限公司 Information sharing method, device and system
CN116012150A (en) * 2022-07-25 2023-04-25 天津理工大学 Bit coin transaction autonomous message extraction and analysis method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506203A (en) * 2016-10-25 2017-03-15 杭州云象网络技术有限公司 A kind of monitoring nodes system for being applied to block chain
CN106951185A (en) * 2017-03-01 2017-07-14 武汉爱宁智慧科技有限公司 A kind of health detection data management system and method based on block chain technology
KR101814989B1 (en) * 2017-07-06 2018-01-05 주식회사 케이뱅크은행 Method of detecting fraud financial trade and server performing the same
CN107862600A (en) * 2017-10-24 2018-03-30 深圳四方精创资讯股份有限公司 Bank transfer method and its system based on block chain

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10157078B2 (en) * 2016-04-10 2018-12-18 Bank Of America Corporation System for transforming large scale electronic processing using application block chain
US10984081B2 (en) * 2016-09-30 2021-04-20 Cable Television Laboratories, Inc. Systems and methods for secure person to device association
CN107819749A (en) * 2017-10-26 2018-03-20 平安科技(深圳)有限公司 Block catenary system and transaction data processing method based on ether mill

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506203A (en) * 2016-10-25 2017-03-15 杭州云象网络技术有限公司 A kind of monitoring nodes system for being applied to block chain
CN106951185A (en) * 2017-03-01 2017-07-14 武汉爱宁智慧科技有限公司 A kind of health detection data management system and method based on block chain technology
KR101814989B1 (en) * 2017-07-06 2018-01-05 주식회사 케이뱅크은행 Method of detecting fraud financial trade and server performing the same
CN107862600A (en) * 2017-10-24 2018-03-30 深圳四方精创资讯股份有限公司 Bank transfer method and its system based on block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
hyperledger fabric的区块事件;mellymengyan;《CSDN》;第1-4页 *

Also Published As

Publication number Publication date
CN109670950A (en) 2019-04-23
WO2020087739A1 (en) 2020-05-07

Similar Documents

Publication Publication Date Title
CN109670950B (en) Transaction monitoring method, device, equipment and storage medium based on blockchain
US11323471B2 (en) Advanced cybersecurity threat mitigation using cyberphysical graphs with state changes
US11089045B2 (en) User and entity behavioral analysis with network topology enhancements
US10594714B2 (en) User and entity behavioral analysis using an advanced cyber decision platform
US10498744B2 (en) Integrity monitoring in a local network
US11968227B2 (en) Detecting KERBEROS ticket attacks within a domain
US20230123314A1 (en) Detecting and mitigating attacks using forged authentication objects within a domain
US20180295154A1 (en) Application of advanced cybersecurity threat mitigation to rogue devices, privilege escalation, and risk-based vulnerability and patch management
US20220377093A1 (en) System and method for data compliance and prevention with threat detection and response
US9602530B2 (en) System and method for predicting impending cyber security events using multi channel behavioral analysis in a distributed computing environment
US20220263860A1 (en) Advanced cybersecurity threat hunting using behavioral and deep analytics
US20180121676A1 (en) System and method for securing personal data elements
US11074652B2 (en) System and method for model-based prediction using a distributed computational graph workflow
US20230308459A1 (en) Authentication attack detection and mitigation with embedded authentication and delegation
US11122143B2 (en) Comparison of behavioral populations for security and compliance monitoring
WO2019018829A1 (en) Advanced cybersecurity threat mitigation using behavioral and deep analytics
CN114208114A (en) Multi-view security context per participant
US20230412620A1 (en) System and methods for cybersecurity analysis using ueba and network topology data and trigger - based network remediation
CN114826790B (en) Block chain monitoring method, device, equipment and storage medium
US20090222876A1 (en) Positive multi-subsystems security monitoring (pms-sm)
EP3679506A2 (en) Advanced cybersecurity threat mitigation for inter-bank financial transactions
US11609835B1 (en) Evaluating machine and process performance in distributed system
CN111258860B (en) Data alarm method, device, computer equipment and storage medium
WO2021072844A1 (en) Cloud platform host node monitoring method, apparatus, and computer device
CN114168413A (en) Server operation and maintenance processing method and device based on block chain and computer equipment

Legal Events

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