Patents
Literature
Patsnap Eureka AI that helps you search prior art, draft patents, and assess FTO risks, powered by patent and scientific literature data.

70 results about "Data-flow analysis" patented technology

Data-flow analysis is a technique for gathering information about the possible set of values calculated at various points in a computer program. A program's control flow graph (CFG) is used to determine those parts of a program to which a particular value assigned to a variable might propagate. The information gathered is often used by compilers when optimizing a program. A canonical example of a data-flow analysis is reaching definitions.

Automatic program repairing method based on data flow driving

PendingCN120872836AError detection/correctionValidation testData stream
The invention relates to an automatic program repairing method based on data flow driving, which takes an error file and a method signature as input, and reports error information in a defect positioning tool or an integrated development environment. Secondly, handing over error information and original defect codes to a large language model, extracting an element list related to defects from the large language model, then constructing defect contexts, using a search tool to retrieve key element definitions and dependency relationships, integrating control flow and error mode information, and finally obtaining defect information; then, the retrieved information, the original defect codes and the potential defect types are integrated into cue words, and the cue words are submitted to a large language model to generate candidate patches. And then the candidate patch is verified, and if the candidate patch does not pass the verification, error reporting information during the verification is combined with the candidate patch to carry out iterative optimization until the candidate patch successfully passes all test verification or the maximum number of iterations is reached. According to the method, context semantics are enhanced by means of data flow analysis, and the repairing accuracy and efficiency are improved.
Owner:CHONGQING UNIV

Research and development platform language intelligent analysis method based on multi-system fusion

The invention discloses a research and development platform language intelligent analysis method based on multi-system fusion, and relates to the technical field of language intelligent analysis. According to the method, various language data in a multi-system fusion research and development platform are efficiently processed, cleaned and coded to generate a standardized data set by customizing a data adaptation interface, deep lexical and syntactic analysis and semantic role labeling are performed on the standardized data set, related features are extracted, a semantic mapping network is constructed, and semantic feature vectors are generated; cross-modal feature fusion is realized, deep meanings of language data are comprehensively captured, rich feature input is provided for intelligent analysis, a constructed intelligent analysis model can perform accurate intelligent analysis and intention recognition on natural language instructions and technical documents, and the intelligent analysis model can be used for performing intelligent analysis and intention recognition on the technical documents by means of compiling environment simulation, debugging information semantic optimization and the like. The model training effect is improved, and the analysis accuracy and the hardware compatibility are improved through hardware behavior simulation, real-time data flow analysis, user feedback and other modes.
Owner:SOUTHERN POWER GRID DIGITAL GRID RESEARCH INSTITUTE CO LTD

Platform and method for automatically testing and generating kernel export function of operating system

The invention provides an automatic test generation platform and method for an operating system kernel derived function. The method comprises the following steps: (1) intelligent symbol extraction and analysis; (2) generating an LLM-driven test code; (3) performing automatic compiling and virtualization testing; and (4) intelligent error diagnosis and repair. According to the method, the test coverage degree is greatly improved, through the multi-level symbol context extraction technology, single function information is extracted, the dependency relationship of related functions in the same element is analyzed, a function call graph and data flow analysis are constructed, rich context information is provided for LLM, and the problem that traditional manual test case writing is incomplete in coverage is solved.
Owner:HANGZHOU SAIFUNAS TECH CO LTD

Redundant code identification method and system based on data flow diagram

The invention provides a redundant code identification method and system based on a data flow diagram. The problem that multiple types of redundant codes cannot be comprehensively identified in the prior art is solved. Identifying a waste interface set through set operation processing of an interface access log, a total station scanning result and code warehouse information; performing dynamic call detection and data flow analysis based on a static analysis tool and the abstract syntax tree, and identifying an internal useless code set; identifying and combining a waste script set and a waste consumer set to form a waste component set through state check and log analysis of consumer operation states, script execution records and task scheduling configuration; constructing a whole system call graph to perform reverse reachability analysis, and identifying a cascade waste code set; and finally, generating a complete redundant code report containing statistical data, a detailed list and risk assessment based on the various sets.
Owner:BEIJING YULORE INNOVATION TECH

Multi-language program and data flow analysis using LLM

A computer-implemented system analyzes program and data flows in a software system comprising code written in multiple programming languages using a generative large language model (LLM) directed by programming-language-specific prompts. The LLM identifies functional components within the code, generating labeled graph nodes that include a node type, a node name, and dependency information. A graph construction computer system processes the labeled graph nodes to generate a directed graph, where nodes represent functional components and directed edges represent dependencies. The system stores the graph in a database and provides a web-based interface for visualization, allowing users to explore, query, and analyze program and data flows across the software system. The system enables automated, language-agnostic dependency mapping, facilitating software analysis, debugging, and modernization.
Owner:MORGAN STANLEY SERVICES GROUP INC

Compiler method and apparatus for identifying dynamic single-use producing definitions in programs

A method, apparatus, and system are disclosed. The method includes constructing a static single assignment (SSA) form and a static single use (SSU) form for a program; setting a single-use disqualifying property locally for each SSU version, and propagating the single-use disqualifying property both forward and backward on an SSU graph uniquely formed from the constructed SSU form so it becomes a global property; transferring results from the SSU form to the SSA form to set a single-use property locally for each SSA version based on an occurrence of any use being associated with a disqualifying SSU version; performing data flow analysis on an SSA graph uniquely formed from the constructed SSA form so the single-use property becomes a global property to identify one or more definitions as dynamic single-use for variables in the program; and generating computer-readable instructions for executing the program based on the one or more definitions identified as dynamic single use for the variables in the program, wherein the one or more definitions identified as dynamic single-use has a defined value used exactly one time during execution of the program.
Owner:SAMSUNG ELECTRONICS CO LTD

Waste code cleaning method and device based on accessibility analysis

The invention relates to the technical field of code classification processing, and discloses a waste code cleaning method and device based on reachability analysis, equipment and a medium, and the method comprises the steps: scanning static codes in a preset program, and collecting and analyzing a dependency relationship and a reference relationship between the static codes; analyzing the reachability of the dependency relationship and the reference relationship between the codes, and determining static codes without the reference relationship; marking the static code without the reference relationship as a waste code according to the reachability analysis result; according to the marked abandoned codes, clearing suggestions and clearing operation steps of the abandoned codes are made, output and displayed. The method can be applied to development of business systems such as financial science and technology, medical treatment, health and pension and the like, waste codes in projects are accurately recognized and cleared through combination of control flow analysis and data flow analysis, and code quality and maintenance efficiency are improved.
Owner:CHINA PING AN LIFE INSURANCE CO LTD

Multi-language program and data flow analysis using LLM

A computer-implemented system analyzes program and data flows in a software system comprising code written in multiple programming languages using a generative large language model (LLM) directed by programming-language-specific prompts. The LLM identifies functional components within the code, generating labeled graph nodes that include a node type, a node name, and dependency information. A graph construction computer system processes the labeled graph nodes to generate a directed graph, where nodes represent functional components and directed edges represent dependencies. The system stores the graph in a database and provides a web-based interface for visualization, allowing users to explore, query, and analyze program and data flows across the software system. The system enables automated, language-agnostic dependency mapping, facilitating software analysis, debugging, and modernization.
Owner:MORGAN STANLEY SERVICES GROUP INC

Application packaging processing method, storage medium and electronic equipment

The invention provides an application packaging processing method, a storage medium and electronic equipment, and is applied to the technical field of software application. According to the method, a full-process closed-loop mechanism of the front stage, the middle stage and the rear stage of packaging is constructed; before packaging, application codes and key parameters are subjected to security detection; in the packaging process, grammar and semantic errors are deeply recognized through a regular engine, an abstract syntax tree and data flow analysis, and a diagnosis report is generated; and after packaging, executing an automatic test by utilizing the matched test case to obtain an application test result. Based on the diagnosis report and the test result, whether repackaging is needed or not is intelligently analyzed, packaging parameters and test cases are adjusted according to the error types and fed back to a safety detection link in a circulating mode, automatic error recognition and self-adaptive optimization are achieved, and therefore the safety and reliability of application packaging are effectively improved, and the development risk is reduced.
Owner:HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD

Inferring type definitions of user-defined types of variables in application program code

Type definitions of user-defined types in application program code for which definitions are absent (“unknown types”) are inferred. A static analyzer implements two passes of a fixed-point type inference algorithm. Each pass encompasses a plurality of traversals of the application's control flow to build inferred definitions of unknown types until the inferred definitions are maximally built. To build an inferred definition, based on inferring a variable is an unknown type, the static analyzer infers member variables / functions of the unknown type based on contextual information associated with the variable. Type information of unknown types is propagated along control flow paths. After the first pass terminates, unknown types can be assigned known types based on matching of inferred definitions. Inferred definitions of remaining unknown types are incorporated into the application program code. A second pass of type inferencing and data flow analysis are then performed with the inferred definitions incorporated therein.
Owner:VERACODE INC

Operating system kernel export function automated test generation platform and method

The application provides an operating system kernel export function automatic test generation platform and method, comprising the following steps: (1) intelligent symbol extraction and analysis; (2) LLM driven test code generation; (3) automatic compilation and virtualization test; (4) intelligent error diagnosis and repair. The application greatly improves test coverage. Through multi-level symbol context extraction technology, not only single function information is extracted, but also the dependency relationship of related functions in the same element is analyzed and a function call graph and data flow analysis are constructed, rich context information is provided for LLM, and the problem of incomplete coverage of traditional manual test case writing is solved.
Owner:HANGZHOU SAIFUNAS TECH CO LTD

Static analysis tool test case generation method based on program slicing technology

The invention discloses a static analysis tool test case generation method based on a program slicing technology, which comprises the following steps: step 1) according to a defect report of a static analysis tool, collecting and extracting variable information related to generation of a specific defect in a program as a slicing criterion; 2) through control flow analysis and data flow analysis, recording data and a control dependency relationship between statements, constructing a program dependency graph, and calculating a statement set having a dependency relationship with a slicing criterion; 3) positioning nodes corresponding to the statement set in the abstract syntax tree of the source code through a depth-first search algorithm, and deleting other nodes; the method comprises the following steps of (1) collecting a user-defined type or an external function declaration which is used through static program analysis, and outputting the type definition and the function declaration to an independent header file, and (5) writing edited codes into a file, and clearing redundant information to serve as a test case, the method adopts two-section analysis, and the test case can be generated efficiently and precisely.
Owner:NANJING UNIV

Aviation safety-oriented evidence-driven large language model MISRA C rule review method and system

The invention provides an evidence-driven large language model MISRA C rule review method and system for aviation safety. According to the method, formalized feature extraction is carried out from four aspects of grammar structure features, semantic structure features, logic analysis features and preprocessing behavior features for target codes according to various rules of MISRA C forcing class rules, and diagnosis information is diagnosed in combination with an industrial-grade compiler; generating a structured evidence set comprising abstract syntax tree node statistical features, code context structure features, control flow graph features, function internal data flow analysis features, symbol and type table features and macro definition analysis features; and based on the structured evidence set and the large language model, executing evidence tracing, rule matching and logical reasoning according to a preset thinking chain process, and outputting a structured judgment result containing illegal rule numbers, evidence description and code positions. According to the method, the false alarm rate can be remarkably reduced while the high rule coverage rate and the detection accuracy are kept.
Owner:NANJING UNIV OF AERONAUTICS & ASTRONAUTICS

A C / C++ post-release reference dynamic detection method based on pointer dereference instrumentation

The application discloses a C / C++ post-release re-reference dynamic detection method based on pointer dereference insertion, and when software testing is performed, a traditional Address Sanitizer cannot detect logical errors of address legality; the application realizes dynamic detection of pointer reuse memory errors through data flow analysis and insertion of GetElementPtr instructions.
Owner:ZHEJIANG UNIV

Method and system to perform interval analysis in source code using functional approach

This disclosure relates generally to method and system to perform interval analysis in source code using functional approach. The method performs data-flow analysis using functional approach to solve infinite-height analyses and properties are validated such as array index within bounds, non-zero division, and preventing arithmetic overflow or underflow on real-life applications. The method receives source code comprising one or more functions to perform a whole program interval analysis over each function using a functional approach to identify range interval of each variable at every program point in the source code. Further, summary for each function is computed which is stored in the form of variable and its corresponding range interval at every exit point of each function. Finally, an incremental interval analysis is performed over each function having edited version change and summary is recomputed for each function impacted by change to optimize overall interval analysis.
Owner:TATA CONSULTANCY SERVICES LTD

Power software vulnerability automatic repairing method and device based on semantic enhancement and storage medium

The application discloses a kind of based on semantic enhancement's electric power software vulnerability automatic repair method, device and storage medium, the method includes: obtaining the historical source code of target software;According to the abstract syntax tree of preprocessed source code;Based on abstract syntax tree, data flow analysis is carried out to preprocessed source code to construct data propagation chain;The weight score of key symbol is calculated to each function level code segment in preprocessed source code and it is injected as semantic enhancement information into the attention mechanism of model;Additional multilayer perception machine classifier is introduced in the output end of the encoder of model;Preprocessed source code and data propagation chain are input into encoder, and the output of encoder is respectively input into multilayer perception machine classifier and decoder;The decoder generates repair patch according to the output of encoder and multilayer perception machine classifier.The application reduces the computing overhead while ensuring the repair effect, realizes the efficient, accurate and automatic repair of electric power software system vulnerability.
Owner:SOUTH CHINA UNIV OF TECH

A CUDA code generation method based on data flow analysis

The application provides a CUDA code generation method based on data flow analysis, comprising: converting a hardware-aware algorithm into a multi-memory level data flow graph based on architecture information of a multi-memory level in target hardware, the data flow graph comprising a plurality of task nodes representing different operation tasks in the algorithm, a plurality of affine edges, and a plurality of cache nodes representing memories, the cache nodes comprising memory levels and memory data, the affine edges comprising memory access information between two cache nodes connected by the affine edges and representing memories of adjacent levels; mapping each task node to the target hardware to obtain a target hardware unit allocated to an operation task of each task node; adjusting a blocking strategy of memory data of each cache node to maximize the performance of all operation tasks as an optimization target to obtain a memory data blocking result; and generating CUDA code indicating execution of operation tasks by each target hardware unit based on the data flow graph, the memory data blocking result, and memory access information of each affine edge.
Owner:INST OF COMPUTING TECH CHINESE ACAD OF SCI

Generalized dataflow analysis for static application security testing

A superlattice corresponding to static application security testing (SAST) of source code specifies lattices respectively corresponding to static analyses performable on the source code. Each lattice is specified by all possible lattice elements of the lattice and an operator indicating how two lattice elements of the lattice are combined during the static analysis to which the lattice corresponds. A lattice product of the lattices specified by the superlattice is generated based on all the possible lattice elements of each lattice and the operator of each lattice indicating how two lattice elements are combined. Generalized dataflow analysis executable code is executed on the source code, using the lattice product, to perform the SAST of the source code, including the static analyses respectively corresponding to the lattices.
Owner:MICRO FOCUS LLC

Static security analysis and vulnerability detection method and system for unmanned aerial vehicle codes

The invention discloses an unmanned aerial vehicle code-oriented static security analysis and vulnerability detection method and system, and relates to the technical field of information security, and the method comprises the steps: carrying out the preprocessing of an unmanned aerial vehicle code, and obtaining standardized code data; performing security vulnerability static detection and performance and complexity analysis on the standardized code data to obtain a vulnerability detection result and a performance analysis result; evaluating and quantifying the obtained vulnerability detection result and the performance analysis result to obtain comprehensive analysis data; and generating a final visual analysis report through the comprehensive analysis data. According to the method, a multi-stage static analysis process is adopted, syntactic analysis, rule detection, data flow analysis and control flow analysis are combined, deep security detection of unmanned aerial vehicle codes is realized, the comprehensiveness and accuracy of vulnerability recognition are improved, two dimensions of security and performance are covered at the same time, and the quality of the unmanned aerial vehicle codes is comprehensively reflected. Quantifiable code quality evaluation is convenient for long-term quality management of an unmanned aerial vehicle project.
Owner:UNIV OF ELECTRONICS SCI & TECH OF CHINA

An Android software static analysis method based on hybrid mode

This invention proposes a hybrid-mode-based static analysis method for Android software, belonging to the field of malware analysis technology. It primarily addresses the accuracy degradation problem caused by existing Android cross-language static analysis frameworks using function digests for inter-function data flow connections. The main solutions include: function-level data flow analysis of the Android Java layer; lightweight inter-function data dependency analysis of the Android Native layer, generating dynamic function digests for each function; and full-program data flow analysis of the Android Java layer, where data flow connections involving Native function calls are reconstructed using function digests.
Owner:UNIV OF ELECTRONICS SCI & TECH OF CHINA +1

A machine learning based data flow analysis method

ActiveCN121479276BEnsure timing coordinationThe feature extraction process is stable and efficientBiological modelsMachine learningData streamEngineering
The application discloses a kind of data flow analysis methods based on machine learning, comprising the following steps: collecting data flow information, generating data flow characteristic sequence;Build the data flow time series analysis model including feature extraction layer, feature fusion layer and self-learning module;Feature sequence is extracted, and time series embedding vector is generated;Weighted fusion is realized through dynamic attention weight mechanism, and data flow fusion representation vector is generated;The fusion result is calculated, and data flow path, node interaction intensity, prediction bias and abnormal probability information are obtained, and abnormal sample is marked when abnormal probability exceeds threshold value;Model parameters are dynamically adjusted by self-learning module;Based on the updated model, the abnormal risk assessment of real-time data flow is realized.The application fuses long short-term memory network and Transformer structure, has the advantages of strong self-adaptability, high prediction accuracy and excellent real-time performance.
Owner:FUYANG GUJIU WEILAN TECHNOLOGY CO LTD

Ethereum intelligent contract deletion operation vulnerability detection method based on static analysis and detector thereof

The invention discloses an Ethereum smart contract deletion operation vulnerability detection method based on static analysis and a detector thereof, and belongs to the technical field of block chains. The method comprises the steps that firstly, byte code disassembling and contract type recognition are carried out, byte codes are analyzed, and contract types such as ERC-20 and ERC-721 are recognized through a function selector; then executing path and data flow analysis, traversing the execution path by adopting depth-first search (DFS), and tracking external input in combination with taint analysis; and finally, identifying the SSTORE zero clearing operation or the SELFDESTRUCT operation in which the permission verification is missing, and generating a report containing the instruction offset, the function information and the vulnerability severity. Through authority verification sequence analysis, it is ensured that the unauthorized deletion operation is accurately detected, and an efficient tool is provided for developers to enhance the security of the smart contract.
Owner:HEILONGJIANG UNIV

RISC-V vector extension-oriented cross-function vector register cooperative allocation method and device

PendingCN122285602Aincrease profitAvoid resource fragmentationComputer hardwareRegister allocation
This invention relates to the field of computer technology and provides a method and apparatus for cross-function vector register collaborative allocation for RISC-V vector extensions. The method includes: performing cross-function data flow analysis on the program to identify active vector registers and construct an active information set; establishing LMUL constraint propagation relationships based on this and determining the target LMUL configuration; performing collaborative vector register allocation between the caller and callee based on the active information set and the target LMUL configuration, and establishing a register mapping relationship; performing overflow optimization based on vector characteristics for vector data that cannot be retained; and collaboratively maintaining the vector execution context at function call boundaries. This invention can reduce register reallocation and overflow overhead during cross-function calls, reduce memory access pressure, and improve RISC-V vector register resource utilization and program execution efficiency.
Owner:BEIJING VCORE TECH CO LTD

Time sequence control method and device, storage medium and equipment

The invention belongs to the technical field of wireless control, and relates to a time sequence control method and device, a storage medium and equipment, and the method comprises the steps: splitting a control flow which needs to be executed by an RF control system for different user operation actions into processing steps which can be executed independently at least; establishing a dependency relationship model for each processing step; on the basis of the dependency relationship model, the functional logic of the RF control system and the data flow analysis result, whether the influence relationship exists among the processing steps of the different user operation actions or not is judged; the processing steps without the influence relation are controlled to be executed in parallel, and the processing steps with the influence relation are controlled to be executed in series; after each processing step is executed, verifying whether the first delay time of the RF control system reaches an expected target or not; and if the expected target is not reached, iteratively optimizing the dependency relationship model, and repeating the judgment, control and verification processes until the expected target is reached. According to the invention, system resource waste of the RF control system can be avoided.
Owner:FLYSKY TECH CO LTD

A method for detecting defects in unsafe code snippets in the Rust programming language

The application designs a detection method for the defect of the UNSAFE code segment in the Rust programming language, first, based on the rustc_lint module, whether the expression in the program language is contained in the unsafe block written by the developer is judged by using HIR; the structure of the expression is analyzed by using HIR; then, the unsafe operation is analyzed and identified by using MIR; finally, the safe expression or statement in the unsafe block written by the developer is reported; the data flow analysis technology for the function parameter is proposed, the alias propagation chain of the function parameter is found out; it is the key technology required for judging whether the function or method is marked with the unsafe keyword, and the target function is tested by combining the fuzz test technology to judge whether the function must be marked with the unsafe keyword.
Owner:NORTHEASTERN UNIV CHINA

Building energy consumption management method and system

The invention relates to the technical field of building energy-saving control, and discloses a building energy consumption management method and system. The core lies in that an energy consumption preset constraint condition and a data stream analysis method are invented, energy consumption characteristic analysis is performed on energy consumption data streams, building energy consumption distribution characteristics are identified, the characteristics are combined with environmental data, similarity calibration is performed on a preset energy-saving decision space, a decision trigger interval is determined, and candidate strategies are generated; and the fitness value of each candidate strategy is calculated and screened, so that the feasibility of the scheme is ensured. And further, on the basis of future energy consumption characteristics and environment data obtained through prediction, feedforward compensation optimization is carried out on the screened strategy, and a final optimization scheme is generated and executed. According to the method, through dynamic calibration and prediction optimization, active generation and self-adjustment of an energy-saving strategy are realized, and the intelligent level and energy efficiency of building energy management are improved.
Owner:TANGSHAN MINGJIA ARCHITECTURAL DESIGN CONSULTING CO LTD

Method and system for detecting forged login request vulnerabilities after third-party verification based on data flow analysis

The present invention proposes a method and system for detecting forged login requests after third-party verification based on data flow analysis, which belongs to the technical field of network security vulnerability detection. Mini-programs are collected on a large scale to construct a data set of mini-programs to be tested. The front-end code decompilation tool of the mini-program is used to automatically decrypt and unpack the wxapkg encrypted package of the front-end of the mini-program to be tested, and the front-end source code file of the mini-program to be tested is obtained. The data flow analysis method based on AST is used to perform data flow analysis on the front-end source code of each mini-program to be tested, identify the API parameters used in the third-party verification login process as the data source, analyze the flow of the data, model the client-server interaction, obtain the mini-program client-server interaction process diagram, and finally perform third-party verification after login request forgery vulnerability. The present invention can effectively detect the vulnerability of forged login requests after third-party verification in the mini-program ecosystem.
Owner:NAT UNIV OF DEFENSE TECH

Sensitive API data dependency analysis and ransomware detection method based on high-order function

The invention discloses a sensitive API data dependency analysis and ransomware detection method based on a high-order function, and relates to the technical field of computer security and program analysis. The method comprises the steps that an Android application program is received and preprocessed, the Android application program is converted into intermediate representation, a function call graph and a control flow graph are obtained, and a function analysis sequence is determined by traversing the function call graph through inverse topological sorting; and according to the determined function analysis sequence, performing intra-process data flow analysis on each method in the function call graph on a control flow graph of the method, and collecting a dependency relationship between a variable at each program point and a sensitive API sequence. According to the efficient sensitive API data dependency analysis and ransomware detection method based on the high-order function abstract, the characteristics that a high-order function can serve as a return value and a function can serve as parameter transmission are utilized, construction of a complex propagation graph when an API calling sequence is extracted through static analysis is avoided, and therefore the ransomware detection efficiency is improved.
Owner:NANJING UNIV OF POSTS & TELECOMM

A fuzzing method for continuous integration processes

ActiveCN115203041BImprove the efficiency of continuous integrationeffective guidanceError detection/correctionContinuous integrationData stream
The application discloses a kind of fuzzy testing methods for continuous integration process, it is related to software collaborative development field.The application includes the following steps: in the project of applying continuous integration, difference analysis is carried out to two adjacent submissions, the difference information of both is obtained, and change point is obtained according to difference information, and is stored in change point set;In the process of building project, data flow analysis is carried out according to change point information, and data flow analysis result is obtained;Program is inserted into using data flow analysis result, and the measured program that has been inserted is obtained;The measured program is carried out fuzzy testing, the fitness of seed test case is calculated in the testing process, and corresponding test resource is allocated to it according to fitness.The application more specifically tests the place where change is generated in continuous integration process, and reduces the overhead brought by manual construction test case.
Owner:BEIJING INFORMATION SCI & TECH UNIV

A smart contract bytecode similarity detection method based on graph neural network

The present invention discloses a method for detecting the similarity of smart contract bytecodes based on a graph neural network, comprising: disassembling the bytecode of the Ethereum virtual machine, performing data flow analysis and control flow analysis on the disassembly result, and obtaining a data flow graph and a control flow graph corresponding to the bytecode; combining the data flow graph and the control flow graph of each external function into a bytecode feature graph; training the graph neural network using a large number of smart contracts with similar labels, performing vectorization operations on the bytecode feature graph during the training process to obtain a feature vector; using the problem contract as a reference smart contract, inputting the bytecode feature graphs of the reference smart contract and the smart contract to be detected into the trained graph neural network respectively, obtaining corresponding feature vectors respectively, comparing the Euclidean distance of the two feature vectors, and measuring the similarity of the bytecodes of the two smart contracts. Compared with traditional methods, the present invention has higher accuracy, can effectively identify problem contracts, and enhance the security of the blockchain system.
Owner:ZHEJIANG UNIV