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

33 results about "Code refactoring" patented technology

Code refactoring is the process of restructuring existing computer code—changing the factoring—without changing its external behavior. Refactoring is intended to improve nonfunctional attributes of the software. Advantages include improved code readability and reduced complexity; these can improve source-code maintainability and create a more expressive internal architecture or object model to improve extensibility.

Systems and methods for LLM-based code refactoring

In some aspects, a management system is provided that interfaces with software code to execute a refactoring process. The process executes iteratively, where a generative AI component (e.g., an LLM) is given the task to make a repository pass a given validation iteratively. In each step, the LLM in provided as an input a list of failed validations to resolve and the ability to interact with the repository. In some examples, the LLM is configured to read source files, write source files, and retrieves information from other data sources such as the Internet or semantically-indexed source repositories, including the repository that the process is currently operating on, among other operations. Further, external APIs and databases can also be included in the process. The LLM will then execute one or multiple of these operations and process one or multiple files to generate modified and / or new code.
Owner:MONGODB INC

Cloud native micro-service splitting and reconstructing method based on runtime behaviors

The invention provides a cloud native micro-service splitting and reconstructing method based on runtime behaviors. A three-layer architecture design is adopted, and the system comprises a dependency network graph construction module, a micro-service division module and a code reconstruction module. The dependency network diagram construction module models specific project source codes and user access operation into abstract representation capable of being processed by an algorithm, the micro-service division module divides a network diagram, obtains a splitting scheme for the dependency network diagram through visual page interaction with a user and manual modification, and inputs the splitting scheme into the code reconstruction module; and a code reconstruction module performs code reconstruction based on the splitting scheme and the dependency network diagram to obtain a complete and operable micro-service architecture code, so that the effect of automatically analyzing Spring Boot project source codes and monitoring the running project to generate the dependency network diagram is realized.
Owner:BEIHANG UNIV

Code reconstruction method and system based on multi-agent collaboration

The invention discloses a code reconstruction method and system based on multi-agent collaboration. The method comprises the steps that a collaborative workflow engine obtains a source code to be reconstructed; the scheduling structure analysis agent analyzes the source code to obtain code structure information of the source code; scheduling an odor analysis agent to analyze the source code based on the code structure information and a preset index to obtain odor code information in the source code; the scheduling reconstruction strategy intelligent agent analyzes the code structure information and the peculiar smell code information to obtain a code reconstruction strategy; scheduling a reconstruction execution agent to execute the code reconstruction strategy to obtain a reconstruction code; and outputting the reconstructed code. The technical problems that a traditional code reconstruction tool has limitation of single-point decision making, rule stiffness and the like, and the quality of reconstructed codes is poor are solved.
Owner:CHINA TELECOM CORP LTD

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

Reconstruction of non-compliant code into compliant code

Techniques are disclosed for intelligently prompting LLM to reconstruct code. A code snippet is accessed. The code is identified as potentially including a reference to a non-compliance library. A context is generated for the code snippets. Then, an LLM prompt is constructed. The hint is to be fed to the LLM, and the hint instructs the LLM to reconstruct the code snippets into modified code, the modified code invoking the compliance library. And displaying the output of the LLM. The output operates based on the LLM in response to the LLM cue. The output includes a proposed rewritten version of the code snippet.
Owner:MICROSOFT TECHNOLOGY LICENSING LLC

Method and system for automatic generation of robot skill primitive library based on large language model

The application discloses a robot skill primitive library automatic generation method and system based on a large language model, and relates to the fields of artificial intelligence and robot software engineering. The method comprises the following steps: adopting a double-level function extraction strategy to extract modular functions and process scripts in a robot code library from a robot task-level python file; based on the extracted robot function code, adopting a preset thinking chain prompt word to guide a large language model to generate global semantic description and to distinguish functions with the same name; based on the function metadata of the robot task level after the same name function is distinguished, adopting a preset thinking chain prompt word to guide the configured large language model to perform perception type code reconstruction with embedded field constraints; based on the reconstructed code, adopting a preset thinking chain prompt word to guide the configured large language model to perform adaptive iterative code evaluation and optimization closed loop to obtain a robot skill primitive library. The application can automatically and reliably generate a robot skill primitive library.
Owner:NAT UNIV OF DEFENSE TECH

Airborne software heterogeneous reconstruction system and method

The invention provides an airborne software heterogeneous reconstruction system, which belongs to the technical field of airborne software, and comprises an application construction module used for software source code development, software source code transplantation and software source code reconstruction; the container construction module is used for containerization packaging of software source codes; the mirror image construction deployment module is used for generating a container mirror image according to the function combination required by the system every time; the resource management module forms a data access interface of each module; the operation management module is used for monitoring and data collection; the resource library module is used for storing a software source file, a container source file, a container mirror image, a target system operation process and result data; the node management container module is used for computing node management, computing node network management and networking management of multiple computing nodes; the function container module is used for realizing system application functions; and the application management container module is used for operation scheduling and management of the functional container modules and data communication among the multifunctional container modules.
Owner:XIAN AIRCRAFT DESIGN INST OF AVIATION IND OF CHINA

Artificial intelligence-based software refactoring method, device, equipment and storage medium

ActiveCN120540697BCode refactoringBiological modelsLinguistic modelTechnical specifications
This invention provides an artificial intelligence-based software refactoring method. The method includes: acquiring the current code data and user data of the software to be refactored; determining a target refactoring strategy based on the current code data and user data; generating refactoring code data corresponding to the target refactoring strategy based on a large language model; and refactoring the software based on the refactoring code data to obtain the target software. This invention analyzes code data and user data, considering both the code problems of the software to be refactored and user business expectations, to generate a target refactoring strategy that balances technical optimization and business needs. This avoids the problem of the separation between technical optimization and business goals in traditional methods, ensuring that the refactored code accurately matches the user's actual business scenario while optimizing technical indicators, reducing the cost of secondary modifications due to misunderstandings of requirements, and thus improving the accuracy and efficiency of software refactoring.
Owner:SHENZHEN FENZHUAN TECH CO LTD

Application migration method from client-server architecture to blockchain architecture

An application migration method from client-server architecture to blockchain architecture is provided. The application migration method includes the following steps: S1: modeling an application program of a conventional client-server architecture and abstracting the application program to a program call tree; S2: defining a taint propagation rule for taint analysis by taking key data as tainted data, to acquire all taint variables in the application program; and S3: identifying a key module of the application program on the program call tree according to a tainted path, and setting a code refactoring rule to perform code refactoring on a method in the key module according to a special program structure.
Owner:FUZHOU UNIV

Code reconstruction method and device, equipment and storage medium

The embodiment of the invention discloses a code reconstruction method and device, equipment and a storage medium, and the method comprises the steps: responding to a reconstruction configuration instruction, and displaying a reconstruction configuration interface; receiving reconstruction configuration information corresponding to the reconstruction configuration item, and determining a to-be-reconstructed first code file according to the reconstruction configuration information; according to a pre-generated reconstruction change information set, determining a first code to be changed in the first code file and reconstructing the first code into a second code to obtain a second code file; wherein the reconstruction change information set comprises at least one piece of reconstruction change information, and each piece of reconstruction change information is used for matching the to-be-changed code and performing code reconstruction on the to-be-changed code. By means of the method, intelligent rapid searching of the to-be-reconstructed code file is achieved, and the risk of missing the to-be-reconstructed code file is better avoided while the labor cost is saved; in addition, automatic matching and reconstruction of the to-be-changed code in the to-be-reconstructed code file are achieved, and the code reconstruction rate and the reconstruction accuracy are greatly improved.
Owner:BEIJING YOUZHUJU NETWORK TECH CO LTD

File input and output proxy method and system compatible with general kernel mirror image specification

PendingCN121560392AVersion controlBootstrappingParallel computingCode refactoring
The invention relates to a file input and output proxy method and system compatible with a general kernel mirror image specification, and the method comprises the steps: providing an interface compatible layer consistent with VFS operation in a kernel space, converting a file operation request into a Netlink protocol message, sending the Netlink protocol message to a user space for execution, maintaining the original calling semantics through a synchronous coordination mechanism, and carrying out the operation of the Netlink protocol message; according to the method, the GKI specification requirement can be met by zero modification of the drive code, the problem of large-scale code reconstruction in the process of smoothly migrating the Android system to the GKI specification is effectively solved, and the development workload and the risk of introducing new defects are reduced.
Owner:MOBIIOT TECH (NINGBO) CO LTD

An algorithm model-based code automatic generation method and system

The present application relates to the field of data processing, and particularly relates to a code automatic generation method and system based on an algorithm model, comprising: obtaining a first incompatibility degree between different prompt words according to a first reconstructed code of each prompt word; retrieving a plurality of reference knowledge with the greatest similarity to each prompt word from a vector database and obtaining a second reconstructed code; obtaining a second incompatibility degree between different prompt words according to the difference between the first reconstructed code and the second reconstructed code of different prompt words; recalculating the similarity between each reference knowledge and each prompt word according to the reduction amount of the second incompatibility degree relative to the first incompatibility degree, and then obtaining a final reconstructed code. When facing the situation of prompt word incompatibility and insufficient code reconstruction ability of a large model, the present application can utilize all prompt words for code reconstruction as much as possible, so that the generated reconstructed code can meet the demand of the new energy monitoring and intelligent control field.
Owner:THREE GORGES INTELLIGENT CONTROL TECHNOLOGY CO LTD

Swift code automatic recommendation and conversion method and device, equipment and medium

The invention provides a Swift code automatic recommendation and conversion method and device, equipment and a medium, and belongs to the technical field of computer software. The method comprises the following steps: receiving an original Swift code input by a user; converting the original Swift code to obtain a serialized code corresponding to the original Swift code; extracting to-be-input features from the serialized codes; the to-be-input features are input into a machine learning model obtained through pre-training, the confidence coefficient that an original Swift code output by the machine learning model belongs to a non-conventional code is obtained, and when the confidence coefficient is larger than a preset threshold value, the machine learning model further outputs a conventional serialization code corresponding to the original Swift code; and performing code reconstruction based on the conventional serialization code to obtain a target recommendation code conforming to the Swift grammar. According to the method, the deep semantic understanding function can be added, so that the habitual code snippet recommendation capability and the code automatic conversion capability are improved.
Owner:SHENZHEN LANYOU TECHNOLOGY CO LTD

A system performance optimization method based on hierarchical decoupling and related equipment

This invention discloses a system performance optimization method and related equipment based on layered decoupling. When a kernel service node detects a cross-process service call, it obtains the call context information, filters target communication data that meets key service filtering conditions from the call context information to identify the current scenario and determine the current scenario identifier data. The hardware abstraction layer service performs performance parameter matching on the current scenario identifier data and performs business logic processing based on the parameter matching results to generate performance tuning data. The kernel service node then executes the performance optimization processing corresponding to the performance tuning data. This invention enables system performance optimization based on layered decoupling, significantly improving performance optimization efficiency. Through the layered decoupling architecture, it greatly reduces the difficulty and workload of code refactoring and adaptation, improves the maintainability and upgrade efficiency of the performance optimization framework, and can be widely applied in the field of system performance optimization technology.
Owner:HUAQIN TECH CO LTD

Software reconstruction method, system, equipment and medium

PendingCN121960605ARealize automatic repair closed loopMake sure it compiles and runsError detection/correctionBiological modelsTest failureSystems engineering
The invention relates to the technical field of artificial intelligence, and can be applied to software code reconstruction scenes in financial and medical scenes. The invention provides a software reconstruction method, system and device and a storage medium, and the method comprises the steps: carrying out the context analysis of a target code entity through a planning agent, and generating a structured reconstruction plan based on an analysis result; generating a reconstructed code by the generation agent according to the reconstruction plan; the compilation agent performs compilation verification on the reconstructed code, and when compilation fails, compilation error information is fed back to the generation agent for iterative correction; and the test agent performs function test on the reconstructed code after successful compiling, and feeds back test failure information to the generation agent for iterative correction when the test fails. The method can be applied to financial / medical software code reconstruction scenes, and the success rate of software reconstruction is improved through multi-agent cooperation and double feedback closed loops of compiling and testing.
Owner:PING AN TECH (SHENZHEN) CO LTD

A Method and System for Automated Generation of Robot Skill Primitives Based on Large Language Models

PendingCN122311404ALinguistic modelAlgorithm
This application discloses an automated method and system for generating a robot skill primitive library based on a large language model, relating to the fields of artificial intelligence and robotics software engineering. The method includes: extracting modular functions and procedural scripts from the robot's task-level Python files using a two-level function extraction strategy; based on the extracted robot function code, using preset thought chain prompts to guide the large language model in generating global semantic descriptions and disambiguating functions with the same name; based on the robot task-level function metadata after disambiguation, using preset thought chain prompts to guide the configured large language model in perceptual code reconstruction with embedded domain constraints; and based on the reconstructed code, using preset thought chain prompts to guide the configured large language model in adaptive iterative code evaluation and optimization loops to obtain the robot skill primitive library. This application can generate a robot skill primitive library fully automatically and with high reliability.
Owner:NAT UNIV OF DEFENSE TECH

Micro-matrix operation instruction level parallel optimization method based on heterogeneous many-core processor system

The present application relates to a micro-matrix operation instruction level parallel optimization method based on a heterogeneous many-core processor system, and belongs to the technical field of electronic information, and comprises the following steps: step 1: a linear address mapping architecture based on particle priority; a multi-dimensional tensor space in a physical problem is mapped to a one-dimensional linear physical address space of a GPU; step 2: a register direct loading mechanism based on explicit definition of a local array is constructed; in combination with a continuous address layout, a fixed-size local array is explicitly defined in a kernel, and a direct data path from a global memory to a register is constructed by using a register allocation mechanism of a compiler; and step 3: a register level instruction static reconstruction method based on an orthogonal calculation flow; an explicit code reconstruction strategy is adopted to convert micro-tensor operation into an instruction sequence optimal for hardware. Through a coherent optimization path of "linear address mapping-direct register loading-instruction static reconstruction", the present application realizes full-link performance improvement from memory access to calculation.
Owner:SHANDONG COMP SCI CENTNAT SUPERCOMP CENT IN JINAN +1

Universal reduced-order model workflow independent packaging method and related device

The invention discloses a universal reduced-order model workflow independent packaging method and a related device, and relates to the technical field of reduced-order model packaging, and the method comprises the following steps: based on model calculation parameters depended on by the reduced-order model workflow, carrying out code reconstruction on the reduced-order model workflow by using a C language to obtain a workflow script file; processing the functional model interface standard specification, the workflow script file and the instance data structure by utilizing a C language, and constructing a packaging interface code file; compiling the workflow script file and the packaging interface code file to obtain a dynamic link library; constructing a model description file according to the functional model interface standard specification; and packaging the dynamic link library and the model description file based on a directory structure defined by a functional model interface standard specification to obtain a functional model unit file. According to the method, plug-and-play, independent deployment and co-simulation of the reduced-order model workflow in the digital twin system are realized.
Owner:BEIHANG UNIV +2

Instruction-level parallel optimization method for micro-matrix operations based on heterogeneous many-core processor systems

This invention relates to a method for parallel optimization of micro-matrix operations at the instruction level based on heterogeneous many-core processor systems, belonging to the technical field of electronic information. The method includes: Step 1: A particle-first linear address mapping architecture; mapping the multidimensional tensor space in the physics problem to the one-dimensional linear physical address space of the GPU; Step 2: Constructing a register direct loading mechanism based on explicitly defined local arrays; combining contiguous address layout, explicitly defining fixed-size local arrays in the kernel, and utilizing the compiler's register allocation mechanism to construct a direct data path from global memory to registers; Step 3: A register-level instruction static refactoring method based on orthogonal computation flow; employing an explicit code refactoring strategy to transform micro-tensor operations into hardware-optimal instruction sequences. This invention achieves end-to-end performance improvement from memory access to computation through a coherent optimization path of "linear address mapping—direct register loading—static instruction refactoring".
Owner:SHANDONG COMP SCI CENTNAT SUPERCOMP CENT IN JINAN +1

Systems and methods for unified computing on digital and quantum computers

Computer systems and methods are provided for compiling a computer program to run on a quantum processor comprising a plurality of qubits, qudits or quantum continuous variables. A compiler obtains the program in a unified language, that is effectively a classical language, as opposed to a quantum language, and performs code refactoring on all or a portion of the program to form a refactored code and converts the refactored code into a first code. The compiler compiles the first code into a second code comprising a plurality of data elements in one or more quantum data structures. The compiler converts the second code to a third code expressed in a quantum gate-level language in accordance with an instruction set and gate locality constraints of the target quantum processor.
Owner:HORIZON QUANTUM COMPUTING PTE LTD

Code review method and device, medium and product

The invention discloses a code review method and device, a medium and a product, relates to the technical field of code review and large models, and can be applied to the field of financial science and technology. The method comprises the following steps: constructing a first cue word according to a grammar verification instruction, a to-be-reviewed code and coding specification information, and inputting the first cue word into a large model to obtain a first review result; constructing a second cue word according to the logic verification instruction, the to-be-reviewed code and the context information, and inputting the second cue word into the large model to obtain a second review result comprising a logic vulnerability description and a second modification suggestion; according to the business logic generation instruction, the to-be-reviewed code, the logic vulnerability description and the second modification suggestion, constructing a third cue word to input the large model to obtain business logic; constructing a fourth cue word according to the code reconstruction instruction, the business logic and the coding specification information, and inputting the fourth cue word into the large model to obtain a third review result; and obtaining a target review result according to the first review result, the second review result and the third review result. Therefore, the code review efficiency is improved.
Owner:INDUSTRIAL AND COMMERCIAL BANK OF CHINA

Reconstruction code recommendation result determination method and device and electronic equipment

The invention discloses a reconstruction code recommendation result determination method and device and electronic equipment. The method comprises the following steps: acquiring an original code corresponding to a predetermined program; determining a control flow graph and a syntax tree structure corresponding to the original code; determining target fusion features respectively corresponding to a plurality of code lines in the original code; inputting the target fusion feature into a target classifier to obtain an initial reconfigurable code line in the original code; and according to an update code reconstructed by the initial reconfigurable code line, inputting an update fusion feature corresponding to the update code into the target classifier, circulating until a target condition is reached, obtaining a plurality of historical reconfigurable code lines, and finally obtaining a code reconstruction recommendation result corresponding to the predetermined program. According to the method and the device, the technical problem that the recommended reconstructed code is still not simple enough when the reconstructed code result is recommended due to the fact that some unnecessary or simplified code lines may exist in the code for executing the predetermined program in the related technology is solved.
Owner:AGRICULTURAL BANK OF CHINA

Code reconstruction method and device, equipment, medium and chip

The invention discloses a code reconstruction method and device, equipment, a medium and a chip, and belongs to the field of artificial intelligence. Comprising the steps of generating a UML class diagram according to a call chain of a source code of a to-be-upgraded application; the UML class diagram is a code class relation diagram meeting the reconstruction requirement of the source code; performing function marking on a plurality of functions contained in the source code to obtain function marking information; generating at least one code reconstruction request according to the source code, the reconstruction demand of the source code and the function mark information; a target code is obtained through a pre-trained code reconstruction model according to the code reconstruction request, and the code reconstruction model is obtained through training based on a GPT large language model: a target code framework is obtained through the pre-trained code reconstruction model according to the UML class diagram and the function marking information; and splicing the target code with the target code framework to obtain a reconstructed code of the source code.
Owner:CHINA TELECOM CLOUD TECH CO LTD

Code refactoring method, system, computing device, storage medium, and program product

Embodiments of the present application provide a code refactoring method, system, computing device, storage medium and program product, wherein the code refactoring method comprises: performing code analysis on initial code to be refactored to generate a target refactoring scheme, wherein the target refactoring scheme comprises a code refactoring plan and a code testing plan, and the code refactoring plan comprises function dependency relationships of target code; analyzing the function dependency relationships in the code refactoring plan to generate at least two code refactoring tasks corresponding to the initial code; sequentially executing the at least two code refactoring tasks to obtain each initial code segment, and iteratively optimizing each initial code segment through static analysis and dynamic verification until a candidate code segment conforming to the function dependency relationships is generated; writing test cases for each candidate code segment based on the code testing plan, testing each candidate code segment based on each test case, and obtaining multiple target code segments conforming to the function dependency relationships. The coherence and consistency of the refactored code are ensured.
Owner:BEIJING URBAN CONSTR INTELLIGENT CONTROL TECH CO LTD

Intelligent software customization development system based on micro-service architecture

The invention relates to the technical field of software development, and discloses an intelligent software customization development system based on a micro-service architecture, and the system comprises a demand intelligent analysis module which is used for analyzing and standardizing user demands, and outputting demand specifications; the micro-service architecture design module is used for automatically generating a high-cohesion and low-coupling micro-service component architecture and interface definition according to a requirement specification; the code automatic generation module is used for automatically generating a compilable code through a template engine and a code reconstruction technology based on the architecture design document; the intelligent test management module is used for automatically generating a test case, executing an automatic test, analyzing a coverage rate and outputting a test evaluation report; the continuous deployment and monitoring module is used for automatically deploying services and collecting monitoring data during operation in real time; and the adaptive optimization module analyzes the performance bottleneck and dynamically generates an optimization strategy to form a development closed loop. According to the method, the source precision and the user satisfaction of software customization development are improved.
Owner:RENHE (BEIJING) SOFTWARE CO LTD

A low-code data governance configuration platform and a governance method thereof

This invention discloses a low-code data governance configuration platform and its governance method, relating to the field of low-code platform technology. It addresses the common problems encountered by low-code data governance configuration platforms during data governance, such as poor platform scalability and tight coupling between governance logic and underlying tools, leading to code refactoring or platform issues when switching technology stacks. The low-code data governance configuration platform and its governance method include a visual configuration engine, a metadata center, a governance rule engine, an execution scheduling engine, and a governance effect feedback module. This invention, through its low-code data governance configuration platform, reduces the data governance capability requirements from the technical team to the business side, accelerating governance response speed while ensuring data compliance and quality stability. It provides lightweight and sustainable data asset management support for enterprises, thereby significantly improving the efficiency and reliability of enterprise data governance.
Owner:YUNNAN TENGJIAN TECH CO LTD

Code automatic generation method and system based on algorithm model

The invention relates to the field of data processing, in particular to an automatic code generation method and system based on an algorithm model, and the method comprises the steps: obtaining a first incompatibility degree between different cue words according to a first reconstruction code of each cue word; retrieving a plurality of pieces of reference knowledge with the maximum similarity with each cue word from the vector database and obtaining a second reconstruction code; obtaining a second incompatibility degree between different cue words according to the difference between the first reconstruction codes and the second reconstruction codes of the different cue words; and recalculating the similarity between each reference knowledge and each cue word according to the reduction amount of the second incompatibility degree relative to the first incompatibility degree, thereby obtaining a final reconstruction code. According to the method, under the conditions that cue words are incompatible and a large model is insufficient in code reconstruction capability, all cue words can be utilized as much as possible to carry out code reconstruction, so that the generated reconstruction code can meet the requirements of the fields of new energy monitoring and intelligent control.
Owner:THREE GORGES INTELLIGENT CONTROL TECHNOLOGY CO LTD

Code processing method and device, electronic equipment and storage medium

The invention discloses a code processing method and device, electronic equipment and a storage medium. Target codes are executed through a target large language model for code optimization, code verification of the optimized codes, comparison of data generated by the codes before and after optimization and other operations; therefore, a complete automatic code processing flow covering code optimization and reconstruction, online data verification and data result automatic comparison is provided, key links such as optimized code analysis and evaluation, data verification and the like do not need to be manually completed by a developer, and automatic closed-loop management of the whole code reconstruction flow is achieved. And the processing efficiency of code reconstruction is effectively improved.
Owner:HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD

Code reconstruction method and device, equipment, storage medium and program product

The embodiment of the invention provides a code reconstruction method and device, equipment, a storage medium and a program product, and relates to the field of financial science and technology. The method comprises the steps that original codes are analyzed through an abstract syntax tree analyzer, an initial abstract syntax tree corresponding to the original codes is obtained, and the original codes are universal codes or financial simple codes; converting the initial abstract syntax tree into an initial graph structure; node attributes are added to nodes in the initial graph structure, a target graph structure is obtained, and the node attributes comprise financial attributes; and processing the target graph structure and the financial related knowledge through a pre-trained target model to generate a reconstruction code corresponding to the original code. Through the method provided by the invention, the efficiency of reconstructing the original code is improved.
Owner:INDUSTRIAL AND COMMERCIAL BANK OF CHINA