CN117354050B - Knowledge graph-fused intelligent contract malicious node collusion behavior detection method - Google Patents

Knowledge graph-fused intelligent contract malicious node collusion behavior detection method Download PDF

Info

Publication number
CN117354050B
CN117354050B CN202311639580.4A CN202311639580A CN117354050B CN 117354050 B CN117354050 B CN 117354050B CN 202311639580 A CN202311639580 A CN 202311639580A CN 117354050 B CN117354050 B CN 117354050B
Authority
CN
China
Prior art keywords
relay
node
committee
trust
intelligent contract
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311639580.4A
Other languages
Chinese (zh)
Other versions
CN117354050A (en
Inventor
易文龙
谢启亮
郭熙
程香平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangxi Agricultural University
Original Assignee
Jiangxi Agricultural University
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 Jiangxi Agricultural University filed Critical Jiangxi Agricultural University
Priority to CN202311639580.4A priority Critical patent/CN117354050B/en
Publication of CN117354050A publication Critical patent/CN117354050A/en
Application granted granted Critical
Publication of CN117354050B publication Critical patent/CN117354050B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/022Knowledge engineering; Knowledge acquisition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1416Event detection, e.g. attack signature detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computer Hardware Design (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method for detecting the collusion behavior of malicious nodes of an intelligent contract, which is used for specifying the inter-link consensus information of the behavior of member nodes of a relay committee by using the intelligent contract of an intelligent contract system and importing the inter-link consensus information into the knowledge graph as an entity and a relation; matching the relevance and similarity of the entity and the relation of the test node through the knowledge graph, judging whether the test node completes the specification of the cross-link consensus information, changing the node number-reputation value recorded on the intelligent contract, if the test node completes the specification of the cross-link consensus information, the intelligent contract does not deduct the reputation value of the test node, otherwise, deducting the reputation value; evaluating trust values between relay committee member nodes using a historical behavior-based trust evaluation model; if the credit values of the plurality of relay committee member nodes simultaneously decrease and the credit values between the relay committee member nodes increase, collusion behavior exists. The invention can detect and prevent collusion behavior in the relay committee.

Description

Knowledge graph-fused intelligent contract malicious node collusion behavior detection method
Technical Field
The invention belongs to the technical field of blockchains, and relates to an intelligent contract malicious node collusion behavior detection method integrating knowledge graphs.
Background
Blockchain technology, as a decentralized, secure and trusted distributed ledger technology, has demonstrated a broad application potential in a number of fields. Among them, cross-chain consensus is a key problem in blockchain ecosystems, involving collaboration and information interaction between multiple blockchains. In order to solve the problem that blockchain value islands are difficult to transfer to each other, a number of methods have been proposed, including notary mechanisms, side chain/relay, hash locking, etc., in side chain relay, a relay committee consisting of blockchain nodes is used for the "bridge" of each heterogeneous chain cross-chain interaction. However, because the blockchains are not trusted, or malicious nodes exist in the nodes in the alliance chains, collusion problems exist among relay committee members, namely, the nodes in the relay committee can tamper with the consensus information through cooperation, and the security and consistency of the whole system are threatened. Such collusion behavior may lead to erroneous consensus decisions and even pose a serious threat to the security of the whole system. Therefore, how to detect and prevent collusion behavior in the relay committee is a highly desirable problem.
Disclosure of Invention
The invention aims to provide an intelligent contract malicious node collusion behavior detection method integrating knowledge graphs, which is used for detecting and preventing collusion behaviors in a relay committee.
The technical scheme adopted by the invention is as follows: a method for detecting the collusion behavior of intelligent contract malicious nodes fused with a knowledge graph includes such steps as choosing several nodes from each block chain system, entering relay committee, and defining the behavior of relay committee member nodes by using intelligent contracts of intelligent contract system in the cross-chain consensus phase; the cross-chain consensus information is defined as an entity, the relationship is imported into a knowledge graph, and the cross-chain consensus information is defined as a trusted verification party; the intelligent contract records the credit value of each relay committee member node, matches the relevance and similarity of the entity and the relation of the test node through the knowledge graph, judges whether the test node completes the specification of the cross-link consensus information, changes the node number-credit value recorded on the intelligent contract, does not deduct the credit value of the test node if the test node completes the specification of the cross-link consensus information, and deducts the credit value if not; monitoring by using a trust evaluation model at the beginning of establishment of a relay committee, evaluating trust values among member nodes of the relay committee by using a trust evaluation model based on historical behaviors, and recording; if the credit values of the relay committee member nodes simultaneously decrease and the credit values between the relay committee member nodes increase, collusion behavior exists between the relay committee member nodes.
Further preferably, the cross-chain consensus information specification means: the behavior of each relay committee member node must be: providing its consensus information over a time frame.
Further preferably, the consensus information includes a transaction number, a signature time, and a timestamp.
Further preferably, designing a smart contract system, including defining a state of a smart contract, defining a smart contract rule, defining a constraint condition; to be used forRepresenting a smart contract system that is configured to store a plurality of smart contracts,representing intelligent contracts residing in the relay committee;representing a knowledge graph;representing the current state of an intelligent contract system, subject toState settings representing an intelligent contract system including start, wait, execute, and end; the intelligent contract system is in a certain state at any moment, and the state transition of the intelligent contract system is triggered by a knowledge graph mechanism.
Further preferably, the state transition of the smart contract system meets the following conditions: defining execution can only be performed by connection to smart contractsIs automatically triggered when the condition is satisfied; accessing smart contractsThe only condition of (a) is to set the knowledge graph of the input and outputThe method comprises the steps of carrying out a first treatment on the surface of the Proof of knowledge graphIntelligent contract bringing systemThe only conditions for state transition are: if and only if the knowledge graphTo intelligent contractsInput data or smart contractsTo knowledge graphWhen outputting data.
Further preferably, the smart contract rule is defined as follows: the common information function PCI (H, N, TID, S, t) provided by the member node of the relay committee, wherein H represents a hash value, N represents a node set in the network, TID represents a transaction number, S represents a signature of the node, and t represents a time stamp; setting the format of the reputation value as R (N, t), and representing the reputation value of the node N at the moment of time t; setting up smart contractsThe constraint conditions of (2) are: at each time t, for each node N, there should be: r (N, t)>=0, when node N provides consensus information: r (N, t+1) =r (N, t), when the node N does not provide consensus information as specified, performing: r (N, t+1) =r (N, t) -, Δ, where Δ represents the amount by which the reputation value is subtracted.
Further preferably, the smart contract system is configured to, during operation, execute the smart contractWill generate the consensus information function PCI to obtain the consensus informationThe function PCI is preprocessed; and extracting corresponding entities and relations among the entities according to the design of the knowledge graph, and storing the extracted entities and relations in a Neo4j graph database to form the knowledge graph.
Further preferably, the entity comprises a hash value, a timestamp, a signature and a signature time.
Further preferably, in a cross-link consensus stage based on a relay committee, when a request chain initiates a cross-link request to an agent node of a requested chain in the relay committee through an agent node in the relay committee, the requested chain packages data after receiving the cross-link request, and initiates cross-link consensus to all member nodes in the relay committee, so as to verify the legality and safety of the data, and the process needs the node to confirm and sign the current transaction; at this time, a timer in the smart contract is started, which is the time ofSecond, each relay committee member node needs to complete signature before the timer finishes timing, and returns to the initiating node; importing the entity and entity relation of the relay committee member nodes into a knowledge graph, and judging the behaviors of the relay committee member nodes by judging the relevance and the similarity among the entities; if the relevance and the similarity between the test node and the knowledge graph are not matched, returning the result to the intelligent contract, and deducting the credit value of the intelligent contract.
Further preferably, the trust evaluation model is divided into an initialization phase and a trust evaluation phase, in the initialization phase, trust values among the relay committee member nodes are represented by direct trust, the trust values of other relay committee member nodes are represented by neutral values, and the trust values are 0.5 or the trust evaluation model is used for re-evaluation.
Further preferably, the re-evaluation using the trust evaluation model is performed as follows:
assume that set to a trust valueUsingRepresenting n relay committee member nodes in the system,representing the 1 st relay committee member node,representing the 2 nd relay committee member node,representing an nth relay committee member node; if the ith relay committee member nodeAnd a j-th relay committee member nodeWith a total trust evaluation function betweenThe decision set is composed ofThe representation is made of a combination of a first and a second color,the distribution is 1,2, …, M decision elements,representing the mth weight factor, there is a constraint:
initialization phase, relay committee member node from same block chainAndtrust value betweenRelay committee member nodes from different blockchainsAndtrust value betweenThe evaluation was performed as follows:
wherein S representsThe service provided, t represents a time stamp;
calculating relay committee member nodes through historical behavior characteristics among the relay committee member nodesAndtrust transfer value betweenConstructing a trust transfer matrix between relay committee member nodesFor trust transfer matrixIf the relay committee member nodeTrusted relay committee member nodeTrust transfer valueOtherwise trust the transfer value. For relay committee member nodesThe trust value after the k-step iteration is expressed as:
wherein,representing a regularization factor, ensuring that the trust value sum is 1;is a member node of the relay committeeStep k-1, calculating a feature vector according to the trust value of iteration, and settingFor the column vector of the confidence value after the k-step iteration, thenIs composed ofA column vector is composed, and the feature vector v satisfies the equation:
wherein I represents a unit vector;
the final trust value is obtained by normalizing the feature vector, and the elements in the feature vector v are normalized to obtain the final trust value vector.
The invention imports the entity and entity relation of the relay committee member node into the knowledge graph, and judges the relationship and similarity between the entities to realize the judgment of the relay committee member node behavior; if the relevance and the similarity between the test node and the knowledge graph are not matched, returning the result to the intelligent contract, and deducting the credit value of the intelligent contract; and combining the trust values, and judging that the relay committee member nodes have collusion malicious behaviors if the credit values of the relay committee member nodes are deducted by the intelligent contracts in the same transaction and the trust values of the relay committee member nodes are obviously improved. Thereby detecting and preventing collusion behavior in the relay committee.
Drawings
Fig. 1 is a schematic diagram of a knowledge graph-fused model of a method for detecting collusion behavior of intelligent contract malicious nodes.
Fig. 2 is a schematic diagram of knowledge graph construction.
FIG. 3 is a diagram of nodes and relationships of a knowledge graph.
Detailed Description
The invention is further elucidated in detail below in connection with the accompanying drawings.
As shown in fig. 1, in a method for detecting collusion behavior of intelligent contract malicious nodes with a knowledge graph, a plurality of nodes selected by each blockchain system enter a relay committee, in order to detect whether the relay committee member nodes have collusion malicious behaviors, in a cross-chain consensus stage, the behaviors of the relay committee member nodes are specified by using intelligent contracts of the intelligent contract system in cross-chain consensus information, namely, the behaviors of each relay committee member node must be: providing consensus information thereof in a certain time range, wherein the consensus information comprises transaction numbers, signatures, signature time, time stamps and the like; the cross-chain consensus information is defined as an entity, the relationship is imported into a knowledge graph, and the cross-chain consensus information is defined as a trusted verification party; the intelligent contract records the credit value of each relay committee member node, matches the relevance and similarity of the entity and the relation of the test node through the knowledge graph, judges whether the test node completes the specification of the cross-chain consensus information, changes the key-value (node number-credit value) recorded on the intelligent contract, does not deduct the credit value of the test node if the test node completes the specification of the cross-chain consensus information, and otherwise deducts the credit value. Monitoring by using a trust evaluation model at the beginning of establishment of a relay committee, evaluating trust values among member nodes of the relay committee by using the trust evaluation model based on historical behaviors, and recording; if the credit values of the relay committee member nodes simultaneously decrease and the credit values between the relay committee member nodes increase, collusion behavior exists between the relay committee member nodes.
The relay committee is composed of relay committee member nodes selected by each blockchain system, wherein trust values are recorded according to histories of the relay committee member nodes.
An intelligent contract is a computer program that automatically executes contracts based on blockchain technology. It is a series of coded instructions and conditions stored on the blockchain that can be automatically executed when certain conditions are met. The execution of intelligent contracts relies on a decentralised computer network, typically running on a blockchain. The intelligent contracts specify and implement behavior specifications that the relay committee member nodes must follow in cross-chain consensus. The intelligent contract contains a series of conventions and conditions to ensure that relay committee member nodes participating in the consensus provide the correct consensus information, including transaction number, signature time, etc., over a range of times. And records the credit value of each relay committee member node and processes the responsive credit value when the prescribed behavior is completed or not completed.
The knowledge graph is a structured semantic network knowledge base, and is used as a graph structure formed by a plurality of nodes and a plurality of relation edges, wherein the knowledge graph comprises a triplet structure of entity-relation-entity and related attribute-value pairs of the entity, and the entities are mutually associated through the relation, so that a netlike knowledge structure is formed. In the invention, the knowledge graph is mainly used for judging whether the behavior of the member node of the relay committee is consistent with the behavior regulated by the intelligent contract in the process of detecting the consensus, and returning the detection result to the intelligent contract.
The trust evaluation model establishes a dynamic trust hierarchy for the blockchain system by analyzing and calculating historical behavior between relay committee member nodes. This trust evaluation model helps to evaluate trust relationships between relay committee member nodes more carefully, providing a deeper understanding of node behavior.
As shown in fig. 1, the design of the smart contract system includes defining the states of smart contracts, defining smart contract rules, defining constraints, and the like. For the description of the smart contract system, the present invention defines the smart contract system as a four-tuple. To be used forRepresenting a smart contract system that is configured to store a plurality of smart contracts,representing intelligent contracts residing in the relay committee;representing a knowledge graph, the knowledge graph being associated with a database;representing the current state of an intelligent contract system, subject toState settings representing an intelligent contract system including start, wait, execute, and end; the intelligent contract system is in a certain state at any moment, and the state transition of the intelligent contract system is triggered by a knowledge graph mechanism.
The state transition of the smart contract system meets the following conditions: because of smart contractsOn the blockchain, thus defining that execution can only be performed by connection to the smart contractIs automatically triggered when the condition is satisfied; accessing smart contractsThe only condition of (a) is to set the knowledge graph of the input and outputThe method comprises the steps of carrying out a first treatment on the surface of the Thus, the knowledge graph is provedIntelligent contract bringing systemThe only conditions for state transition are: if and only if the knowledge graphTo intelligent contractsInput data or smart contractsTo knowledge graphWhen outputting data.
The invention defines the intelligent contract rule as follows: the relay committee member node provides a consensus information function PCI (H, N, TID, S, t), where H represents a hash value, N represents a set of nodes in the network, TID represents a transaction number, S represents a signature of the node, and t represents a timestamp. The format of the reputation value is set to R (N, t), representing the reputation value of node N at time t. Setting up smart contractsThe constraint conditions of (2) are: at each time t, forAt each node N, there should be: r (N, t)>=0, when node N provides consensus information: r (N, t+1) =r (N, t), when the node N does not provide consensus information as specified, performing: r (N, t+1) =r (N, t) -, Δ, where Δ represents the amount by which the reputation value is subtracted.
During operation of intelligent contract system, intelligent contractAnd generating a consensus information function PCI, acquiring the consensus information function PCI, and preprocessing the same. And extracting corresponding entities and relations among the entities according to the design of the knowledge graph, and storing the extracted entities and relations in a Neo4j graph database to form the knowledge graph.
As shown in fig. 2, the knowledge graph construction includes knowledge extraction of intelligent contracts, including structured data entity extraction and relationship extraction, and then stored in Neo4j graph database. The node and relation of the knowledge graph are shown in fig. 3, entity extraction mainly supports information integration and network security situation perception in a network security system through a unified security network body, and the emphasis of the invention mainly uses the knowledge graph to detect the consensus information provided by relay committee member nodes in a cross-chain consensus stage, so that only partial entities need to be selected from the knowledge graph, and then the recognition and extraction of entities such as hash values, transaction numbers, time stamps, signature information, signature time and the like are realized by combining with the unique entities of the cross-chain consensus. Before extracting the entity, integrating the entities such as hash value, timestamp, signature time and the like into one CSV file according to the transaction number, wherein the entity extraction is to extract the structured data CSV file, and the local Neo4j graph database needs to be connected before the node is created, and the entity extraction method for the structured data can extract the entity by circularly reading the data from the CSV file, so that the node is created into the Neo4j graph database.
In the inter-chain consensus stage based on the relay committee, two blockchains for performing inter-chain operation, one is a request chain and the other is a requested chain, and when the request chain is in the relay committee to the requested chain through a proxy node in the relay committeeThe agent node in the meeting initiates a cross-link request, the requested link packages the data after receiving the cross-link request, initiates cross-link consensus to all member nodes in the relay committee, verifies the legality and the security of the data, and the process requires the node to confirm and sign the current transaction; at this time, a timer in the smart contract is started, which is the time ofSecond, each relay committee member node needs to complete signature before the timer finishes timing, and returns to the initiating node; importing the entity and entity relation of the relay committee member node into a knowledge graph, and judging the behavior of the relay committee member node by judging the relevance and similarity between the entities; if the relevance and the similarity between the test node and the knowledge graph are not matched, returning the result to the intelligent contract, and deducting the credit value of the intelligent contract. Nodes with subtracted reputation values do not represent their presence of malicious activity, but may also be too slow in response time, whenVerification is not completed within seconds, resulting in a reputation score deduction, so that a ticket cannot thereby account for malicious behavior of the node.
The trust evaluation model is divided into an initialization stage and a trust evaluation stage, in the initialization stage, the trust value between the relay committee member nodes is mainly represented by direct trust, because any two relay committee member nodes possibly come from the same blockchain, in order to avoid the occurrence of high trust value of the relay committee member nodes from the same blockchain, the invention uses neutral value to represent the trust value of other relay committee member nodes, is 0.5 or uses the trust evaluation model to carry out reevaluation, and is assumed to be set as the trust valueUsingRepresenting n relay committee member nodes in the system,representing the 1 st relay committee member node,representing the 2 nd relay committee member node,representing the nth relay committee member node. If the ith relay committee member nodeAnd a j-th relay committee member nodeWith a total trust evaluation function betweenThe decision set is composed ofThe representation is made of a combination of a first and a second color,the distribution is 1,2, …, M decision elements,representing the mth weight factor, there is a constraint:
initialization phase, relay committee member node from same block chainAndtrust value betweenRelay committee member nodes from different blockchainsAndtrust value betweenThe evaluation was performed as follows:
wherein S representsThe service provided, t, represents a time stamp.
Calculating relay committee member nodes through historical behavior characteristics among the relay committee member nodesAndtrust transfer value betweenConstructing a trust transfer matrix between relay committee member nodesFor trust transfer matrixIf the relay committee member nodeTrusted relay committee member nodeTrust transfer valueOtherwise trust the transfer value. For relay committee member nodesThe trust value after the k-step iteration is expressed as:
wherein,representing a regularization factor, ensuring that the trust value sum is 1;is a member node of the relay committeeStep k-1, calculating a feature vector according to the trust value of iteration, and settingFor the column vector of the confidence value after the k-step iteration, thenIs composed ofA column vector is composed, and the feature vector v satisfies the equation:
where I represents a unit vector.
The final trust value is obtained by normalizing the feature vector, and the elements in the feature vector v are normalized to obtain the final trust value vector.
If some relay committee member nodes are deducted by the intelligent contract for credit values in the same transaction, and the trust values of the relay committee member nodes are obviously improved, the system can judge that the nodes have collusion malicious behaviors.
For example, there is currently a relay committee consisting of 3 nodes of blockchains, blockchain a, respectively, consisting ofRepresenting, by blockchain BRepresenting, by blockchain CAnd (3) representing. At the beginning of the establishment of the relay committee, a trust evaluation model is executed to evaluate the trust value between the members of each relay committee, such as the member of relay committee P A And P b The trust value between them is 0.5. At presentAs a requesting blockchain to a requested blockchainInitiating a cross-chain request, in the presence of a relay committeeProxy node P of (1) A To exist in the relay committeeProxy node P of (1) C Initiate request, by P C To the direction ofAcquiring related information from the relay committee, packaging, and initiating a consensus request to all member nodes in the relay committee, if the relay committee member node P exists in the relay committee b 、P d 、P e 、P f ,P C Initiating consensus requests to the relay committee member nodes, P before consensus b And P d Trust value between 0.5, neutral value, P e And P f The trust value between them is 0.6. The intelligent contract prescribes that each relay committee member node should provide consensus information including transaction numbers, time stamps, signatures, signature time and the like within 1 second, the prescribes are imported into a knowledge graph as entities and entity relations of the relay committee member nodes, and the judgment of the behaviors of the relay committee member nodes is realized by judging the relativity and the similarity among the entities. Intelligent contracts record Relay Commission Member node P A 、P b 、P d 、P e 、P f ,P C Reputation value R (N, t), if P b 、P d And providing relevant information within 1 second, and comparing the provided relevant information with the entity and the relation in the knowledge graph to obtain the information which accords with the relevant regulations. P (P) b And P d The reputation values of (a) are R (100, t), respectively, because of P b And P d All completed within a prescribed time and are in compliance with the prescribed, their reputation values are R (100, t), R (100, t). If P A The reputation value before consensus is R (100, t), in the consensus process, the verification speed is too slow, so that the time spent for verification is 1.05 seconds and exceeds the time specified by the contract, but the comparison between the provided related information and the entity and the relationship in the knowledge graph accords with the related specification of the intelligent contract, then P A The reputation value of (2) is R (99, t) because of P A It is not discriminated as a malicious node because it meets the regulations. If the relay committee member node P e And P f The credit value before consensus is R (100, t), the trust value between them is 0.5, the related information is provided in 1 second, but the relationship is not in accordance with the related regulation when being compared with the entity in the knowledge graph, the intelligent contract deducts P e And P f The reputation value after deduction is R (99, t), if the trust value between them is 0.8, it can be deduced that the relay committee member node P e And P f There is collusion behavior。
Finally, it should be noted that: the above embodiments are only for illustrating the present invention and not for limiting the technical solution described in the present invention; thus, while the invention has been described in detail with reference to the various embodiments described above, it will be understood by those skilled in the art that the invention may be modified or equivalents; all technical solutions and modifications thereof that do not depart from the spirit and scope of the present invention are intended to be included in the scope of the appended claims.

Claims (4)

1. A method for detecting the collusion behavior of intelligent contract malicious nodes integrating knowledge graphs is characterized in that a plurality of nodes selected by each block chain system enter a relay committee, and in a cross-chain consensus phase, the behaviors of the relay committee member nodes are specified by using intelligent contracts of the intelligent contract system; the cross-chain consensus information is defined as an entity, the relationship is imported into a knowledge graph, and the cross-chain consensus information is defined as a trusted verification party; the intelligent contract records the credit value of each relay committee member node, matches the relevance and similarity of the entity and the relation of the test node through the knowledge graph, judges whether the test node completes the specification of the cross-link consensus information, changes the node number-credit value recorded on the intelligent contract, does not deduct the credit value of the test node if the test node completes the specification of the cross-link consensus information, and deducts the credit value if not; monitoring by using a trust evaluation model at the beginning of establishment of a relay committee, evaluating trust values among member nodes of the relay committee by using a trust evaluation model based on historical behaviors, and recording; if the credit values of the relay committee member nodes are simultaneously reduced and the credit values among the relay committee member nodes are increased, collusion behaviors exist among the relay committee member nodes;
designing an intelligent contract system, wherein the intelligent contract system comprises the steps of defining the state of an intelligent contract, defining intelligent contract rules and defining constraint conditions; to be used forRepresenting intelligenceContract enabling system->Representing intelligent contracts residing in the relay committee; />Representing a knowledge graph; />Representing the current state of the smart contract system, limited by +.>;/>State settings representing an intelligent contract system including start, wait, execute, and end; the intelligent contract system is in a certain state at any moment, and the state transition of the intelligent contract system is triggered by a knowledge graph mechanism;
the state transition of the smart contract system meets the following conditions: defining execution can only be performed by connection to smart contractsIs automatically triggered when the condition is satisfied; access Smart contracts->The only condition of (a) is to set the knowledge patterns of input and output +.>The method comprises the steps of carrying out a first treatment on the surface of the Proof of knowledge pattern->Intelligent contract bringing system>The only conditions for state transition are: if and only if the knowledge graph/>To intelligent contracts->Input data or Smart contracts->Knowledge graph->Outputting data;
the intelligent contract rule is defined as follows: the common information function PCI (H, N, TID, S, t) provided by the member node of the relay committee, wherein H represents a hash value, N represents a node set in the network, TID represents a transaction number, S represents a signature of the node, and t represents a time stamp; setting the format of the reputation value as R (N, t), and representing the reputation value of the node N at the moment of time t; setting up smart contractsThe constraint conditions of (2) are: at each time t, for each node N, there is: r (N, t)>=0, when node N provides consensus information: r (N, t+1) =r (N, t), when the node N does not provide consensus information as specified, performing: r (N, t+1) =r (N, t) -, Δ, where Δ represents the amount by which the reputation value is subtracted;
during operation of intelligent contract system, intelligent contractGenerating a consensus information function PCI, acquiring the consensus information function PCI, and preprocessing the same; according to the design of the knowledge graph, extracting corresponding entities and relations among the entities, and storing the extracted entities and relations in a Neo4j graph database to form the knowledge graph;
the trust evaluation model is divided into an initialization stage and a trust evaluation stage, wherein in the initialization stage, trust values among relay committee member nodes are represented by direct trust, and the trust values of other relay committee member nodes are represented by neutral values, and are 0.5 or are re-evaluated by using the trust evaluation model;
the process of re-evaluation using the trust evaluation model is as follows:
setting trust valuesUse +.>Representing n relay committee member nodes in the system,/->Represents the 1 st relay committee member node, < ->Representing the 2 nd relay committee member node, +.>Representing an nth relay committee member node; if the i-th relay committee member node +.>And j-th relay committee member node +.>There is a total trust evaluation function between->Decision set is composed of->The representation is made of a combination of a first and a second color,1,2, …, M decision elements, < >>,/>Representing the mth weight factor, there is a constraint:
initialization phase, relay committee member node from same block chainTrust value betweenRelay Committee member node from different blockchains +.>And->Trust value +.>The evaluation was performed as follows:
wherein S representsThe service provided, t represents a time stamp;
calculating relay committee member nodes through historical behavior characteristics among the relay committee member nodesAnd->Trust transfer value +.>Constructing a trust transfer matrix between relay committee member nodes>,/>For trust transfer matrix->Element, if Relay Commission Member node +.>Trusted relay committee member node->Trust transfer value +.>Otherwise trust transfer value +>The method comprises the steps of carrying out a first treatment on the surface of the For relay committee member node->The trust value after the k-step iteration is expressed as:
wherein,representing a regularization factor, ensuring that the trust value sum is 1; />Is a member node of the relay committee->The trust value of the k-1 step iteration is calculated, the feature vector is set up +.>For the column vector of the confidence value after the k-step iteration, then +.>Is composed ofA column vector is composed, and the feature vector v satisfies the equation:
wherein the method comprises the steps ofIRepresenting a unit vector;
the final trust value is obtained by normalizing the feature vector, and the elements in the feature vector v are normalized to obtain the final trust value vector.
2. The knowledge graph-fused intelligent contract malicious node collusion behavior detection method according to claim 1, wherein the cross-chain consensus information specification is: the behavior of each relay committee member node must be: providing its consensus information over a time frame.
3. The knowledge-graph-fused intelligent contract malicious node collusion behavior detection method according to claim 2, wherein the consensus information comprises transaction numbers, signatures, signature times and time stamps.
4. The knowledge-graph-fused intelligent contract malicious node collusion behavior detection method according to claim 1,the method is characterized in that in a cross-link consensus stage based on a relay committee, when a request chain initiates a cross-link request to an agent node of a requested chain in the relay committee through an agent node in the relay committee, the requested chain packages data after receiving the cross-link request, and initiates cross-link consensus to all member nodes in the relay committee, so as to verify the legality and safety of the data, and the process needs the node to confirm and sign the current transaction; at this time, a timer in the smart contract is started, which is the time ofSecond, each relay committee member node needs to complete signature before the timer finishes timing, and returns to the initiating node; importing the entity and entity relation of the relay committee member nodes into a knowledge graph, and judging the behaviors of the relay committee member nodes by judging the relevance and the similarity among the entities; if the relevance and the similarity between the test node and the knowledge graph are not matched, returning the result to the intelligent contract, and deducting the credit value of the intelligent contract.
CN202311639580.4A 2023-12-04 2023-12-04 Knowledge graph-fused intelligent contract malicious node collusion behavior detection method Active CN117354050B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311639580.4A CN117354050B (en) 2023-12-04 2023-12-04 Knowledge graph-fused intelligent contract malicious node collusion behavior detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311639580.4A CN117354050B (en) 2023-12-04 2023-12-04 Knowledge graph-fused intelligent contract malicious node collusion behavior detection method

Publications (2)

Publication Number Publication Date
CN117354050A CN117354050A (en) 2024-01-05
CN117354050B true CN117354050B (en) 2024-02-23

Family

ID=89363509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311639580.4A Active CN117354050B (en) 2023-12-04 2023-12-04 Knowledge graph-fused intelligent contract malicious node collusion behavior detection method

Country Status (1)

Country Link
CN (1) CN117354050B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112488679A (en) * 2020-12-03 2021-03-12 陈鹏 Cross-link contract analysis method of block chain, relay chain and cross-link system
CN113098689A (en) * 2021-02-25 2021-07-09 西安电子科技大学 Trust-establishing cross-chain consensus method, system, storage medium and application
WO2022062976A1 (en) * 2020-09-23 2022-03-31 华为技术有限公司 Cross-blockchain system for executing transactions, and cross-blockchain transaction method and device
CN115499129A (en) * 2022-06-14 2022-12-20 广州链融信息技术有限公司 Multimode trust cross-chain consensus method, system, medium, equipment and terminal
CN116452207A (en) * 2023-04-20 2023-07-18 浙江大学 Cross-link combined payment method based on relay link
CN116506884A (en) * 2023-04-28 2023-07-28 桂林电子科技大学 Block chain node trust value calculation method based on wireless Mesh network
WO2023201927A1 (en) * 2022-04-23 2023-10-26 东南大学 Blockchain cross-chain regulation method for governance of chain by chain
CN116996521A (en) * 2023-09-28 2023-11-03 江西农业大学 Relay committee cross-chain interaction system and method based on trust evaluation model

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12034867B2 (en) * 2021-08-11 2024-07-09 International Business Machines Corporation Blockchain with random committee selection
US20230139892A1 (en) * 2021-10-27 2023-05-04 Industry-Academic Cooperation Foundation, Yonsei University Apparatus and method for managing trust-based delegation consensus of blockchain network using deep reinforcement learning

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022062976A1 (en) * 2020-09-23 2022-03-31 华为技术有限公司 Cross-blockchain system for executing transactions, and cross-blockchain transaction method and device
CN112488679A (en) * 2020-12-03 2021-03-12 陈鹏 Cross-link contract analysis method of block chain, relay chain and cross-link system
CN113098689A (en) * 2021-02-25 2021-07-09 西安电子科技大学 Trust-establishing cross-chain consensus method, system, storage medium and application
WO2023201927A1 (en) * 2022-04-23 2023-10-26 东南大学 Blockchain cross-chain regulation method for governance of chain by chain
CN115499129A (en) * 2022-06-14 2022-12-20 广州链融信息技术有限公司 Multimode trust cross-chain consensus method, system, medium, equipment and terminal
CN116452207A (en) * 2023-04-20 2023-07-18 浙江大学 Cross-link combined payment method based on relay link
CN116506884A (en) * 2023-04-28 2023-07-28 桂林电子科技大学 Block chain node trust value calculation method based on wireless Mesh network
CN116996521A (en) * 2023-09-28 2023-11-03 江西农业大学 Relay committee cross-chain interaction system and method based on trust evaluation model

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于信誉值创建数字资产的区块链系统;王醒;翁健;张悦;李明;;信息网络安全(05);全文 *
王醒 ; 翁健 ; 张悦 ; 李明 ; .基于信誉值创建数字资产的区块链系统.信息网络安全.2018,(05),全文. *

Also Published As

Publication number Publication date
CN117354050A (en) 2024-01-05

Similar Documents

Publication Publication Date Title
CN116194929A (en) Training of machine learning systems for transaction data processing
CN111612455A (en) Power consumption information protection-oriented Byzantine fault-tolerant alliance chain consensus method, system and storage medium
CN111506722A (en) Knowledge graph question-answering method, device and equipment based on deep learning technology
US20190394215A1 (en) Method and apparatus for detecting cyber threats using deep neural network
CN109784015A (en) A kind of authentication identifying method and device
Liu et al. A concurrent fault diagnosis method of transformer based on graph convolutional network and knowledge graph
EP3591561A1 (en) An anonymized data processing method and computer programs thereof
CN114090408A (en) Data monitoring and analyzing method and device, computer equipment and storage medium
WO2019058340A1 (en) Method for executing smart contracts through electronic processing means using the blockchain technology
US11539730B2 (en) Method, device, and computer program product for abnormality detection
CN113672654B (en) Data query method, device, computer equipment and storage medium
CN114219596A (en) Data processing method based on decision tree model and related equipment
CN117354050B (en) Knowledge graph-fused intelligent contract malicious node collusion behavior detection method
CN111582878A (en) Transaction risk prediction method, device and system
CN112200549B (en) Block chain link point verification method and payment verification platform applied to block chain payment
CN114596612A (en) Configuration method of face recognition model, recognition system, computer equipment and medium
CN110677494B (en) Access response method and device
CN114511200A (en) Job data generation method and device, computer equipment and storage medium
EP4217897A1 (en) A method of training a submodule and preventing capture of an ai module
CN113837235B (en) Intelligent body behavior responsibility-following method based on social network privacy negotiation system
CN110516075A (en) Early warning report-generating method, device and computer equipment based on machine learning
Deshpande et al. Multilevel credit card fraud detection using face recognition and machine learning
CN110415099A (en) A kind of credit financing swindle recognition methods, system and electronic equipment
WO2022267181A1 (en) Method and apparatus for generating code list, computer device, and storage medium
CN116127033A (en) Network illegal behavior user identification method and corresponding device

Legal Events

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