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

296 results about "Code segment" patented technology

In computing, a code segment, also known as a text segment or simply as text, is a portion of an object file or the corresponding section of the program's virtual address space that contains executable instructions. The term "segment" comes from the memory segment, which is a historical approach to memory management that has been succeeded by paging. When a program is stored in an object file, the code segment is a part of this file; when the loader places a program into memory so that it may be executed, various memory regions are allocated (in particular, as pages), corresponding to both the segments in the object files and to segments only needed at run time. For example, the code segment of an object file is loaded into a corresponding code segment in memory.

Generating Software Code Using Large Language Models

PendingUS20260037234A1Model driven codeCode generationPseudocode
Techniques for generating proprietary software code using large language models (LLMs) are disclosed. An LLM is trained on billions of words, tokens, and code segments to generate non-proprietary software code. A system uses the LLM to generate proprietary software code by generating a set of LLM prompts and a proprietary code mapping. Based on receiving an instruction to generate a set of software code, a system generates a set of LLM prompts. The system prompts the LLM to generate a set of non-proprietary software code. The system further prompts the LLM to generate a set of pseudocode from the non-proprietary software code. The system further prompts the LLM to generate proprietary software code from the pseudocode and the proprietary code mapping.
Owner:ORACLE INT CORP

Code generation and correction method based on multilevel context sensing and memory iteration

The invention relates to a machine question answering technology, in particular to a code generation and correction method based on multilevel context awareness and memory iteration, which comprises the following steps of: S1, receiving a preliminary fuzzy demand, proposing a clear question and generating a structured demand document according to content supplement and question answer; s2, learning the context of the item and generating an initial code according to a learning result and the structured demand document; s3, running the initial code; s4, monitoring operation, capturing logs, if the operation is successful, ending circulation, and if the operation is not successful, entering S5; s5, analyzing the log and positioning errors; updating the error to a problem pool and a correction history, and triggering a correction request; the positioning error comprises extraction abnormity, files and line numbers; the correction request comprises an error code snippet, error information and a correction history; and S6, analyzing the correction request and generating a correction code, wherein the correction code comprises construction of an enhanced diagnosis prompt word. According to the invention, rapid, efficient and accurate project code generation can be realized.
Owner:BEIJING JUNTIAN TECHNOLOGY CO LTD

Code similarity detection method and system based on large language model

The invention discloses a code similarity detection method and system based on a large language model, and the method comprises the steps: obtaining a to-be-detected source code pair, and marking the to-be-detected source code pair as a source code A and a source code B; performing code cleaning and format standardization on the source code A and the source code B, and mapping a variable name and a function name which are customized by a user into a uniform placeholder; analyzing the source codes A and B based on the abstract syntax tree, respectively replacing variable names and function names in the source codes A and B with unified serialized placeholders, and maintaining a mapping table; meanwhile, expanding a lexical dictionary of the pre-training large language model, and inserting a special identifier; splicing the replaced code snippets with special identifiers, and constructing a structure sensing input sequence; inputting the structure perception input sequence into a pre-trained large language model backbone network for feature coding to obtain a high-dimensional semantic feature vector containing global context information; connecting a multi-task prediction head behind the large language model backbone network, inputting the feature vector into the multi-task prediction head, outputting probability distribution of code clone types through a classification task head, and respectively outputting a row level similarity score and a lexical element level similarity score through a regression task head; and according to the classification probability and the regression score, performing comprehensive judgment by combining a preset threshold, and generating a detection report. According to the method, similar codes after variable renaming, statement rearrangement or control flow transformation can be accurately recognized, and the accuracy and robustness of code similarity detection are improved.
Owner:NANJING UNIV OF SCI & TECH

Agentic artificial intelligence based software development and modernization

Various embodiments of the present disclosure include systems, methods, and / or apparatuses for executing an agentic-AI-based software modernization system. An example system may be configured to receive one or more portions of monolithic legacy code of a legacy software program product, the monolithic legacy code comprising a plurality of code segments, group the monolithic legacy code by functionally related code segments of the plurality of code segments to define a plurality of groups, generate an API for each identified group, generate modern microservice code for each identified group to define a modernized software program product, and validate the modernized software program product.
Owner:PRESIDIO INC

System calling ptrace-based operating system micro-service security protection system and method

The invention relates to a system calling ptrace-based operating system micro-service security protection system and method, which are characterized in that the running state of micro-service is monitored in real time through calling of a ptrace system in a user state, and dynamic integrity verification is realized in combination with an SM3 hash algorithm. The method comprises the following steps: calculating an SM3 hash value of a code segment of a micro-service when the micro-service is started, storing the SM3 hash value as a static reference, periodically reading memory data of a target process through ptrace in a running process, recalculating a dynamic hash value, and comparing the dynamic hash value with a reference value; if it is detected that the hash values are inconsistent, it is judged that code injection attacks exist, and a defense mechanism is triggered. According to the method, the system stability risk caused by kernel module injection is avoided, meanwhile, real-time interception of tampering attacks during operation is achieved through high-frequency dynamic comparison, the lightweight design enables the method to be suitable for high-reliability scenes such as spaceflight with limited resources, the integrity of a micro-service code segment can be guaranteed, low performance loss of the system can be maintained, and the system reliability is improved. The balance blank between dynamic defense and system stability in the prior art is effectively filled.
Owner:CHINA AEROSPACE TIMES ELECTRONICS CORP

Debugging method and device of low-code platform, storage medium and electronic equipment

The invention discloses a debugging method and device for a low-code platform, a storage medium and electronic equipment. The method comprises the steps that a low-code engine is started in a local environment, the low-code engine is used for calling a target code to provide a low-code platform service, and the target code represents a modified original low-code segment; under the condition that the target code is used for transforming the front-end service, request flow data is obtained through a flow forwarding component, breakpoint debugging operation is executed based on the request flow data to obtain a debugging result, and the request flow data is used for indicating an interaction request obtained from a front-end page; the traffic forwarding component is used for controlling the request traffic data to be forwarded from the test environment to the local environment; under the condition that the target code reforms the back-end service, a target interface is used for executing breakpoint debugging operation to obtain a debugging result, and the target interface is used for debugging the target code in the local environment. According to the method and the device, the technical problem that the debugging efficiency is relatively low when the modified original low-code segment in the low-code platform is debugged is solved.
Owner:CHINA CONSTRUCTION BANK +1

System and method for synthetic intrusion data generation and remediation via machine learning

ActiveUS20260039674A1Securing communicationHeuristicsEngineering
Systems, computer program products, and methods are described herein for synthetic intrusion data generation and remediation via machine learning. The present disclosure includes training a first machine learning model using a plurality of malicious code segments from a code repository, generating, using the first machine learning model, a predetermined number of generated code segments, training a second machine learning model using the plurality of malicious code segments, generating, by using the second machine learning model, at least one generated heuristic mitigation resource for the generated code segments, analyzing, via a static heuristics analysis, stored code on an endpoint device, and applying the at least one generated heuristic mitigation resource upon a first condition wherein the static heuristics analysis identifies a malicious activity.
Owner:BANK OF AMERICA CORP

Intelligent contract vulnerability detection method based on hierarchical multi-granularity coding

The invention discloses an intelligent contract vulnerability detection method based on hierarchical multi-granularity coding, and the method comprises the steps: dividing an intelligent contract source code into multi-level data for feature extraction, and determining a token feature corresponding to each token, a statement block feature corresponding to each statement block, and a cross-statement block feature corresponding to each code segment; according to the token feature of the token and the statement block feature corresponding to the statement block, determining an intra-segment feature corresponding to each code segment, according to the cross-statement block feature, determining a cross-segment feature, and according to the intra-segment feature, the cross-segment feature and the document-level feature, determining a vulnerability detection result, therefore, a unique hierarchical structure is divided according to the code features so as to facilitate feature extraction of the vulnerability detection model, and an interaction relationship and a dependency relationship among the token, the statement block and the code segment can be obtained through feature extraction and feature fusion of the vulnerability detection model, so that the accuracy of intelligent contract vulnerability detection is improved.
Owner:CAPITAL UNIV OF ECONOMICS & BUSINESS

Source code reconstruction method and device, equipment and medium

The invention discloses a source code reconstruction method and device, equipment and a medium. The method comprises the following steps: acquiring a to-be-processed source code and reconstruction performance description content; determining at least one target code snippet in the to-be-processed source code according to a code reconstruction standard; according to the to-be-processed source code, generating a calling relation and an input and output relation corresponding to the to-be-processed source code; aiming at each target code snippet, reconstructing the target code snippets according to the calling relation and the input and output relation to obtain reconstructed code snippets; and replacing the target code snippets in the to-be-processed source codes with the reconstructed code snippets, wherein the to-be-processed source codes before replacement and the to-be-processed source codes after replacement have the same functions. According to the embodiment of the invention, the source code upgrading efficiency and automation degree of the original system can be improved.
Owner:PIPECHINA SOUTH CHINA CO +1

User interface test method and device, electronic equipment, medium and program product

PendingCN121858449ARealize intelligent repairAchieve self-evolutionError detection/correctionBiological modelsTest scriptSimulation
The invention provides a user interface testing method and device, electronic equipment, a medium and a program product, and can be applied to the technical field of big data and the technical field of artificial intelligence. The method comprises the following steps: acquiring a target test script, and performing semantic conversion on an operation instruction in the target test script by utilizing a first model to obtain a target test step set containing business semantic description; the target test step set is executed, in the process of executing the target test step set, the first model is used for determining the positioning mode of the target interface element according to the business semantic description, corresponding interaction operation is executed, and actual interface output is obtained; in response to execution failure of the target test step set, generating a diagnosis result by using a first model at least based on the actual interface output and the business semantic description; and inputting the diagnosis result into a second model, generating a modification code snippet by the second model, and applying the modification code snippet to the target test script.
Owner:INDUSTRIAL AND COMMERCIAL BANK OF CHINA

Software vulnerability analysis report generation method and device

The invention discloses a method and a device for generating a software vulnerability analysis report, and relates to the field of information security. The method comprises the following steps: acquiring auditing information of software vulnerabilities; a code feature matching rule for the software vulnerability is generated according to the auditing information through the large language model, and the code feature matching rule is used for matching a code calling mode related to the software vulnerability in the target software project; constructing a calling graph of the target software project; according to the code feature matching rule and the call graph, the correlation degree between each code snippet of the target software project and the software vulnerability is detected, and the correlation degree is used for evaluating the risk level of each code snippet of the target software project; and generating a software vulnerability analysis report of the target software project according to the association degree between each code snippet of the target software project and the software vulnerability. The technical problem that in the prior art, an open source software vulnerability detection tool cannot accurately evaluate the real influence of vulnerabilities in specific project contexts is solved.
Owner:INDUSTRIAL AND COMMERCIAL BANK OF CHINA

Large language models for creating a multi-lingual, low-resource code translation dataset

One or more unit-test cases are generated from a monolingual code corpus and the generated unit-test cases are filtered to generate a corpus of unit-test cases which have acceptability scores exceeding one or more predefined thresholds. One or more of the code samples of the monolingual code corpus are translated from a source language to a target language using a pretrained Large Language Model and the generated unit-test cases are translated from the source language to the target language. The LLM-translated code samples are validated using the translated unit-test cases and a parallel-data training corpus comprising the LLM-translated code samples that pass the validation is created. The pretrained large language model (LLM) is fine-tuned using the parallel-data training corpus, a given code segment is translated using the fine-tuned large language model (LLM), the translated given code segment is tested and the tested given code segment is deployed.
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION +1

Python type error repair method and system based on large model

The invention belongs to the technical field of software code automatic repair, and discloses a Python type error repair method based on a large model, which comprises the following steps of: 1, acquiring an error code segment, and running a test case to obtain error information; 2, a repair task is decoupled into three sub-tasks of error understanding, information collection and self-verification and patch generation; 3, inputting the error information description into a large language model to generate a repair hypothesis; 4, analyzing a repair hypothesis, identifying missing repair elements, retrieving a code file, and complementing the repair elements according to a static analysis result and a call chain; 5, verifying the consistency and integrity between the restoration hypothesis and the complementation information through a self-verification agent, generating feedback information if the information is insufficient or conflicts exist, and triggering preorder task iteration; and 6, generating a patch through a patch generation agent according to the verified repair elements, and verifying the correctness of the patch through automatic testing. According to the method, the overall repair accuracy is improved.
Owner:HANGZHOU DIANZI UNIV

Code optimization method and system based on knowledge graph

PendingCN121764474AImprove optimization effectMeet optimization needsBiological modelsIntelligent editorsCoding blockLinguistic model
The invention provides a code optimization method and system based on a knowledge graph, and the method comprises the steps: carrying out the source code analysis based on a to-be-optimized code library, constructing an abstract syntax tree, and determining a to-be-optimized code snippet based on the code complexity of a corresponding code in the abstract syntax tree; determining a reconstruction mode corresponding to each to-be-optimized code snippet based on the to-be-optimized code snippet in combination with a pre-constructed code optimization knowledge graph, and constructing a context dependency graph of each to-be-optimized code snippet based on the abstract syntax tree and the code optimization knowledge graph corresponding to each to-be-optimized code snippet; performing sliding window decomposition based on the context dependency graph to obtain a plurality of mutually associated code blocks, and performing simplification and fusion on the code blocks to obtain a current context; and inputting the reconstruction mode corresponding to each to-be-optimized code snippet and the current context into the large language model for structured reconstruction to obtain a target reconstruction scheme output by the large language model. According to the method and the device, the code optimization effect is improved.
Owner:GUANGDONG MASTER INTELLIGENT SYST CO LTD

A dynamic link library updating method, device, equipment and medium

Embodiments of the present application disclose a dynamic link library updating method, device, equipment and medium, the method comprising: obtaining a process list of a dynamic link library to be processed and a new dynamic link library; selecting a target process from the process list and obtaining a virtual address interval of a code segment of the dynamic link library to be processed in the target process; obtaining a virtual address of a next instruction to be executed of the target process and judging whether the virtual address is in the virtual address interval; if the virtual address is not in the virtual address interval, pausing execution of the target process; performing binary difference analysis on the same interface of the dynamic link library to be processed and the new dynamic link library; obtaining new memory page file data from the new dynamic link library, covering data in a difference memory page with the new memory page file data, and resuming execution of the process. By locating and replacing the process outside the virtual address interval, the dynamic link library updating is completed without restarting the process.
Owner:CHINA TELECOM CLOUD TECH CO LTD

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

Code detection method, system and device, electronic equipment, storage medium and program product

PendingCN121560707AError detection/correctionProgram segmentSoftware engineering
The embodiment of the invention provides a code detection method, system and device, electronic equipment, a storage medium and a program product. According to the scheme provided by the embodiment of the invention, the received change code data comprises at least one change code line, and the change code line is a code line of which the content is changed relative to the previous version source code in the current version source code. Based on the current version source code and the change code data, extracting at least one code program segment from the current version source code; one code program segment comprises one change code line or a plurality of change code lines with continuous line numbers or a plurality of change code lines with discontinuous line numbers. Furthermore, the change classification corresponding to the code program segment can be determined. And based on the code program segment and a risk rule associated with the change classification corresponding to the code program segment, determining a risk detection result of the change code line in the code program segment.
Owner:ALIPAY (HANGZHOU) INFORMATION TECH CO LTD

Binary loadable file downloading method and device, equipment and medium

The embodiment of the invention discloses a binary loadable file downloading method and device, equipment and a medium. The method comprises the steps that a binary intermediate file generated after a program source code is compiled and a binary link file of a module where the binary intermediate file is imported are obtained; converting the binary intermediate file into a binary loadable file according to the binary link file; in response to a downloading command stream, downloading the binary loadable file to a resource-constrained device to obtain a binary execution file; wherein the binary loadable file comprises a first segment, a function segment, a global segment and a code segment. According to the technical scheme provided by the embodiment of the invention, the downloading and execution efficiency of the WebAssessment module in the resource-constrained equipment can be improved, and the resource consumption of the equipment is reduced.
Owner:BEIJING CEC HUADA ELECTRONIC DESIGN CO LTD

A code retrieval method based on code classification representation in a code repository scenario

The application relates to the technical field of code retrieval, and discloses a code retrieval method based on code classification representation in a code repository scenario, which comprises the following steps: labeling semantics of each code segment as a user query corresponding to the code segment, and constructing a training set and a verification set; extracting auxiliary information and internal structure information of each code segment in the training set; respectively calculating a first correlation matrix of the auxiliary information and the user query and a second correlation matrix of the internal structure information and the user query; splicing the first correlation matrix and the second correlation matrix, and outputting a final correlation score through a neural network; and training a code retrieval model to convergence based on a sorting loss function. The application solves the problems that code information in an existing code retrieval model is single and the effect is difficult to improve, realizes all-round utilization of code information, and effectively improves the effect of code retrieval.
Owner:UNIV OF SCI & TECH OF CHINA

Software bill-of-materials via stack sampling

A system of determining a software bill-of-materials (RBOM) of an operating environment, the system comprising a processing circuitry configured to: a) access a memory space of a first process executing in the operating environment; b) for one or more threads of the first process: read contents of one or more memory location of a thread stack associated with the respective thread, determine whether a contained value of a respective memory location is a code section execution address, and responsive to the contained value of the respective memory location of the thread stack being a code section execution address: i) determine, based on the memory space of the first process and / or an executable file associated with the first process, a code section identifier associated with the code section, and ii) add the code section identifier associated with the code section to the RBOM.
Owner:KODEM SECURITY LTD

Computer system and method for distributed privacy-preserving shared execution of one or more processes

A computer system (100) for distributed shared execution of one or more shared processes, comprising: first program code for the one or more shared processes that comprises one or more shared code segments (142, 144, 146) shared between a first authorizing node (102) and a second authorizing node (104), wherein the one or more shared code segments (142, 144, 146) are executable by one or more executing nodes (102, 104, 106); a distributed ledger (152, 154, 156) that provides a record of valid code segments of the program code; and second program code comprising instructions that, when executed by the first and / or second authorizing nodes, validates that an anticipated execution result of the one or more shared code segments (142, 144, 146) satisfies shared authorization conditions and, if satisfied, authorizes the execution of the one or more shared code segments by the one or more executing nodes.
Owner:DIGITAL ASSET SWITZERLAND GMBH

Code retrieval method and computer program product

The invention discloses a code retrieval method and a computer program product, relates to the field of artificial intelligence, and is used for solving the problem of low code retrieval efficiency in the prior art. The method comprises the following steps: based on a code retrieval demand, determining a target retrieval carrier meeting the code retrieval demand through a retrieval carrier of each code snippet in a source code library; any retrieval carrier is constructed through a source code library and a corresponding business document and comprises semantic information representing the code snippets and structural information representing the code snippets; wherein the structure information comprises hierarchical information of the code snippets in the codes to which the code snippets belong; and obtaining a response result of the code retrieval demand based on the code snippets indicated by the target retrieval carrier. Through the scheme, the code retrieval efficiency can be improved.
Owner:WEBANK (CHINA)

Method and Device for Checking an Algorithm Integrity for a Generated Program Code for Computing a Neural Network on a Hardware Environment

A computer-implemented method for operating a code generator to create a program code for computing a neural network in a hardware environment is disclosed. The method includes (i) providing a defined neural network, (ii) identifying at least one tiling group, (iii) creating a tiling code segment for computing the layers of the at least one tiling group using tiling, (iv) creating a program code for computing the defined neural network in the hardware environment, wherein the code segment created for computing the tiling group is implemented in the program code, and (v) implementing the program code in the hardware environment.
Owner:ROBERT BOSCH GMBH

Dsp startup program loading method and device, equipment and storage medium

The application discloses a DSP starting program loading method, device and equipment and a storage medium, wherein the method comprises the following steps: when a DSP chip is powered on, target codes are moved from an external memory to an internal program storage area of the DSP chip; the target codes moved to the internal program storage area are compared with the target codes in the external memory; when the target codes in the internal program storage area are inconsistent with the target codes in the external memory, the inconsistent code segments in the target codes in the internal program storage area are re-written according to the target codes in the external memory, and when the target codes are consistent, other codes and data except the target codes in the external memory are loaded to the DSP chip. The application guarantees that the loaded target codes for DSP configuration are consistent with the target codes in the external memory, and then other codes are loaded, so that the high reliability of the program is ensured.
Owner:CHANGCHUN INST OF OPTICS FINE MECHANICS & PHYSICS CHINESE ACAD OF SCI

A method for generating a defect code and related apparatus

The application discloses a defect code generation method and related device, and the method comprises the steps of: obtaining at least one code segment pair from a code library; analyzing the modification reason between the first code segment before modification and the second code segment after modification in each code segment pair through a first language model, and identifying the defect type of the first code segment in each code segment pair indicating defect repair; obtaining at least one code segment pair corresponding to each defect type as a target code segment pair, and calling a second language model to learn each target code segment pair with the generation of defect code as a learning target to obtain a learned second language model; and generating a defect code segment corresponding to the target code segment through the learned second language model. The method can realize the automatic generation of defect code, improve the generation efficiency of defect code, improve the generation quality of defect code, and enhance the comprehensiveness and authenticity of the generated defect code.
Owner:ZHIWEI CHUANGXIN (NANJING) TECHNOLOGY CO LTD

Method for managing development of a software application

Described herein is a method for managing the development of a software application comprising generating first project codes of a software application by a code language model based on developmental requirements being provided thereto, the first project codes being in a first code format, and rendering the first project codes into at least one of components, relational vertices, code segments, functional descriptors of code segments and natural language representation of code segments in a user-interface (UI) environment and presented on a UI of a computing device. At least one of the components, relational vertices, code segments, functional descriptors of code segments and natural language representation of code segments being editable via the UI to effect a corresponding change in the first project codes.
Owner:ORANGEKLOUD PTE LTD

A web page file processing method and device

Embodiments of the present application provide a webpage file processing method and device, the method is applied to a client, and comprises the following steps: obtaining a packaging file, mapping information and customized information of a target webpage; wherein the packaging file is obtained by packaging a plurality of code files of the target webpage by a server, the mapping information comprises a mapping relationship between each code segment in the packaging file and a first path, and the customized information comprises a second path; for any code segment in the packaging file, after running the code segment, the first path of the code segment is matched with the second path in the customized information; and based on a matching result, it is determined whether to replace a running result of the code segment. Through packaging processing, the opening speed of the webpage is improved; through dynamic replacement of the running result at runtime, the directory structure is not affected by damage, the customized demand is met at the same time on the premise of improving the performance of the webpage.
Owner:BEIJING XINWANG RUIJIE NETWORK TECH CO LTD

File encryption method, device, system platform and file decryption method

The application discloses a file encryption method, device, system platform and file decryption method. The method comprises the following steps: determining a first key, wherein the first key is a random generated preset length string; transforming the first key based on a preset transformation rule to obtain a second key; encrypting a target file according to the second key and a preset encryption algorithm, and writing the first key, the preset encryption algorithm and the preset transformation rule into a code segment for kernel compilation in a target platform, wherein the first key, the preset encryption algorithm and the preset transformation rule written in the code segment are used for decrypting the encrypted target file. The application solves the technical problem that the key is easily leaked due to the fact that the key for encryption and decryption is not processed in the prior art.
Owner:HILLSTONE NETWORKS CO LTD

Program compiling and program loading method

The embodiment of the present application provides a program compiling and loading method. In the embodiment of the present application, when an application program is compiled, on one hand, the code section and the data section of a plurality of object files compiled from application source code are subjected to merging processing to obtain a target code section and a target data section, thereby reducing table header information; on the other hand, only a symbol table corresponding to a relocation table required when the application is loaded is retained, thereby reducing the space consumption of the symbol table; therefore, the size of an executable file of the application generated according to the target code section, the target data section, the relocation table and the symbol table corresponding to the relocation table is reduced, and the memory consumption when the application is loaded is reduced.
Owner:ALIBABA CLOUD COMPUTING CO LTD

Code generation method and device, electronic equipment and computer readable storage medium

The present disclosure provides a code generation method and device, electronic equipment and computer readable storage medium, relates to the field of computers, in particular to the technical field of source code. The specific implementation scheme is: obtaining a to-be-declared attribute in an attribute of an object in a code segment that meets a preset attribute condition; determining a data type of the to-be-declared attribute based on an attribute name of the to-be-declared attribute; determining first attribute declaration code corresponding to the to-be-declared attribute based on the data type of the to-be-declared attribute, the first attribute declaration code being used to define the data type of the to-be-declared attribute. Based on the present scheme, the attribute declaration code corresponding to the to-be-declared attribute can be automatically determined, which can replace the manual writing of the attribute declaration code, thereby improving the development efficiency.
Owner:BEIJING BAIDU NETCOM SCI & TECH CO LTD