WO2023050620A1 - 一种分布式区块链系统用户异常行为监测方法及系统 - Google Patents

一种分布式区块链系统用户异常行为监测方法及系统 Download PDF

Info

Publication number
WO2023050620A1
WO2023050620A1 PCT/CN2021/142711 CN2021142711W WO2023050620A1 WO 2023050620 A1 WO2023050620 A1 WO 2023050620A1 CN 2021142711 W CN2021142711 W CN 2021142711W WO 2023050620 A1 WO2023050620 A1 WO 2023050620A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
behavior
user
abnormal
depth
Prior art date
Application number
PCT/CN2021/142711
Other languages
English (en)
French (fr)
Inventor
谢海鹏
王昀
汤凌峰
别朝红
李更丰
Original Assignee
西安交通大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 西安交通大学 filed Critical 西安交通大学
Publication of WO2023050620A1 publication Critical patent/WO2023050620A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries

Definitions

  • the invention belongs to the technical field of risk control involving blockchain transactions, and in particular relates to a method and system for monitoring abnormal behavior of users in a distributed blockchain system.
  • Blockchain is a chained data structure that combines data blocks in a sequential manner in chronological order.
  • the discrimination of abnormal behavior can be attributed to the problem of outlier detection, that is, to find points in a group of data points that are sparsely distributed and far away from the group with high density.
  • Traditional outlier detection technologies such as statistics-based EM algorithm, cluster-based k-means algorithm, density-based DBSCAN algorithm, etc., have high time complexity, difficulty in parameter or model selection, poor detection effect of high-dimensional data, Problems such as the inability to perform distributed computing are often not applicable to big data, distributed, and high-dimensional blockchain systems. Therefore, it is particularly necessary and urgent to study abnormal behavior detection of blockchain systems.
  • the purpose of the present invention is to provide a distributed block chain system user abnormal behavior monitoring method and system to overcome the deficiencies of the prior art.
  • the present invention adopts the following technical solutions:
  • a distributed block chain system user abnormal behavior monitoring method comprising the following steps:
  • S1 collect the behavior data of each user in the blockchain transaction system
  • each node builds an isolated tree at the same time according to the acquired feature data, calculates the data depth and average depth of the isolated tree, and then summarizes the data depth and average depth calculated by each node to calculate the user behavior score. If the user behavior score exceeds the set Threshold, it is judged that the user behavior is abnormal, and the relevant information of the abnormal behavior is composed of an abnormal information block and uploaded to the blockchain, and each node performs self-examination of the corresponding behavior according to the abnormal information block information.
  • the user's behavior data is a vector composed of user account, user login time, login IP, transaction amount, transaction time and transaction type.
  • preprocessing refers to removing incomplete and duplicate data and filling missing data.
  • the desensitization process is specifically to perform hash encryption on the user account and login IP, and convert the user's login time and transaction time into timestamps.
  • data features include login time difference, login IP hash value, transaction amount standard deviation, transaction amount dispersion coefficient, transaction time difference and transaction type number.
  • each node builds an isolated tree at the same time according to the acquired feature data, and calculates the data depth and average depth of the isolated tree, which specifically includes the following steps:
  • step 2) in the left and right branches respectively until the data cannot be further divided or the binary tree reaches the limited maximum depth log 2 (n).
  • the node score calculation method is Among them, E(h(x)) represents the mean value of the path depth of data x in all isolated trees; when 0 ⁇ Score(x) ⁇ 0.5, it proves that data x can be isolated from other data after more binary divisions, so It is considered that the user behavior corresponding to the data is normal; when 0.5 ⁇ Score(x) ⁇ 1, it proves that the data x has undergone fewer binary divisions and is isolated from other data, so it is considered that the user behavior corresponding to the data is abnormal.
  • a distributed block chain system user abnormal behavior monitoring system including a data acquisition module, a preprocessing module and an abnormal monitoring module;
  • the data acquisition module is used to collect the behavior data of each user in the blockchain transaction system, and transmit the acquired data to the preprocessing module;
  • the preprocessing module preprocesses and desensitizes the collected behavior data, and from the preprocessing Extract data features from the desensitized behavior data, and then upload the extracted feature data to form a verification information block to the blockchain, and each node synchronizes the block to obtain the processed feature data;
  • the abnormality monitoring module connects each node , build an isolated tree at each node according to the acquired feature data, calculate the data depth and average depth of the isolated tree, and then summarize the data depth and average depth calculated by each node to calculate the user behavior score.
  • the relevant information of the abnormal behavior is composed of an abnormal information block and uploaded to the blockchain, and each node performs self-examination of the corresponding behavior according to the abnormal information block information.
  • the anomaly monitoring module is calculated according to the node score as Among them, E(h(x)) represents the mean value of the path depth of data x in all isolated trees; when 0 ⁇ Score(x) ⁇ 0.5, it proves that data x can be isolated from other data after more binary divisions, so It is considered that the user behavior corresponding to the data is normal; when 0.5 ⁇ Score(x) ⁇ 1, it proves that the data x has undergone fewer binary divisions and is isolated from other data, and it is considered that the user behavior corresponding to the data is abnormal.
  • the present invention has the following beneficial technical effects:
  • the present invention is a distributed block chain system user abnormal behavior monitoring method, after preprocessing and desensitizing the behavior data of the user, extracting data features from the behavior data after preprocessing and desensitizing processing, and then extracting
  • the data characteristics of the block chain are shared among the various nodes of the blockchain to form a complete data chain.
  • Each node synchronizes the block to obtain the processed characteristic data, and then builds an isolated tree to integrate all data according to the data characteristics of a certain dimension.
  • the abnormal value of the detected data can be obtained, which is conducive to overcoming the high Difficult to monitor data anomalies and low accuracy, and use distributed algorithms to improve computing efficiency and provide reliable guarantees for the security of blockchain system transactions.
  • user behavior data is a vector composed of user account, user login time, login IP, transaction amount, transaction time and transaction type, which can accurately reflect user information and improve calculation accuracy.
  • each node to independently generate an isolated tree, and uploading the tree depth of each data to the system
  • a distributed algorithm not only fits with the distributed decentralized architecture of the blockchain system, but also compares the traditional
  • the method of repeatedly generating isolated trees to form an isolated forest further improves the computational efficiency and speeds up the identification of abnormal behaviors, making the isolated forest algorithm more suitable for practical engineering applications and providing fast and effective security guarantees for blockchain systems.
  • the present invention is a distributed block chain system user abnormal behavior monitoring system, including a data acquisition module, a preprocessing module and an abnormal monitoring module;
  • the data acquisition module is used to collect the behavior data of each user in the blockchain transaction system.
  • the abnormality monitoring module is used to efficiently judge the abnormal behavior of the blockchain transaction system based on the isolated tree.
  • the isolated tree only needs to be calculated through the data itself. It does not need to calculate the density, distance and other indicators of the data, which greatly reduces the calculation time.
  • Fig. 1 is a flow chart of interaction between nodes and a system during anomaly identification in an embodiment of the present invention.
  • Fig. 2 is a flow chart of implementing the isolated forest algorithm in the embodiment of the present invention.
  • a method for monitoring abnormal behavior of users in a distributed blockchain system includes the following steps:
  • S1 collect the behavior data of each user in the blockchain transaction system
  • the system is used to collect the behavior data of each user in the blockchain transaction system.
  • the system refers to the blockchain management system in the private chain to collect the blockchain transaction system.
  • the system is based on consensus between the public chain and the alliance chain.
  • User behavior refers to the user logging into the blockchain trading system or conducting transactions in the blockchain trading system.
  • User behavior data is a vector composed of user account, user login time, login IP, transaction amount, transaction time and transaction type.
  • Preprocessing refers to clearing incomplete and duplicate data and filling in missing data; cleaning up duplicate content of information that appears multiple times on the same user in the behavior data, and retaining one copy; for multiple information data of the same user, complementary retention is carried out, and the same user All the information below is fused to remove duplicate data;
  • Data features include login time difference (i.e. the difference between two consecutive login timestamps) and login IP hash value. Since the hash encryption length is too long and the hash encryption algorithm itself is anti-collision, the hash encryption result can be intercepted.
  • the first 4 digits are the data characteristics of the IP address and the standard deviation of the transaction amount, namely in is the average value of the transaction amount and the dispersion coefficient of the transaction amount, namely Transaction time difference, that is, the difference between two consecutive transaction timestamps and the transaction type number.
  • each node builds an isolated tree at the same time according to the acquired feature data, calculates the data depth and average depth of the isolated tree, and then summarizes the data depth and average depth calculated by each node to calculate the user behavior score. If the user behavior score exceeds the set Threshold, it is judged that the user behavior is abnormal, and the relevant information of the abnormal behavior is composed of an abnormal information block and uploaded to the blockchain, and each node performs self-examination of the corresponding behavior according to the abnormal information block information.
  • each node builds an isolated tree at the same time according to the acquired feature data, and calculates the data depth and average depth of the isolated tree, which specifically includes the following steps:
  • step 2) in the left and right branches respectively until the data cannot be further divided or the binary tree reaches the limited maximum depth log 2 (n);
  • H(n-1) ln(n-1)+0.5772156649.
  • h(x) e+C(T.size).
  • e represents the number of edges that the data passes from the starting point of the isolated tree to the fork where the data is located
  • T.size represents the number of samples that are in the same minimum fork as the data
  • C(T.size) is the number of samples that have reached the maximum depth but Path depth correction for data that can actually still be partitioned.
  • E(h(x)) represents the mean value of the path depth of data x in all isolated trees; when 0 ⁇ Score(x) ⁇ 0.5, it proves that data x can only be isolated from other data after more binary divisions, so It is considered that the user behavior corresponding to the data is normal; when 0.5 ⁇ Score(x) ⁇ 1, it proves that the data x has undergone fewer binary divisions and is isolated from other data, so it is considered that the user behavior corresponding to the data is abnormal.
  • the relevant information of abnormal behavior is composed of abnormal information blocks and uploaded to the blockchain, and each node performs self-examination of corresponding behaviors according to the information of abnormal information blocks.
  • the present invention is a distributed block chain system user abnormal behavior monitoring method, using the isolated forest algorithm to realize the efficient judgment of the abnormal behavior of the block chain transaction system, because the isolated forest algorithm only needs to carry out the calculation through the data itself, and does not need to calculate the data
  • the density, distance and other indicators can greatly reduce the calculation time.
  • the isolation forest model does not need to learn and train existing data, so it can identify new abnormal data, reducing the limitation of only identifying existing or partially preset abnormal behaviors in traditional engineering applications.
  • each node By using each node to independently generate an isolated tree, and upload the tree depth of each data to the system, such a distributed algorithm not only fits with the distributed decentralized architecture of the blockchain system, but also compares the traditional repeated generation on a single device
  • the method of forming an isolated forest from isolated trees further improves the computational efficiency and speeds up the identification of abnormal behaviors, making the isolated forest algorithm more suitable for practical engineering applications and providing fast and effective security guarantees for blockchain systems.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明公开了一种分布式区块链系统用户异常行为监测方法及系统,通过对用户的行为数据进行预处理与脱敏处理后,从预处理与脱敏处理后的行为数据中提取数据特征,然后将提取的数据特征在区块链的各个节点之间共享,形成完整的数据链,各节点同步该区块以获取处理后的特征数据,然后通过构建孤立树,将所有数据根据某个维度的数据特征分散至该孤立树中的多个分叉上,通过计算数据在由多个孤立树构建的孤立森林中的路径深度与平均路径深度,可以得到检测数据的异常值,有利于克服区块链高维大数据异常监测困难、准确率低的问题,并通过采用分布式算法提升计算效率,为区块链系统交易的安全性提供可靠保障。

Description

一种分布式区块链系统用户异常行为监测方法及系统 技术领域
本发明属于涉及区块链交易的风控技术领域,尤其涉及一种分布式区块链系统用户异常行为监测方法及系统。
背景技术
区块链是一种按照时间顺序将数据区块以顺序相连的方式组合成的一种链式数据结构。作为新兴的分布式数据存储技术,由于去中心化、分布式存储等特点,引起了各个行业的高度重视,并正成为驱动各行业技术创新与产业变革的重要力量。
随着区块链技术的日渐成熟与区块链应用的逐步展开,区块链交易的隐私性与安全性受到广泛的关注。传统的区块链系统通过非对称加密的方法对用户真实性进行验证。然而,当攻击者通过区块链外的网络攻击形式截取到用户的密钥时,就可以直接控制用户在区块链交易系统中做出欺骗性交易行为。因此,如何对区块链交易中的异常行为进行准确判别与筛选成为研究的重点。
异常行为的判别可以归结为异常点检测问题,即在一群数据点中找寻分布稀疏且距离密度高的群体较远的点。传统的异常点检测技术,如基于统计学的EM算法、基于聚类的k-means算法、基于密度的DBSCAN算法等存在着时间复杂度大、参数或模型选取困难、高维数据检测效果差、无法进行分布式计算等问题,对于大数据、分布式、高维度的区块链系统往往并不适用。因此,研究区块链系统的异常行为检测显得尤为必要和迫切。
发明内容
本发明的目的在于提供一种分布式区块链系统用户异常行为监测方法及系统,以克服现有技术的不足。
为达到上述目的,本发明采用如下技术方案:
一种分布式区块链系统用户异常行为监测方法,包括以下步骤:
S1,采集区块链交易系统中每个用户的行为数据;
S2,对采集的行为数据进行预处理与脱敏处理;
S3,从预处理与脱敏处理后的行为数据中提取数据特征;
S4,将提取的特征数据组成验证信息区块上传至区块链,各节点同步该区块以获取处理后的特征数据;
S5,各节点根据获取的特征数据同时构建孤立树,计算孤立树的数据深度与平均深度,然后将各节点计算的数据深度与平均深度汇总后对计算用户行为评分,若用户行为评分超过设定阈值,则判断用户行为为异常,并将异常行为的相关信息组成异常信息区块上传至区块链,各节点根据异常信息区块信息进行对应行为的自查。
进一步的,用户的行为数据是由用户账号、用户登录时间、登录IP、交易金额、交易时间和交易类型构成的向量。
进一步的,预处理是指清除残缺与重复数据,填充缺失数据。
进一步的,脱敏处理具体是对用户账号与登录IP进行哈希加密,将用户的登录时间与交易时间转化为时间戳。
进一步的,数据特征包括登录时间差、登录IP哈希值、交易金额标准差、交易金额离散系数、交易时间差与交易类型编号。
进一步的,各节点根据获取的特征数据同时构建孤立树,计算孤立树的 数据深度与平均深度,具体包括以下步骤:
1)在所有数据中随机选择n个样本,进行孤立树的生成;
2)随机选择n个样本的同一数据特征,在该特征的最大值和最小值之间随机选择一个值,对样本进行二叉划分,将样本中小于该取值的数据划到该层树的左分支,大于等于该取值的划到该层树的右分支;
3)分别在左右分支中重复步骤2),直至数据不可再分或二叉树达到限定的最大深度log 2(n)。
进一步的,孤立树中所有数据的平均路径深度为
Figure PCTCN2021142711-appb-000001
其中,H(n-1)=ln(n-1)+0.5772156649,对于任意数据,其在某棵孤立树的路径深度为h(x)=e+C(T.size),其中,e代表数据从孤立树的起点到数据所在分叉经过的边的数目,T.size代表与该数据在同一最小分叉的样本数目,C(T.size)是对已达最大深度但实际上仍能继续划分的数据的路径深度修正。
进一步的,根据各节点计算的数据深度与平均深度汇总后对计算用户行为评分,并判断用户行为是否异常:节点评分计算方法为
Figure PCTCN2021142711-appb-000002
其中,E(h(x))表示数据x在所有孤立树的路径深度均值;当0<Score(x)<0.5时,证明数据x经过更多次的二叉划分才能与其他数据孤立,因此认为该数据对应的用户行为正常;当0.5<Score(x)<1时,证明数据x经过更少次的二叉划分即与其他数据孤立,因此认为该数据对应的用户行为存在异常。
一种分布式区块链系统用户异常行为监测系统,包括数据采集模块,预处理模块和异常监测模块;
数据采集模块用于采集区块链交易系统中每个用户的行为数据,并将获取的数据传输至预处理模块;预处理模块对采集的行为数据进行预处理与脱 敏处理,并且从预处理与脱敏处理后的行为数据中提取数据特征,然后将提取的特征数据组成验证信息区块上传至区块链,各节点同步该区块以获取处理后的特征数据;异常监测模块连接各节点,在各节点根据获取的特征数据同时构建孤立树,计算孤立树的数据深度与平均深度,然后将各节点计算的数据深度与平均深度汇总后对计算用户行为评分,若用户行为评分超过设定阈值,则判断用户行为为异常,并将异常行为的相关信息组成异常信息区块上传至区块链,各节点根据异常信息区块信息进行对应行为的自查。
进一步的,异常监测模块根据节点评分计算方法为
Figure PCTCN2021142711-appb-000003
其中,E(h(x))表示数据x在所有孤立树的路径深度均值;当0<Score(x)<0.5时,证明数据x经过更多次的二叉划分才能与其他数据孤立,因此认为该数据对应的用户行为正常;当0.5<Score(x)<1时,证明数据x经过更少次的二叉划分即与其他数据孤立,认为该数据对应的用户行为存在异常。
与现有技术相比,本发明具有以下有益的技术效果:
本发明一种分布式区块链系统用户异常行为监测方法,通过对用户的行为数据进行预处理与脱敏处理后,从预处理与脱敏处理后的行为数据中提取数据特征,然后将提取的数据特征在区块链的各个节点之间共享,形成完整的数据链,各节点同步该区块以获取处理后的特征数据,然后通过构建孤立树,将所有数据根据某个维度的数据特征分散至该孤立树中的多个分叉上,通过计算数据在由多个孤立树构建的孤立森林中的路径深度与平均路径深度,可以得到检测数据的异常值,有利于克服区块链高维大数据异常监测困难、准确率低的问题,并通过采用分布式算法提升计算效率,为区块链系统交易的安全性提供可靠保障。
进一步的,用户的行为数据是由用户账号、用户登录时间、登录IP、交易金额、交易时间和交易类型构成的向量,能够准确反应用户信息,提高计算准确度。
进一步的,通过利用各个节点独立生成孤立树,并将各数据的树深度上传至系统,这样的分布式算法不仅与区块链系统分布式去中心的架构相契合,也相比传统在单一设备上重复生成孤立树组成孤立森林的方法进一步提高计算效率,加速了异常行为的判别速度,使得孤立森林算法更加贴合工程实际应用,为区块链系统提供快速有效的安全性保证。
本发明一种分布式区块链系统用户异常行为监测系统,包括数据采集模块,预处理模块和异常监测模块;
数据采集模块用于采集区块链交易系统中每个用户的行为数据,采用异常监测模块基于孤立树实现区块链交易系统的异常行为的高效判断,采用孤立树只需要通过数据本身开展计算,并不需要计算数据的密度、距离等指标,大大降低了计算时间。
附图说明
图1为本发明实施例中异常识别过程中节点与系统的交互流程图。
图2为本发明实施例中孤立森林算法实现流程图。
具体实施方式
下面结合附图对本发明做进一步详细描述:
如图1所示,一种分布式区块链系统用户异常行为监测方法,包括以下步骤:
S1,采集区块链交易系统中每个用户的行为数据;
具体的,利用系统采集区块链交易系统中每个用户的行为数据,所述系 统在私有链中指区块链管理系统采集区块链交易系统,所述系统在公有链与联盟链中根据共识机制随机选取的具有计算能力的某个或多个节点。用户行为指用户登入区块链交易系统或在区块链交易系统中进行交易。用户的行为数据是由用户账号、用户登录时间、登录IP、交易金额、交易时间和交易类型构成的向量。
S2,对采集的行为数据进行预处理与脱敏处理;
预处理是指清除残缺与重复数据,填充缺失数据;对行为数据中同一用户出现多次的信息进行重复部分内容清理,留存一份,对于同一用户多个信息数据,进行互补留存,将同一用于下的所有信息进行融合去除重复数据;
脱敏处理具体是对用户账号与登录IP进行哈希加密,即y IP=SHA256(x IP),其中x IP与y IP为加密前后的IP地址,SHA256是一种防碰撞不可逆的加密算法,将任意字符串转化为64位16进制的加密结果;将用户的登录时间与交易时间转化为时间戳,即y time=timestamp(x time),其中x time与y time为转换前后的时间信息,timestamp是一种时间戳转化算法,可以将时间转化为10位10进制的数字结果。
S3,从预处理与脱敏处理后的行为数据中提取数据特征;
数据特征包括登录时间差(即连续两次登录时间戳的差值)、登录IP哈希值,由于哈希加密长度过长,且哈希加密算法本身的防碰撞性,可以截取哈希加密结果的前4位为IP地址的数据特征、交易金额标准差,即
Figure PCTCN2021142711-appb-000004
其中
Figure PCTCN2021142711-appb-000005
为交易金额的平均值、交易金额离散系数,即
Figure PCTCN2021142711-appb-000006
交易时间差,即连续两次交易时间戳的差值与交易类型编号。
S4,将提取的特征数据组成验证信息区块上传至区块链,各节点同步该 区块以获取处理后的特征数据;
S5,各节点根据获取的特征数据同时构建孤立树,计算孤立树的数据深度与平均深度,然后将各节点计算的数据深度与平均深度汇总后对计算用户行为评分,若用户行为评分超过设定阈值,则判断用户行为为异常,并将异常行为的相关信息组成异常信息区块上传至区块链,各节点根据异常信息区块信息进行对应行为的自查。
如图2所示,各节点根据获取的特征数据同时构建孤立树,计算孤立树的数据深度与平均深度,具体包括以下步骤:
1)在所有数据中随机选择n个样本,进行孤立树的生成;
2)随机选择n个样本的同一数据特征,在该特征的最大值和最小值之间随机选择一个值,对样本进行二叉划分。将样本中小于该取值的数据划到该层树的左分支,大于等于该取值的划到该层树的右分支。
3)分别在左右分支中重复步骤2),直至数据不可再分或二叉树达到限定的最大深度log 2(n);
4)孤立树中所有数据的平均路径深度为
Figure PCTCN2021142711-appb-000007
其中,H(n-1)=ln(n-1)+0.5772156649。对于任意数据,其在某棵孤立树的路径深度为h(x)=e+C(T.size)。其中,e代表数据从孤立树的起点到数据所在分叉经过的边的数目,T.size代表与该数据在同一最小分叉的样本数目,C(T.size)是对已达最大深度但实际上仍能继续划分的数据的路径深度修正。
根据各节点计算的数据深度与平均深度汇总后对计算用户行为评分,并判断用户行为是否异常。节点评分计算方法为
Figure PCTCN2021142711-appb-000008
其中,E(h(x))表示数据x在所有孤立树的路径深度均值;当0<Score(x)<0.5时,证明数据x 经过更多次的二叉划分才能与其他数据孤立,因此认为该数据对应的用户行为正常;当0.5<Score(x)<1时,证明数据x经过更少次的二叉划分即与其他数据孤立,因此认为该数据对应的用户行为存在异常。并将异常行为的相关信息组成异常信息区块上传至区块链,各节点根据异常信息区块信息进行对应行为的自查。
本发明一种分布式区块链系统用户异常行为监测方法,采用孤立森林算法实现区块链交易系统的异常行为的高效判断,由于孤立森林算法只需要通过数据本身开展计算,并不需要计算数据的密度、距离等指标,大大降低了计算时间。此外,孤立森林模型不需要对已有的数据进行学习与训练,因此可以识别出新的异常数据,减小了传统工程应用中仅能识别现有或部分预设异常行为的局限性。
通过利用各个节点独立生成孤立树,并将各数据的树深度上传至系统,这样的分布式算法不仅与区块链系统分布式去中心的架构相契合,也相比传统在单一设备上重复生成孤立树组成孤立森林的方法进一步提高计算效率,加速了异常行为的判别速度,使得孤立森林算法更加贴合工程实际应用,为区块链系统提供快速有效的安全性保证。
通过构建孤立树,将所有数据根据某个维度的数据特征分散至该孤立树中的多个分叉上。对于异常数据,由于具有某些较为明显的数据特征,通常会被分散在距离树根更近的位置。通过计算数据在由多个孤立树构建的孤立森林中的路径深度与平均路径深度,可以得到检测数据的异常值,该值越大,则说明该数据更有可能是异常数据,有利于克服区块链高维大数据异常监测困难、准确率低的问题,并通过采用分布式算法提升计算效率,为区块链系统交易的安全性提供可靠保障。

Claims (10)

  1. 一种分布式区块链系统用户异常行为监测方法,其特征在于,包括以下步骤:
    S1,采集区块链交易系统中每个用户的行为数据;
    S2,对采集的行为数据进行预处理与脱敏处理;
    S3,从预处理与脱敏处理后的行为数据中提取数据特征;
    S4,将提取的特征数据组成验证信息区块上传至区块链,各节点同步该区块以获取处理后的特征数据;
    S5,各节点根据获取的特征数据同时构建孤立树,计算孤立树的数据深度与平均深度,然后将各节点计算的数据深度与平均深度汇总后对计算用户行为评分,若用户行为评分超过设定阈值,则判断用户行为为异常,并将异常行为的相关信息组成异常信息区块上传至区块链,各节点根据异常信息区块信息进行对应行为的自查。
  2. 根据权利要求1所述的一种分布式区块链系统用户异常行为监测方法,其特征在于,用户的行为数据是由用户账号、用户登录时间、登录IP、交易金额、交易时间和交易类型构成的向量。
  3. 根据权利要求1所述的一种分布式区块链系统用户异常行为监测方法,其特征在于,预处理是指清除残缺与重复数据,填充缺失数据。
  4. 根据权利要求1所述的一种分布式区块链系统用户异常行为监测方法,其特征在于,脱敏处理具体是对用户账号与登录IP进行哈希加密,将用户的登录时间与交易时间转化为时间戳。
  5. 根据权利要求1所述的一种分布式区块链系统用户异常行为监测方法,其特征在于,数据特征包括登录时间差、登录IP哈希值、交易金额标准差、交易金额离散系数、交易时间差与交易类型编号。
  6. 根据权利要求1所述的一种分布式区块链系统用户异常行为监测方法,其特征在于,各节点根据获取的特征数据同时构建孤立树,计算孤立树的数据深度与平均深度,具体包括以下步骤:
    1)在所有数据中随机选择n个样本,进行孤立树的生成;
    2)随机选择n个样本的同一数据特征,在该特征的最大值和最小值之间随机选择一个值,对样本进行二叉划分,将样本中小于该取值的数据划到该层树的左分支,大于等于该取值的划到该层树的右分支;
    3)分别在左右分支中重复步骤2),直至数据不可再分或二叉树达到限定的最大深度log 2(n)。
  7. 根据权利要求6所述的一种分布式区块链系统用户异常行为监测方法,其特征在于,孤立树中所有数据的平均路径深度为
    Figure PCTCN2021142711-appb-100001
    其中,H(n-1)=ln(n-1)+0.5772156649,对于任意数据,其在某棵孤立树的路径深度为h(x)=e+C(T.size),其中,e代表数据从孤立树的起点到数据所在分叉经过的边的数目,T.size代表与该数据在同一最小分叉的样本数目,C(T.size)是对已达最大深度但实际上仍能继续划分的数据的路径深度修正。
  8. 根据权利要求6所述的一种分布式区块链系统用户异常行为监测方法,其特征在于,根据各节点计算的数据深度与平均深度汇总后对计算用户行为评分,并判断用户行为是否异常:节点评分计算方法为
    Figure PCTCN2021142711-appb-100002
    其中,E(h(x))表示数据x在所有孤立树的路径深度均值;当0<Score(x)<0.5时,证明数据x经过更多次的二叉划分才能与其他数据孤立,因此认为该数据对应的用户行为正常;当0.5<Score(x)<1时,证明数据x经过更少次的二叉划分即与其他数据孤立,因此认为该数据对应的用户行为存在异常。
  9. 一种分布式区块链系统用户异常行为监测系统,其特征在于,包括数据采集模块,预处理模块和异常监测模块;
    数据采集模块用于采集区块链交易系统中每个用户的行为数据,并将获取的数据传输至预处理模块;预处理模块对采集的行为数据进行预处理与脱敏处理,并且从预处理与脱敏处理后的行为数据中提取数据特征,然后将提取的特征数据组成验证信息区块上传至区块链,各节点同步该区块以获取处理后的特征数据;异常监测模块连接各节点,在各节点根据获取的特征数据同时构建孤立树,计算孤立树的数据深度与平均深度,然后将各节点计算的数据深度与平均深度汇总后对计算用户行为评分,若用户行为评分超过设定阈值,则判断用户行为为异常,并将异常行为的相关信息组成异常信息区块上传至区块链,各节点根据异常信息区块信息进行对应行为的自查。
  10. 根据权利要求9所述的一种分布式区块链系统用户异常行为监测系统,其特征在于,异常监测模块根据节点评分计算方法为
    Figure PCTCN2021142711-appb-100003
    其中,E(h(x))表示数据x在所有孤立树的路径深度均值;当0<Score(x)<0.5时,证明数据x经过更多次的二叉划分才能与其他数据孤立,因此认为该数据对应的用户行为正常;当0.5<Score(x)<1时,证明数据x经过更少次的二叉划分即与其他数据孤立,认为该数据对应的用户行为存在异常。
PCT/CN2021/142711 2021-09-29 2021-12-29 一种分布式区块链系统用户异常行为监测方法及系统 WO2023050620A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111153349.5A CN113961434A (zh) 2021-09-29 2021-09-29 一种分布式区块链系统用户异常行为监测方法及系统
CN202111153349.5 2021-09-29

Publications (1)

Publication Number Publication Date
WO2023050620A1 true WO2023050620A1 (zh) 2023-04-06

Family

ID=79463306

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/142711 WO2023050620A1 (zh) 2021-09-29 2021-12-29 一种分布式区块链系统用户异常行为监测方法及系统

Country Status (2)

Country Link
CN (1) CN113961434A (zh)
WO (1) WO2023050620A1 (zh)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116823816A (zh) * 2023-08-28 2023-09-29 济南正邦电子科技有限公司 一种基于安防监控静态存储器的检测设备及检测方法
CN116827971A (zh) * 2023-08-29 2023-09-29 北京国网信通埃森哲信息技术有限公司 基于区块链的碳排放数据存储与传输方法、装置与设备
CN116911806A (zh) * 2023-09-11 2023-10-20 湖北华中电力科技开发有限责任公司 基于互联网+的电力企业能源信息管理系统
CN117150244A (zh) * 2023-10-30 2023-12-01 山东凯莱电气设备有限公司 基于电参数分析的智能配电柜状态监测方法及系统
CN117201203A (zh) * 2023-11-07 2023-12-08 西安芝麻数据科技发展有限公司 基于区块链的供应链数据安全共享系统及方法
CN117370898A (zh) * 2023-12-08 2024-01-09 钛合联(深圳)科技有限公司 一种电子数据安全管控系统
CN117454283A (zh) * 2023-12-22 2024-01-26 深圳前海慧联科技发展有限公司 一种用于风电机组运行检测数据的状态评估方法
CN117454096A (zh) * 2023-12-25 2024-01-26 西安高商智能科技有限责任公司 一种电机生产质量检测方法及系统
CN117632937A (zh) * 2023-12-06 2024-03-01 北京开元泰达净化设备有限公司 一种工业互联网大数据平台及数据处理方法

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114116733B (zh) * 2022-01-26 2022-04-19 国网区块链科技(北京)有限公司 配电自动化系统数据异常操作检测和追溯系统及方法
CN115660689A (zh) * 2022-11-03 2023-01-31 淮阴工学院 一种基于区块链金融诈骗的用户行为监测方法及装置
CN116663871B (zh) * 2023-08-02 2023-10-13 苏州安极能新能源发展有限公司 用电需求量预测方法及系统
CN117408734B (zh) * 2023-12-15 2024-03-19 广东云百科技有限公司 基于物联网设备的客户信息智能管理系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109859029A (zh) * 2019-01-04 2019-06-07 深圳壹账通智能科技有限公司 异常申请检测方法、装置、计算机设备以及存储介质
CN111798312A (zh) * 2019-08-02 2020-10-20 深圳索信达数据技术有限公司 一种基于孤立森林算法的金融交易系统异常识别方法
CN111833172A (zh) * 2020-05-25 2020-10-27 百维金科(上海)信息科技有限公司 一种基于孤立森林的消费信贷欺诈行为检测方法及其系统
US20210160266A1 (en) * 2019-11-27 2021-05-27 Telefonaktiebolaget Lm Ericsson (Publ) Computer-implemented method and arrangement for classifying anomalies
CN113034145A (zh) * 2021-05-24 2021-06-25 浙江中科华知科技股份有限公司 用户异常加密数字资产交易类别判断方法、装置
CN113283901A (zh) * 2021-04-19 2021-08-20 河南大学 一种面向区块链平台的基于字节码的诈骗合约检测方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109859029A (zh) * 2019-01-04 2019-06-07 深圳壹账通智能科技有限公司 异常申请检测方法、装置、计算机设备以及存储介质
CN111798312A (zh) * 2019-08-02 2020-10-20 深圳索信达数据技术有限公司 一种基于孤立森林算法的金融交易系统异常识别方法
US20210160266A1 (en) * 2019-11-27 2021-05-27 Telefonaktiebolaget Lm Ericsson (Publ) Computer-implemented method and arrangement for classifying anomalies
CN111833172A (zh) * 2020-05-25 2020-10-27 百维金科(上海)信息科技有限公司 一种基于孤立森林的消费信贷欺诈行为检测方法及其系统
CN113283901A (zh) * 2021-04-19 2021-08-20 河南大学 一种面向区块链平台的基于字节码的诈骗合约检测方法
CN113034145A (zh) * 2021-05-24 2021-06-25 浙江中科华知科技股份有限公司 用户异常加密数字资产交易类别判断方法、装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LIU XINGZI; JIANG FRANK; ZHANG RONGBAI: "A New Social User Anomaly Behavior Detection System Based on Blockchain and Smart Contract", 2020 IEEE INTERNATIONAL CONFERENCE ON NETWORKING, SENSING AND CONTROL (ICNSC), IEEE, 30 October 2020 (2020-10-30), pages 1 - 5, XP033848362, ISBN: 978-1-7281-6853-1, DOI: 10.1109/ICNSC48988.2020.9238118 *

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116823816B (zh) * 2023-08-28 2023-11-21 济南正邦电子科技有限公司 一种基于安防监控静态存储器的检测设备及检测方法
CN116823816A (zh) * 2023-08-28 2023-09-29 济南正邦电子科技有限公司 一种基于安防监控静态存储器的检测设备及检测方法
CN116827971A (zh) * 2023-08-29 2023-09-29 北京国网信通埃森哲信息技术有限公司 基于区块链的碳排放数据存储与传输方法、装置与设备
CN116827971B (zh) * 2023-08-29 2023-11-24 北京国网信通埃森哲信息技术有限公司 基于区块链的碳排放数据存储与传输方法、装置与设备
CN116911806A (zh) * 2023-09-11 2023-10-20 湖北华中电力科技开发有限责任公司 基于互联网+的电力企业能源信息管理系统
CN116911806B (zh) * 2023-09-11 2023-11-28 湖北华中电力科技开发有限责任公司 基于互联网+的电力企业能源信息管理系统
CN117150244B (zh) * 2023-10-30 2024-01-26 山东凯莱电气设备有限公司 基于电参数分析的智能配电柜状态监测方法及系统
CN117150244A (zh) * 2023-10-30 2023-12-01 山东凯莱电气设备有限公司 基于电参数分析的智能配电柜状态监测方法及系统
CN117201203B (zh) * 2023-11-07 2024-02-23 西安芝麻数据科技发展有限公司 基于区块链的供应链数据安全共享系统及方法
CN117201203A (zh) * 2023-11-07 2023-12-08 西安芝麻数据科技发展有限公司 基于区块链的供应链数据安全共享系统及方法
CN117632937A (zh) * 2023-12-06 2024-03-01 北京开元泰达净化设备有限公司 一种工业互联网大数据平台及数据处理方法
CN117632937B (zh) * 2023-12-06 2024-04-30 北京开元泰达净化设备有限公司 一种工业互联网大数据平台及数据处理方法
CN117370898A (zh) * 2023-12-08 2024-01-09 钛合联(深圳)科技有限公司 一种电子数据安全管控系统
CN117370898B (zh) * 2023-12-08 2024-03-12 钛合联(深圳)科技有限公司 一种电子数据安全管控系统
CN117454283A (zh) * 2023-12-22 2024-01-26 深圳前海慧联科技发展有限公司 一种用于风电机组运行检测数据的状态评估方法
CN117454096A (zh) * 2023-12-25 2024-01-26 西安高商智能科技有限责任公司 一种电机生产质量检测方法及系统
CN117454096B (zh) * 2023-12-25 2024-03-01 西安高商智能科技有限责任公司 一种电机生产质量检测方法及系统

Also Published As

Publication number Publication date
CN113961434A (zh) 2022-01-21

Similar Documents

Publication Publication Date Title
WO2023050620A1 (zh) 一种分布式区块链系统用户异常行为监测方法及系统
CN111277578B (zh) 加密流量分析特征提取方法、系统、存储介质、安全设备
CN110909811B (zh) 一种基于ocsvm的电网异常行为检测、分析方法与系统
CN111277570A (zh) 数据的安全监测方法和装置、电子设备、可读介质
US20180288084A1 (en) Method and device for automatically establishing intrusion detection model based on industrial control network
CN107360145B (zh) 一种多节点蜜罐系统及其数据分析方法
CN112468347B (zh) 一种云平台的安全管理方法、装置、电子设备及存储介质
CN114021168B (zh) 基于联邦学习的地铁基坑开挖风险识别方法及装置
Lan et al. Traffic data classification to detect man-in-the-middle attacks in industrial control system
CN113612763B (zh) 基于网络安全恶意行为知识库的网络攻击检测装置和方法
CN110310176B (zh) 一种基于区块链网络的数据加密方法及装置
CN110222795B (zh) 基于卷积神经网络的p2p流量的识别方法及相关装置
CN112560029A (zh) 基于智能分析技术的网站内容监测和自动化响应防护方法
CN110365678B (zh) 一种基于反样本的工控网络协议漏洞挖掘方法
Hong et al. Graph based encrypted malicious traffic detection with hybrid analysis of multi-view features
CN113259367B (zh) 工控网络流量多级异常检测方法及装置
Liang et al. FECC: DNS Tunnel Detection model based on CNN and Clustering
CN113902052A (zh) 一种基于ae-svm模型的分布式拒绝服务攻击网络异常检测方法
Martins et al. Automatic detection of computer network traffic anomalies based on eccentricity analysis
CN112637165B (zh) 模型训练方法、网络攻击检测方法、装置、设备及介质
CN115277178A (zh) 基于企业网网络流量的异常监测方法、装置及存储介质
CN114154476A (zh) 一种大型仪器共享实验执行可信度判别方法
CN111490976B (zh) 一种面向工控网络的动态基线管理与监测方法
Zhaojun et al. Statistic and analysis for host-based syslog
Zhou et al. Fingerprinting IIoT devices through machine learning techniques

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

Country of ref document: EP

Kind code of ref document: A1