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

179 results about "Code snippet" patented technology

Intelligent risk identification and self-adaptive repair method, system and equipment for software supply chain and medium

The invention discloses an intelligent risk identification and self-adaptive repair method, system and device for a software supply chain and a medium, belongs to the field of network security and automatic software engineering, and aims to solve the technical problem of how to accurately and comprehensively identify software code supply chain risks including code snippets. A reliable and efficient automatic closed-loop repair scheme is provided, and the technical defects that in the prior art, the software code supply chain recognition range is limited, the repair process is rigid and the reliability is low are overcome. Analyzing the declarative dependency; meanwhile, semantic traceability based on artificial intelligence is carried out on the code snippets, and a global software material list is generated; and performing intelligent mapping on the software components in the global software bill of materials and the vulnerability database to identify risks.
Owner:SHANDONG ZHENBAI INFORMATION TECHNOLOGY CO LTD

Data platform metadata automatic generation method based on large model

The invention relates to the technical field of metadata generation, and discloses a data platform metadata automatic generation method based on a large model, which comprises the following steps of: firstly, performing unified standardization and preliminary grammatical analysis on an original SQL (Structured Query Language) code to obtain a structured intermediate representation; on the basis, preliminary blood relationship analysis based on rules is carried out, and simple column references are quickly identified and processed. For complex expressions which are difficult to accurately analyze by a traditional method, code snippets and context information of the complex expressions are accurately extracted and submitted to a large language model for deep semantic understanding and complex blood relationship analysis. And finally, integrating the complex consanguinity analyzed by the large model with the initial consanguinity list to form a comprehensive and accurate field-level consanguinity, and further generating complete data platform metadata. In this way, the defect that a traditional analysis tool understands complex semantics is effectively overcome, and the accuracy and integrity of metadata generation are remarkably improved.
Owner:ZHEJIANG NON-LINEAR DIGITAL TECH CO LTD

Code exception analysis method and device, storage medium and program product

The embodiment of the invention provides a code exception analysis method and device, a storage medium and a program product. In the embodiment of the invention, in the preset plug-in, the global knowledge graph is constructed through the logic syntax tree of the plurality of original business codes, so that intelligent anomaly analysis is carried out on the modified to-be-detected codes, multi-language and heterogeneous programming styles and complex dependency limitation are broken through, and cross-language and cross-file analysis is supported; change code snippets and associated influence code snippets thereof are accurately identified, and a data basis is tamped and analyzed; the analysis depth is deepened and the accuracy is improved through a multi-dimensional anomaly analysis large model and four-dimensional collaborative analysis in combination with an adaptive review rule and a knowledge graph; and finally, performing correction based on the generated repair scheme. Through the technical fusion of an MCP protocol, a multi-AI model, a syntax tree and a knowledge graph, the high efficiency, accuracy and real-time performance of code examination and repair are realized, and the service development quality and the system operation stability are remarkably improved.
Owner:BEIJING 58 INFORMATION TTECH CO LTD

Script preservation method, device, equipment, medium and program product

The invention provides a script preservation method which can be applied to the technical field of artificial intelligence. The script preservation method comprises the following steps: carrying out semantic understanding on demand related files by utilizing a large model, extracting core elements, and generating a structured demand change list; analyzing to obtain an abstract syntax tree of an existing script code, and constructing a mapping relationship between the software automation test element and a script code block; dynamically comparing the structured demand change list with an existing script code structure tree based on a mapping relation between software automation test elements and script code blocks, identifying a script range influenced by demand change, and outputting a change influence matrix; and based on the change influence matrix, generating an automatic script code snippet needing to be updated, and realizing preservation of the automatic script. The invention further provides a script preservation device and equipment, a storage medium and a program product.
Owner:INDUSTRIAL AND COMMERCIAL BANK OF CHINA

Method, apparatus and device for automated control code generation and verification, and storage medium

A method for automated control code generation and verification includes: receiving a natural language command, the natural language command being configured to instruct the large language model to output a code text that meets control requirements corresponding to the natural language command; performing matching retrieval on a vector database according to the natural language command to obtain a sample code snippet; obtaining API structured information corresponding to the sample code snippet from a knowledge graph database; generating an initial control code according to the sample code snippet and the API structured information; and performing a multi-level virtual operation verification on the initial control code in a software motion control system, and generating a target control code according to multi-level verification results confirmed multiple times by the user and the initial control code.
Owner:THE HONG KONG UNIV OF SCI & TECH (GUANGZHOU) +1

Test case generation method based on multi-modal knowledge base and self-adaptive cue words

The invention relates to a test case generation method based on a multi-modal knowledge base and self-adaptive cue words, belongs to the technical field of software testing, and solves the problems of insufficient reuse of historical project data and expert knowledge, lack of knowledge in a large model professional field, prominent illusion problem, low adoption rate of generated test cases, low practicability and the like. The method comprises the steps of generating an original test demand set of a to-be-tested item; forming a test demand-code snippet / function set based on the software source code file and the original test demand set; generating a first-stage test tree graph based on each test demand point and the corresponding code snippet / function; forming a software test outline based on the test items, the test subitems and the corresponding test demand points and code snippets / functions; forming a second-stage test tree graph based on the first-stage test tree graph and the software test outline; and generating a test case based on the second-stage test tree graph and the software test outline. And the specialty, the accuracy and the interpretability of the test case are enhanced.
Owner:BEIJING JINGHANG COMPUTING & COMM RES INST

Code generation method and device based on large model, equipment, medium and product

The invention discloses a code generation method and device based on a large model, equipment, a medium and a product, and the method comprises the steps: carrying out the code generation through a first code large model according to target code demand data, and obtaining an initial code; according to the first code snippet, generating a test code through a second code large model to obtain a unit test code; according to the unit test code and the initial code, code repair based on editing distance regularization is conducted through a third code large model, and a to-be-analyzed code is obtained; performing iterative optimization on the to-be-analyzed code and the unit test code to obtain a target code corresponding to the target code demand data; according to the method, code generation, unit test generation and code repair are carried out in a multi-model cooperation mode, the reliability and accuracy of code generation can be effectively improved, software security vulnerabilities are reduced, and therefore the stability and security of a software system are improved.
Owner:CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1

Automatic driving test scene generation method and device based on large language model and probabilistic scene generation language

The invention discloses an automatic driving test scene generation method based on a large-scale language model and a probabilistic scene generation language. The automatic driving test scene generation method comprises the following steps: S1, analyzing a natural language instruction input by a user by using the large-scale language model; s2, performing structured decomposition on the scene description; s3, generating a code snippet of a probabilistic scene generation language; and S4, assembling and compiling a script of the probabilistic scene generation language. The invention further discloses an automatic driving test scene generation device based on the large language model and the probabilistic scene generation language. According to the method, direct, efficient and reliable conversion from the natural language intention to the complex dynamic simulation scene is realized, and the method can be widely applied to the technical field of simulation testing and artificial intelligence.
Owner:WUHAN UNIV OF TECH

Code retrieval method, electronic equipment and storage medium

The invention discloses a code retrieval method, electronic equipment and a storage medium, and relates to the technical field of artificial intelligence, the method comprises the following steps: encoding a query text through a pre-training text encoder to obtain a query vector; a target vector related to the query vector is queried in a shared vector space, the shared vector space is a shared space of a pre-training text encoder and a pre-training code encoder, and the shared vector space comprises a plurality of code snippet vectors obtained by encoding the full-amount code through the pre-training code encoder; and determining a target code corresponding to the query text according to the target vector. According to the method and the device, the retrieval result can accurately reflect the user demand, and the retrieval efficiency, precision and recall rate are improved.
Owner:GUANGDONG-HONG KONG-MACAO GREATER BAY AREA DIGITAL ECONOMY RESEARCH INSTITUTE (INTERNATIONAL ADVANCED TECHNOLOGY APPLICATION PROMOTION CENTER (SHENZHEN)

Systems and methods for generating code output

A method of generating a code output in response to a natural language problem description. The method includes: receiving the natural language problem description; generating, by a neural network based language model, a first candidate code snippet based on a first input prompt combining the natural language problem description and a first instruction; executing, at a code execution environment, the first candidate code snippet based on a unit test thereby producing a first feedback reflecting a correctness of the first candidate code snippet; generating, by the neural network based language model, a second candidate code snippet based on a second input prompt combining the natural language problem description, the first candidate code snippet, and the first feedback; and executing, at the code execution environment, the second candidate code snippet based on a runtime test thereby producing a second feedback reflecting a runtime efficiency of the second candidate code snippet.
Owner:SALESFORCE INC

Interface verification and test method and device based on large model, medium and product

The embodiment of the invention relates to the technical field of information, and discloses an interface verification and test method and device based on a large model, a medium and a product, and the method comprises the steps: obtaining a to-be-tested interface document, analyzing the interface document through a first large model, constructing a test request parameter based on a request parameter definition, acquiring a real-time response message by calling a real interface; performing semantic comparison on a response example in the document structure information and the real-time response message by using the second large model to obtain a corrected interface document; comparing the parameter constraint condition in the corrected interface document with the verification logic in the business logic code snippet by using a third model to generate a logic verification passing result; and on the basis of the corrected interface document and a logic verification passing result, a Mock rule and an automatic test case script are generated by utilizing the fourth model, so that the maintenance cost and the false alarm rate of the automatic test script are reduced, and the automatic test efficiency is improved.
Owner:SHANGHAI SHANGHU INFORMATION TECH CO LTD

Synthetic generation of software code using language models

One or more new coding instructions are generated using a language model (LM) prompted to perform one or more genetic operations on one or more seed coding instructions of an initial set of coding instruction-snippet pairs. One or more respective coding snippets are generated to implement the one or more new coding instructions using a LM prompted to generate coding snippets for the one or more new coding instructions. A generational set of coding instruction-snippet pairs comprising the initial set of coding instruction-snippet pairs and a new set of coding instruction-snippet pairs comprising the one or more new coding instructions and the one or more respective coding snippets is created.
Owner:NVIDIA CORP

LLM-powered threat modeling

Techniques for implementing an AI threat modeling tool are disclosed. A static analysis tool is used to extract a candidate code snippet from a code repository. The candidate code snippet is identified as potentially being a security relevant code element. The static analysis tool generates additional context associated with the candidate code snippet. An LLM prompt is generated. This prompt is structured to include the candidate code snippet, the context, and a directive to assign a classification to the candidate code snippet. The classification includes a source classification, a sink classification, a sanitizer classification, or a flow step classification. The LLM operates on the prompt to generate output comprising a specific classification for the candidate code snippet. The output is formatted into a data extension file that is consumable by the static analysis tool.
Owner:MICROSOFT TECHNOLOGY LICENSING LLC

Vulnerability false alarm detection method and electronic equipment

The invention discloses a vulnerability misinformation detection method and electronic equipment, and relates to the technical field of computers, and the method comprises the steps: obtaining feature statistical information based on a sample data set from a plurality of data providers, determining a feature subset with a distinguishing capability, and carrying out the joint model training based on a standard data set corresponding to the feature subset, and generating a vulnerability false alarm identification model. The model can automatically learn difference characteristics of misinformation and non-misinformation code snippets among different items, and realizes cross-item and cross-version misinformation identification and filtering. The technical problem of rule failure caused by dependence on context information such as specific code paths or line numbers and code structure adjustment or version updating is solved, and the technical effects of automation of false alarm filtering, reduction of manual intervention and maintenance cost and improvement of code security analysis accuracy and overall efficiency are achieved.
Owner:LANGCHAO ELECTRONIC INFORMATION IND CO LTD

Program performance monitoring method and device, equipment and storage medium

PendingCN120872773AResource allocationFault responseDynamic resourceProgram quality
The invention discloses a program performance monitoring method and device, equipment and a storage medium, and relates to the field of computers.The program performance monitoring method comprises the steps that a running log of a to-be-monitored program is obtained, dynamic resource information of the to-be-monitored program during running is obtained from a server-free platform, the running log and the dynamic resource information are processed according to a timestamp, and the dynamic resource information is obtained; performing performance analysis according to the performance data of the monitored program, and determining code snippets with abnormal performance. According to the log record based on the monitoring mark and the dynamic resource deployment information of the platform, the program performance in the non-service environment is monitored, the correlation analysis is performed on the program execution track and the underlying resource scheduling, the mutual influence relationship between the code logic and the operation environment is considered, and the program performance is improved. According to the method, a cross-level performance monitoring system is established, the accuracy of program performance monitoring is improved, abnormal program fragments with high resource consumption and low execution efficiency are recognized, and therefore a basis is provided for optimizing program quality and avoiding resource waste.
Owner:AGRICULTURAL BANK OF CHINA

Validation of code snippets from documentation

A computing system comprising one or more computing devices can access a file comprising documentation that includes a textual description and a source code snippet written to comply with a programming language syntax. The computing system can identify the source code snippet. The computing system can generate an executable based on the source code snippet. The computing system can initiate a test process that accesses the executable, the test process causing the executable to cause an event. The computing system can determine that the event is a valid event or an invalid event.
Owner:RED HAT INC

Systems and methods for generating code output using an a neural network based language model that involves adapting the generation based first on the correctness and second on the runtime efficiency of the code

A method of generating a code output in response to a natural language problem description. The method includes: receiving the natural language problem description; generating, by a neural network based language model, a first candidate code snippet based on a first input prompt combining the natural language problem description and a first instruction; executing, at a code execution environment, the first candidate code snippet based on a unit test thereby producing a first feedback reflecting a correctness of the first candidate code snippet; generating, by the neural network based language model, a second candidate code snippet based on a second input prompt combining the natural language problem description, the first candidate code snippet, and the first feedback; and executing, at the code execution environment, the second candidate code snippet based on a runtime test thereby producing a second feedback reflecting a runtime efficiency of the second candidate code snippet.
Owner:SALESFORCE INC

Digital power supply graphical programming method based on flow driving

The invention belongs to the technical field of power supply control, and particularly discloses a digital power supply graphical programming method based on flow driving, which comprises the following steps of: constructing a power supply control Flow component library which comprises a plurality of Flow nodes, and storing the nodes in a script file form, the script file comprises basic code snippets required by node function implementation and describes data terminals, logic terminals and node attribute parameters of input and output reserved by nodes; constructing a graphical programming module, and providing a graphical programming interface to receive a setting operation of a user so as to form a graphical program logic description file; generating a graphical program script file according to the description file and each Flow node script file; and generating a power supply control code based on the graphical program script file and the chip peripheral drive script file, and compiling and burning the power supply control code into an embedded controller of the digital power supply. According to the method, low-code / code-free development can be realized, and the development difficulty is effectively reduced.
Owner:WUHAN SENMU LEISHI TECH CO LTD

Research and development-oriented long-short-term memory framework construction method and system

The invention belongs to the technical field of software development, and particularly provides a research and development-oriented long and short-term memory framework construction method and system, which adopts a layered memory architecture to construct four core modules including a short-term memory compressor, a medium-term memory aggregator, a long-term memory graph and a cross-layer memory router. The system takes multi-source input such as research and development dialogues, code snippets and project documents as a starting point, extracts research and development elements through semantic analysis and entity recognition technologies, compresses lengthy dialogues into structured short-term memory by utilizing an attention distillation mechanism, upgrades high-frequency short-term memory into medium-term knowledge fragments based on a time sequence attenuation algorithm, and improves the research and development efficiency. And constructing a long-term knowledge graph containing developer portraits, project dependence and normative standards by adopting a graph convolutional network. Context understanding accuracy, multi-round dialogue continuity and personalized service quality of a large model in a research and development scene are remarkably improved, and the method is suitable for mainstream research and development tool scenes such as IDE plug-ins, code review and architecture design.
Owner:HUAZHONG UNIV OF SCI & TECH

Integrated code generation method, system, equipment and medium

The invention is suitable for the technical field of computers, and provides an integrated code generation method which comprises the steps that on a low-code platform, a seed code is generated based on a data model, and the seed code comprises service metadata capable of being recognized by a development environment; analyzing a data model and a business rule on which the seed code is based, and constructing a multi-dimensional meta-knowledge graph; in a code editor, analyzing the business metadata to generate a business context; deducing a service constraint condition from the service context, and converting the service constraint condition into a code generation constraint; on the basis of the code generation constraints, code snippets are generated through an AI programming assistant in combination with the seed codes, and therefore semantic matching is carried out on data relations, service rules and the like in services and constraint conditions needed by code generation through integration of low-platform codes, a code editor and the AI programming assistant, deep semantic understanding is achieved, and the service quality is improved. And generating a corresponding code snippet.
Owner:GUANGZHOU SANQI DREAM NETWORK TECH CO LTD

System and method for software development on mobile devices

An interactive coding environment is provided via an integrated mobile application. The interactive coding environment includes multiple user interface input elements including, but not limited to, a text editor, a virtual keyboard, a virtual autocomplete toolbar, a quick actions toolbar, and a virtual joystick. A user interacts with the coding environment via their user device, such as a mobile device. While coding within the text editor, the user is provided with auto-complete code suggestions and / or code snippets. Suggested inputs are obtained from a predictive model based on the user's input. A virtual joystick is provided to enable easy navigation within a text document shown within the text editor.
Owner:REPLIT INC

Method and system for arbitrary-granularity execution clone detection

A method and apparatus are disclosed for enhancing operable functionality of input source code files from a software program by identifying a first code snippet and a first library function which have similar execution flow similarity measures by evaluating a first contiguous sequence of n items extracted from the first code snippet against a second contiguous sequence of n items extracted from the first library function using an Ngram threshold that is calculated for the first library function and one or more literals from the first code snippet so that the developer is presented with a library function recommendation which includes the first code snippet, the first library function, and instructions for replacing the first code snippet with the first library function.
Owner:DEVFACTORY INNOVATIONS FZ LLC

Scalable source code vulnerability remediation

In some examples, scalable source code vulnerability remediation may include receiving source code that includes at least one vulnerability, and receiving remediated code that remediates the at least one vulnerability associated with the source code. At least one machine learning model may be trained to analyze a vulnerable code snippet of the source code. The vulnerable code snippet may correspond to the at least one vulnerability associated with the source code. The machine learning model may be trained to generate, for the vulnerable code snippet, a remediated code snippet to remediate the at least one vulnerability associated with the source code. The remediated code snippet may be validated based on an analysis of whether the remediated code snippet remediates the at least one vulnerability associated with the source code.
Owner:ACCENTURE GLOBAL SOLUTIONS LTD

Code execution method and device based on low-code platform

The invention provides a code execution method and device based on a low-code platform, and the method comprises the steps: obtaining a current code file under the condition that a storage modification instruction for code modification based on the low-code platform is received; determining an incremental code snippet of the current code file; performing code compiling on the incremental code snippets to obtain a compiling result; and under the condition that the compiling result is determined to be failed, outputting and displaying the compiling result. According to the method provided by the invention, the current code file is automatically obtained under the condition that the storage instruction of code modification by the user is received, the incremental code snippets of the current code file are compiled, and the compilation result containing the compilation error information is returned and displayed under the condition that the compilation result is compilation failure; according to the method and the device, the compiling triggering is automatically enhanced, the compiling failure problem is quickly positioned, and the code development and debugging efficiency is further improved.
Owner:BEIJING TIANYUAN INNOVATION TECH CO LTD

Code retrieval method and device, computer equipment, storage medium and computer program product

The invention relates to a code retrieval method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: obtaining candidate code snippets, and splitting the candidate code snippets into mark sequences; for any mark in the mark sequence, generating a semantic vector of the mark, and coding to obtain a representation vector of the mark based on the semantic vector of the mark and the position of the mark in the mark sequence; generating a code representation vector of the candidate code snippet according to the representation vector of each mark and a grammatical relationship between the marks; and when a target retrieval text is received, generating a target retrieval vector based on the target retrieval text, and determining a target code snippet from the candidate code snippets based on the similarity between the target retrieval vector and the code representation vector of each candidate code snippet. By adopting the method, the code retrieval accuracy can be improved.
Owner:CHINA LIFE INSURANCE CO LTD

Code inspection method, electronic equipment and medium

The invention provides a code checking method, electronic equipment and a medium, and relates to the technical field of computers. The method comprises the steps of obtaining a first check result of a target code; the first check result is used for indicating a first code snippet which does not meet each code rule in a pre-constructed code rule set in the target code; determining a second check result according to the operation data of the target code and a preset operation condition; the operation data is used for representing the operation condition of the target code in the execution process; the second check result is used for indicating a second code snippet which does not meet the preset operation condition in the target code; generating a third check result of the target code according to the first check result and the second check result; the third check result is used for indicating a third code snippet in the target code; the third code snippets are code snippets in the first code snippets and the second code snippets. Through the method, the code is checked according to the operation data of the code, and the accuracy of code operation performance detection is improved.
Owner:HUAWEI TECH CO LTD

Error alarm interpretation method and related equipment

The invention discloses a method for explaining an error alarm. The method comprises the following steps of: presenting description information of a plurality of alarm records output by analyzing a code file of a detected item to a user; according to the description information of the multiple alarm records, extracting target code snippets associated with the multiple alarm records and rule description of a target rule; retrieving at least one of a description text of a defect code, a description text of a misinformation scene or an example code snippet identified by the target rule from a knowledge base according to the rule description; according to the description text of the defect code, the description text of the false alarm scene or the example code snippet and the rule description and the target code snippet of the target rule, generating a false alarm conclusion and reason explanation of the multiple alarm records through a language model; and presenting a false alarm conclusion and reason explanation to the user. According to the method, the rule check principle is interpreted through the language model, the program execution process is analyzed and deduced, the reason explanation for generating the misinformation is generated, evidence is provided for the misinformation conclusion, and high availability and reference are achieved.
Owner:HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD