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

35 results about "Code annotation" patented technology

Annotation is a term used in computer programming to refer to documentation and comments that may be found on code logic. Annotation is typically ignored once the code is executed or compiled.

Automobile fault code labeling method and device, computer equipment and storage medium

PendingCN121259840ACharacter and pattern recognitionData ingestionText annotation
The invention relates to the technical field of data processing, and discloses an automobile fault code labeling method and device, computer equipment and a storage medium, and the automobile fault code labeling method comprises the steps: carrying out the recognition processing of fault maintenance data, generating structured data, carrying out the standardization processing of the structured data, and generating text verification data; fault code fields and state information are extracted based on the text verification data, preliminary annotation data are constructed, recognition enhancement processing is carried out according to the preliminary annotation data, and fusion annotation data are generated; carrying out maintenance part matching processing on the fusion annotation data to generate image-text annotation structure data; and performing format processing on the image-text annotation structure data to generate target automobile fault code annotation data. According to the method, the labeling capability of the complex maintenance data can be effectively improved, the manual operation burden is reduced, and the efficiency, accuracy and consistency of data labeling are greatly improved.
Owner:THINKCAR TECH CO LTD

Code abstract generation method and system based on hierarchical context awareness

ActiveCN121957613AOvercoming the lack of context problemEnhance semantic relevanceSemantic analysisBiological modelsPathPingLinguistic model
The invention discloses a code abstract generation method and system based on hierarchical context awareness, and belongs to the field of natural language processing and software engineering. The method comprises the following steps: generating hierarchical annotations for a code warehouse based on a function call graph, firstly extracting a call relationship in the graph and eliminating a ring structure, and then classifying leaf nodes and generating annotations; a topological sequence from bottom to top is adopted in the core step, the importance score of a child node is calculated for each father node, child node annotations, class function descriptions and code bodies of the child nodes are fused, and a large language model is input to generate annotations till the whole graph is covered. The method is suitable for an automatic document generation scene of a complex software project, and through a technical path combining function call graph analysis, child node importance measurement and class function description, the accuracy and semantic consistency of code annotation are improved; the method can be widely applied to the fields of software maintenance, code understanding, intelligent development tools, automatic document generation of enterprise-level code warehouses and the like.
Owner:HANGZHOU DIANZI UNIV

Code annotation generation method and system based on token-level semantic matching

The invention belongs to the technical field of software engineering, and discloses a token-level semantic matching-based code annotation generation method and system, and the method comprises the following steps: obtaining a target code and a data set, carrying out the preprocessing and dividing, and obtaining a training set as a corpus; performing word segmentation on the codes in the corpus by using a word segmentation device of a pre-trained large language model, and extracting and storing a context semantic embedding vector of each token in the codes to form a code semantic warehouse; calculating the lexical similarity between the target code and the code in the corpus, and taking the top k high examples as candidate examples; according to the method, a target code and a candidate sample are subjected to token-level semantic matching, the most similar token in another code segment is matched, the accuracy rate and the recall rate are combined to obtain an F1 score, and the sample with the highest score is reused, the context semantic feature of fine granularity is considered in the aspect of retrieval, the code annotation generation precision is improved, extra training is not needed, and the retrieval efficiency is improved. And the method has good applicability to different scenes.
Owner:HANGZHOU DIANZI UNIV

Method and system for automatic generation of source code comments based on word-level retrieval

ActiveCN116627487BFeature vectorAlgorithm
The application discloses a source code annotation automatic generation method and system based on word-level retrieval and belongs to the field of natural language processing text generation. A training set composed of code function text, code abstract syntax tree and code annotation text is used to train an encoding-decoding network; an overall feature vector of each annotation word in the code annotation text is obtained to construct a near-neighbor word database; for the code function text to be annotated and the abstract syntax tree thereof, a model-based target word probability distribution and an overall feature vector of a target word at a current time step are generated in a self-recurrent manner; K near-neighbor words with the highest similarity to the overall feature vector of the target word are searched in the near-neighbor word database to generate a target word probability distribution based on the near-neighbor words; and the two target word probability distributions are fused to take the target word with the maximum probability as an annotation word generated at the current time step. The application can greatly improve the annotation generation quality of an original model and also improve the generation probability of low-frequency words in code annotation.
Owner:ZHEJIANG UNIV

Automatic code generation method and system for some / ip data type

PendingCN122308840ACode generationData class
This application discloses an automatic code generation method and system for SOME / IP data types, relating to the field of vehicle system development. The method includes: S1, data dictionary reading: obtaining the data dictionary for SOME / IP protocol communication; S2, data type classification, identification, and processing: opening the Excel file from step S1, classifying each row of data in the worksheet, and performing specific parsing processing for different types; S3, multi-round iterative dependency resolution: using a multi-round scanning strategy to resolve nested dependencies between various data types; S4, naming standardization processing: standardizing the names of each parsed data type according to preset naming rules; S5, standard code generation and output: converting all data types that have undergone naming standardization processing into type definition code conforming to C language specifications; simultaneously converting the value range, precision, unit, and Chinese description metadata in the data dictionary of the Excel file into code comments, generating a C language header file that can be included in the compilation project.
Owner:CHINA FAW CO LTD

Code annotation generation method and device, equipment, storage medium and program product

The invention relates to the technical field of computers, and provides a code annotation generation method and device, equipment, a storage medium and a program product. The method comprises the steps of obtaining a to-be-analyzed SQL code; based on a large language model, generating an SQL code blood relationship of the to-be-analyzed SQL code; generating business knowledge based on the SQL code blood relationship; and based on the SQL code consanguinity and the business knowledge, generating a code annotation of the to-be-analyzed SQL code through the large language model. By means of the mode, it can be avoided that the generated code annotation is too technically or abstractly generated, the service logic and the service target of the code can be effectively reflected, the code annotation has better readability and understandability, and the influence on subsequent development and maintenance of software is reduced.
Owner:CHINA MOBILE GROUP ZHEJIANG +1

A source code annotation generation method and device, a storage medium and a computer device

A source code annotation generation method and device, a storage medium and a computer device are provided. When automatically annotating source code, the source code to be annotated and the bytecode of the source code to be annotated are first obtained. The bytecode can identify source codes with the same function but different implementation manners. Then, based on a preset word embedding matrix, a text word vector of the source code to be annotated and a bytecode word vector of the bytecode are determined. The text word vector can capture the semantic and syntactic information between the strings of the source code to be annotated. After the text word vector and the bytecode word vector are determined, the text word vector and the bytecode word vector are spliced to form a spliced word vector. The spliced word vector is used to generate an annotation result of the source code to be annotated. In this way, the annotation of the codes with the same function but different implementation manners is constrained, confusion and ambiguity are avoided, and the accuracy of the annotation result is improved.
Owner:SUN YAT SEN UNIV

Large model code generation method based on multi-feature improved Ptuning-V2

The invention discloses a large model code generation method based on multi-feature improved Ptuning-V2, which comprises the following steps that: aiming at a source code, multi-source features are extracted and fused from three dimensions of text, consumption and image, and the text features comprise code vectors, grammar structures and execution process features; the consumption features comprise code annotation, time and space complexity features; and the image features are used for processing a structure chart and a flow chart of the code by utilizing a visual converter. And injecting final semantic features generated after weighted fusion into a P-tuning V2 fine tuning algorithm in each layer of the base large model, so that the final semantic features, learnable prompt vectors and an input sequence jointly participate in self-attention calculation. According to the method, rich priori knowledge is provided for the prompt vector by deeply fusing the multi-dimensional characteristics of the code, the understanding ability of the model for the code structure, logic and performance is remarkably enhanced, and the accuracy, logic completeness and practicability of the generated code are effectively improved while the advantage of efficient fine tuning of parameters is kept.
Owner:NANJING HAOLIN TECH CO LTD

Source code comment generation system and source code comment generation method

A source code comment generation system: has term information in which terms used in a design document inputted to the source code comment generation system and meanings of the terms are associated with each other; divides source code into source codes in prescribed scope units; and, on the basis of a term having a meaning in a prescribed relationship with the meaning of the source code in scope units, the source code in scope units, and a prescribed language model, generates commented-upon source code that includes a comment in prescribed scope units for the source code in scope units.
Owner:HITACHI LTD

A machine learning based code annotation generation and verification method

This invention discloses a machine learning-based code annotation generation and verification method, comprising the following steps: Step 1: Determine the target code unit and construct an abstract syntax tree, control flow graph, and data flow graph; Step 2: Encode the target code unit to generate candidate annotation text; Step 3: Parse the candidate annotation text to obtain a set of atomic assertions and extract a set of code facts; Step 4: Calculate the consistency score and determine the core conflict set; Step 5: Perform semantic preservation transformation to generate an equivalent view set and an equivalence evidence set, and delete invalid equivalent views; Step 6: Limit the interpretation domain and perform improved SmoothGrad attribution on the consistency score to generate contribution location results; Step 7: Generate candidate edit sequences and output corrected annotations; Step 8: Calculate the re-verification consistency score and generate annotation update records. This invention improves annotation consistency and interpretability verification capabilities.
Owner:TIBET TENGSHI SOFTWARE CO LTD

General-purpose document automatic generation method based on structured code annotation

This invention relates to the field of code documentation generation technology and discloses a general automatic documentation generation method based on structured code comments. The method collects structured code comments from source code files and acquires code context information in real time. In a document generation fusion mode, the structured code comments are compensated and parsed to obtain code element description indicators, thereby determining the document content update cycle. By acquiring logical path information during code execution and extracting semantic features, semantic node data is obtained, and the document generation quality status level is determined in combination with code context information. Finally, based on the content update cycle and quality status level, the dynamic document generation blind spots in the document generation process are regulated. This method achieves dynamic optimization of document generation through deep parsing of comments and integration of context and logical path information, enhancing the correlation and completeness between the document and the actual logic of the code.
Owner:国投人力资源服务有限公司

Public component development management method

PendingCN121433653AVersion controlProgram documentationExtensibilityCode writing
The invention provides a public component development management method. The method comprises the following steps: establishing a code writing specification, a dynamic expansion mechanism, a code annotation specification and a version control strategy for developing a public component; establishing a development team training mechanism and a code review mechanism based on the code writing specification; designing dynamic parameters based on a dynamic expansion mechanism; optimizing the annotation document based on the code annotation specification; and managing the version of each public component in the public component library based on the version control strategy. By establishing a series of management specifications and optimization mechanisms, the development efficiency, quality and maintainability of the public component are improved, and the flexibility and expandability of the public component are enhanced. Through the implementation of the steps, it is ensured that developers can rapidly and easily integrate and call the public components, and meanwhile customized configuration and expansion can be conducted according to specific requirements of the project, so that the development efficiency is improved, the maintenance cost is reduced, and successful implementation of the project is promoted.
Owner:TUS CLOUD CONTROL (BEIJING) TECH LTD

Universal document automatic generation method based on structured code annotation

The invention relates to the technical field of code document generation, and discloses a universal document automatic generation method based on structured code annotation. The method comprises the following steps: acquiring a structured code annotation from a source code file, and acquiring code context information in real time; in a document generation fusion mode, performing compensation analysis on the structured code annotation to obtain a code element description index, and further determining a document content updating period; semantic node data are obtained by obtaining logic path information in a code execution process and extracting semantic features, and a quality situation level generated by a document is determined in combination with code context information; finally, according to the content updating period and the quality situation level, a dynamic document generation blind area in the document generation process is regulated and controlled. According to the method, dynamic optimization of document generation is achieved by deeply analyzing the annotation and integrating context and logic path information, and relevance and integrity of the document and actual code logic are enhanced.
Owner:国投人力资源服务有限公司

Code annotation generation method driven by mixed entropy

The invention belongs to the technical field of code annotation generation, and particularly relates to a mixed entropy driven code annotation generation method which comprises the following key steps: S1, constructing a standardized dictionary for standardizing codes and annotations; s4, constructing a program structure multi-relation graph PSRG for comprehensively capturing multi-dimensional structure information and deep semantic features of the codes; s6-S8: constructing a PSRG structure expert coding module, a retrieval annotation expert coding module and an expert vector sequence dynamic selection module, realizing effective balance between information utilization efficiency and semantic generalization ability based on a mixed entropy driving mechanism, and enhancing the representation ability and context adaptability of the generation model. According to the scheme, the adaptive capacity of the model to the long word string is improved, and the grasping of semantic details is enhanced, so that the accuracy, fluency and robustness of annotation generation are remarkably improved.
Owner:GUANGDONG UNIV OF TECH

A code comment generation method based on active learning

The application provides a code annotation generation method based on active learning, and belongs to the technical field of computers, and solves the problem that under a limited manual annotation budget, model training data is insufficient, and it is difficult to generate high-quality code annotations.The technical scheme comprises the following steps: (1) collecting domain data sets; (2) pre-training a general model; (3) designing an active learning sampling strategy based on clustering and attention dispersion; (4) continuously iterating in the two steps of data sampling, labeling and model fine-tuning until the budget is used up or the predefined termination condition is reached; (5) under the limited manual annotation budget, the fine-tuned model can generate higher quality code annotations for code segments.The beneficial effects of the application are that the model trained based on active learning can generate higher quality annotations for code segments using less training data under a limited annotation budget, thereby balancing the manpower required for a certain annotation quality.
Owner:NANTONG UNIV

Game testing method and device, storage medium, equipment and program product

The invention discloses a game test method, a game test device, a computer readable storage medium, electronic equipment and a computer program product, and the method comprises the steps: responding to a test instruction of a to-be-tested game service function, reading an annotation in a program code used for realizing the to-be-tested game service function, and through a preset test case, reading the annotation in the program code used for realizing the to-be-tested game service function; and controlling the target game virtual object to execute the to-be-tested game service function, and determining a test result of the to-be-tested game service function according to the process of executing the to-be-tested game service function by the target game virtual object. Therefore, the test case can be stored in the code annotation, so that a test case writing environment in a game service function test is simplified, test data does not need to be constructed or an execution script does not need to be written completely manually, function abnormity can be positioned quickly, and function verification can be completed quickly. And the situation that the user needs to construct a virtual offline environment for testing is avoided, and the testing efficiency is further improved.
Owner:NETEASE (HANGZHOU) NETWORK CO LTD

Code comment quality assurance

Code comment quality assurance includes calculating a complexity of a code portion extracting, from the code portion, one or more comments associated with the code portion, converting the one or more comments into a set of text features, quantifying the set of text features, determining, for the one or more comments, alignment between the one or more comments and the associated code portion using the quantifications of the set of text features and the complexity of the code portion, and triggering a notification responsive to the determination that the one or more comments and the associated code portion are misaligned.
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION

A code comment generation method and device

The application discloses a code annotation generation method and device. The application obtains the source code of a first project, compiles the source code into bytecode, generates a control flow diagram according to the bytecode, inputs the bytecode and the control flow diagram into an annotation translation model, and obtains the annotation of the source code output by the annotation translation model. According to the application, the source code of a second project is converted into bytecode and a control flow diagram, the annotation translation model is trained by using the bytecode and the control flow diagram of the second project, the annotation of the source code of the second project output by the annotation translation model is obtained, and compared with the prior art, the annotation translation model can be trained by using the training data of the second project because the bytecode of the source code of the second project and the first project has similarity. The annotation translation model obtained can be used for the first project with similar bytecode, and the learning cost of the annotation translation model is reduced.
Owner:SUN YAT SEN UNIV

RESTful API intelligent application method and system based on large language model

The invention discloses a RESTful API intelligent application method based on a large language model, and the method comprises the following steps: automatically extracting API endpoints, parameter entities and response code information from an OpenAPI standard document, a source code annotation, HAR flow data, a WITSML standard data stream of a petroleum drilling geological design system, and an SDK document of Landmark and Schlumberger platforms through employing a BERT series model in combination with a rule template; the method comprises the following steps of: vectorizing a natural language instruction input by a user through a Sension-BERT model; calculating a comprehensive score based on three dimensions of cosine similarity of a query vector and an API description vector, a Jaccard similarity coefficient of a parameter set and a historical calling frequency; an API calling request is constructed and executed, a dynamic timeout threshold value based on a historical response time P95 quantile is set, and a backspacing strategy related to the field is configured for a key API. According to the method, end-to-end intelligent API calling is realized, multidisciplinary data islands such as geology and engineering are effectively broken through, and the automation level and service continuity of complex system integration are remarkably improved.
Owner:KARAMAY HONGYOU SOFTWARE

Computer-implemented configuration method, corresponding processing device and computer program product

The present disclosure provides a method for embedded configurator for electronic control units (ECU). An example method includes, providing an executable software code portion of a software component (SWC). The SWC comprising instructions which, when the program is executed by an ECU of a vehicle, cause the ECU to perform signal processing operations. The method includes: providing a non-executable tagged software code portion, the non-executable tagged software code portion comprising code comment tags; providing a set of configuration values of the at least one executable software code portion; parsing the at least one non-executable tagged software code portion; detecting the code comment tags; based on the detected code comment tags and on the set of configuration values, modifying the one executable software code portion associated with detected code comment tags in the executable software code portion; and providing a configured SWC as a result.
Owner:STMICROELECTRONICS INT NV

Software design intention inference and document generation method, device and system

The invention discloses a software design intention inference and document generation method, device and system, and belongs to the technical field of automatic document generation. According to the method, a code warehouse is analyzed to extract submitted historical data, semantic association continuous submission is aggregated into a logic change unit through a heuristic clustering algorithm, multi-modal input fusing code change, submission information and metadata is constructed for the logic change unit, a large language model is used for deducing a design intention, and structured knowledge is output. And a project document is automatically generated after a framework knowledge graph and a function evolution timeline are constructed through global aggregation. The method does not depend on code annotation, can reversely deduce the design intention from the evolution history, and is suitable for software projects with document missing.
Owner:ZHIJIA ARTIFICIAL INTELLIGENCE TECH (TIANJIN) CO LTD

A code snippet function description method based on tree-shaped neural network machine learning

This invention discloses a method for describing the functionality of code snippets based on tree-structured neural network machine learning. First, a code dataset is selected for preprocessing, and an abstract syntax tree (AST) is extracted from the code snippet. The descriptive text of the code is then preprocessed, and subtrees within the AST are identified. Irregular trees are transformed into binary trees, and the AST is embedded to obtain its feature vector set. Finally, a logical description model of the code snippet is constructed and trained. A code snippet without comments is input to generate a functional description. This method can quickly parse irregular code snippets, improving reuse efficiency, software quality, and reliability. It also reduces resource investment during reuse, lowers development costs, and enables faster development and launch of new products to meet market demands and competitive pressures through low-cost software reuse.
Owner:UNIV OF ELECTRONICS SCI & TECH OF CHINA

Determining risk based test cases in build routines

ActiveUS12681834B2Theoretical computer scienceCode annotation
A processor set is configured to receive a plurality of software modules to be analyzed and select one or more software modules that contain modified code. The processor set may further parse product documentation or code comments related to the selected software modules and use the parsed product documentation or code comments to generate a dependency matrix (DM). The processor set may also tag test cases with an associated directed acyclic graph (DAG) that includes a sequence of modules directly or indirectly impacted by the test cases. By reconciling the DM and the DAG for the test cases, the processor set may generate a consolidated directed acyclic graph (CDAG). The processor set may determine, and perform, an optimized list of test cases, based on the generated CDAG and one or more consolidated dependency matrix (CDM) nodes.
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION

Code annotation generation method and device and storage medium

The invention discloses a code annotation generation method and device and a storage medium. The method comprises the following steps: receiving a target code of a to-be-generated annotation; generating a data stream sequence corresponding to the target code, and obtaining a code sequence of the target code; and inputting the data stream sequence and the code sequence into a code annotation generation model, and outputting a target annotation corresponding to the target code by utilizing the code annotation generation model. Through the method and the device, the problem of relatively low generation accuracy of code annotations in related technologies is solved.
Owner:INDUSTRIAL AND COMMERCIAL BANK OF CHINA

Code annotation intelligent agent method and device and electronic equipment

The invention relates to the technical field of computer software, can be applied to the field of science and technology finance / digital medical treatment, and discloses a code annotation intelligent proxy method and device and electronic equipment. The method comprises the following steps: receiving a code annotation request, and analyzing the code annotation request to obtain a to-be-annotated code and annotation demand information; based on a preset agent engine, matching a corresponding prompt word template according to the annotation demand information; performing filling optimization on the cue word template according to the context information of the to-be-annotated code to generate a target cue word; inputting the generated target prompt word and the to-be-annotated code to a preset large language model, and obtaining initial annotation data returned by the large language model; calling a preset service information interface, acquiring service associated information of the to-be-annotated code, and performing data correction on the initial annotation data according to the service associated information to obtain target annotation data; and outputting the target annotation data, and updating a cue word optimization strategy of the proxy engine according to an execution result of the code annotation request. According to the method, the generation efficiency and quality of the code annotation are improved.
Owner:CHINA PING AN PROPERTY INSURANCE CO LTD

A flexible downloading method based on conditional compilation

ActiveCN113608743BCode compilationSoftware engineeringCode annotation
The present application relates to the technical field of industrial control programming language, and particularly relates to a flexible downloading method based on conditional compilation, which comprises a label management module, a label editing module, a label syntax module, a conditional compilation module, a downloading mode module and a downloading program module, and a user realizes selective compilation of a user control program in a conditional mode by means of attaching a label to an existing matching program code segment, which can also serve as a code annotation function, different labels can define different meanings according to actual conditions, and complex conditional compilation business logic can be realized by means of flexible combination of the labels. The method can well satisfy the flexible control requirements of the user individualization and diversification, so as to realize adaptation of different control models and manufacturers, and achieve the purpose of individualization of control process. In addition, the conditional compilation can greatly improve the modularization compilation speed of the user program, the program supports multiple conditional mode adaptation, and is beneficial to long-term maintenance and management in the later period.
Owner:WUXI XINJIE ELECTRICAL

Code characterization method based on operation code

The invention discloses a code characterization method based on an operation code. The code characterization method comprises the following steps: analyzing a Python source code into an operation code sequence; performing single-mode mask language modeling on the operation code sequence to obtain operation code semantic features; splicing the operation code sequence and the corresponding code annotations and then carrying out bimodal mask language modeling to obtain cross-modal semantic association features; executing multi-modal comparative learning based on the cross-modal semantic association features to obtain an optimized code representation vector; the code characterization vector is output for use by downstream tasks. According to the method, the bottom layer execution logic and semantic features of the Python code can be effectively mined. Meanwhile, by applying a mapping method from an operation code to a sequence and a multi-modal data collaboration mechanism, the dependence of the model on a complex analysis process is reduced, and the robustness of the model on low-quality or sparse code data is improved.
Owner:HUNAN UNIV OF SCI & TECH

Augmented reality and generative ai based programming cognitive enhancement system and method

The application discloses a programming cognitive enhancement system and method based on augmented reality and generative AI, relates to the field of programming education, and comprises an augmented reality device layer, a data processing layer and an artificial intelligence generation layer; the application extracts code semantic information by using an abstract syntax tree, maps the code semantic information into a three-dimensional logical topology graph, acquires user gaze duration information by eye tracking and generates code annotations of corresponding levels, generates and displays logical deduction animations of the code in real time by using generative artificial intelligence technology, and provides corresponding physical feedback signals to the user according to code exception types by using a tactile feedback device, so that the problem that complex code logic cannot be intuitively displayed in the prior art is effectively solved, and the application can be applied to multiple scenes such as programming education and program debugging.
Owner:YANGTZE UNIVERSITY

Smart contract test method and device, equipment, storage medium and program product

The invention provides an intelligent contract test method and device, equipment, a storage medium and a program product, and relates to the technical field of financial science and technology, the technical field of block chains and the technical field of artificial intelligence. The method comprises the following steps: analyzing a development document, a code annotation and a business rule of a smart contract to obtain entities and relationships between the entities; constructing a business knowledge graph according to the entities and the relationship between the entities, wherein the business knowledge graph represents the association relationship among the interface, the code branch, the business scene, the business rule and the supervision rule; generating a test scene and a test case corresponding to the test scene based on the business knowledge graph, wherein the test scene covers interface interaction, code branches, business rules and supervision compliance; and executing the test case to obtain a test result. According to the method, the automation degree and the test accuracy of the smart contract test can be improved.
Owner:INDUSTRIAL AND COMMERCIAL BANK OF CHINA