CN115098062A - Code generation method and device - Google Patents

Code generation method and device Download PDF

Info

Publication number
CN115098062A
CN115098062A CN202210747612.1A CN202210747612A CN115098062A CN 115098062 A CN115098062 A CN 115098062A CN 202210747612 A CN202210747612 A CN 202210747612A CN 115098062 A CN115098062 A CN 115098062A
Authority
CN
China
Prior art keywords
code data
code
name
initial
development
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210747612.1A
Other languages
Chinese (zh)
Inventor
易旺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202210747612.1A priority Critical patent/CN115098062A/en
Publication of CN115098062A publication Critical patent/CN115098062A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/10Requirements analysis; Specification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a code generation method and a device, wherein the code generation method comprises the following steps: receiving a code development requirement input by a developer; converting the code development requirements into development thinking points; matching initial code data corresponding to a development thinking point in a pre-constructed central memory storage library; carrying out adaptive adjustment processing on the initial code data to obtain target code data; the initial code data is added to a location corresponding to the code development requirement. Therefore, the implementation of the implementation mode can quickly generate the required codes, thereby being beneficial to improving the development speed and the development efficiency and saving time and labor.

Description

Code generation method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a code generation method and apparatus.
Background
At present, in the development process, developers often encounter similar functions or scenes and need to search old former codes for reference, but similar codes are difficult to find quickly due to long time, and sometimes the developers need to rewrite, so that the development speed and the development efficiency are reduced.
Disclosure of Invention
An object of the embodiments of the present application is to provide a code generation method and apparatus, which can generate a required code quickly, thereby facilitating improvement of development speed and development efficiency, and saving time and labor.
A first aspect of an embodiment of the present application provides a code generation method, including:
receiving a code development requirement input by a developer;
converting the code development requirements into development thinking points;
matching initial code data corresponding to the development thinking points in a pre-constructed central memory storage library;
carrying out adaptive adjustment processing on the initial code data to obtain target code data;
adding the initial code data to a location corresponding to the code development requirement.
In the implementation process, the method can preferentially receive the code development requirement input by a developer; then, converting the code development requirements into development thinking points; then, matching initial code data corresponding to the development thinking points in a pre-constructed central memory storage library; carrying out adaptive adjustment processing on the initial code data to obtain target code data; and finally, adding the initial code data to a position corresponding to the code development requirement. Therefore, the implementation of the implementation mode can quickly generate the required codes, thereby being beneficial to improving the development speed and the development efficiency and saving time and labor.
Further, before the receiving the code development requirement input by the developer, the method further comprises:
acquiring integral engineering code data, wherein the integral engineering code data at least comprises open source framework data, code calling link data, code characteristics, general code data of query classes and independent function code data;
determining a characteristic point of each code data according to the whole engineering code data;
generating a thinking point corresponding to each code data according to the characteristic points;
and constructing a central memory storage bank according to the code data and the thinking points.
Further, the adaptively adjusting the initial code data to obtain target code data includes:
determining a new method name for name adjustment of the initial code data;
and on the premise of keeping the parameter object of the initial code data unchanged, renaming the initial code data according to the new method name to obtain target code data.
Further, the determining a new method name for name adjustment of the initial code data includes:
judging whether the initial code data is code data with special meaning;
if not, intercepting the complete word of the name according to the context of the initial code data to obtain a header name;
and generating a new method name of the target code data according to the header name and a preset name splicing word.
Further, the method further comprises:
when the initial code data is judged to be code data with special meaning, acquiring an original name of the initial code;
acquiring a replacement word matched with the original name;
and generating a new method name of the initial code data according to the replacement word.
A second aspect of embodiments of the present application provides a code generation apparatus, including:
the receiving unit is used for receiving a code development requirement input by a developer;
the conversion unit is used for converting the code development requirement into a development thinking point;
the matching unit is used for matching initial code data corresponding to the development thinking points in a pre-constructed central memory storage bank;
the adjusting unit is used for carrying out adaptive adjustment processing on the initial code data to obtain target code data;
an adding unit configured to add the initial code data to a position corresponding to the code development requirement.
In the implementation process, the code generation device can receive the code development requirement input by a developer through the receiving unit; converting the code development requirement into a development thinking point through a conversion unit; matching initial code data corresponding to a development thinking point in a pre-constructed central memory storage bank through a matching unit; performing adaptive adjustment processing on the initial code data through an adjusting unit to obtain target code data; the initial code data is added to a position corresponding to the code development requirement by an adding unit. Therefore, the implementation of the implementation mode can quickly generate the required codes, thereby being beneficial to improving the development speed and the development efficiency and saving time and labor.
Further, the code generation apparatus further includes:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring integral engineering code data before receiving a code development requirement input by a developer, and the integral engineering code data at least comprises open source framework data, code calling link data, code characteristics, general code data of query classes and independent function code data;
the determining unit is used for determining the characteristic point of each code data according to the whole engineering code data;
the generating unit is used for generating thinking points corresponding to the code data according to the characteristic points;
and the construction unit is used for constructing a central memory storage library according to the code data and the thinking point.
Further, the adjusting unit includes:
a name determining subunit, configured to determine a new method name for performing name adjustment on the initial code data;
and the renaming subunit is used for renaming the initial code data according to the new method name on the premise of keeping the parameter object of the initial code data unchanged to obtain target code data.
Further, the name determination subunit includes:
the judging module is used for judging whether the initial code data is code data with special meaning;
the intercepting module is used for intercepting a complete word with a complete name according to the context of the initial code data to obtain a header name when the initial code data is not code data with special meanings;
and the generating module is used for generating a new method name of the target code data according to the header name and a preset name splicing word.
Further, the name determining subunit further includes:
the acquisition module is used for acquiring the original name of the initial code when judging that the initial code data is code data with special meaning;
the acquisition module is further used for acquiring the replacement words matched with the original names;
the generating module is further configured to generate a new method name of the initial code data according to the replacement word.
A third aspect of embodiments of the present application provides an electronic device, including a memory and a processor, where the memory is used to store a computer program, and the processor runs the computer program to cause the electronic device to execute a code generation method described in any one of the first aspect of embodiments of the present application.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, which stores computer program instructions, and when the computer program instructions are read and executed by a processor, the computer program instructions perform the code generation method according to any one of the first aspect of the embodiments of the present application.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flowchart of a code generation method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another code generation method provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of a code generation apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of another code generation apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Example 1
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a code generation method according to an embodiment of the present application. The code generation method comprises the following steps:
and S101, receiving a code development requirement input by a developer.
In this embodiment, the method has a central memory repository similar to the brain, which has an overall engineering code recognition function and is capable of recognizing engineering directory hierarchies including open-source frameworks such as springboot. Meanwhile, based on the calling process of the framework, the method can intelligently memorize the calling link, dependency and other characteristics of the storage codes (such as class names and method names of controllers, services and dao layers).
In this embodiment, the general method for identifying query classes, such as query, select, and the like, can facilitate the association of the entire relevant codes from one point at a later time.
In this embodiment, when a completely independent function or a conversion method, function, etc. is encountered, such as a few utis help classes, etc., the central memory repository can fully memorize and store the function.
And S102, converting the code development requirement into a development thinking point.
In this embodiment, the central storage repository can map the stored feature points of each code into thought points, which may be class names, method names, keywords, and the like.
And S103, matching initial code data corresponding to the development thinking points in a pre-constructed central memory storage library.
In the embodiment, the method can match the initial code data corresponding to the development thinking points in the central memory storage, so that a developer is prevented from searching and searching the code content, and the initial code data can be acquired more quickly.
And S104, carrying out adaptive adjustment processing on the initial code data to obtain target code data.
In this embodiment, the method may perform adaptive adjustment processing on the initial code data to obtain target code data, so that the target code data may be automatically generated, thereby facilitating the subsequent steps to call the target code data.
And S105, adding the initial code data to a position corresponding to the code development requirement.
In this embodiment, the method may add the automatically acquired code to the position corresponding to the code development requirement, thereby avoiding the process of querying, copying and pasting the conventional code by the developer.
In this embodiment, the method described in this application may be implemented by a plug-in package or a jar package.
In this embodiment, in the current development process, developers often encounter similar functions or scenarios and need to search for previous old code references, so that copying and pasting of codes cannot be avoided. However, similar codes are difficult to find quickly in practice due to the long time, which makes copy-and-paste difficult to implement. Therefore, the method can replace a copy and paste method, and therefore the development speed is rapidly improved and the development efficiency is improved.
In this embodiment, the execution subject of the method may be a computing device such as a computer and a server, and is not limited in this embodiment.
In this embodiment, an execution subject of the method may also be an intelligent device such as a smart phone and a tablet computer, which is not limited in this embodiment.
It can be seen that, by implementing the code generation method described in this embodiment, the use of traditional copy and paste can be avoided through an intelligent insertion method, so that the development speed is improved to a certain extent, the development efficiency is improved, and the time and labor saving effect is further achieved.
Example 2
Referring to fig. 2, fig. 2 is a flowchart illustrating a code generation method according to an embodiment of the present application. The code generation method comprises the following steps:
s201, obtaining integral engineering code data, wherein the integral engineering code data at least comprises open source framework data, code calling link data, code characteristics, general code data of query classes and independent function code data.
In this embodiment, the method may pre-construct a central memory repository capable of identifying the engineering directory hierarchy (including the contents of the open-source framework such as springboot).
S202, determining the characteristic point of each code data according to the whole engineering code data.
In this embodiment, the central memory repository to be constructed can at least intelligently memorize the feature points such as the call link, the dependency, and the like of the storage code.
And S203, generating thinking points corresponding to the code data according to the characteristic points.
In this embodiment, the method may map feature points of each code into thought points (which may be class names, method names, keywords, etc.), and store the thought points in the central memory repository together.
And S204, constructing a central memory repository according to the code data and the thinking points.
In this embodiment, the method may construct the central memory repository through the above steps.
And S205, receiving a code development requirement input by a developer.
And S206, converting the code development requirements into development thinking points.
In this embodiment, when a developer develops a code, the developer only needs to input or introduce a class name as a thinking point at the current position, which is equal to an instruction sent to the central brain warehouse.
In this embodiment, the method can automatically recognize the requirements of developers, and automatically acquire corresponding thinking points based on the code development requirements, so that the central memory repository can conveniently search and call the thinking points.
And S207, matching initial code data corresponding to the development thinking points in a pre-constructed central memory storage library.
And S208, determining a new method name for adjusting the name of the initial code data.
In this embodiment, when the method is implemented by a plug-in package, the method may introduce a corresponding class or method, so as to implement intelligent insertion and replace content.
In this embodiment, in the process, firstly, method renaming needs to be performed, so as to avoid naming conflict, based on the context of the current class, the method can intercept the complete name word, use the complete name word as the head name of the NEW method, and then use NEW words such as NEW to splice to the back.
For example, the method of a. requestconvert (Request req) can intercept the name of the method, keep the parameter object unchanged, and automatically add the parameter object as b. requestconvertnew (Request req).
As an alternative embodiment, determining a new method name for name adjustment of the initial code data includes:
judging whether the initial code data is code data with special meaning;
if not, intercepting the complete word of the name according to the context of the initial code data to obtain a header name;
and generating a new method name of the target code data according to the header name and the preset name splicing words.
As an optional implementation, the method further comprises:
when the initial code data is judged to be code data with special meaning, acquiring an original name of the initial code;
acquiring a replacement word matched with the original name;
and generating a new method name of the initial code data according to the replacement words.
S209, on the premise of keeping the parameter object of the initial code data unchanged, renaming the initial code data according to the new method name to obtain target code data.
In this embodiment, name replacement may be performed on contents of methods having special meanings such as service and dao layers, similar words such as insert may be replaced with add words, select may be replaced with query, and processing logic thereof remains unchanged.
And S210, adding the initial code data to a position corresponding to the code development requirement.
In this embodiment, the execution subject of the method may be a computing device such as a computer and a server, and is not limited in this embodiment.
In this embodiment, the main body of the method may also be an intelligent device such as a smart phone and a tablet computer, which is not limited in this embodiment.
It can be seen that, by implementing the code generation method described in this embodiment, the use of traditional copy and paste can be avoided through an intelligent insertion method, so that the development speed is improved to a certain extent, the development efficiency is improved, and the time and labor saving effect is further achieved.
Example 3
Referring to fig. 3, fig. 3 is a schematic structural diagram of a code generation apparatus according to an embodiment of the present application. As shown in fig. 3, the code generation apparatus includes:
a receiving unit 310, configured to receive a code development requirement input by a developer;
a conversion unit 320 for converting the code development requirement into a development thinking point;
a matching unit 330, configured to match initial code data corresponding to a development thinking point in a pre-constructed central memory repository;
an adjusting unit 340, configured to perform adaptive adjustment processing on the initial code data to obtain target code data;
an adding unit 350, configured to add the initial code data to a location corresponding to the code development requirement. In this embodiment, the method has a central memory repository similar to the brain, which has an overall engineering code recognition function and is capable of recognizing engineering directory hierarchies including open-source frameworks such as springboot. Meanwhile, based on the calling process of the framework, the method can intelligently memorize the calling link, dependency and other characteristics of the storage code (such as class names and method names of controllers, services and dao layers).
In this embodiment, the general method for identifying query classes, such as query, select, etc., can facilitate the correlation of the whole face from one point later.
In this embodiment, when a completely independent function or a conversion method, function, etc. is encountered, such as a few utis help classes, etc., the central memory repository can fully memorize and store the function.
In this embodiment, the central storage repository can map the stored feature points of each code into a single thought point, which may be a class name, a method name, a keyword, or the like.
In the embodiment, the method can match the initial code data corresponding to the development thinking points in the central memory storage library, and avoids the search and search of code contents by developers, so that the initial code data can be acquired more quickly.
In this embodiment, the method may perform adaptive adjustment processing on the initial code data to obtain target code data, so that the target code data may be automatically generated, thereby facilitating the subsequent steps to call the target code data.
In this embodiment, the method may add the automatically acquired code to the position corresponding to the code development requirement, thereby avoiding the process of querying, copying and pasting the conventional code by the developer.
In this embodiment, the method described in this application may be implemented by a plug-in package or a jar package.
In this embodiment, for the explanation of the code generation apparatus, reference may be made to the description in embodiment 1 or embodiment 2, and details are not repeated in this embodiment.
It can be seen that, by implementing the code generation apparatus described in this embodiment, the use of traditional copy and paste can be avoided through an intelligent insertion method, so that the development speed is improved to a certain extent, the development efficiency is improved, and further, the time-saving and labor-saving effects are achieved.
Example 4
Referring to fig. 4, fig. 4 is a schematic structural diagram of a code generation apparatus according to an embodiment of the present disclosure. As shown in fig. 4, the code generation apparatus includes:
a receiving unit 310, configured to receive a code development requirement input by a developer;
a conversion unit 320 for converting the code development requirement into a development thinking point;
a matching unit 330, configured to match initial code data corresponding to a development thinking point in a pre-constructed central memory repository;
an adjusting unit 340, configured to perform adaptive adjustment processing on the initial code data to obtain target code data;
an adding unit 350, configured to add the initial code data to a position corresponding to the code development requirement.
As an optional implementation, the code generation apparatus further includes:
an obtaining unit 360, configured to obtain, before receiving a code development requirement input by a developer, overall engineering code data, where the overall engineering code data at least includes open-source framework data, code call link data, code characteristics, general code data of query classes, and independent function code data;
a determining unit 370, configured to determine feature points of each piece of code data according to the entire engineering code data;
a generating unit 380, configured to generate a thought point corresponding to each piece of code data according to the feature points;
a construction unit 390 for constructing the central memory repository based on the code data and the thinking points.
As an alternative embodiment, the adjusting unit 340 includes:
a name determining subunit 341 configured to determine a new method name for performing name adjustment on the initial code data;
and a renaming subunit 342, configured to, on the premise that the parameter object of the initial code data remains unchanged, rename the initial code data according to the new method name to obtain target code data.
As an alternative embodiment, the name determining subunit 341 includes:
the judging module is used for judging whether the initial code data is code data with special meaning;
the intercepting module is used for intercepting complete words with names according to the context of the initial code data to obtain a header name when the initial code data is not code data with special meanings;
and the generating module is used for generating a new method name of the target code data according to the header name and the preset name splicing words.
As an optional implementation manner, the name determining subunit 341 further includes:
the acquisition module is used for acquiring the original name of the initial code when the initial code data is judged to be code data with special meaning;
the acquisition module is also used for acquiring the replacement words matched with the original names;
and the generating module is also used for generating a new method name of the initial code data according to the replacing words.
In this embodiment, for the explanation of the code generation apparatus, reference may be made to the description in embodiment 1 or embodiment 2, and details are not repeated in this embodiment.
It can be seen that, by implementing the code generation apparatus described in this embodiment, the use of traditional copy and paste can be avoided through an intelligent insertion method, so that the development speed is improved to a certain extent, the development efficiency is improved, and further, the time-saving and labor-saving effects are achieved.
An embodiment of the present application provides an electronic device, which includes a memory and a processor, where the memory is used to store a computer program, and the processor runs the computer program to make the electronic device execute the code generation method in embodiment 1 or embodiment 2 of the present application.
An embodiment of the present application provides a computer-readable storage medium, which stores computer program instructions, and when the computer program instructions are read and executed by a processor, the computer program instructions execute the code generation method in embodiment 1 or embodiment 2 of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made to the present application by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A code generation method, comprising:
receiving a code development requirement input by a developer;
converting the code development requirements into development thinking points;
matching initial code data corresponding to the development thinking points in a pre-constructed central memory storage library;
carrying out adaptive adjustment processing on the initial code data to obtain target code data;
adding the initial code data to a location corresponding to the code development requirement.
2. The code generation method of claim 1, wherein prior to the receiving a code development requirement input by a developer, the method further comprises:
acquiring integral engineering code data, wherein the integral engineering code data at least comprises open source framework data, code calling link data, code characteristics, general code data of query classes and independent function code data;
determining a characteristic point of each code data according to the whole engineering code data;
generating a thinking point corresponding to each code data according to the characteristic points;
and constructing a central memory repository according to the code data and the thinking points.
3. The code generation method according to claim 1, wherein the adaptively adjusting the initial code data to obtain target code data includes:
determining a new method name for name adjustment of the initial code data;
and on the premise of keeping the parameter object of the initial code data unchanged, renaming the initial code data according to the new method name to obtain target code data.
4. The code generation method of claim 3, wherein the determining a new method name for name adjustment of the initial code data comprises:
judging whether the initial code data is code data with special meaning;
if not, intercepting the complete word of the name according to the context of the initial code data to obtain a header name;
and generating a new method name of the target code data according to the header name and a preset name splicing word.
5. The code generation method of claim 4, wherein the method further comprises:
when the initial code data is judged to be code data with special meaning, acquiring an original name of the initial code;
acquiring a replacement word matched with the original name;
and generating a new method name of the initial code data according to the replacement word.
6. A code generation apparatus, characterized in that the code generation apparatus comprises:
the receiving unit is used for receiving a code development requirement input by a developer;
the conversion unit is used for converting the code development requirement into a development thinking point;
the matching unit is used for matching initial code data corresponding to the development thinking points in a pre-constructed central memory storage bank;
the adjusting unit is used for carrying out adaptive adjustment processing on the initial code data to obtain target code data;
an adding unit configured to add the initial code data to a position corresponding to the code development requirement.
7. The code generation apparatus according to claim 6, characterized in that the code generation apparatus further comprises:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring integral engineering code data before receiving a code development requirement input by a developer, and the integral engineering code data at least comprises open source frame data, code calling link data, code characteristics, general code data of query classes and independent function code data;
the determining unit is used for determining the characteristic point of each code data according to the whole engineering code data;
the generating unit is used for generating thinking points corresponding to the code data according to the characteristic points;
and the construction unit is used for constructing a central memory storage library according to the code data and the thinking point.
8. The code generation apparatus according to claim 6, wherein the adjustment unit includes:
a name determining subunit, configured to determine a new method name for performing name adjustment on the initial code data;
and the renaming subunit is used for renaming the initial code data according to the new method name on the premise of keeping the parameter object of the initial code data unchanged to obtain target code data.
9. An electronic device, characterized in that the electronic device comprises a memory for storing a computer program and a processor for executing the computer program to cause the electronic device to perform the code generation method of any of claims 1 to 5.
10. A readable storage medium having stored therein computer program instructions which, when read and executed by a processor, perform the code generation method of any one of claims 1 to 5.
CN202210747612.1A 2022-06-28 2022-06-28 Code generation method and device Pending CN115098062A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210747612.1A CN115098062A (en) 2022-06-28 2022-06-28 Code generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210747612.1A CN115098062A (en) 2022-06-28 2022-06-28 Code generation method and device

Publications (1)

Publication Number Publication Date
CN115098062A true CN115098062A (en) 2022-09-23

Family

ID=83294239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210747612.1A Pending CN115098062A (en) 2022-06-28 2022-06-28 Code generation method and device

Country Status (1)

Country Link
CN (1) CN115098062A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115373725A (en) * 2022-10-24 2022-11-22 布谷云软件技术(南京)有限公司 Software development management system and method with requirement as granularity
CN116862401A (en) * 2023-06-07 2023-10-10 北京智德广迅科技有限公司 Software development system based on big data platform

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115373725A (en) * 2022-10-24 2022-11-22 布谷云软件技术(南京)有限公司 Software development management system and method with requirement as granularity
CN116862401A (en) * 2023-06-07 2023-10-10 北京智德广迅科技有限公司 Software development system based on big data platform

Similar Documents

Publication Publication Date Title
US10180989B2 (en) Generating and executing query language statements from natural language
CN110263317B (en) Method and device for generating document template
US9817802B2 (en) Intelligent automatic expansion/contraction of abbreviations in text-based electronic communications
CN115098062A (en) Code generation method and device
US10642897B2 (en) Distance in contextual network graph
EP3724835A1 (en) Split mapping for dynamic rendering and maintaining consistency of data processed by applications
CN110032568B (en) Data structure reading and updating method and device, and electronic equipment
CN109408522A (en) A kind of update method and device of user characteristic data
US11537448B1 (en) Adapting application programming interfaces with schema mappings
US9208194B2 (en) Expanding high level queries
CN114722036A (en) Data processing method and device, electronic equipment and readable storage medium
CN111046640A (en) Dynamic generation method and device of certification document
CN112925523B (en) Object comparison method, device, equipment and computer readable medium
CN115203209A (en) List dividing method and device based on hibernate interceptor, electronic equipment and storage medium
CN112925561B (en) Software development method, device, computer equipment and storage medium
CN111142852B (en) Interface conversion function generation method and device
CN114625373A (en) Application conversion method and device, electronic equipment and storage medium
CN108491448B (en) Data pushing method and device
CN110309315B (en) Template file generation method and device, computer readable medium and electronic equipment
CN111104369A (en) Retrieval database construction method and device
US8793263B2 (en) Avoiding duplicate and equivalent data objects in service registries
CN111597368A (en) Data processing method and device
CN110647568A (en) Method and device for converting graph database data into programming language data
US11797504B2 (en) Converting computing infrastructure diagrams to searchable diagrams
CN118428376B (en) Method, device and storage medium for translating engineering materials

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination