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

1702 results about "Abstract syntax tree" patented technology

In computer science, an abstract syntax tree (AST), or just syntax tree, is a tree representation of the abstract syntactic structure of source code written in a programming language. Each node of the tree denotes a construct occurring in the source code.

Unit test case generation system based on large language model

The invention provides a unit test case generation system based on a large language model, and the system comprises a function dependency analysis engine module which is used for preprocessing a target project, extracting a function dependency relationship, and generating an abstract syntax tree and a source code file; the large model module is used for automatically generating a test case through the code context information and the optimized cue word; and the verification and optimization module is used for verifying whether the test cases can be successfully executed or not by compiling and running the test cases, marking part of the test cases needing to be further processed, automatically analyzing error reasons, optimizing cue words and realizing automatic repair of the part of the test cases. According to the unit test case generation system based on the large language model, the function dependency analysis and the large language model are combined, the high-quality test case can be automatically generated, dependence on manpower or existing test cases is not needed, manual intervention is reduced, and the test efficiency and comprehensiveness are improved.
Owner:SHANGHAI ANBAN INFORMATION TECH CO LTD

Code review and optimization method driven by large language model

The invention provides a large language model-driven code review and optimization method, which belongs to the field of computer science, and comprises the following steps of: firstly, performing intensive training on a model through rich code samples and accurate manual annotation to ensure that the model has accurate code understanding and analysis capability; and then, performing deep analysis on an input source code by utilizing the trained large language model, and constructing an abstract syntax tree (AST) to capture deep semantic information of the code. And finally, the model automatically analyzes the codes, identifies potential defects, non-standard coding practices and optimization possibilities, and generates specific optimization suggestions, including code repair schemes and guidance following optimal practices, according to identification results, so that efficient support is provided for developers, and the quality of software products is ensured.
Owner:INSPUR QILU SOFTWARE IND

Large model code security review method based on control flow analysis and retrieval enhancement

The invention relates to the technical field of code security analysis, and discloses a control flow analysis and retrieval enhancement-based large model code security review method, which comprises the following steps of: analyzing an incremental code to generate an abstract syntax tree and data flow analysis information; retrieving local knowledge base association business rules and historical vulnerabilities based on grammatical features, and generating a context enhancement prompt; calling a large language model to jointly analyze codes and contexts, identifying vulnerabilities and outputting a structured report; and combining with a historical false alarm data optimization result and then integrating to a development assembly line. Multi-source information is fused through an RAG technology to enhance semantic understanding, and control flow node tracking and cross-version semantic association are combined, so that the problems of a traditional tool business logic vulnerability detection blind area, incremental code analysis failure and high false alarm rate are solved, synchronous improvement of security examination accuracy and efficiency is realized, and the method is adaptive to an agile development scene.
Owner:HANGZHOU BAIHA YIBAI INFORMATION TECHNOLOGY CO LTD

Adaptive code annotation updating method and system, terminal and storage medium

The invention relates to the technical field of software development, and particularly provides a self-adaptive code annotation updating method and system, a terminal and a storage medium, and the method comprises the following steps: confirming that codes are updated, extracting an updated code set, and combining and constructing an abstract syntax tree for the codes; performing semantic analysis on the abstract syntax tree by using a deep learning model to generate a semantic vector, and constructing a program dependency graph based on the semantic vector; analyzing a dependency relationship among code elements in the program dependency graph by utilizing a graph neural network; and generating a code annotation based on the semantic vector and the dependency relationship between the code elements by using a natural language generation model. According to the method, the real-time performance and the accuracy of the code document are ensured, the readability and the maintainability of the code are greatly improved, and the maintenance cost is reduced.
Owner:浪潮智慧科技有限公司 +1

Method for generating SQL (structured query language) from natural language based on bidirectional mapping and semantic analysis

The invention provides a method for generating an SQL (Structured Query Language) by a natural language based on bidirectional mapping and semantic parsing, which relates to the technical field of database query and comprises the following steps of: extracting natural language query elements and packaging the natural language query elements into structured data, and establishing a mapping relationship from a query field to a service attribute and a physical data table by adopting a bidirectional Hash index technology; and automatically identifying multi-table association keys, performing semantic extension and compliance verification, generating an abstract syntax tree, performing processing according to user permission, and finally converting the abstract syntax tree into an SQL statement conforming to a target database syntax specification. According to the method, the accuracy and the efficiency of converting the natural language into the SQL are improved, and the flexibility and the safety of the system are enhanced.
Owner:北京科杰科技有限公司

System and method for vulnerability localization based on deep learning

The present disclosure relates to a system and method for vulnerability localization based on deep learning, which comprises, at a minimum, a processor configured to: analyze a code file under detection to obtain a first abstract syntax tree devoid of semantic information; build upon the first abstract syntax tree by incorporating data-flow edges and / or control-flow edges, thereby forming a second abstract syntax tree with semantic-flow enhancement; split the second abstract syntax tree to obtain a plurality of second abstract syntax sub-trees; and input these second abstract syntax sub-trees into a pre-established vulnerability detection and localization model. Compared with existing code vulnerability detection methods, the present disclosure employs a semantically-enhanced abstract syntax tree and finely-grained segmentation thereof, enabling both the efficient detection and accurate localization of code vulnerabilities, characterized by swift detection rates, low false positive rates, and commendable interpretability of the detection results.
Owner:HUAZHONG UNIV OF SCI & TECH

Dynamic language test case automatic generation method based on large language model

The invention discloses a method for automatically generating a dynamic language test case based on a large language model, which comprises the following steps of: firstly, in a preprocessing stage, arranging related information of a to-be-tested program into prompts, analyzing a parameter type of the to-be-tested program by the large language model according to the prompts, and generating code information required by a test through an abstract syntax tree; in the test case generation stage, a dynamic multi-objective optimization algorithm is adopted, test cases are continuously crossed and mutated through branch coverage feedback, in the partial evolution process, test data which cannot be generated by conventional variation are generated by utilizing a large language model, and finally, the screened excellent test cases are organized into a complete test suite. In a program repair phase, the test suite is run to detect potential errors, the errors are analyzed and iteratively repaired using a large language model, and an executable and error-free test suite is generated. According to the method, the test coverage rate of the dynamic language is remarkably improved, and the achievement of a coverage target is accelerated.
Owner:HANGZHOU DIANZI UNIV

Code peculiar smell detection method and system based on AST code measurement and code semantics

The invention provides a code peculiar smell detection method and system based on AST code measurement and code semantics. The method comprises the following steps of: firstly, constructing a FA-AST (Flow-Augmented Abstraction Syntax Tree) by analyzing a code snippet, and extracting three types of AST-based code metrics, namely a structure metric, a syntactic metric and a semantic metric from the FA-AST; then, a deep learning model is used for capturing contextual information and a dependency relationship of the code from the source code so as to extract code semantics; and finally, by fusing AST-based code measurement and code semantics, inputting a classification model to carry out training and testing so as to identify the peculiar smell in the code and evaluate the severity of the peculiar smell. Compared with software code measurement extracted by a traditional static code analysis tool, the AST-based code measurement provided by the invention is more comprehensive and easier to extract, and has obvious advantages in the aspect of improving the code odor detection precision and efficiency.
Owner:HANGZHOU DIANZI UNIV +1

Python program test case generation method based on large language model

The invention belongs to the field of test case generation in traditional software engineering, and discloses a Python program test case generation method based on a large language model. The method can automatically generate and optimize a unit test case of a Python program, and comprises the following steps of: extracting public basic context and function information by utilizing project dependent structure scanning and an AST abstract syntax tree, and constructing an accurate cue word template; verification of grammar, operation logic and coverage rate is carried out on the test case generated by the large language model; aiming at the failed test case, designing a new cue word template and an iteration process so as to automatically iterate and improve, and setting the maximum number of iterations so as to ensure the efficiency; and finally, outputting an optimized high-quality successful test case set so as to improve the test efficiency and reduce the waste of manpower and material resources.
Owner:DALIAN UNIV OF TECH

Auxiliary code review method and system based on large language model

The invention discloses an auxiliary code review method and system based on a large language model, and the method comprises the steps: analyzing a submitted code file based on a static analysis technology and an abstract syntax tree AST extraction tool, and extracting key elements; reviewing the code through a pre-constructed company internal and external knowledge base by relying on a knowledge graph technology to obtain a reviewing result; performing context analysis on the code by adopting a large language model to obtain an analysis result; integrating the review result and the analysis result, and generating a review report through NLP; a containerization technology is adopted to be integrated with plug-ins of mainstream development tools, and private deployment is supported. According to the method, the efficiency, accuracy and safety of code review can be greatly improved, the workload of manual review is reduced, and automation and intelligentization of the code review process are realized.
Owner:BEIYIN FINANCIAL TECH CO LTD

Self-adaptive SQL (Structured Query Language) differential privacy noise adding method

The invention discloses a self-adaptive SQL differential privacy noise adding method, and relates to the technical field of data protection. In order to accurately calculate and add noise of a proper magnitude in a complex SQL statement, the adopted scheme comprises the following steps: regularly collecting and updating metadata of a database, analyzing attribute features of a data table, and forming a data attribute feature library and a corresponding data sensitivity library; the SQL query request is rewritten into an abstract syntax tree and traversed, and an aggregation function, multi-table connection and a sub-query structure are recorded; key semantic information contained in the request is bound with the data sensitivity library, the sensitivity of the request is calculated, and a privacy budget is distributed in a self-adaptive mode; the privacy budget allowance is checked, when the allowance is sufficient, a data disturbance mechanism meeting-differential privacy is used for disturbing the query result, a disturbed result is obtained, and otherwise, the request is rejected. The method is used for accurately calculating the dynamic allocation privacy budget according to the characteristics of the complex SQL query.
Owner:INSPUR SOFTWARE TECH CO LTD

Source code similarity analysis method and system based on semantic enhancement AST

The invention relates to the technical field of program similarity, in particular to a source code similarity analysis method and system based on semantic enhancement AST, and the method comprises the steps: respectively generating corresponding abstract syntax trees AST for two functions using different programming languages; enabling nodes with the same type but different names in different programming languages AST to have the same representation by utilizing a node vocabulary, and shielding the node representation difference of the different programming languages AST; a control flow edge and a data flow edge are expanded for the AST after node standardization processing, a semantic enhancement AST is generated, and the semantic enhancement AST integrates grammar, structure and semantic information of a function; a function similarity analysis network is designed, semantic enhancement AST is converted into graph vectors in combination with a graph convolutional network and an attention mechanism, the two graph vectors are spliced and then input into a full-connection neural network, and the similarity of different programming language functions is judged. According to the method, similarity judgment of different programming language functions can be realized, and the detection efficiency is improved while high accuracy of the detection effect is achieved.
Owner:Chinese People's Liberation Army Cyberspace Force Information Engineering University

Vulnerability detection method based on source code structure and detection system thereof

The invention discloses a vulnerability detection method based on a source code structure and a detection system thereof, and belongs to the technical field of code vulnerability detection. Comprising the following steps: analyzing a source code to generate an abstract syntax tree; building a multi-level graph based on the abstract syntax tree; detecting potential vulnerabilities in the source code based on a graph theory algorithm to generate a potential vulnerability report; performing a predetermined operation on the source code to identify a complex dependency relationship and a data flow path in the source code; detecting vulnerabilities in the source code structure based on a multi-level graph theory analysis method to generate a code structure vulnerability report; and detecting the potential vulnerability report and the code structure vulnerability report in combination with an adaptive scanning strategy, generating a vulnerability detection report, judging whether to repair according to the vulnerability detection report, and giving a repair suggestion. According to different types of source code files and known vulnerability features, the detection strategy is dynamically adjusted, and the detection efficiency is improved.
Owner:JIANGSU QITONG HAOMIAO INFORMATION TECH CO LTD

Cross-framework code migration method and system, electronic equipment and storage medium

The invention provides a cross-frame code migration method and system, electronic equipment and a storage medium, and the code migration method comprises the steps: carrying out the frame-level conversion of a first frame code, and generating a target engineering skeleton adaptive to a second frame protocol; analyzing the construction configuration and the entry file, determining an entry point and a compiling rule of code migration, analyzing the first frame code through an abstract syntax tree, and generating a target code range list needing to be migrated; and according to the target code range list and the dependency item list, applying a preset conversion rule to the first framework code, and generating a second framework code adaptive to a second framework protocol. Through automatic framework-level conversion and dynamic rule adaptation, rapid migration from the first framework code to the second framework code is realized, a multi-terminal code library is unified, the manpower development cost is reduced, synchronous operation of business iteration and migration is supported, and the development efficiency is improved.
Owner:SHANGHAI TRAVEL INFORMATION TECH CO LTD

Intelligent data acquisition and conversion method based on visual rule model

The invention discloses an intelligent data acquisition and conversion method based on a visual rule model, which comprises the following steps: S1, converting a configured rule chain into a data body in a JSON format by a visual rule modeling layer, analyzing the data body into an AST abstract syntax tree, and performing field mapping on the AST abstract syntax tree, the mapping fields are converted into executable codes through an intelligent conversion engine, and an execution plan is generated; s2, the intelligent acquisition layer pulls data from the heterogeneous data source, cleans the data and then allocates the data to an intelligent conversion engine for parallel processing; and S3, the intelligent conversion engine monitors the data consanguinity map and the field-level conversion path in real time, and sends a signal to the visual rule modeling layer or the intelligent acquisition layer according to the abnormal condition type so as to realize rule chain reconfiguration or data reacquisition. The method has the advantages that non-coding docking and real-time supervision of heterogeneous system data are realized, and the problems of dynamic adaptation, semantic understanding and data blood relationship interpretability in financial fund management are solved.
Owner:INST OF SCI & TECHN INFORMATION OF CHINA

Log quality detection method and system, electronic equipment and storage medium

The invention discloses a log quality detection method and system, electronic equipment and a storage medium. The method comprises the following steps: acquiring a multi-modal input source; performing reverse anchoring operation in a dynamic analysis stage of the running log to establish direct mapping between the running log and the source code; compiling the abstract syntax tree based on the source code, establishing a grammar dependence graph according to the abstract syntax tree, and traversing the abstract syntax tree to construct a structured data set; based on the running log, obtaining a quality detection result through structured analysis, and generating a semantic detection result by using a large language model; performing cooperative operation on the structured data set and the grammar dependency graph to generate a code log coverage score, and performing arrangement according to a quality detection result and a semantic detection result to obtain an abnormal mode feature; and performing feedback adjustment based on the code log coverage score and the abnormal mode feature in combination with a preset correction rule. The method can efficiently and accurately realize log quality detection, and can be widely applied to the technical field of data processing.
Owner:SUN YAT SEN UNIV

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

Method and device for automatically upgrading codes based on compiler and storage medium

The invention relates to the technical field of computer code upgrading, and discloses an automatic code upgrading method and device based on a compiler and a storage medium. The method comprises the steps that firstly, lexical analysis, grammatical analysis and semantic analysis are conducted on a source code, an abstract syntax tree is generated, then a new standard grammatical rule mapping table is constructed, and a new standard grammatical rule mapping table is generated; and traversing the abstract syntax tree, querying whether the nodes of the abstract syntax tree can be queried in the mapping table, outputting the character strings mapped to the queried nodes, and normally outputting codes conforming to node semantics for the nodes which are not queried. The abstract syntax tree of the original code is automatically traversed, and node matching and conversion are performed according to the syntax rule mapping table of the new standard, so that the need of manual intervention is greatly reduced, the automation degree of code migration from an old standard to the new standard is improved, a large amount of manpower and time cost is saved, and the migration problem caused by human errors is reduced.
Owner:SHANDONG INSPUR SCI RES INST CO LTD

PHP taint type vulnerability detection method based on heterogeneous graph neural network

The invention discloses a PHP taint type vulnerability detection method based on a heterogeneous graph neural network, and belongs to the field of software security. The method comprises the following steps: performing annotation removal, variable naming standardization and character string standardization processing on a PHP source code through a code preprocessing module to generate a standardized code; based on a vulnerability sub-attribute graph extraction module, reversely tracking vulnerability sinks to a taint source, extracting a simplified vulnerability sub-attribute graph, and removing redundant nodes and edges; fusing BERT semantic features and node type features through a graph node embedding module to generate an initial embedding vector, and constructing a heterogeneous graph comprising an abstract syntax tree edge, a program flow graph edge and a control dependence graph edge; a heterogeneous graph neural network vulnerability detection module is adopted to perform independent feature aggregation on multiple types of edges, dynamic weighted fusion is performed in combination with an attention mechanism, and key nodes are screened through Top-k graph pooling; and finally, inputting the graph-level features into a classifier to realize vulnerability detection.
Owner:YANSHAN UNIV

Distributed storage method based on source code semantic partitioning

The invention provides a distributed storage method based on source code semantic partitioning, and particularly relates to the technical field of cloud data distributed storage. The method comprises the steps of performing semantic partitioning on a source code, and segmenting the source code into a plurality of semantic blocks according to dimensions such as functional semantics, an abstract syntax tree structure, author information and version information; generating metadata containing information such as grammar type tags, file paths, line number ranges, author identifiers, version identifiers and access popularity for each semantic block; constructing a weighted directed acyclic graph (DAG) based on the semantic chunks and the dependency relationship thereof; superposing a metadata layer in the DAG structure, and recording information such as function call dependency, inter-block reference relationship and version evolution chain; blocks with relatively high access frequency and close semantics are aggregated into super blocks, the traversal depth is reduced, and meanwhile, hot data and cold data are differentiated for hierarchical storage by adopting a cold and hot data management strategy; and evaluating a parent block aggregation degree through a BDS algorithm, determining a block sorting priority, and optimizing super block boundary division. Compared with the prior art, the method has the advantages that the semantic retrieval efficiency, the incremental updating capability and the distributed query performance of the source code storage system are improved.
Owner:GUILIN UNIV OF ELECTRONIC TECH

Multi-mode fusion product document and source code association retrieval method based on knowledge graph

The invention discloses a multi-mode fusion product document and source code association retrieval method based on a knowledge graph, and relates to the technical field of software engineering and artificial intelligence. The method comprises the steps that source codes are preprocessed, and code structure information and business semantics are mapped in combination with a predefined business term dictionary; performing controlled induction on a code file and a product document by utilizing a large model, extracting business terms, logic intentions and a subject relationship, fusing with original codes, and establishing a vector retrieval index system; further analyzing a code structure by using an abstract syntax tree, and extracting an entity and a calling relationship; semantic enhancement and relation normalization are performed in combination with the large model, entities and relations are stored in a graph database, and a knowledge graph is formed; and performing parallel processing on user query based on a full-text retrieval index, a vector retrieval index system and a knowledge graph, and finally generating a product concept. According to the method, the retrieval speed, the semantic depth and the logical reasoning ability can be considered at the same time, and the retrieval accuracy is improved.
Owner:MARCO POLO TRAVEL TECH CO LTD

Prompt word compiling and generating method and system for large language model

The invention relates to the technical field of artificial intelligence and natural language processing, in particular to a cue word compiling and generating method and system for a large language model.The method comprises the steps that in response to a compiling calling request, a PDL protocol is received to serve as a compiling input text; performing lexical and grammatical analysis on the compiled input text, and constructing a corresponding abstract syntax tree AST as an intermediate representation according to a context-independent method; semantic verification and structure correction are carried out on the AST, and when semantics are effective, structure optimization is carried out to generate an optimized AST; and traversing the optimized AST, matching a cue word template in a cue word generation rule base, mapping semantic nodes into structured text fragments, splicing the structured text fragments to form a final cue word text, and outputting a compilation result consistent with PDL protocol semantics. By introducing a PDL-oriented compiling mechanism, automatic analysis, structure optimization and high-quality cue word generation of an input protocol are realized before cue words of a large language model are generated, and the development efficiency and the output quality of the cue words are improved.
Owner:BEIJING WENYIN INTERNET TECH CO LTD

Dynamic and static combined detection method for security vulnerabilities of power system software

The invention is applicable to the technical field of vulnerability detection, and provides a power system software security vulnerability dynamic and static combined detection method, which comprises the following steps: acquiring static source code data of power system software and dynamic behavior log data during operation; generating a hierarchical abstract syntax tree and structured time series data; performing multi-dimensional feature extraction on the static source code data and the dynamic behavior log data based on a vulnerability knowledge graph of the power system; generating a domain constraint confrontation sample based on the power protocol features and the abnormal features during operation, and inputting the domain constraint confrontation sample into the constructed hybrid detection model for confrontation training to obtain a trained hybrid detection model; and performing automatic detection on the power system software by utilizing the trained hybrid detection model, and outputting a detection result containing a static code defect position and a dynamic attack path. The full-life-cycle accurate detection of the software vulnerability of the power system is realized, and the network security protection capability of the power system is improved.
Owner:GUANGXI POWER GRID CORP

Fixed function shared accelerator

Systems and methods for generating fixed function shared accelerators (FFSAs) implement and / or comprise operations of receiving source code, the source code indicating a plurality of workloads to be performed by an electronic circuit; generating a plurality of abstract syntax trees (ASTs) based on the source code, wherein respective ones of the plurality of ASTs include a plurality of nodes corresponding to function instructions; generating a plurality of fingerprinting vectors corresponding to the plurality of ASTs, wherein respective ones of the plurality of fingerprinting vectors encode at least one of a number of nodes, a number of edges, a density, a computation intensity, an operands percentage, a control, or a data dependency; and providing the plurality of fingerprinting vectors to a machine learning (ML) model, wherein the ML model is configured to predict similarities between different ones of the plurality of workloads and to output at least one candidate FFSA.
Owner:TRUSTEES OF TUFTS COLLEGE

Multi-source heterogeneous database SQL statement sensitivity calculation method

The invention discloses a multi-source heterogeneous database SQL (structured query language) statement sensitivity calculation method, relates to the technical field of SQL query, and aims to accurately calculate and add noise of a proper magnitude in a complex SQL statement. The adopted scheme is as follows: receiving and preprocessing an SQL query request, and disassembling the SQL query request to generate an abstract syntax tree; traversing the abstract syntax tree, identifying syntax features needing to be processed, defining a rewriting rule, and modifying and optimizing corresponding nodes in the abstract syntax tree; selecting a serialization format, and converting the optimized abstract syntax tree into corresponding serialization data; and performing semantic analysis and logic analysis on the serialized data, binding semantic information contained in the request with metadata information of a target database, calling a sensitivity evaluation algorithm, and performing sensitivity calculation on the request. The sensitivity obtained through calculation is used for guiding data noise addition in an SQL query result.
Owner:INSPUR SOFTWARE TECH CO LTD

Semantic-based migration and consistency verification method, system and equipment and medium

The invention provides a semantic-based migration and consistency verification method, system and device and a medium, and relates to the technical field of databases. The method comprises the following steps: performing metadata topology scanning analysis by obtaining metadata, including generating an abstract syntax tree and constructing a semantic graph; according to a metadata topology scanning analysis result, performing data mapping and conversion, including loading a YAML rule and generating corresponding type mapping and constraint conversion; data migration is carried out through primary key fragmentation parallel migration, batch writing optimization and real-time double-writing verification; through structure-data-business three-layer verification, simulation business SQL comparison and automatic difference repair, the integrity of migrated data and business compliance are ensured, the semantic gap problem in heterogeneous database migration is solved, high-precision and high-efficiency database migration is realized, the migration efficiency is improved, and the data migration efficiency is improved. The method is suitable for scenes with strict requirements on data consistency and migration efficiency, such as financial, government affair and enterprise-level data centers.
Owner:CHINA YANGTZE POWER

Method for realizing SQL grammar conversion of different databases based on middleware and middleware

The invention discloses a method for realizing SQL (Structured Query Language) grammar conversion of different databases based on middleware and the middleware, belongs to the technical field of databases, and aims to solve the technical problem of how to realize SQL grammar conversion of different databases through the middleware. The following operations are executed through the middleware to realize the grammar conversion of the SQL between the source database and the target data constructing an abstract syntax tree AST by taking various SQL elements as nodes; operating nodes in the AST on the basis of requirements of a target database; based on the data type in the target database, performing data type mapping by applying a data type conversion rule, and generating an SQL statement adapted to the target database; performing security check on the generated SQL statement; caching the query result and the generated SQL statement based on a caching mechanism; and recording the conversion process and query processing of the SQL statement.
Owner:INSPUR ZHUOSHU BIG DATA IND DEV CO LTD

Security code automatic generation method and system based on full information theory and mechanism ambiguity

The invention provides a security code automatic generation method and system based on a full information theory and mechanism ambiguity, and the method comprises the steps: S1, carrying out the feature extraction of a grammar verification layer of an input demand, extracting the grammar features of a code through the topological features of an abstract syntax tree, and carrying out the formalized rule verification of the extracted grammar features; s2, constructing a semantic association model of a cross-code snippet through a semantic analysis layer, and forming a propagation path for tracking a data flow and a control flow; s3, in the pragmatic optimization layer, combining pragmatic constraints of the business scene, and generating a security policy through a dynamic utility function; and step S4, optimizing parameters and security policies of the dynamic utility function through knowledge federal evolution and a closed-loop feedback mechanism. According to the method, a deep collaboration mechanism of grammar, semantic and pragmatic three-dimensional information and a dynamic strategy generation model are reconstructed, security logic is converted from external attributes to endogenous cognitive competence, and the security, interpretability and adaptability of automatic code generation are improved.
Owner:SHENZHEN CESTBON TECH CO

Systems and methods for iterative feedback-driven code synthesis using syntax trees and large language models

PendingUS20250306882A1Code compilationSource to sourceCode synthesisObject code
A system for translating source code in a first programming language to a target language is provided. The system is configured to receive source code for converting to target code; determine an abstract syntax tree from the source code; determine program specifications from the source code; determine a dependency graph from the source code; determine a plurality of chunks based at least in part on the abstract syntax tree, the program specifications, and the dependency graph; determine a plurality of converted chunks based at least in part on the plurality of chunks and a deep learning model, the deep learning model converting the plurality of chunks from the language of the source code to the language of the target code; post-process the plurality of converted chunks to obtain intermediate code; and provide the intermediate code as the target code.
Owner:UST GLOBAL INC

Structured query language conversion method, system and equipment and storage medium

The embodiment of the invention discloses a structured query language conversion method, system and device and a storage medium. According to the technical scheme provided by the embodiment of the invention, a first structured query language of a HiveQL standard is input, lexical analysis and grammatical analysis are performed on the first structured query language, and an abstract syntax tree of the first structured query language is generated; traversing the abstract syntax tree, converting each intermediate code of the abstract syntax tree based on a syntax node class of a third-party library to obtain a corresponding first node, and converting the first node into an intermediate node based on a relational algebra expression tree; and converting the intermediate node into a second node based on the grammar rule of the ANSI SQL, and outputting a second structured query language of the ANSI SQL standard based on the second node. By the adoption of the technical means, efficient, convenient and automatic structured query language conversion can be achieved, an analyst does not need to execute manual editing of ANSI SQL, the use threshold of a calculation engine of the ANSI SQL standard is lowered, and data query and analysis efficiency is improved.
Owner:BEIJINGLUOTA INFORMATION TECHNOLOGYCO LTD