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

542 results about "Control flow graph" patented technology

In computer science, a control-flow graph (CFG) is a representation, using graph notation, of all paths that might be traversed through a program during its execution. The control-flow graph is due to Frances E. Allen, who notes that Reese T. Prosser used boolean connectivity matrices for flow analysis before.

Variation test method and device based on intelligent automation script

The invention discloses a variation test method and device based on an intelligent automation script. The method comprises the following steps: extracting a statement execution sequence and a branch dependency relationship in an original source code by using a context-aware syntax tree, and generating a control flow diagram and a data flow diagram; performing code semantic analysis on the multi-dimensional code features by using a large language model, identifying potential defect types and variation rules, predicting the test efficiency of variants in combination with a deep Q learning model, and generating to-be-processed variants; performing grammar check and equivalence analysis on the to-be-processed variants to obtain effective variants, and testing the effective variants; variation test indexes are calculated, code weak points are positioned, and test blind areas are identified according to survival variants, so that a visual analysis report is generated; and iteratively generating a new test case according to the current survival variant and the visual analysis report, and testing the current survival variant by using the new test case. According to the invention, the variation test efficiency can be improved.
Owner:BEIJING YULORE INNOVATION TECH

Fine-grained vulnerability detection method and system based on semantic perception sparse attention

The invention relates to the technical field of vulnerability detection, and provides a fine-grained vulnerability detection method and system based on semantic perception sparse attention, and the method comprises the steps: analyzing a to-be-detected source code, and generating an abstract syntax tree, a control flow graph and a program dependency graph; carrying out weighted fusion on graph representations of the abstract syntax tree, the control flow graph and the program dependency graph, and integrating into a code attribute graph; for the code attribute graph, processing the code attribute graph by adopting a semantic perception sparse attention method combined with sparse attention, a learnable Token pruning method and Top-k interaction frequency to obtain a Token attention score; and based on the obtained Token attention scores, accumulating the attention score of each Token in each row of the code, and detecting and determining a statement where the vulnerability code is located. According to the detection method disclosed by the invention, the capability of modeling code semantic information and capturing a structured dependency relationship can be effectively improved, and meanwhile, the calculation complexity is remarkably reduced.
Owner:SHANDONG COMP SCI CENTNAT SUPERCOMP CENT IN JINAN +1

Multi-round reasoning and feedback optimization method and system for industrial software codes

The invention belongs to but is not limited to the technical field of software development, and particularly relates to a multi-round reasoning and feedback optimization method and system for industrial software codes, and the method comprises the steps: S1, vector code library establishment: the establishment of a vector code library is composed of three parts of feedback establishment, vector database establishment and format summarization; s2, code reasoning optimization: the code reasoning optimization mainly comprises four aspects: control flow graph analysis, multi-query generation and reciprocal ranking fusion retrieval, reasoning generation subtask and code chain submodule generation, and code combination completion; and S3, feedback optimization: the feedback optimization is composed of score feedback optimization and log feedback optimization. According to the method, an automatic verification mechanism is introduced, logic consistency check and performance evaluation are carried out on the generated and optimized codes, and the correctness and execution efficiency of the codes are ensured. The verification mechanism can find and correct errors in real time in each stage of generation, so that the cost of manual verification is reduced, and the development efficiency is improved.
Owner:GUANGDONG UNIV OF PETROCHEMICAL TECH

Cross-chain smart contract vulnerability detection method and system based on multi-feature fusion learning

The invention discloses a cross-chain smart contract vulnerability detection method and system based on multi-feature fusion learning. The method comprises the following steps: collecting a cross-chain smart contract vulnerability data set for cleaning and labeling; feature extraction is carried out from the source code and the byte code, an abstract syntax tree (AST) is extracted from the cleaned source code, a basic control flow graph (CFG) is extracted from the byte code, and a cross-chain control flow graph (xCFG) is constructed; carrying out feature representation on AST and xCFG, generating a graph vector through a graph neural network (GNN), generating a semantic vector through CodeBert, and fusing the semantic vector into a feature fusion vector; performing model training and detection, taking the generated vectors as training data and test data, obtaining a cross-chain smart contract vulnerability detection model by adopting Transform-FC model training data, and finally evaluating model performance through accuracy, recall rate, precision rate and F1 value. According to the method, the structural features and semantic features of the codes can be effectively fused, potential vulnerability information in the codes can be fully mined, the recognition capability of the model for cross-chain vulnerabilities can be enhanced, and the accuracy and reliability of the cross-chain vulnerability detection model can be improved, so that the security of a block chain system can be more efficiently guaranteed.
Owner:HOHAI UNIV

IEC 61131-3 standard ST language static code analysis method, device and equipment and storage medium

The invention provides an I EC 61131-3 standard ST language static code analysis method, device and equipment and a storage medium, and the method comprises the following steps: based on a lexical and grammatical analysis technology, analyzing an ST source program into an analysis tree, and detecting lexical and grammatical errors of the program; constructing an abstract syntax tree of the ST program according to the analytic tree, and checking semantic errors of the program based on an abstract syntax tree analysis technology; and constructing a control flow graph according to the abstract syntax tree, and detecting the static constraints of the program by executing constraint collection, constraint solution and loop expansion operations based on a symbolic execution technology and a depth-first search traversal technology. According to the I EC 61131-3 standard ST language static code analysis method provided by the embodiment of the invention, some potential static defects of the PLC program can be detected, so that the accuracy and safety of the PLC program are improved, the development and debugging efficiency of the PLC program is improved, and the development and maintenance cost of the PLC program is reduced.
Owner:SHANGHAI FORMAL TECH INFORMATION TECH CO LTD

Malicious code gene information recessive association mining method based on meta learning

The invention provides a malicious code gene information recessive association mining method based on meta-learning, which comprises the following steps of: generating a function call graph (FCG) to obtain an attribute function call graph; training the feature extraction model based on the sequence-to-sequence mechanism by adopting meta-learning, and obtaining a key sub-graph of the function call graph from the generated attribute function call graph through the trained feature extraction model based on the sequence-to-sequence mechanism; generating a control flow graph (CFG), and obtaining an attribute control flow graph; using the optimized gene feature extraction model based on the graph structure for the generated attribute control flow graph to obtain a key sub-graph of the control flow graph; and a fine-tuning corpus is obtained through the key sub-graph of the function call graph and the key sub-graph of the control flow graph, and hidden association mining of malicious code gene information is carried out by using the fine-tuned large language model. According to the method, the recessive association of the malicious code gene information can be accurately mined, and the malicious code analysis precision and efficiency are remarkably improved.
Owner:NANJING UNIV OF POSTS & TELECOMM

Intelligent contract vulnerability detection method based on code graph fusion analysis and graph matching network

The invention relates to the field of intelligent contract vulnerability detection, in particular to an intelligent contract vulnerability detection method based on code graph fusion analysis and a graph matching network. The method comprises the steps of constructing an intelligent contract source code data set; through static analysis, extracting three different code feature information including a control flow diagram, a data flow diagram and an abstract syntax tree from the source code of the smart contract; carrying out information integration on the three extracted code features, and constructing a code graph covering wider features; on the basis of the generated code graph, a GraphCodeBerT model is used for pre-training; vectorizing a code graph which is output by the pre-training model and contains structural and semantic features through a graph embedding network; and learning the feature representation of the contract pair by using a cross-graph attention mechanism of a graph matching network to realize specific vulnerability detection of the smart contract source code. According to the invention, potential vulnerabilities can be accurately identified.
Owner:CHINA UNIV OF GEOSCIENCES (WUHAN)

Intelligent contract vulnerability detection method based on heterogeneous graph attention network

The invention discloses an intelligent contract vulnerability detection method based on a heterogeneous graph attention network. According to the method, firstly, the source code of the intelligent contract is preprocessed, the SCIR of the code of the intelligent contract is constructed, the complexity of the code of the contract is reduced, and vulnerability features are enriched; and constructing an intelligent contract code attribute graph SCPG based on SCIR, integrating various code graph structures such as an abstract syntax tree and a control flow graph, and comprehensively describing syntax and semantic features of the contract. And then constructing an intelligent contract code heterogeneous graph SCHG on the basis of the SCPG, optimizing code graph structure representation, and realizing high-quality modeling of node features. And finally, detecting the vulnerability of the smart contract by using a customized multi-layer heterogeneous graph attention network model MHGAN. The intelligent contract vulnerability detection method based on deep learning makes up for the defects of an existing intelligent contract vulnerability detection method based on deep learning, effectively improves the accuracy of intelligent contract vulnerability detection, and is excellent in the interpretability of the detection result.
Owner:HANGZHOU DIANZI UNIV

Interactive visualization method, device and equipment for fuzz test bottleneck breakthrough

The invention relates to an interactive visualization method, device and equipment for fuzzy test bottleneck breakthrough, and belongs to the field of network security. According to the method, all compiling modules in a tested program are combined into a complete intermediate code, and a global view of the tested program is obtained; generating a unique label for each function by using a hash algorithm; constructing a call graph and a control flow graph, and obtaining function call instruction information by scanning a basic block of each function; carrying out pile insertion on the basic blocks; performing a fuzzy test on the tested program after compiling and instrumentation, and obtaining runtime data in real time; according to the fuzzy test runtime data and the static analysis data, data-driven visualization is carried out, and a call graph, a control flow graph and real-time execution statistical information are displayed in real time; a test engineer is assisted through an interactive chart, and fuzzy test bottleneck constraints are positioned. According to the method, a test engineer can be helped to better understand and intervene the fuzzy test process, and the fuzzy test code coverage rate and the defect detection number are improved.
Owner:CHINESE PEOPLES LIBERATION ARMY UNIT 61660

Cross-modal pre-training model-based smart contract similarity detection method

The present invention provides a cross-modal pre-training model-based smart contract similarity detection method, comprising: constructing a control flow graph of a smart contract; extracting comment information from the smart contract, and enabling the control flow graph to correspond to the comment information so as to acquire a corresponding graph; inputting information of the corresponding graph into a preset cross-modal pre-training model so as to acquire a feature representation vector of the contract; and, on the basis of the feature representation vector, determining a contract similarity by means of a threshold value. The present invention can implement high-precision smart contract semantic similarity detection.
Owner:HARBIN ENG UNIV +2

Program structure sensitive engine task division method and system in parallel fuzzy test scene

PendingCN118535449Aincrease coverageImprove the ability to detect potential vulnerabilitiesSoftware testing/debuggingEnergy efficient computingTheoretical computer scienceBasic block
The invention discloses a program structure sensitive engine task division method and system in a parallel fuzzy test scene. The method comprises the following steps: statically analyzing a source code of a target program to obtain basic block information and a calling relationship, and constructing an initial control flow diagram; and capturing the calling condition of the function granularity and the basic block granularity during operation by utilizing a customized instrumentation module. And collecting execution information, updating the initial control flow diagram, and forming a runtime control flow diagram. According to the runtime control flow diagram, the boundaries of the triggered basic blocks and the untriggered basic blocks are recognized, and the boundary basic blocks with exploration potential serve as exploration targets. And according to the position of the target basic block on the control flow diagram and the number of engines, dividing the target basic block into a plurality of groups of exploration tasks, and distributing the exploration tasks to each test engine. And the engine screens the test case as a final engine task according to the exploration task. According to the method, the code coverage rate and the vulnerability mining efficiency of the parallel fuzzy test are remarkably improved.
Owner:ZHEJIANG UNIV

Router firmware two-stage vulnerability automatic mining method based on GNN and angr

The invention relates to the technical field of computer security and network, and discloses a GNN and angr-based router firmware two-stage vulnerability automatic mining method, which comprises the following steps of: generating a control flow diagram from router firmware by utilizing a dynamic and static hybrid analysis tool; performing data conversion and data enhancement processing on the control flow diagram; performing vulnerability identification on the processed control flow graph by using a pre-trained graph neural network model, and performing priority ranking on program execution paths with vulnerabilities; and based on the sorting result of the program execution paths with the vulnerabilities, performing symbolic execution on the program execution paths by utilizing a dynamic and static mixed analysis tool to obtain a router firmware vulnerability mining result. According to the method, by combining the deep dynamic and static mixed analysis capability of angr and the efficient graph data processing capability of GNN, the automation level and accuracy of vulnerability detection are improved, and meanwhile, the problem of path explosion encountered when a traditional binary analysis tool processes complex firmware is solved.
Owner:SOUTHWEST PETROLEUM UNIV

Source code static analysis method and device, equipment and medium

The invention discloses a source code static analysis method and device, equipment and a medium, and relates to the technical field of software detection.The method comprises the steps that a control flow graph and a function call graph are constructed based on an abstract syntax tree obtained through source code analysis; performing arrival constant value analysis on the control flow diagram by using the function call diagram, and constructing an initial value flow diagram; adding an edge related to the C + + language parameter to the initial value flow graph to obtain a final value flow graph; the C + + language parameters are parameter nodes and / or variable nodes obtained based on the abstract syntax tree; and performing static detection on the source code based on the final value flow graph to obtain a static detection result. According to the method and the device, false alarm and missing alarm caused by lack of edges related to the parameter nodes of the C + + language can be reduced, and the source code static detection precision is effectively improved.
Owner:BEIJING BEIDA SOFTWARE ENG DEV CO LTD

Intelligent contract fine-grained vulnerability detection method based on expert knowledge

A smart contract fine-grained vulnerability detection method based on expert knowledge comprises the following steps: S1, constructing cue words by using a large language model, analyzing smart contract source codes, and labeling a smart contract data set; the method comprises the following steps: statically analyzing an intelligent contract source code statement, representing a source code element as a vector to obtain a source code fine-grained feature preliminary representation, and merging abstract syntax tree sub-trees into a code graph of a control flow graph node to obtain a graph representation of a source code; s2, acquiring heterogeneous code features and source code fine-grained features of the same smart contract, inputting the heterogeneous code features and the source code fine-grained features into a BGSCVul model for iterative fusion, and constructing a deep learning classifier; s3, by constructing an expert knowledge classifier, making a decision for specific expert knowledge; and S4, fusing the output of each sub-classifier by using a stack pressing method, and outputting final prediction.
Owner:HUNAN NORMAL UNIVERSITY

Source code vulnerability detection method combining static and dynamic analysis

The invention discloses a static and dynamic analysis-combined source code vulnerability detection method, which comprises the following steps of: performing static scanning on an input source code, and preliminarily positioning potential vulnerabilities according to a preset vulnerability rule base; executing program slicing based on the control flow diagram and the data flow diagram, and extracting a precise code subset related to the vulnerability; a large language model based on a Transform structure is utilized, and a dynamic verification attack case is automatically generated according to the vulnerability type and the slice code; executing the test case in a sandbox environment, monitoring program abnormal behaviors in real time, and confirming actual availability of vulnerabilities; and finally, synthesizing static and dynamic results to generate a multi-level vulnerability detection report. According to the method, the accuracy and coverage rate of vulnerability detection can be effectively improved, the false report and missing report rate is reduced, high automation and intelligence of the source code vulnerability detection process are realized, and the method has good applicability and popularization value.
Owner:GUANGDONG POWER GRID CO LTD +1

EOSIO smart contract vulnerability detection method of adaptive multi-channel graph convolutional network

The invention relates to an EOSIO smart contract vulnerability detection method based on an adaptive multi-channel graph convolutional network. The method comprises the following steps: S1, generating a control flow graph CFG and a data flow graph DFG of a smart contract function to be detected; s2, learning contents in a control flow graph CFG and a control flow graph DFG by adopting an adaptive multi-channel graph convolutional network EAM-GCN; s3, after a feature vector splicing process in a learning control flow graph (CFG) and a data flow graph (DFG) of the adaptive multi-channel graph convolutional network EAM-GCN, fusing semantic features extracted from the control flow graph (CFG) and the data flow graph (DFG) of the source code by using a global fusion attention mechanism, classifying the obtained global code features by using a classifier, and extracting the feature vectors in the data flow graph (DFG) of the source code; and identifying the existence of the EOSIO smart contract vulnerability to be detected. According to the method, the problem that deep learning cannot be applied to EOSIO smart contract vulnerability detection at present is solved.
Owner:HEBEI UNIVERSITY

Automatic test scheme generation method, equipment and medium

The invention relates to the technical field of automatic testing, and discloses an automatic testing scheme generation method and device and a medium, and the method comprises the steps: matching a demand action in a test demand with a code entry name corresponding to a code segment, and determining a code risk level of a current demand code block; analyzing the code change frequency and the code dependency degree of the current demand code block according to historical test records in the test domain knowledge base, and determining the test dynamic priority of the current demand code block; constructing a control flow diagram and a data flow diagram of the current demand code block, and detecting risk nodes in the control flow diagram and the data flow diagram; generating a test scene of the current demand code block according to the risk node, and generating a boundary value test rule according to a key constraint condition in the data flow diagram; and querying an environment simulation rule of the current demand code block, and packaging the test scene, the boundary value test rule and the environment simulation rule into an automatic test scheme. According to the invention, the code coverage when the test scheme is generated can be improved.
Owner:深圳市分期乐网络科技有限公司

Cross-language application program vulnerability mining method based on static analysis

The invention discloses a cross-language application program vulnerability mining method based on static analysis, which adopts a nested cross-programming language pointer analysis method and a micro-service cross-programming language taint tracking method to effectively solve the limitation of processing nested cross-language control flow and micro-service cross-language data flow. A nested language semantic boundary is accurately positioned by constructing a nested byte code, and a data stream is completely tracked by utilizing an interface relay technology, so that the detection precision is improved. According to the method, part of multi-end data streams and complex control streams of cross-programming language applications can be uniformly processed, and the analysis process in a cross-programming language environment is simplified; by nesting cross-programming language control flow diagram construction and double-end / multi-end data flow diagram construction, a unified analysis framework is constructed, seamless cooperation of static analysis among different languages is achieved, the analysis cost is reduced, the analysis efficiency is improved, efficient and accurate vulnerability mining is achieved in a complex cross-programming language application program, and the method is suitable for application and popularization. And the reliability of cross-language vulnerability detection is improved.
Owner:XIDIAN UNIV

Estimating Executed Paths from Operator Execution Counts

Mechanisms are provided for identifying execution paths in computer application logic. A control flow graph is generated for the computer application logic based on source code and an execution log. Paths of the control flow graph are identified that have operators matching operators having execution counts in the execution log. An operator list for each path is generated specifying operators in the path. An operator count expression is generated for each operator in the operator list for each path. For each path, a relationship is generated between the path's operator count expression and actual execution count information for operators in the path's operator list. An execution possibility value is estimated for each path based on the relationships for each path, and a second set of paths having execution possibility values indicating they are possible execution paths of the computer application logic is output.
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION

Malicious software package detection method, system and device and storage medium

The invention discloses a malicious software package detection method, system and device and a storage medium, and the method comprises the steps: obtaining a benign package from a public website, and taking the benign package as a training sample; analyzing the codes in the training sample, and generating a calling graph and a control flow graph corresponding to the codes; according to the call graph and the control flow graph, training to obtain a standardized code behavior sequence; a standard code behavior sequence is combined, a SecureBERT model is adjusted, software packages possibly having malicious behaviors are screened out, and the SecureBERT model is trained; forming a malicious feature set according to artificially collected expert knowledge, extracting features, and training a binary classifier based on a naive Bayes classifier; according to the trained SecureBERT model, an integrated classifier is generated in combination with the binary classifier, and the malicious software package is detected and recognized through the integrated classifier; according to the method, suspicious code behaviors can be adaptively detected, and the influence of objective factors on a detection result is avoided.
Owner:YANGZHOU UNIV

Test generation and defect prediction method and system based on heterogeneous program diagram

The invention discloses a test generation and defect prediction method and system based on a heterogeneous program diagram, and the method comprises the steps: constructing a heterogeneous dynamic program dependency diagram: extracting an abstract syntax tree, a control flow diagram and a program dependency diagram of a source code through static analysis, capturing an execution track during operation in combination with dynamic instrumentation, and integrating version evolution information, forming a heterogeneous dynamic program dependency graph containing various types of nodes and edges; heterogeneous graph neural network modeling: designing a four-layer eight-header heterogeneous graph neural network model based on the heterogeneous dynamic program dependency graph, and outputting a function level defect probability and a test case sequence by adopting a type awareness attention mechanism and time coding injection; and multi-task joint training and reasoning: adopting an end-to-end training strategy, jointly optimizing defect prediction loss and test generation loss, preferentially screening high-risk functions during reasoning, and generating a coverage test case. According to the method, the defect detection accuracy is remarkably improved, the test coverage rate is increased, and the method is suitable for enterprise-level complex software systems.
Owner:NO 15 INST OF CHINA ELECTRONICS TECH GRP

Source code bug repairing method, electronic equipment and storage medium

The invention relates to the technical field of vulnerability repair, in particular to a source code vulnerability repair method, electronic equipment and a storage medium, and the method comprises the following steps: obtaining an abstract syntax tree and a control flow graph according to a source code containing a vulnerability, and generating a vulnerability context feature vector by using a graph neural network model in combination with vulnerability position information, determining a historical vulnerability repair case corresponding to the vulnerability context feature vector from a vulnerability-repair knowledge base, inputting the vulnerability context feature vector and the corresponding historical vulnerability repair case into a code generation model, outputting a candidate repair code set corresponding to the source code, evaluating each candidate repair code, and determining the vulnerability-repair knowledge base according to the candidate repair code set. Screening out an optimal repair code to automatically repair the source code vulnerability; according to the method, deep semantic analysis is performed on the vulnerability context, and intelligent reasoning is performed, so that the repair code with correct grammar and adaptive context can be generated, and the automation level and accuracy of vulnerability repair are remarkably improved.
Owner:QINGDAO WANDAO (BEIJING) INFORMATION TECH CO LTD

Intelligent contract vulnerability detection method based on code slices and neural network

The invention provides an intelligent contract vulnerability detection method based on code slices and a neural network, and relates to the technical field of contract vulnerability detection, and the method specifically comprises the following steps: carrying out the static analysis of an intelligent contract code; checking a program execution path through depth-first traversal of the control flow diagram, detecting timestamp dependent vulnerabilities and unchecked external call vulnerabilities, and positioning vulnerability paths in the control flow diagram according to nodes corresponding to vulnerability statements; normalizing the smart contract code, removing smart contract code annotations, unifying variables and function naming, not renaming related state information related variables, converting a smart contract code statement into vector representation, and training and updating a vector; constructing a multilayer graph convolutional neural network as a neural network model for training and detecting vulnerabilities; and outputting a detection result by the multilayer graph convolutional neural network. According to the technical scheme, the problem that the intelligent contract vulnerability cannot be accurately and effectively detected in the prior art is solved.
Owner:CHINA UNIV OF PETROLEUM (EAST CHINA)

Code similarity detection method and device based on graph neural network and medium

The invention relates to the technical field of code similarity detection, in particular to a code similarity detection method and device based on a graph neural network and a medium, and the method comprises the following steps: calling a control flow graph conversion module, converting a to-be-detected code into a control flow graph, carrying out topological structure coding on the control flow graph, and carrying out topological structure coding on the control flow graph; obtaining a node feature vector; constructing a graph editing distance calculation model; a model loss function is adopted to train a graph editing distance calculation model, the trained graph editing distance calculation model is called to predict a graph editing distance and a node matching confidence coefficient matrix between the two control flow graphs at the same time, and the graph editing distance serves as a quantitative index of code similarity; the node matching confidence matrix may generate a graph editing path. According to the method, logic and semantics of codes are captured by adopting the control flow graph, and the control flow graph is analyzed by utilizing the deep learning model based on the graph neural network, so that the aim of detecting the similarity of the codes is fulfilled.
Owner:CENT SOUTH UNIV

Intelligent contract byte code similarity detection method based on graph neural network

The invention discloses a graph neural network-based intelligent contract bytecode similarity detection method, which comprises the following steps of: performing disassembling operation on Ethereum virtual machine bytecodes, and performing data flow analysis and control flow analysis on disassembling results to obtain a data flow graph and a control flow graph corresponding to the bytecodes; combining the data flow diagram and the control flow diagram of each external function into a byte code characteristic diagram; a large number of intelligent contracts with similar labels are adopted to train a graph neural network, vectorization operation is performed on the byte code feature graph in the training process, and feature vectors are obtained; and taking the problem contract as a reference smart contract, respectively inputting the bytecode feature maps of the reference smart contract and the to-be-detected smart contract into the trained graph neural network to respectively obtain corresponding feature vectors, comparing the Euclidean distance of the two feature vectors, and measuring to obtain the similarity of the bytecode of the two smart contracts. Compared with a traditional method, the method has higher accuracy, problem contracts can be effectively recognized, and the safety of a block chain system is enhanced.
Owner:ZHEJIANG UNIV

Instruction-level code optimization method and device based on template matching, medium and equipment

The invention discloses an instruction-level code optimization method and device based on template matching, a medium and equipment. According to the method, instruction-level codes serve as input, the input instruction-level codes are firstly constructed into corresponding control flow diagrams, then value ranges of active variables and register quantities are initialized based on the control flow diagrams, then variable assignment instructions and related instructions are found out from instruction sequences of basic blocks to form instruction segments to be optimized, and the instruction segments to be optimized are optimized. The method comprises the following steps of: optimizing an instruction fragment, obtaining an optimized instruction fragment through template matching, performing SMT equivalence verification on the instruction fragment before and after optimization based on an active variable and a value range of a register quantity, and finally optimizing an input instruction-level code in a manner of replacing the instruction fragment before optimization with the optimized instruction fragment which is verified to be equivalent. And finally, the optimized instruction-level code is obtained.
Owner:NANJING UNIV

Multi-language code generation method based on self-supervised pre-training

The invention discloses a multi-language code generation method based on self-supervised pre-training, which comprises the following steps: acquiring and cleaning multi-language code data to form a training corpus; the method comprises the following steps: representing code data as an abstract syntax tree, extracting a control flow diagram and a data flow diagram of the code data, and obtaining unified semantic representation through combination of a diagram encoder and a sequence encoder; designing a self-supervised pre-training task, and pre-training the semantic representation based on the training corpus; constructing a multi-language pre-training model based on the structure-improved recurrent neural tensor network and the multi-language embedding matrix; when a user inputs a natural language, generating a target language code by using the multi-language pre-training model; and target language code correction is carried out through conventional function testing and grammar checking. According to the method, multi-channel recursive combination and a hierarchical recursive expansion mechanism are combined with self-supervised pre-training, so that accurate generation and performability improvement of cross-language codes are realized.
Owner:CLOUD HI-TECH (BEIJING) TECHNOLOGY CO LTD

LLVM-based Program Static Analysis Method and System

The present invention discloses a program static analysis method and system based on LLVM, belonging to the technical field of computer program analysis. The technical problem to be solved is that the existing program analysis technologies have low accuracy, low efficiency and limited application scope in estimating program performance characteristics and memory reuse distance distribution. The method includes: converting a source file into an LLVM IR file with source-level debugging information; traversing modules, functions, basic blocks and instructions in the LLVM IR file to obtain static trace information of a target function; constructing a basic block-level control flow graph of the LLVM IR file and annotating relevant information; identifying and annotating loop information when traversing paths to obtain an execution path with loop annotations, replacing basic blocks in the execution path with corresponding memory access information, and generating a static memory trace with loop annotations; calculating the memory access reuse distance distribution through a recursive algorithm based on the static memory trace with loop annotations.
Owner:SHANDONG INSPUR SCI RES INST CO LTD

Application user tracking detection method and device based on dynamic and static combination technology

The invention relates to an application user tracking detection method and device based on a dynamic and static combination technology, and the method comprises the steps: obtaining a first interprocess control flow diagram associated with a device identifier according to an application package of a target application and a configuration file containing a predefined device identifier; according to a program behavior of a target application in a running state, determining a function associated with an application programming interface of the equipment identifier and an application programming interface of network data transmission, and obtaining a second interprocess control flow diagram of data leakage according to the function; integrating the first interprocess control flow diagram and the second interprocess control flow diagram to obtain a third interprocess control flow diagram; and obtaining a leakage path of the target application to the user data according to the third interprocess control flow diagram. By adopting the method, the problems of narrow detection coverage and low detection accuracy in the aspect of tracking the user by using the device identifier through the APP can be solved.
Owner:HANGZHOU HIGH-TECH ZONE (BINJIANG) INSTITUTE OF BLOCKCHAIN & DATA SECURITY +1

Cross-modal adaptation fine tuning method and system based on double-branch network architecture

The invention discloses a cross-modal adaptive fine tuning method and system based on a double-branch network architecture, and realizes cross-modal knowledge fusion and migration by combining the modeling capability of a graph neural network on code graph structures such as an abstract syntax tree, a control flow graph and the like and the powerful semantic understanding and generation capability of a large language model. A double-branch architecture is adopted, a graph structure and text input are coded respectively, and feature interaction is achieved through heterogeneous adaptation, structural decoupling and a mask attention mechanism. In a fine tuning stage, three-stage strategies are provided: basic fine tuning of structure perception, efficient parameter migration by combining Adapter, Prefix Tuning and LoRA, and language generation quality and robustness are optimized based on an unsupervised text reconstruction task. The training stage relates to structure sensing tasks such as node prediction, edge reconstruction and subgraph comparison, and the stability and generalization ability are improved in combination with course learning. The method is widely applicable to tasks such as code completion, question and answer and vulnerability detection, and has the advantages of strong structure perception, efficient cross-modal fusion, low training cost and the like.
Owner:PEKING UNIV +1