CN117827964A - Block chain data acquisition and analysis method - Google Patents

Block chain data acquisition and analysis method Download PDF

Info

Publication number
CN117827964A
CN117827964A CN202211503555.9A CN202211503555A CN117827964A CN 117827964 A CN117827964 A CN 117827964A CN 202211503555 A CN202211503555 A CN 202211503555A CN 117827964 A CN117827964 A CN 117827964A
Authority
CN
China
Prior art keywords
transaction
data
blockchain
module
record
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.)
Pending
Application number
CN202211503555.9A
Other languages
Chinese (zh)
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202211503555.9A priority Critical patent/CN117827964A/en
Publication of CN117827964A publication Critical patent/CN117827964A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a blockchain data acquisition and analysis method, which comprises the following steps of S101, preprocessing after acquiring transaction record data in a blockchain, and classifying an acquired data set; s102, constructing a transaction characteristic record database through cluster analysis, and generating a transaction record detection model; s103, inputting transaction data into the detection model, and detecting and judging whether malicious transaction behaviors exist or not; s104, visually displaying the detection result in a chart form; preprocessing after acquiring transaction record data in the blockchain, and classifying the acquired data set comprises the following steps: pulling the data of the latest block from the block chain, extracting a transaction record, and storing corresponding data in a database after the transaction record is obtained; preliminary screening and classifying the preprocessed transaction data information by setting a transaction limit threshold; the invention has the characteristics of effectively detecting malicious behaviors and ensuring transaction safety.

Description

Block chain data acquisition and analysis method
Technical Field
The invention relates to the technical field of blockchain, in particular to a blockchain data acquisition and analysis method.
Background
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like, and at present, research and application of the blockchain technology are extremely popular fields in the current age, and the application range of the blockchain technology is gradually expanded and extends to various fields related to the Internet. In all researches and applications of the blockchain, a transaction system based on digital currency is the most important core, and the transaction of the digital currency has the advantages of convenience, encryption, anonymity and the like, and has very high security for the whole transaction system, however, the security and legality of the transaction per se are not guaranteed for the entity of the transaction, namely, the blockchain can prove the legality of the transaction process, but cannot guarantee whether the transaction per se is legal or not, under the digital currency system, the current blockchain digital currency is utilized by a plurality of malicious transactants, and a plurality of malicious transaction behaviors including fraud, halving, money laundering and the like are caused. Therefore, it is necessary to design a blockchain data collection and analysis method that effectively detects malicious behaviors and ensures transaction security.
Disclosure of Invention
The invention aims to provide a block chain data acquisition and analysis method for solving the problems in the background technology.
In order to solve the technical problems, the invention provides the following technical scheme: a blockchain data acquisition analysis method, comprising: preprocessing after acquiring transaction record data in a blockchain, and classifying the acquired data set;
constructing a transaction characteristic record database through cluster analysis, and generating a transaction record detection model;
inputting transaction data into the detection model, and detecting and judging whether malicious transaction behaviors exist or not;
and visually displaying the detection result in a chart form.
According to the above technical solution, the step of preprocessing the obtained transaction record data in the blockchain and classifying the obtained data set includes:
pulling the data of the latest block from the block chain, extracting a transaction record, and storing corresponding data in a database after the transaction record is obtained;
and carrying out preliminary screening classification on the preprocessed transaction data information by setting a transaction limit threshold.
According to the above technical solution, the step of creating the transaction record detection model by constructing the transaction characteristic record database through cluster analysis includes:
each data item of the data set is displayed in a form of a scatter diagram on a right-angle coordinate axis, classified by a clustering method, and feature vectors are preliminarily selected;
and analyzing and summarizing the transaction samples through machine learning, constructing a characteristic database for analysis and detection of malicious transaction records, and generating a detection model.
According to the above technical scheme, the step of inputting transaction data into the detection model and detecting and judging whether malicious transaction behaviors exist includes:
after inputting transaction data, detecting whether the transaction data is an unlabeled transaction record in a database;
analyzing and detecting unlabeled transaction data, marking the detected malicious transaction, and storing a detection result;
after the transaction detection is completed, a transaction record is saved, legal transaction or malicious transaction feature vector data is returned, and the feature vector data is stored in a feature database and used as training data of a detection model to continue to be used.
According to the technical scheme, the step of visually displaying the detection result in the form of a chart comprises the following steps:
and generating a visual chart according to the marking output result and updating in real time.
According to the technical scheme, the method is applied to a block chain data acquisition and analysis system, and the system comprises the following steps:
the transaction data acquisition module is used for acquiring transaction data from the blockchain;
the detection analysis module is used for detecting and analyzing the transaction data;
and the detection result display module is used for visually displaying the detection result of the transaction data.
According to the above technical scheme, the transaction data acquisition module includes:
the data preprocessing module is used for preprocessing the acquired transaction data;
and the sample data set induction module is used for carrying out set induction processing on the transaction data after processing.
According to the above technical solution, the sample data set induction module includes:
the transaction amount judging module is used for further judging the transaction amount set threshold value;
and the data subset classification module is used for primarily classifying the transaction data according to the transaction limit threshold.
According to the above technical scheme, the detection and analysis module includes:
the transaction characteristic database construction module is used for constructing a transaction characteristic database;
the detection model generation module is used for generating a malicious transaction data detection model;
the transaction data input module is used for inputting transaction data to be detected;
and the malicious transaction marking module is used for marking the detected malicious transaction.
Compared with the prior art, the invention has the following beneficial effects: the invention, through setting up the data acquisition module of trade, detecting and analyzing module and display module of the detection result, pull the data of the latest block from the blockchain, withdraw the trade record, carry on the preliminary screening classification to the trade data information after preconditioning through setting up the threshold value of the trade line, divide the trade record into different data subsets and store and calculate according to the difference of the line, make a large amount of small amount of trade sample data will not be influenced by the sample data of the large total trade, thus reduce the accuracy of the subsequent detection process; analyzing and summarizing a transaction sample through machine learning, constructing a characteristic database for analysis and detection of malicious transaction records, and generating a detection model; the unlabeled transaction data are respectively trained to construct detection models through classified data sets according to different amounts, classification detection is carried out, the accuracy of transaction data detection is further ensured, and errors of detection results caused by large change amount of transaction amounts are avoided; finally, a visualization chart is generated, and the malicious transaction records are marked and displayed, so that the security and the legality of the transaction of both parties in the blockchain are further ensured.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a flowchart of a blockchain data collection and analysis method provided in accordance with an embodiment of the present invention;
fig. 2 is a schematic diagram of a block chain data collection and analysis system according to a second embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Embodiment one:
fig. 1 is a flowchart of a blockchain data collection and analysis method according to a first embodiment of the present invention, where the method may be implemented by a blockchain data collection and analysis system according to the first embodiment of the present invention, and the system is composed of a plurality of software and hardware modules, as shown in fig. two, and the method specifically includes the following steps:
s101, preprocessing after acquiring transaction record data in a blockchain, and classifying an acquired data set;
in some embodiments of the present invention, the latest block data is pulled from the blockchain, the transaction record is extracted, and after the transaction record is obtained, the corresponding data is stored in the database.
In some embodiments of the present invention, the pre-processed transaction data information is subjected to preliminary screening classification by setting a transaction amount threshold.
In the embodiment of the invention, the data are filtered through the distribution conditions of the cluster diagram and the scatter diagram, the definition domain and the value domain of the horizontal and vertical coordinate diagram of the transaction record are reduced, the feature vector is selected according to the digital feature of the cluster diagram, the feature space is determined in an auxiliary mode through the tree diagram of the decision tree, the data items outside the feature space are deleted or filtered, the interference of irrelevant redundant data is eliminated, the transaction type is judged according to the set transaction limit threshold, and the transaction record is divided into different data subsets according to different limits for storage and calculation.
In the embodiment of the invention, the range of the data value is reduced, and the data set content is divided according to the magnitude of the numerical value, namely the transaction limit value, so that the gradient drop of the data on the coordinate graph is effectively reduced, a large amount of small transaction sample data cannot be influenced by the large total transaction sample data, and the accuracy of the subsequent detection process is reduced;
s102, constructing a transaction characteristic record database through cluster analysis, and generating a transaction record detection model;
in some embodiments of the invention, each data item of the data set is displayed in a form of a scatter diagram on a rectangular coordinate axis, classified by a clustering method, and data capable of reflecting digital characteristics of legal transactions and malicious transactions are found out, and characteristic vectors are preliminarily selected.
In the embodiment of the invention, each digital currency and each data set classified by transaction amount correspond to different training models, after the feature vectors are selected preliminarily by clustering analysis, the feature vectors which can finally distinguish malicious transaction records from legal transaction records are further classified by decision tree model auxiliary judgment, a transaction feature database is constructed, and the detection content is more accurate by the secondary selection of the feature vectors, and the detection content is concentrated on the data features of the transaction records per se by the method, so that the acquisition requirements of associated data are eliminated, the data content is simplified, the feature dimension is reduced, and the working efficiency is further improved.
In some embodiments of the invention, a feature database of malicious transaction record analysis and detection is constructed through analysis and induction of a transaction sample by machine learning, and a detection model is generated.
In the embodiment of the invention, a model training function is called, the selected sample data is modeled according to Bayesian optimization and cross verification, a detection model is stored, if the current sample does not have corresponding data features which are enough to construct the detection model, a database is returned to acquire a transaction record again, and a feature vector reconstruction reflecting the digital features of legal transaction and malicious transaction is selected until the construction is completed.
S103, inputting transaction data into the detection model, and detecting and judging whether malicious transaction behaviors exist or not;
in some embodiments of the present invention, the transaction data is entered and then a database is checked for unlabeled transaction records.
In some embodiments of the present invention, unlabeled transaction data is analyzed and detected, and detected malicious transactions are labeled and the detection results are saved.
Illustratively, in the embodiment of the invention, all data information can be accessed in the analysis and detection process, but transaction records, transaction data and detection models cannot be modified to ensure the authenticity of the detection process and the correctness of the detection result.
In the embodiment of the invention, the unlabeled transaction data are respectively trained and constructed by the classified data sets according to different amounts to carry out classified detection, so that the accuracy of transaction data detection is further ensured, and the error of detection results caused by large change amount of the transaction amounts is avoided.
In some embodiments of the present invention, after the transaction detection is completed, a transaction record is saved and legal transaction or malicious transaction feature vector data is returned, and the transaction record is stored in a feature database and used as training data of a detection model.
S104, visually displaying the detection result in a chart form;
in some embodiments of the present invention, a visual chart is generated and updated in real time based on the marker output results.
By means of the embodiment of the invention, the malicious transaction records are marked and displayed through the generation of the visual chart, so that the security and the legality of the transaction of both parties in the blockchain are further ensured.
Embodiment two:
fig. 2 is a schematic diagram of module configuration of a blockchain data collection and analysis system according to the second embodiment, as shown in fig. 2, and the system includes:
the transaction data acquisition module is used for acquiring transaction data from the blockchain;
the detection analysis module is used for detecting and analyzing the transaction data;
and the detection result display module is used for visually displaying the detection result of the transaction data.
In some embodiments of the invention, the transaction data acquisition module comprises:
the data preprocessing module is used for preprocessing the acquired transaction data;
the sample data set induction module is used for carrying out set induction processing on the transaction data after processing;
in some embodiments of the invention, the sample data set generalization module comprises:
the transaction amount judging module is used for further judging the transaction amount set threshold value;
and the data subset classification module is used for primarily classifying the transaction data according to the transaction limit threshold.
In some embodiments of the invention, the detection analysis module comprises:
the transaction characteristic database construction module is used for constructing a transaction characteristic database;
the detection model generation module is used for generating a malicious transaction data detection model;
the transaction data input module is used for inputting transaction data to be detected;
and the malicious transaction marking module is used for marking the detected malicious transaction.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Finally, it should be noted that: the foregoing description is only a preferred embodiment of the present invention, and the present invention is not limited thereto, but it is to be understood that modifications and equivalents of some of the technical features described in the foregoing embodiments may be made by those skilled in the art, although the present invention has been described in detail with reference to the foregoing embodiments. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A block chain data acquisition and analysis method is characterized in that: comprising the following steps:
preprocessing after acquiring transaction record data in a blockchain, and classifying the acquired data set;
constructing a transaction characteristic record database through cluster analysis, and generating a transaction record detection model;
inputting transaction data into the detection model, and detecting and judging whether malicious transaction behaviors exist or not;
and visually displaying the detection result in a chart form.
2. The blockchain data collection and analysis method of claim 1, wherein: the step of preprocessing after obtaining the transaction record data in the blockchain and classifying the obtained data set comprises the following steps:
pulling the data of the latest block from the block chain, extracting a transaction record, and storing corresponding data in a database after the transaction record is obtained;
and carrying out preliminary screening classification on the preprocessed transaction data information by setting a transaction limit threshold.
3. The blockchain data collection and analysis method of claim 1, wherein: the step of constructing a transaction characteristic record database through cluster analysis and generating a transaction record detection model comprises the following steps:
each data item of the data set is displayed in a form of a scatter diagram on a right-angle coordinate axis, classified by a clustering method, and feature vectors are preliminarily selected;
and analyzing and summarizing the transaction samples through machine learning, constructing a characteristic database for analysis and detection of malicious transaction records, and generating a detection model.
4. The blockchain data collection and analysis method of claim 1, wherein: the step of inputting transaction data into the detection model and detecting and judging whether malicious transaction behaviors exist comprises the following steps:
after inputting transaction data, detecting whether the transaction data is an unlabeled transaction record in a database;
analyzing and detecting unlabeled transaction data, marking the detected malicious transaction, and storing a detection result;
after the transaction detection is completed, a transaction record is saved, legal transaction or malicious transaction feature vector data is returned, and the feature vector data is stored in a feature database and used as training data of a detection model to continue to be used.
5. The blockchain data collection and analysis method of claim 1, wherein: the step of visually displaying the detection result in the form of a chart comprises the following steps:
and generating a visual chart according to the marking output result and updating in real time.
6. The blockchain data collection and analysis method of claim 1, wherein: the method is applied to a block chain data acquisition and analysis system, and the system comprises the following steps:
the transaction data acquisition module is used for acquiring transaction data from the blockchain;
the detection analysis module is used for detecting and analyzing the transaction data;
and the detection result display module is used for visually displaying the detection result of the transaction data.
7. The blockchain data collection and analysis method of claim 6, wherein: the transaction data acquisition module comprises:
the data preprocessing module is used for preprocessing the acquired transaction data;
and the sample data set induction module is used for carrying out set induction processing on the transaction data after processing.
8. The blockchain data collection and analysis method of claim 7, wherein: the sample dataset induction module comprises:
the transaction amount judging module is used for further judging the transaction amount set threshold value;
and the data subset classification module is used for primarily classifying the transaction data according to the transaction limit threshold.
9. The blockchain data collection and analysis method of claim 6, wherein: the detection analysis module comprises:
the transaction characteristic database construction module is used for constructing a transaction characteristic database;
the detection model generation module is used for generating a malicious transaction data detection model;
the transaction data input module is used for inputting transaction data to be detected;
and the malicious transaction marking module is used for marking the detected malicious transaction.
CN202211503555.9A 2022-11-28 2022-11-28 Block chain data acquisition and analysis method Pending CN117827964A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211503555.9A CN117827964A (en) 2022-11-28 2022-11-28 Block chain data acquisition and analysis method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211503555.9A CN117827964A (en) 2022-11-28 2022-11-28 Block chain data acquisition and analysis method

Publications (1)

Publication Number Publication Date
CN117827964A true CN117827964A (en) 2024-04-05

Family

ID=90512277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211503555.9A Pending CN117827964A (en) 2022-11-28 2022-11-28 Block chain data acquisition and analysis method

Country Status (1)

Country Link
CN (1) CN117827964A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110866160A (en) * 2018-08-09 2020-03-06 翟红鹰 Transaction data display method, system and storage medium based on block chain
CN112801783A (en) * 2020-12-31 2021-05-14 北京知帆科技有限公司 Entity identification method and device based on digital currency transaction characteristics
CN112927072A (en) * 2021-01-20 2021-06-08 北京航空航天大学 Block chain-based anti-money laundering arbitration method, system and related device
CN115330368A (en) * 2022-07-13 2022-11-11 成都链安科技有限公司 Block chain abnormal transaction identification method and system integrating unsupervised machine learning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110866160A (en) * 2018-08-09 2020-03-06 翟红鹰 Transaction data display method, system and storage medium based on block chain
CN112801783A (en) * 2020-12-31 2021-05-14 北京知帆科技有限公司 Entity identification method and device based on digital currency transaction characteristics
CN112927072A (en) * 2021-01-20 2021-06-08 北京航空航天大学 Block chain-based anti-money laundering arbitration method, system and related device
CN115330368A (en) * 2022-07-13 2022-11-11 成都链安科技有限公司 Block chain abnormal transaction identification method and system integrating unsupervised machine learning

Similar Documents

Publication Publication Date Title
US11681925B2 (en) Techniques for creating, analyzing, and modifying neural networks
CN111882446B (en) Abnormal account detection method based on graph convolution network
CN109446341A (en) The construction method and device of knowledge mapping
CN101408885B (en) Modeling topics using statistical distributions
CN110069623A (en) Summary texts generation method, device, storage medium and computer equipment
US20210366055A1 (en) Systems and methods for generating accurate transaction data and manipulation
US11640539B2 (en) Techniques for visualizing the operation of neural networks using samples of training data
CN110827131B (en) Tax payer credit evaluation method based on distributed automatic feature combination
US20210012209A1 (en) Techniques for modifying neural network definitions
US20210012212A1 (en) Techniques for modifying the operation of neural networks
CN110287292A (en) A kind of judge's measurement of penalty irrelevance prediction technique and device
US20140279301A1 (en) Unsupervised analytical review
CN117764724A (en) Intelligent credit rating report construction method and system
CN111709845A (en) Medical insurance fraud behavior identification method and device, electronic equipment and storage medium
CN107330705A (en) A kind of method and system according to multi-data source antifraud
WO2022104322A1 (en) Systems and method for textile fabric construction
CN113505117A (en) Data quality evaluation method, device, equipment and medium based on data indexes
KR102110350B1 (en) Domain classifying device and method for non-standardized databases
Jeyaraman et al. Practical Machine Learning with R: Define, build, and evaluate machine learning models for real-world applications
CN111582313A (en) Sample data generation method and device and electronic equipment
CN117827964A (en) Block chain data acquisition and analysis method
CN115358878A (en) Financing user risk preference level analysis method and device
KR20230169538A (en) Apparatus and method for analysis of transaction brief data using corpus for machine learning based on financial mydata and computer program for the same
Kulothungan Loan Forecast by Using Machine Learning
CN110472680B (en) Object classification method, device and computer-readable storage medium

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