CN116781584A - Intelligent contract Pong cheating detection method and device based on pre-training model - Google Patents

Intelligent contract Pong cheating detection method and device based on pre-training model Download PDF

Info

Publication number
CN116781584A
CN116781584A CN202310788383.2A CN202310788383A CN116781584A CN 116781584 A CN116781584 A CN 116781584A CN 202310788383 A CN202310788383 A CN 202310788383A CN 116781584 A CN116781584 A CN 116781584A
Authority
CN
China
Prior art keywords
intelligent contract
training model
model
poincare
training
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
CN202310788383.2A
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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN202310788383.2A priority Critical patent/CN116781584A/en
Publication of CN116781584A publication Critical patent/CN116781584A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • G06N3/0442Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/16Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using machine learning or artificial intelligence
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/14Arrangements for monitoring or testing data switching networks using software, i.e. software packages

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Medical Informatics (AREA)
  • Computer Security & Cryptography (AREA)
  • Environmental & Geological Engineering (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Storage Device Security (AREA)

Abstract

The application discloses an intelligent contract Pond deception detection method and device based on a pre-training model, wherein the method comprises the steps of firstly acquiring an intelligent contract source code to be identified from an Ethernet platform; then converting the source code into a data stream; inputting the source code and the data stream representing the variable dependency relationship into a pre-training model; and finally, outputting a detection result of whether the intelligent contract is the Pond deception, wherein the method only needs to use the source code characteristics of the intelligent contract, has good generalization capability, reduces the difficulty of data acquisition and characteristic extraction of the existing method, and solves the technical problems of poor interpretability, poor sustainability and insufficient accuracy of the existing intelligent contract Pond deception detection method.

Description

Intelligent contract Pong cheating detection method and device based on pre-training model
Technical Field
The application relates to the technical field of blockchain information security, in particular to an intelligent contract Pong cheat detection method and device based on a pre-training model.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
The contract terms in the smart contract will automatically execute, store, copy and update in the distributed blockchain if predetermined conditions are met. The combination of blockchain technology with smart contracts makes the dream of point-to-point markets truly, which means that in blockchain markets, buyers and suppliers will not have intervention by third parties through the trading of smart contracts. The intelligent contracts of the Ethernet platform are intelligent contracts with complete graphics, and through the intelligent contracts with complete graphics, a user can conduct not only encrypted money transactions, but also arbitrary actions on blockchains. But at the same time the advent of smart contracts also gives the spreading of poincare foci a new opportunity. While the smart contracts are building blocks of the DApp, if the individual smart contracts in the DApp are poincare, then the DApp may also be at risk. Thus, detecting and marking smart contracts deployed in ethernet is a smart contract poincare office is important for both preventing financial fraud and maintaining the health development of DApps and blockchain platforms.
Currently, existing detection methods for intelligent contract poincare bureau are mainly divided into three types, wherein the first type of methods is to train a classifier or perform static analysis by using byte codes or operation codes of the intelligent contract as characteristics; the second type of method is transaction behavior characteristics using intelligent contracts; a third class of methods is to use both the operation code feature and the account feature training model. However, these three methods all face some limitations, firstly the byte code and the opcode features lack interpretability, and adding or deleting some opcodes in smart contracts can easily circumvent detection. Transaction behavior features and account features require collection of large amounts of data, have problems with recognition hysteresis, and are also difficult to accurately locate fraudsters in anonymous ethernet platforms. Meanwhile, in the context of intelligent contract rapid update, aiming at the novel intelligent contract Pongshi bureau, the sustainability and performance of the existing detection method are reduced greatly. In general, in the context of rapid update of intelligent contracts, the current detection method aims at the technical problems of poor interpretability, poor sustainability and insufficient accuracy of the novel intelligent contract poincare bureau.
Disclosure of Invention
The application provides an intelligent contract Pong bureau detection method based on a pre-training model, which is used for solving the technical problems of poor interpretability, poor sustainability and insufficient accuracy of the existing detection method.
In order to achieve the above object, the present application provides the following technical solutions: an intelligent contract poincare fraud detection method based on a pre-training model, comprising:
(1) The method comprises the steps of crawling intelligent contract information on an Ethernet to be detected from an Etherscan browser of the Ethernet to obtain source codes and classifying the source codes;
(2) Converting source codes in the intelligent contracts into abstract syntax trees, and converting the abstract syntax trees into data streams;
(3) Constructing a pre-training model, namely inputting a data stream and a source code into the pre-training model, and training the pre-training model to obtain a trained model;
(4) Optimizing the hyper parameters of the trained model, and then utilizing the optimized model to identify the intelligent contracts to be detected, so as to obtain the identification result of the intelligent contract Pond deception.
Specifically, the obtaining the source code and classifying the source code in the step (1) includes: after the intelligent contracts are acquired, reading the source codes to classify the contracts, and marking the intelligent contracts as Pongshi fraudulent intelligent contracts and normal contracts.
Specifically, the abstract syntax tree in the step (2) is specifically: each node on the tree represents a structure that appears in the source code, and leaf nodes in the tree can be used to identify the sequence of variables.
Specifically, the data flow in the step (2) is a graph representing the dependency relationship between the variables in the code, wherein the nodes represent the variables and the edges represent the sources of the values of each variable.
Specifically, the training of the pre-training model in the step (3) aims at the detection task of the intelligent contract Pongshi cheating bureau to improve the pre-training model, so that the key information of the intelligent contract source code on the Ethernet is extracted, and the sustainability and the accuracy rate of the detection are improved.
Further, the step (3) inputs the data stream and the source code into the pre-training model as follows: the variable dependency of the data stream and the source code is entered into the pre-training model in the form of a sequence.
Further, in the step (4), specifically, the super parameter of the model is optimally set as follows: code length is set to 256,data flow length at 64,train batch size at 1,eval batch size at 32, learning rate at 2e-5, and model parameters are updated using an adam optimizer; and at the same time epochs is set to 3, 5 or 10, and threshold is set to 0.5 or 0.15; and dividing the Ethernet intelligent contract data set, classifying intelligent contract Pong authorities under different data set division, and checking the identification accuracy rate of the intelligent contract Pong authorities to obtain an identification result.
The second aspect of the application: an intelligent contract poincare fraud detection apparatus based on a pre-training model, the apparatus comprising the following modules:
and a data acquisition module: the method comprises the steps of crawling intelligent contract information on an Ethernet to be detected from an Etherscan browser of the Ethernet to obtain source codes and classifying the source codes;
and a conversion module: converting source codes in the intelligent contracts into abstract syntax trees, and converting the abstract syntax trees into data streams;
model training module: constructing a pre-training model, inputting a data stream and a source code into the pre-training model, and training the model;
and (3) an optimization and identification module: optimizing the hyper parameters of the model, and then identifying the intelligent contracts to be detected to obtain the identification result of the intelligent contract Pong deception.
An intelligent contract poincare fraud detection terminal based on a pre-training model, comprising: a memory and a processor; the memory is used for storing program codes, and the program codes correspond to the intelligent contract Pope cheat detection method based on the pre-training model; the processor is configured to execute the program code.
A storage medium having stored therein program code corresponding to said one intelligent contract poincare fraud detection method based on a pre-training model.
In the above technical solution, in the intelligent contract poincare fraud detection method based on the pre-training model, only the source code is used as the feature to detect the intelligent contract poincare fraud. Compared with the existing traditional method in the aspect of detecting intelligent Pongshi cheating bureau, the method does not need to obtain byte codes, transaction and account information of intelligent contracts, reduces the difficulty of data acquisition, increases the interpretability of a model, and simultaneously avoids various problems caused by excessive characteristics. Experiments are carried out under the same conditions, and finally, the application proves that the method has good generalization capability and better detection effect, and solves the technical problems of poor interpretability, poor sustainability and insufficient accuracy of the existing detection method.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments described in the present application, and other drawings may be obtained according to these drawings for a person having ordinary skill in the art.
FIG. 1 is a schematic flow chart of an intelligent contract Pond-Bay fraud detection method based on a pre-training model according to an embodiment of the present application;
FIG. 2 is a flow chart of converting source codes into data streams according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a pre-training model according to an embodiment of the present application;
FIG. 4 is a schematic block diagram of a device flow provided in an embodiment of the present application;
fig. 5 is a hardware configuration diagram of an apparatus for an intelligent contract poincare fraud detection device based on a pre-training model according to an embodiment of the present application.
Detailed Description
In order to make the technical scheme of the present application better understood by those skilled in the art, the present application will be further described in detail with reference to the accompanying drawings.
It should be noted that the following detailed description is illustrative and is intended to provide further explanation of the application. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
In order to make the objects, features and advantages of the present application more comprehensible, the technical solutions in the embodiments of the present application are described in detail below with reference to the accompanying drawings, and it is apparent that the embodiments described below are only some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The intelligent contracts, in which the contract terms are to be automatically executed in case a predetermined condition is met, are stored, copied and updated in the distributed blockchain. The intelligent contracts of the Ethernet platform are intelligent contracts with complete graphics, and through the intelligent contracts with complete graphics, a user can conduct not only encrypted money transactions, but also arbitrary actions on blockchains.
Pongshi cheating, a fraudulent investment cheating, promises high rates of return with little risk to investors. The poincare bureau creates a return for the early investors by acquiring new investors. This is similar to pyramid cheating, all based on paying early supporters with the funds of new investors. Both the poincare and pyramid foci eventually bottom out in the event that the new investor's inflow is exhausted, and there is insufficient money to turn around. Such a fraudster would then break directly and all those who have not yet retracted the investment would not be able to retrieve the investment.
Pre-training models, by storing knowledge into huge parameters and fine tuning on specific tasks, rich knowledge implicit in huge parameters can benefit various downstream tasks.
Examples:
referring to fig. 1, an embodiment of the present application provides an intelligent contract poincare fraud detection method based on a pre-training model, including:
acquiring data: the method comprises the steps of crawling intelligent contract information on an Ethernet to be detected from an Etherscan browser of the Ethernet to obtain source codes and classifying the source codes;
conversion: converting source codes in the intelligent contracts into abstract syntax trees, and converting the abstract syntax trees into data streams;
model training: constructing a pre-training model, inputting a data stream and a source code into the pre-training model, and training the model;
optimizing and identifying: optimizing the hyper parameters of the model, and then identifying the intelligent contracts to be detected to obtain the identification result of the intelligent contract Pong deception.
Specifically, the step of acquiring data includes:
the data is normalized, the obtained intelligent contract information is stored into a jsonnines format, each line in the file represents a contract, three attributes are respectively provided, and the sourcecode attribute is the source code of the intelligent contract; idx represents the index of the contract; address represents the address of the contract. Meanwhile, the data set is divided into a training set, a testing set and a verification set, and the performance of the method is tested by dividing according to the ratio of 8:1:1. The training set, test set, and validation set are all stored in the txt file in the same format, including the idx index and label tag of the corresponding smart contract, which represents whether this smart contract is a poincare smart contract.
The flow chart of the intelligent contract Pope cheat detection method based on the pre-training model is shown in FIG. 1.
Further, the converting step includes:
fig. 2 is a flow chart of converting source codes into data streams according to an embodiment of the present application.
Firstly, converting source code into abstract grammar tree, and introducing Python third party module (tree-side-space) into second part of figure 2The source code of the contract is converted. The abstract syntax tree translated by the source code includes syntax information of the code, leaf nodes in the tree are used to identify a sequence of variables, which are represented as var= { v 1 ,v 2 ,...,v n }。
Because the data flow is a graph, each variable in the abstract syntax tree can be seen as a node, see the third part of fig. 2. The edge connecting two nodes is denoted epsilon= < v i ,v j By >, it is meant that the value of the j-th variable is from the i-th variable. The set of all directed edges in the graph is denoted edge= { epsilon 12 ,…,ε n }. The final dataflow graph is denoted G (SC) = (Var, edge), which is the structured dataflow that is used to represent the dependencies between variables in the source code.
Further, the model training step includes:
fig. 3 is a flowchart of a pre-training model according to an embodiment of the present application.
The input to the model is a sequence x= { [ CLS ]],SC,[SEP]Var }. Wherein [ CLS ]]Is a special classification mark, [ SEP ]]Is a special tag for splitting two different data types. The remaining two segments in X, sc= { SC 1 ,sc 2 ,...,sc n The set of source codes, var= { v 1 ,v 2 ,...,v n The variable set of the data flow graph G (SC) = (Var, edge).
After input, the sequence X will be converted into an input vector W 0 . For each marker in X, the corresponding marker and position embedding are added to construct its input vector. A special position embedding is used for all variables in X to indicate that these variables are nodes in the data stream. The model then uses the input vector W 0 Context processing W is performed on the representation through N conversion layers n =transformer n (W n-1 ),n∈[1,N]. In the model, the value of N is set to 12. To incorporate the structure of the dataflow graph into the translation layer, a graph-directed, masked attention function is used herein. Each conversion layer is identical, U n By applying a multi-headed self-attention layer, then applyingNormalizing the layer operation. Then to U n Feed forward layer and layer normalization operations are used. From input W n-1 Obtain the output W of the nth layer n . To incorporate the structure of the dataflow graph into the translation layer, a graph-directed, masked attention function is used.
The graph-directed masked attention function includes:
the function is obtained by dividing the attention scoreInstead of minus infinity to avoid query q j Key k of interest i So that the attention weight becomes 0 after using the softmax function. In order to represent the dependency between variables, if there is a slave node v j To node v i Wherein<v j ,v i >E Edge or if i=j, allow node to query v i Node key v j Attention is paid. Otherwise, attention is masked by adding negative infinity to the attention score. In order to represent the relationship between the source code marker and the data flow node, a set Edge' is first defined, if the variable v i Is marked sc from the source code j Is identified in (a) then<v i ,sc j >/<sc j ,v i >E Edge'. Then if and only if<v i ,sc j >/<sc j ,v i >E Edge', allow nodeAnd code->Attention is paid to each other.
Calculation of each conversion layer: u (U) n =LayN(MulA(W n-1 )+W n-1 ),W n =LayN(FeeF(U n )+U n ). Where LayN refers to normalized layer operation, mulA refers to a multi-headed self-attention mechanism, feefs is a two-layer feed forward network. In the nth conversion layer, multi-head self-attention operation calculation
Wherein the output of the previous layerIs projected linearly onto the triplet of query, key and value, the parameter used is +.>d k Is the dimension of the header; m epsilon R |I|×|I| Is a mask matrix if the ith token is allowed to participate in the jth token, M ij Then 0 and otherwise minus infinity. But->Is a model parameter.
The model finally outputs the predictive label through a linear classifier and a Softmax functionThe predictive label shows 0, then it represents that this smart contract is not a poincare fraud; if displayed as 1, the representative smart contract is a Pond deception.
Further, the optimizing and identifying step includes:
the test shows that the super parameter of the model is optimally set as follows: code length was set to 256,data flow length at 64,train batch size at 1,eval batch size at 32 and learning rate at 2e-5, and model parameters were updated using an adam optimizer. While epochs is set to 3, 5 or 10 and threshold is set to 0.5 or 0.15. With this setting, the model can obtain the best smart contract poincare detection effect.
And using the intelligent contract Pongshi cheating bureau data set in the XBLOCK platform as an intelligent contract to be detected to carry out classification detection. Specifically, all contracts are arranged according to the ethernet block height order at the time of smart contract creation, and the training set is composed of the smart contract poincare from 1 st to 250 th and the intermediate poincare contract. The test set consists of 251 to the last 341 intelligent contracts poincare and the remaining non poincare intelligent contracts. Thus, the training set has 5990 smart contracts in total, while the test set has 508 smart contracts. Such partitioning may better characterize the detection capabilities of the model for emerging intelligent pompe cheats with only early intelligent pompe cheat data than random partitioning. The test result of the application on the data set is that the recall rate is 88.7%, the precision is 95.6%, the F1 value is 91.8%, and the accuracy is 96.7%. To facilitate comparison of different detection methods, the performance of the model was evaluated using common precision, recall and F1 values, and the experimental results versus other intelligent contract poincare bureau detection methods under the same test set training set partitioning are shown in table 1. Wherein XGBoost-TF-IDF, SVM-NC and Ridge-NC use the extracted features from the operation codes of the intelligent contracts, mulcas fuses account features on the basis, and SadPonzi detects Ponz according to the byte codes of the intelligent contracts. The dataset performance comparison table is partitioned in order of creation height as in table 1.
TABLE 1
As can be seen from table 1, the present application shows the best performance among all three indexes, demonstrating the sustainability and high accuracy of the present application in detecting intelligent contract poincare fraud. Under the condition of ensuring the precision, the application obtains the recall rate improvement of 21.3 percent and the F1 improvement of 12.9 percent compared with other detection methods.
To verify the generalization ability of the present application, experiments were performed with randomly partitioned data sets. To prevent model overfitting, the validation set is separately partitioned from the training set. Thus, training set in this experiment: verification set: the ratio of the test sets was 7:1:2. Several methods of using the opcode features and account features were repeated for comparison, including KNN, LSTM, SVM, XGBOOST and RF, and 10 experiments were performed to record the average results of detecting smart contract poincare fraud, i.e., a randomly partitioned dataset performance comparison, as shown in table 2.
TABLE 2
Method Recall rate of recall Precision of F1 value
KNN 0.69 0.63 0.66
LSTM 0.71 0.73 0.72
SVM 0.72 0.76 0.74
XGBoost 0.81 0.78 0.79
RF 0.84 0.79 0.81
The application is that 0.90 0.92 0.91
As can be seen from Table 2, the highest recall rate, accuracy and F1 value are still obtained in the experiment of randomly dividing the data set, and the high accuracy and good generalization capability of the application in the aspect of detecting intelligent contract Pope trickpad are proved.
Experiments prove that the intelligent contract Pong and spoofing detection method is effective in detecting intelligent contract Pong and spoofing, has excellent generalization capability and high accuracy, and solves the technical problems of poor interpretability, poor sustainability and insufficient accuracy of the existing intelligent contract Pong and spoofing contract detection method.
As shown in fig. 4, another aspect of the present application: an intelligent contract poincare fraud detection apparatus based on a pre-training model, the apparatus comprising the following modules:
and a data acquisition module: the method comprises the steps of crawling intelligent contract information on an Ethernet to be detected from an Etherscan browser of the Ethernet to obtain source codes and classifying the source codes;
and a conversion module: converting source codes in the intelligent contracts into abstract syntax trees, and converting the abstract syntax trees into data streams;
model training module: constructing a pre-training model, inputting a data stream and a source code into the pre-training model, and training the model;
and (3) an optimization and identification module: optimizing the hyper parameters of the model, and then identifying the intelligent contracts to be detected to obtain the identification result of the intelligent contract Pong deception.
Correspondingly, the application also provides electronic equipment, which comprises: one or more processors; a memory for storing one or more programs; the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the smart contract poincare fraud detection method as described above. As shown in fig. 5, a hardware structure diagram of an arbitrary device with data processing capability, where the deep learning dataset access system is located, is provided in an embodiment of the present application, except for the processor, the memory and the network interface shown in fig. 5, where the arbitrary device with data processing capability is located in the embodiment, generally, according to the actual function of the arbitrary device with data processing capability, other hardware may also be included, which will not be described herein.
Accordingly, the present application also provides a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the smart contract poincare fraud detection method as described above. The computer readable storage medium may be an internal storage unit, such as a hard disk or a memory, of any of the data processing enabled devices described in any of the previous embodiments. The computer readable storage medium may also be an external storage device, such as a plug-in hard disk, a Smart Media Card (SMC), an SD Card, a Flash memory Card (Flash Card), or the like, provided on the device. Further, the computer readable storage medium may include both internal storage units and external storage devices of any device having data processing capabilities. The computer readable storage medium is used for storing the computer program and other programs and data required by the arbitrary data processing apparatus, and may also be used for temporarily storing data that has been output or is to be output.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof.

Claims (10)

1. An intelligent contract poincare cheating detection method based on a pre-training model, which is characterized by comprising the following steps of:
(1) The method comprises the steps of crawling intelligent contract information on an Ethernet to be detected from an Etherscan browser of the Ethernet to obtain source codes and classifying the source codes;
(2) Converting source codes in the intelligent contracts into abstract syntax trees, and converting the abstract syntax trees into data streams;
(3) Constructing a pre-training model, namely inputting a data stream and a source code into the pre-training model, and training the pre-training model to obtain a trained model;
(4) Optimizing the hyper parameters of the trained model, and then utilizing the optimized model to identify the intelligent contracts to be detected, so as to obtain the identification result of the intelligent contract Pond deception.
2. The method for intelligent contract poincare fraud detection based on the pre-training model according to claim 1, wherein the step (1) of obtaining the source code and classifying it comprises: after the intelligent contracts are acquired, reading the source codes to classify the contracts, and marking the intelligent contracts as Pongshi fraudulent intelligent contracts and normal contracts.
3. The intelligent contract poincare fraud detection method based on the pre-training model according to claim 1, wherein the abstract syntax tree in the step (2) is specifically: each node on the tree represents a structure that appears in the source code, and leaf nodes in the tree can be used to identify the sequence of variables.
4. The intelligent contract poincare fraud detection method based on the pre-training model according to claim 1, wherein the data flow in the step (2) is a graph representing the dependency relationship between the variables in the code, wherein the nodes represent the variables and the edges represent the sources of the values of each variable.
5. The intelligent contract poincare fraud detection method based on the pre-training model according to claim 1, wherein the training of the pre-training model in step (3) is to improve the pre-training model for the detection task of the intelligent contract poincare fraud, and further extract key information of the intelligent contract source code on the ethernet, and detect the sustainability and accuracy rate of the intelligent contract source code.
6. The intelligent contract poincare fraud detection method based on the pre-training model according to claim 1, wherein the data stream and the source code are input into the pre-training model in the step (3) as follows: the variable dependency of the data stream and the source code is entered into the pre-training model in the form of a sequence.
7. The intelligent contract poincare fraud detection method based on the pre-training model according to claim 1, wherein in the step (4), specifically, the super-parameters of the model are optimally set as follows: code length is set to 256,data flow length at 64,train batch size at 1,eval batch size at 32, learning rate at 2e-5, and model parameters are updated using an adam optimizer; and at the same time epochs is set to 3, 5 or 10, and threshold is set to 0.5 or 0.15; and dividing the Ethernet intelligent contract data set, classifying intelligent contract Pong authorities under different data set division, and checking the identification accuracy rate of the intelligent contract Pong authorities to obtain an identification result.
8. An intelligent contract poincare cheating bureau detection device based on a pre-training model, which is characterized by comprising the following modules:
and a data acquisition module: the method comprises the steps of crawling intelligent contract information on an Ethernet to be detected from an Etherscan browser of the Ethernet to obtain source codes and classifying the source codes;
and a conversion module: converting source codes in the intelligent contracts into abstract syntax trees, and converting the abstract syntax trees into data streams;
model training module: constructing a pre-training model, inputting a data stream and a source code into the pre-training model, and training the model;
and (3) an optimization and identification module: optimizing the hyper parameters of the model, and then identifying the intelligent contracts to be detected to obtain the identification result of the intelligent contract Pong deception.
9. An intelligent contract poincare fraud detection terminal based on a pre-training model, comprising: a memory and a processor; the memory is used for storing program codes corresponding to the intelligent contract Pond deception detection method based on the pre-training model as set forth in any one of claims 1 to 7; the processor is configured to execute the program code.
10. A storage medium having stored therein a program code corresponding to a pre-trained model-based intelligent contract poincare office detection method according to any one of claims 1 to 7.
CN202310788383.2A 2023-06-30 2023-06-30 Intelligent contract Pong cheating detection method and device based on pre-training model Pending CN116781584A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310788383.2A CN116781584A (en) 2023-06-30 2023-06-30 Intelligent contract Pong cheating detection method and device based on pre-training model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310788383.2A CN116781584A (en) 2023-06-30 2023-06-30 Intelligent contract Pong cheating detection method and device based on pre-training model

Publications (1)

Publication Number Publication Date
CN116781584A true CN116781584A (en) 2023-09-19

Family

ID=87985807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310788383.2A Pending CN116781584A (en) 2023-06-30 2023-06-30 Intelligent contract Pong cheating detection method and device based on pre-training model

Country Status (1)

Country Link
CN (1) CN116781584A (en)

Similar Documents

Publication Publication Date Title
CN110163478B (en) Risk examination method and device for contract clauses
CN112417096B (en) Question-answer pair matching method, device, electronic equipment and storage medium
CN113011185A (en) Legal field text analysis and identification method, system, storage medium and terminal
CN110502694A (en) Lawyer&#39;s recommended method and relevant device based on big data analysis
CN113779358B (en) Event detection method and system
WO2021213123A1 (en) User fraudulent behavior detection method, apparatus and device, and storage medium
CN112860841A (en) Text emotion analysis method, device and equipment and storage medium
CN114265967A (en) Sensitive data security level marking method and device
WO2023071120A1 (en) Method for recognizing proportion of green assets in digital assets and related product
CN112990989B (en) Value prediction model input data generation method, device, equipment and medium
CN113269179B (en) Data processing method, device, equipment and storage medium
CN116150663A (en) Data classification method, device, computer equipment and storage medium
CN112364136B (en) Keyword generation method, device, equipment and storage medium
CN116702834B (en) Data generation method, data generation device, and computer-readable storage medium
CN117113154A (en) Method and system for identifying partner of fake plate blank enterprise
TWI713877B (en) Regulatory compliance processing device for auditing
CN116781584A (en) Intelligent contract Pong cheating detection method and device based on pre-training model
TWM569465U (en) Regulatory compliance processing device for auditing
CN109635289A (en) Entry classification method and audit information abstracting method
CN113988878A (en) Graph database technology-based anti-fraud method and system
CN113706258A (en) Product recommendation method, device, equipment and storage medium based on combined model
CN114118779A (en) KGANN-based enterprise risk identification method facing Internet public sentiment events
CN111753872A (en) Method, device, equipment and storage medium for analyzing association of serial and parallel cases
CN111414699A (en) Information analysis and prediction method, device, computer system and readable storage medium
CN114020687B (en) User retention analysis method, device, equipment and 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