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

39 results about "Program Dependence Graph" patented technology

In computer science, a program dependence graph (PDG) is a representation, using graph notation, that makes data dependencies and control dependencies explicit. These dependencies are used during dependence analysis in optimizing compilers to make transformations so that multiple cores are used, and parallelism is improved.

Code quality adaptive evaluation and optimization method, system, equipment and medium

The invention provides a code quality adaptive evaluation and optimization method, system and device and a medium, and belongs to the technical field of computers. The method comprises the following steps: performing redundant information cleaning and standardization processing on an original code; selecting an adaptive parser to convert the processed code into an abstract syntax tree, and optimizing the abstract syntax tree; performing embedding processing on each node of the abstract syntax tree by using a pre-trained deep learning model to generate a node semantic vector, and performing aggregation, feature extraction and vector normalization operation to obtain a semantic vector representing code semantic features; extracting a dependency relationship from the abstract syntax tree to construct a program dependency graph, extracting node features by using a neural network model, and generating a dependency relationship analysis result; based on the semantic vector and the dependency analysis result, identifying a code potential problem by using an optimization algorithm and generating an optimization suggestion; codes are automatically modified according to optimization suggestions, the optimization effect is re-evaluated, and related models and algorithms are iteratively optimized according to feedback information.
Owner:浪潮智慧科技有限公司 +2

Binary code block semantic information automatic capturing method and related device

The invention discloses a method for automatically capturing semantic information of a binary code block and a related device, and relates to the technical field of computers.The method comprises the following steps that code disassembling and instruction level analysis are conducted on the binary code block, and a binary stream original instruction sequence is generated; performing semantic intermediate representation conversion and vocabulary overflow standardization on the binary stream original instruction sequence to obtain a binary code standardized instruction sequence; obtaining an instruction data dependency relationship and an instruction control dependency relationship corresponding to the binary code block, and constructing a corresponding binary code program dependency graph; semantic code node embedding is carried out on the binary code program dependency graph to generate a binary code representation vector corresponding to context semantics; and performing automatic semantic capture reasoning on the binary code representation vector corresponding to the context semantics through a pre-trained semantic understanding model to obtain semantic information of the binary code block. According to the method, the semantic information of the binary code block can be efficiently and accurately captured.
Owner:HUANENG POWER INT INC +1

Contract vulnerability detection method and system based on cross-granularity feature fusion and meta-learning

The invention discloses a contract vulnerability detection method and system based on cross-granularity feature fusion and meta-learning, and relates to the technical field of block chain security, the method comprises the following steps: obtaining a source code and a compiled byte code of a contract to be detected; source code semantic features are extracted from the source code, operation code execution features are extracted from the byte code, and graph structure features are extracted after a program dependency graph is constructed from the source code; performing cross-granularity attention interaction to generate cross-granularity fusion features; performing type-aware feature modulation on the cross-granularity fusion feature and a vulnerability type identifier of the current detection task, training a classifier by adopting a meta-learning strategy, and outputting a vulnerability detection result; and in response to the vulnerability detection result that the vulnerability exists, positioning the vulnerability code position based on the graph-source code attention weight matrix generated in the cross-granularity attention interaction process, thereby solving the problem of poor generalization ability in a rare vulnerability scene with scarce samples.
Owner:CHENGDU UNIV OF INFORMATION TECH

Binary vulnerability retrieval and positioning method and system based on high-dimensional vulnerability characterization

The invention relates to the field of code vulnerability detection, in particular to a binary vulnerability retrieval and positioning method and system based on high-dimensional vulnerability characterization, and the method comprises the steps: firstly inputting a binary file, analyzing the structural information of the binary file, and analyzing a machine instruction; extracting binary file function information, generating a cross-platform basic block IR instruction sequence, constructing a control flow graph, and constructing a data dependency graph; splicing the program dependency graph feature vector and the basic block IR instruction sequence feature vector, and performing multi-modal feature fusion to generate a comprehensive high-dimensional vulnerability representation vector; and finally, inputting the high-dimensional vulnerability representation vector into an index for searching to obtain a plurality of nearest neighbor indexes and distances, converting the distances into similarity, filtering according to a similarity threshold to obtain a most similar vulnerability vector, and obtaining vulnerability information and vulnerability positions corresponding to the vulnerability vector. The problems that traditional binary vulnerability detection cross-platform and compiler optimization detection fails and the result reliability is low are solved.
Owner:HUANENG POWER INT INC +1

Method and system for generating coverage loop boundary test case based on program slices

The invention discloses a method and a system for generating a test case for covering a loop boundary based on program slices. The method comprises the following steps of: inputting a source code to be tested and a target loop line number; the method comprises the following steps: analyzing a to-be-tested source code based on an abstract syntax tree technology, and extracting key node information to construct a program dependency graph; collecting related code lines through graph traversal by taking a loop structure needing to be analyzed as a criterion, and generating a minimum executable loop slice; performing symbolic execution on the minimum executable loop slice, simulating a loop execution process, capturing condition judgment nodes, and forming a track dictionary; determining a strategy based on the trajectory dictionary and the variable state, and when the strategy is numerical search, performing parameter space exploration; when the strategy is symbolic analysis, analyzing the cyclic condition expression and solving the optimal parameter; generating candidate test cases based on the analysis result; executing the candidate test case, calculating the number of loop iterations, and determining whether an expected state is reached; and if the expected state is reached, outputting a final test case.
Owner:NANJING UNIV OF AERONAUTICS & ASTRONAUTICS

A variable correlation-based PLC information security analysis model construction method

The application provides a PLC information security analysis model construction method based on variable association, which comprises the following steps: analyzing PLC code to obtain PLC variables, combining variable pairs according to network blocks, splicing variable pairs in a global range to obtain global variable dependency relations, constructing a weighted PLC program dependency graph according to the global variable dependency relations and SCADA log features, cleaning the relationship edges of the weighted PLC program dependency graph, and enhancing the dependency strength of the dependency edges of the cleaned weighted PLC program dependency graph to generate a PLC information security analysis model. The method can simultaneously act on two levels of structure optimization and weight optimization, and realize stable reconstruction of PLC dependency relations. Not only can the method effectively remove redundant dependency edges, but also can maintain the stability of key dependency relations under the conditions of data drift and noise interference, and significantly improve the accuracy and robustness of the PLC information security analysis model.
Owner:GUANGZHOU UNIVERSITY

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

Binary program vulnerability detection method and related device

The invention belongs to the technical field of power system security protection, and discloses a binary program vulnerability detection method and related device.The binary program vulnerability detection method comprises the steps that a VEX instruction of a to-be-detected binary program is obtained, and a program dependency graph is generated according to the VEX instruction; disassembling the to-be-detected binary program to obtain an assembly instruction, traversing the program dependency graph based on a preset sensitive operation instruction, and performing operand granularity slicing of the assembly instruction to obtain assembly instruction slices; a pre-trained encoder model is adopted to obtain feature vectors of the assembly instruction slices; and according to the feature vector of the assembly instruction slice, based on a pre-trained vulnerability detection model, obtaining a vulnerability detection result of the assembly instruction slice. According to the method, accurate dependency analysis is carried out around operands, a large number of irrelevant instruction interferences in binary program codes are effectively filtered out, most sensitive operations generating vulnerabilities can be covered based on preset sensitive operation instructions, the noise influence of redundant information on a model is reduced, and the robustness and generalization ability of detection are improved.
Owner:CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD +1

A method for detecting vulnerabilities of smart contracts based on self-supervised learning

This invention relates to the field of smart contract security and discloses a smart contract vulnerability detection method based on self-supervised learning. The aim is to obtain effective structured representations of smart contract vulnerabilities at the bytecode level, and to improve the robustness of smart contract vulnerability detection by learning key features related to vulnerabilities through self-supervised learning. The method includes: collecting smart contract bytecode; constructing a smart contract opcode program dependency graph; extracting vulnerability-related program dependency graph slices to construct a self-supervised learning dataset and a vulnerability detection model training dataset; training a self-supervised learning model using the self-supervised learning dataset and extracting program dependency graph slice features; training a smart contract vulnerability detection model using the vulnerability detection model dataset; and using the trained self-supervised learning model to extract vulnerability-related features of the smart contract under test, and inputting these features into the trained smart contract vulnerability detection model for vulnerability detection.
Owner:UNIV OF ELECTRONICS SCI & TECH OF CHINA +2

Source code vulnerability detection method and device based on graph neural network and multi-branch feature fusion and medium

The invention provides a source code vulnerability detection method and device based on a graph neural network and multi-branch feature fusion and a medium, and the method comprises the steps: carrying out the static analysis of an input source code, and constructing a program dependency graph; coding the text information of the nodes in the program dependency graph based on a pre-training language model to generate a semantic embedding representation of structure perception; in combination with centrality index analysis, converting the program dependency graph, and constructing a converted three-channel image; constructing a feature extraction network, and performing feature extraction on the program dependency graph, the text information and the three-channel image through the feature extraction network to obtain graph features, text features and image features; and fusing the graph features, the text features and the image features through an adaptive feature fusion module, and inputting the fused features into a full-connection layer classifier to complete vulnerability classification. According to the method, potential problems in source codes can be comprehensively understood and analyzed, and the accuracy of vulnerability detection is remarkably improved.
Owner:HUZHOU UNIVERSITY

Program dependency graph feature-based metamorphic relation identification method and device

The invention relates to the technical field of computers, in particular to a metamorphic relation identification method based on program dependency graph features. The method comprises the following steps: obtaining a control flow graph (CFG) of a target program, and obtaining a control dependency graph according to the control flow graph and a forward dominating tree; obtaining a program dependency graph according to the control dependency graph and the data dependency relationship; according to a program analysis requirement slicing criterion C = (N, V) of a target program, graph traversal is conducted on the program dependency graph, program slicing features are obtained, N represents instructions in the target program, and V represents a variable set; and inputting the program slice features into a target prediction model for identification, and obtaining a prediction result corresponding to the metamorphic relationship of the target program. By the adoption of the method and device, the metamorphic relation obtaining accuracy can be improved, the situation that the metamorphic relation cannot be obtained is reduced, program testing convenience can be improved, and software quality is improved.
Owner:HUANENG NUCLEAR ENERGY TECH RES INST CO LTD +1

A method, apparatus, device, and medium for automatic translation of deep learning code.

This disclosure provides an automatic translation method, apparatus, device, and medium for deep learning code. The method includes: acquiring source code written on a deep learning framework based on a first heterogeneous computing hardware; parsing the source code to extract its lexical sequence and program dependency graph; inputting the lexical sequence and program dependency graph into a graph-aware cross-attention Transformer model to generate a set of candidate target code that satisfies constraints of lexical consistency, structural consistency, and behavioral consistency; performing API-level replacement and reconstruction on the set of candidates through operator alignment mapping and symbol synthesis search; performing multi-dimensional consistency verification on the reconstructed candidate code; and outputting the verified target code. According to embodiments of this disclosure, the migration of deep learning code between different heterogeneous computing hardware eliminates the need for manual reconstruction and debugging, significantly shortening the adaptation cycle and reducing human resource investment and professional knowledge threshold.
Owner:CHINA UNITED NETWORK COMM GRP CO LTD

Intelligent contract vulnerability detection method and device, electronic equipment and storage medium

The invention provides an intelligent contract vulnerability detection method and device, electronic equipment and a storage medium, and can be applied to the technical field of block chains. The method comprises the following steps: based on code data of a to-be-detected smart contract, obtaining a program dependency graph of the code data; inputting the program dependency graph into a pre-constructed feature extraction model, and obtaining fusion features output by the feature extraction model; inputting the fusion feature into a pre-constructed classifier model, and obtaining a contract vulnerability tag output by the classifier model; wherein the contract vulnerability tag is used for identifying the vulnerability code in the code data. According to the method, the structural features and the semantic features of the to-be-detected smart contract are fused in the detection process, so that the accuracy and the reliability of vulnerability detection are improved.
Owner:INDUSTRIAL AND COMMERCIAL BANK OF CHINA

Static stain analysis white-box testing method, device and equipment based on mutual information entropy

The invention discloses a static taint analysis white-box testing method, device and equipment based on mutual information entropy, and relates to the technical field of test.The method comprises the steps that a taint source and a taint sink are determined, and a program flow chart is constructed; checking the state of the stain sink based on a program dependency graph in the program flow chart, and filtering and optimizing the path of the program to obtain a path simplification graph of the program; performing static taint analysis on the path simplification diagram, performing taint marking on variables with a data dependency relationship according to a taint propagation rule, and calculating a polluted probability of statement variables with a control dependency relationship in combination with a mutual information formula in a quantitative information flow technology so as to realize taint marking; and traversing each dependency set containing the stain mark nodes along the path simplification graph, and generating a stain propagation path graph. According to the method, the taint marking problem under the control dependency relationship can be effectively solved, and the vulnerability injection attack resisting capability and reliability of a program are improved.
Owner:DONGFENG ELECTRONICS TECH

A vulnerability detection method based on a hierarchical centrality fusion strategy and a double-channel convolutional neural network

The application provides a vulnerability detection method based on a hierarchical centrality fusion strategy and a double-channel convolutional neural network, and belongs to the technical field of source code vulnerability detection. The method comprises the following steps: 1, denoising and normalizing the source code function for preprocessing, to generate a standardized code text; 2, parsing the standardized code text into a program dependency graph, and weighting and integrating the code semantic features and the centrality structure features of the graph nodes; 3, based on the hierarchical centrality fusion strategy, the integrated feature matrix is hierarchically mapped according to the local, propagation and global topological properties, to generate a multi-view RGB image representation; and 4, a double-channel convolutional neural network is constructed, deep features of the multi-view RGB image are extracted in parallel, and the vulnerability classification detection is completed based on the fused enhanced features.
Owner:JIANGSU UNIV

Vulnerability mining method and device based on multi-task learning

The application discloses a vulnerability mining method and device based on multi-task learning, and the method comprises the following steps: based on the abstract syntax tree, the control flow graph and the program dependency graph of the source code, a code attribute graph is constructed; the tree structure and the graph structure in the code attribute graph are separated; the nodes in the tree structure are encoded to obtain the initial node vector representation of the abstract syntax tree; the initial node vector representation of the abstract syntax tree, the tree structure and the graph structure are respectively input into a vulnerability recognition neural network model and a vulnerability positioning neural network model to obtain a vulnerability recognition result and a vulnerability positioning result. In order to solve the problems that the accuracy of the existing learning-based source code vulnerability mining method needs to be improved and the detection granularity is coarse, the application proposes a vulnerability mining method based on multi-task learning. The application can accurately identify the vulnerability and position the vulnerability at the same time, and improve the security vulnerability mining ability of the vulnerability mining personnel.
Owner:INST OF SOFTWARE - CHINESE ACAD OF SCI

Memory allocation vulnerability detection method and device, equipment and storage medium

The invention provides a memory allocation vulnerability detection method and device, equipment and a storage medium. The invention relates to the field of vulnerability detection. A memory allocation vulnerability detection method comprises the steps of performing static analysis on a to-be-detected binary code to obtain a program dependency graph; according to a memory allocation function in a preset memory allocation path and a first constraint condition, performing slicing operation on the program dependency graph to obtain a plurality of initial sub-graphs; a vulnerability detection model based on a graph neural network is used to screen the plurality of initial sub-graphs, and a plurality of vulnerability sub-graphs are determined; and performing vulnerability detection on the plurality of vulnerability sub-graphs to obtain a memory allocation vulnerability detection result of the to-be-detected binary code.
Owner:INST OF MICROELECTRONICS CHINESE ACAD OF SCI LTD

A vulnerability detection method based on graph embedding and bidirectional gated graph neural network

The application provides a vulnerability detection method based on graph embedding and a bidirectional gated graph neural network. First, function-level source code containing vulnerabilities and source code not containing vulnerabilities extracted from source code are obtained, all the source code is converted into a program dependence graph including a control dependence graph and a data dependence graph by using a source code analysis tool, and then the improved node2vec method is used to convert the program dependence graph into a code graph embedding representation, which contains both the graph structure information of the source code and the text structure information of the source code, and to a certain extent, the ability of the feature to represent nonlinear information is improved, and finally, the code embedding after the pretreatment is trained by using a bidirectional gated graph neural network model. The training result is applied to a target program to detect and evaluate the code vulnerability of the target program.
Owner:HANGZHOU DIANZI UNIV

Software row-level defect prediction method based on hierarchical attention mechanism

The invention discloses a software row-level defect prediction method based on a hierarchical attention mechanism, and the method comprises the steps: converting each row of statements in a source code file into vector representation through employing a CodeBERT pre-training model, so as to obtain the semantic information of a code row; extracting a program dependency graph of the source code, recording a mapping relation between each node in the program dependency graph and a source code line, and calculating a network measurement index corresponding to each node; fusing the semantic vectors of the code lines and the network measurement indexes to generate fused node features so as to construct a program dependency graph after the node features are expanded; constructing a HAGLineDP model, wherein the HAGLineDP model comprises a graph feature extraction network and a dual-task classification network; the graph feature extraction network designs three-level feature evolution paths from local to global and from structure to semantic, and sequentially comprises a local structure aggregation layer, a structure generalization enhancement layer and a semantic importance weighting layer; the dual-task classification network comprises a node classification path and a graph classification path; and training the HAGLineDP model by using a joint loss function and an AdamW optimizer, outputting the defect probability of each code line for a to-be-predicted source code file through a node classification path, and sorting according to the defect probability to locate a high-risk code line. According to the method, fine positioning of code defects can be effectively completed, and efficient distribution and utilization of software testing resources are promoted.
Owner:NANJING UNIV OF SCI & TECH

A smart contract vulnerability detection method based on operation code program dependence graph

The application relates to the field of smart contract security and discloses a smart contract vulnerability detection method based on an operation code program dependency graph, which aims to obtain effective smart contract vulnerability related semantic information from the bytecode level and improve the accuracy of automatic detection of smart contract vulnerabilities. The method comprises the following steps: collecting a smart contract bytecode dataset and marking operation codes that may trigger vulnerabilities; simulating the execution of a smart contract operation code sequence, constructing a smart contract operation code control flow graph and a data dependency graph; constructing a smart contract operation code program dependency graph; taking the operation codes that may trigger vulnerabilities as key nodes, extracting vulnerability related program dependency graph slices, combining the marked information to construct a slice dataset; encoding the program dependency graph slices; training a smart contract vulnerability detection model based on a graph neural network to extract slice features and realize smart contract vulnerability detection.
Owner:UNIV OF ELECTRONICS SCI & TECH OF CHINA +2

Function level vulnerability detection method based on source code annotation and program dependency graph

The invention relates to the field of software security technology and the like, discloses a function-level vulnerability detection method based on source code annotation and a program dependency graph, and aims to realize function-level vulnerability detection by fusing code annotation and code statement features and using the program dependency graph as a code representation mode. A graph convolutional neural network is used for learning structure information and grammar semantic information of codes, the vulnerability detection rate is effectively improved, meanwhile, the mode has good expandability, and the method comprises the following steps that nonstandard annotation information existing in the codes is removed, and the codes are subjected to standardization processing; generating a program dependency graph (PDG) of the normalized code; generating annotation information for each node by using the large model to obtain a program dependency graph containing the code statements and the annotation information of the code statements; the vector representation of the code annotation information and the vector representation of the code statement are generated, and then the two vector representations are fused into a fused feature vector which is used for subsequently inputting the overall architecture of the graph neural network to carry out model training.
Owner:SICHUAN UNIV

Code review method and device based on program dependency graph

The invention provides a code review method and device based on a program dependency graph, computing equipment and a computer readable storage medium, the method adopts a deep semantic difference analysis method based on the program dependency graph, and non-functional changes such as code formats, annotations and variable renaming are effectively ignored; secondly, functional equivalent reconstruction operations such as an extraction method can be accurately identified by utilizing the structural characteristics of the program dependency graph; and thirdly, through a bidirectional traversal algorithm, automatically tracking and aggregating cross-file and cross-module data and control dependence, aggregating fragmented association modifications into logic cohesion'function change blocks', and presenting core changes and influences brought by the changes in a one-stop manner through a visual difference comparison report, so as to obtain a function change block. Therefore, the efficiency, the accuracy and the safety of code review are fundamentally improved.
Owner:BEIJING XUEJING TECHNOLOGY CO LTD +1

A method and apparatus for detecting smart contract vulnerabilities based on particle-based computation and weighted path signature similarity.

This invention relates to a smart contract vulnerability detection method and apparatus based on particle sphere computation and weighted path signature similarity, comprising: determining sensitive functions in the smart contract source code according to a given sensitive word list, obtaining a set of all sensitive paths from the entry point of the sensitive function to the sensitive word; calculating the PageRank value of each node in the sensitive path in the program dependency graph as the weight value of the node in the path; constructing a smart contract word-vector mapping table through the particle sphere algorithm, and generating a vector representation of each node in the sensitive path based on the word-vector mapping table; fusing the vector representation of each node in the sensitive path with the weighted path information to obtain a weighted path signature; comparing the weighted path signature of each sensitive path with the weighted path signatures in various vulnerability signature libraries to identify potential vulnerability paths of the corresponding vulnerability type in the vulnerability signature libraries, and detecting whether the potential vulnerability paths in the smart contract source code contain a defense mode of the corresponding vulnerability type. If not, it is determined that there is a vulnerability of this type in the smart contract source code.
Owner:CHONGQING UNIV OF POSTS & TELECOMM

Software defect prediction method based on code multi-layer heterogeneous association features

This invention discloses a software defect prediction method based on multi-layer heterogeneous association features of code, belonging to the field of software engineering technology. The method first preprocesses the software code, parsing it into an abstract syntax tree, program dependency graph, and control flow graph. Using the program dependency graph as the core, it constructs inter-layer heterogeneous association edges, forming a multi-layer heterogeneous association graph of code. Then, through a hierarchical heterogeneous association graph neural network containing horizontal and vertical attention networks, it completes node embedding initialization, intra-layer feature refinement, inter-layer feature fusion, and global feature aggregation to extract multi-layer heterogeneous association features and node attention scores. Finally, a classifier performs overall defect judgment on the code segment, calculating the association degree between code lines and defects based on attention scores, generating a line-level defect prediction report to locate suspicious lines. This invention fully expresses the heterogeneous topological relationship of code, accurately extracts multi-layer heterogeneous association features, and integrates defect judgment and location. It has strong versatility, significantly improves code review efficiency, and adapts to the actual review needs of industry.
Owner:SOUTH CHINA UNIV OF TECH

A code pre-training model training method based on program dependency graph prediction

The application discloses a code pre-training model training method based on program dependency graph prediction, which predicts the program dependency graph of code in the pre-training stage, helps the pre-training model to perceive and capture the semantic structure features of the code, and improves the performance of downstream tasks sensitive to the semantic structure of the code. The method first extracts the program dependency graph of the code by using a static program analysis tool and constructs pre-training supervision information according to the program dependency graph, then encodes the code into a real value feature vector sequence by using a neural network encoder, and predicts the program dependency graph of the code based on the feature vector sequence, and finally updates the weight of the model according to the difference between the prediction result and the actual program dependency graph. The pre-trained model can be directly used for program dependency analysis, and the massive code can be quickly analyzed by using a parallel processor such as a GPU, and the pre-trained model can also be used for downstream tasks sensitive to the semantic structure of the code after fine tuning, such as vulnerability analysis related tasks and the like.
Owner:ZHEJIANG UNIV

Network printer vulnerability detection method based on machine learning and related equipment

The invention is suitable for the technical field of network information security, and provides a network printer vulnerability detection method based on machine learning and related equipment, and the method comprises the steps: decomposing printing control data received by a printer into instruction data and page description data; obtaining instruction features of the instruction data and data features of the page description data; generating a program dependency graph based on the instruction data and the page description data; nodes in the program dependency graph represent control instructions, a directed edge in the program dependency graph represents a calling relation between two control instructions corresponding to the directed edge, and attributes of each node in the program dependency graph comprise page description data, instruction features and data features corresponding to the node; and inputting all instruction features and all data features corresponding to the program dependency graph and the printing control data into a vulnerability detection model for vulnerability detection to obtain a vulnerability detection result of the printing control data. The printer vulnerability detection efficiency and accuracy can be improved.
Owner:CHINA ELECTRONICS GREAT WALL CHANGSHA INFORMATION TECH +1

A third-party library function abstract construction method for static vulnerability detection

The application provides a third-party library function abstract construction method for static vulnerability detection, comprising: establishing a program P abstract as a two-layer abstract (G, S) and a vulnerability specification (delta src , delta sink ), wherein G is a program dependence graph PDG of the program P, S is a vulnerability-specific abstract of the program P, and delta src and delta sink represent attributes that should be met by source nodes and sink nodes; a two-layer abstract design is provided: one layer uses a linear-size program intermediate representation called a program dependence graph to compactly encode path conditions, and the other layer encodes vulnerability-specific attributes of reachability, the abstract construction method provided by the application can greatly reduce the time of abstract generation and the space of abstract storage, and the third-party library function abstract construction method provided by the application can greatly improve the detection speed and save the detection memory when detecting.
Owner:XIAMEN UNIV

Line-level code defect detection method

The invention discloses a line-level code defect detection method, and relates to the technical field of code defect detection. The method specifically comprises the steps of preprocessing a source code file to obtain a source code sequence; constructing a program dependency graph PDG based on the preprocessed source code sequence; extracting a PDG node sequence by using a heuristic-based depth-first search algorithm, and merging all node sequences corresponding to the source code file to obtain an overall node sequence; utilizing a byte pair coding algorithm to carry out lexical meta-processing and embedding on the preprocessed source code sequence and node sequence to generate a high-dimensional embedded vector; using the embedded vectors of the source code sequence and the node sequence to train a dual-granularity code defect prediction model; and applying the trained dual-granularity code defect prediction model to row-level code defects. The line-level defect detection index Recall (at) top20% loc on a disclosed LLDP code defect data set is improved by more than 100% compared with a mainstream model, and the method has high precision and strong robustness.
Owner:NORTHEASTERN UNIV CHINA

Code similarity detection method based on reinforcement learning by combining multi-graph features

The invention discloses a multi-graph feature combined code similarity detection method based on reinforcement learning, and the method comprises the following steps: carrying out the preprocessing of a to-be-detected code, and generating an AST (abstract syntax tree) and a PDG (program dependency graph); extracting a sequence feature matrix of AST by adopting Transform, and extracting a graph feature matrix of PDG by adopting a GATv2 + model; constructing a three-layer reinforcement learning agent optimization detection parameter based on a PPO algorithm, including constructing a feature weight adaptive agent, a cross-language structure alignment agent and a local-global matching collaborative agent; and based on the optimal weight, in combination with the alignment list and the optimization matrix, calculating the similarity through a weighting formula and outputting the similarity. The invention provides a code similarity detection method based on reinforcement learning by combining multi-graph features, which realizes an integrated architecture of scene-divided similarity calculation, realizes accurate detection of different types of codes, does not need to manually preset fixed parameters, and remarkably improves the detection precision and scene adaptability.
Owner:SHANGHAI UNIV

Contract vulnerability detection method and system based on cross-granularity feature fusion and meta learning

The application discloses a contract vulnerability detection method and system based on cross-granularity feature fusion and meta-learning, relates to the technical field of blockchain security, and comprises the following steps: acquiring source code and compiled bytecode of a to-be-detected contract; extracting source code semantic features from the source code, extracting operation code execution features from the bytecode, and extracting graph structure features after constructing a program dependency graph from the source code; performing cross-granularity attention interaction to generate cross-granularity fusion features; performing type-aware feature modulation on the cross-granularity fusion features and a vulnerability type identifier of a current detection task, training a classifier by adopting a meta-learning strategy, and outputting a vulnerability detection result; and in response to the vulnerability detection result being that there is a vulnerability, locating a vulnerability code position based on a graph-source code attention weight matrix generated in the cross-granularity attention interaction process. The application solves the problem of poor generalization ability in the rare vulnerability scenario with scarce samples.
Owner:CHENGDU UNIV OF INFORMATION TECH