CN115421728A - Business code generation method and device, electronic equipment and storage medium - Google Patents

Business code generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115421728A
CN115421728A CN202211160800.0A CN202211160800A CN115421728A CN 115421728 A CN115421728 A CN 115421728A CN 202211160800 A CN202211160800 A CN 202211160800A CN 115421728 A CN115421728 A CN 115421728A
Authority
CN
China
Prior art keywords
information
code
code generation
frame
format
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
CN202211160800.0A
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.)
Lianren Healthcare Big Data Technology Co Ltd
Original Assignee
Lianren Healthcare Big Data Technology 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 Lianren Healthcare Big Data Technology Co Ltd filed Critical Lianren Healthcare Big Data Technology Co Ltd
Priority to CN202211160800.0A priority Critical patent/CN115421728A/en
Publication of CN115421728A publication Critical patent/CN115421728A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation

Landscapes

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

Abstract

The embodiment of the invention discloses a method and a device for generating a service code, electronic equipment and a storage medium. The method comprises the following steps: acquiring preset code generation information in a database; wherein the code generation information comprises table information and/or field information; based on pre-stored development specification requirement information, format verification is carried out on the design format of the code generation information, and target code information is determined based on the verification result; inputting the target code information into a pre-constructed code generator, generating a target code frame, and sending the target code frame to a development terminal so that the development terminal generates a target service code based on the target code frame. The technical scheme of the embodiment of the invention can ensure that the generated target service code meets the development standard requirement, improve the design rationality and avoid increasing the later code management cost.

Description

Business code generation method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a business code generation method and device, electronic equipment and a storage medium.
Background
At present, in the code development industry, tables and fields are usually defined through a database when codes are generated, and then a fixed code frame is generated in a template loading mode, so that a user can continue to develop services on the basis of the fixed code frame, and basic mechanized labor is avoided.
However, in the process of implementing the present invention, it is found that the prior art has at least the following technical problems: when developers design data tables and fields, the data tables and the fields are usually designed according to own logic, the situation that the data tables and the fields are not in accordance with the design specifications is easy to occur, the design is unreasonable, and the management cost in the later period is increased.
Disclosure of Invention
The embodiment of the invention provides a business code generation method, a business code generation device, electronic equipment and a storage medium, which are used for ensuring that a generated target business code meets the requirements of development specifications, and achieving the purposes of improving the reasonability of design and avoiding increasing the later code management cost.
According to an aspect of the present invention, there is provided a service code generation method, including:
acquiring code generation information preset in a database; wherein the code generation information includes table information and/or field information;
based on pre-stored development specification requirement information, format verification is carried out on the design format of the code generation information, and target code information is determined based on the verification result;
inputting the target code information into a pre-constructed code generator, generating a target code frame, and sending the target code frame to a development terminal so that the development terminal generates a target service code based on the target code frame.
According to another aspect of the present invention, there is provided a service code generation apparatus, including:
the code generation information acquisition module is used for acquiring preset code generation information in a database; wherein the code generation information comprises table information and/or field information;
the code generation information checking module is used for carrying out format checking on the design format of the code generation information based on pre-stored development specification requirement information and determining target code information based on the checking result;
and the object code frame generating module is used for inputting the object code information into a pre-constructed code generator, generating an object code frame and sending the object code frame to a development terminal so that the development terminal generates an object service code based on the object code frame.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform a service code generation method according to any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the service code generation method according to any embodiment of the present invention when the computer instructions are executed.
According to the technical scheme of the embodiment of the invention, the code generation information preset in the database is obtained, wherein the code generation information comprises table information and/or field information; the method comprises the steps of carrying out format verification on a design format of code generation information based on prestored development standard requirement information, determining target code information based on a verification result, ensuring that the target code information is code information meeting the development standard requirement, inputting the target code information into a pre-constructed code generator, generating a target code frame, and sending the target code frame to a development terminal so that the development terminal generates a target service code based on the target code frame. The embodiment of the invention can ensure that the generated target service code meets the requirement of development specification, improve the design rationality and avoid increasing the later code management cost.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a service code generation method according to an embodiment of the present invention;
FIG. 2 is a flow diagram providing a method of code generation and template optimization according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a service code generation apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing the service code generation method according to the embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a flowchart of a service code generation method according to an embodiment of the present invention. The method may be performed by a service code generation apparatus, which may be implemented in the form of hardware and/or software. As shown in fig. 1, the method includes:
as shown in fig. 1, the method of the embodiment may specifically include:
and S110, acquiring code generation information preset in a database.
Wherein the code generation information includes table information and/or field information. The table information may include table name, table description, and the like, and the field information includes field length, field name, field description, and the like. In this embodiment, a developer may upload the designed table information and/or field information to the database through the development terminal. When the target code frame needs to be generated, preset code generation information can be acquired from the database.
And S120, carrying out format verification on the design format of the code generation information based on the pre-stored development specification requirement information, and determining target code information based on a verification result.
Wherein the development specification requirement information is used to reflect format requirements for the code generation information. For example, the development specification requirement information may include specification rule information such as format of table name, meaning of table name, description of table, name of field, description of field, default field, etc.
In specific implementation, through the development specification requirement information, format verification can be performed on the obtained code generation information, that is, whether the format of the table name, the meaning of the table name, the description of the table, the naming of the field, the description of the field, the default field and the like in the code generation information meet the development specification requirement or not is determined.
In this embodiment, performing format check on the design format of the code generation information, and determining the target code information based on the check result includes: carrying out format verification on the design format of the code generation information; and if the format of the code generation information passes the verification, determining the code generation information as target code information.
When all field information and all table information in the code generation information conform to the development specification requirement information, the code generation information format can be determined to pass the verification, and the code generation information can be directly determined as target code information.
Further, after the format check is performed on the design format of the code generation information, the method further includes: if the code generation information format is not verified, generating correction code information corresponding to the code generation information based on the development specification requirement information; and sending the correction code information to a development terminal, and determining target code information based on feedback code information sent by the development terminal.
When any field information or any table information in the code generation information does not accord with the development specification requirement information, the code generation information format check is not passed. The correction code information corresponding to the code generation information may be generated based on the development specification requirement information. The correction code information is obtained by correcting information which does not meet the format design requirement in the development standard requirement information in the code generation information.
Specifically, the correction code information may be transmitted to the development terminal, so that the developer checks and confirms the correction code information, and transmits the feedback code information through the development terminal based on the confirmation result. Optionally, the feedback code information may be confirmation information, that is, confirmation correction code information replaces code generation information, and the correction code information is used as target code information. In addition, the feedback code information can also be modified code information, namely the correction code information is not approved, the modified code information is designed manually by developers, the modified code information is fed back through a development terminal, so that the modified code information replaces code generation information, and finally the modified code information is used as target code information. The embodiment can timely and accurately determine the target code information required by the rechecking verification when the code generation information is not verified through interaction with the development terminal so as to ensure the accuracy of the generated target code frame.
In this embodiment, the development specification requirement information includes default requirement information and/or custom requirement information; based on pre-stored development specification requirement information, format verification is carried out on the design format of the code generation information, and the method comprises the following steps: and carrying out format verification on the design format of the code generation information based on the default requirement information and/or the custom requirement information.
The default requirement information may be a default rule of the development specification, for example, may be a database design part in the existing java development specification. The custom requirement information can be a personalized definition specification which is set by research personnel in advance according to the current use scene of the code.
In specific implementation, the format of the design format of the code generation information can be checked only based on the default requirement information or the custom requirement information; and simultaneously, format verification is carried out on the design format of the code generation information based on the default requirement information or the custom requirement information, so that the generated target code frame can meet the default requirement and also can meet the personalized requirement under the current use scene.
S130, inputting the target code information into a pre-constructed code generator, generating a target code frame, and sending the target code frame to the development terminal so that the development terminal generates a target service code based on the target code frame.
Wherein the code generator is used for generating a code framework. The object code information includes object field information and/or object table information, and in a specific implementation, the object field information and/or the object table information can be input into a pre-constructed code generator, and an object code frame corresponding to the object code information is generated by the code generator. And sending the object code frame to the development terminal, so that the development terminal can add codes on the basis of the object code frame to generate object service codes.
According to the technical scheme of the embodiment of the invention, the code generation information preset in the database is obtained, wherein the code generation information comprises table information and/or field information; the method comprises the steps of carrying out format verification on a design format of code generation information based on prestored development standard requirement information, determining target code information based on a verification result, ensuring that the target code information is code information meeting the development standard requirement, inputting the target code information into a pre-constructed code generator, generating a target code frame, and sending the target code frame to a development terminal so that the development terminal generates a target service code based on the target code frame. The embodiment of the invention can ensure that the generated target service code meets the requirement of development specification, improve the rationality of design and avoid increasing the management cost of the code at the later stage.
In the embodiment, the target service code generated by the development terminal is obtained, and the target service code and the corresponding target code frame are matched and stored, so as to facilitate subsequent query. The present embodiment may further include: determining frame template modification information of a code generator based on pre-stored historical service codes and historical code frames corresponding to the historical service codes; and updating the frame template set in the code generator based on the frame template modification information.
The historical service code is a service code generated by the development terminal and acquired at the historical time, and the historical code frame is a code frame sent to the development terminal at the historical time and corresponds to the historical service code. The frame template modification information includes at least one of package name modification information, package path modification information, interface name modification information, entity name modification information, and entity path modification information.
In this embodiment, in order to improve the accuracy and effectiveness of generating the code frame, the frame template set in the code generator may be periodically or randomly updated. It should be noted that the code frame adopted in the historical service code may be the same as the historical code frame, or the code frame obtained after adjustment and modification by the developer is not the same as the historical code frame generated by the code generator and sent to the development terminal, so that the actual code frame adopted by the historical service code can be determined, and the frame template modification information can be obtained by comparing the actual code frame with the corresponding historical code frame; and updating the frame template set in the code generator through the frame template modification information.
Specifically, determining the frame template modification information of the code generator includes: determining at least one of package name modification information, package path modification information, interface name modification information, entity name modification information and entity path modification information of the framework template.
In this embodiment, before updating the framework template set in the code generator, the method further includes: sending the frame template modification information to a development terminal, and receiving modification feedback information sent by the development terminal; updating the frame template set in the code generator based on the frame template modification information, wherein the updating comprises the following steps: and if the modification feedback information is modification approval information, updating the frame template set in the code generator based on the frame template modification information.
In this embodiment, the framework template modification information is sent to the development terminal, so that the developer can view the framework template modification information. The development terminal may generate modification feedback information based on input operations of a developer. Wherein the modification feedback information may include approval modification information and disapproval modification information. When the modification feedback information is modification approval information, updating the frame template in the code generator based on the frame template modification information; when the feedback information is modified to be the disagreeable information, the framework template in the code generator is not updated.
In the embodiment, the modification feedback information of the development terminal is acquired by interacting with the development terminal, so that the frame template in the code generator is updated after the modification approval information fed back by the development terminal is received, and the correctness of the modification of the frame template is ensured.
The embodiments corresponding to the service code generation method are described in detail above, and specific application scenarios are given below in order to make the technical solutions of the method further clear to those skilled in the art. FIG. 2 is a flow diagram providing a method of code generation and template optimization according to an embodiment of the present invention; as shown in fig. 2, the present embodiment includes the following steps:
1. acquiring table and field information of a pre-designed database;
2. inputting the table information and the field information into a code generator, and starting the code generator;
3. carrying out standard verification on the table information and the field information; the specification check may include the following two aspects:
a) Default rule configuration
The default rule configuration can be a database design part in java development specifications which is established in advance, and can be used for providing standard rules such as table name format, table name meaning, table description, field naming rules, field description and default fields.
b) Custom rule configuration
In addition to default rules, personalized specification rules are pre-designed by developers.
And when the verification is failed, modifying the design of the table name, the field and the like according to default rule configuration, modifying and confirming in a man-machine cooperation mode, and then re-acquiring the table and field information of the database. When the verification passes, the next step is entered.
4. Generating a corresponding code frame in a code generator based on the field information and the table information;
5. and feeding back the code frame to a development terminal so as to enable a developer to carry out service personalized development, thereby generating a service code.
6. After the service development is completed, the service code can be provided for the intelligent code analysis platform to perform code frame analysis, including analysis of package name, package path, interface name, interface path, entity name, entity path and the like, and the code frame is compared with a code frame configured in advance in the code generator to learn so as to generate frame template modification information.
7. And judging whether to update the code frame set in the code generator based on the frame template modification information through man-machine cooperation, so that the code frame template is continuously optimized.
The embodiment of the invention can ensure that the generated target service code meets the requirement of development specification, improve the rationality of design and avoid increasing the management cost of the code at the later stage.
Fig. 3 is a schematic structural diagram of a service code generation apparatus according to an embodiment of the present invention, which is configured to execute the service code generation method provided in any of the above embodiments. The device and the service code generation method of each embodiment belong to the same inventive concept, and reference may be made to the embodiment of the service code generation method for details that are not described in detail in the embodiment of the service code generation device. As shown in fig. 3, the apparatus includes:
a code generation information acquisition module 10, configured to acquire code generation information preset in a database; wherein the code generation information includes table information and/or field information;
the code generation information verification module 11 is configured to perform format verification on a design format of the code generation information based on pre-stored development specification requirement information, and determine target code information based on a verification result;
and the object code frame generating module 12 is configured to input object code information into a pre-constructed code generator, generate an object code frame, and send the object code frame to the development terminal, so that the development terminal generates an object service code based on the object code frame.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the code generation information verification module 11 includes:
the first format checking unit is used for carrying out format checking on the design format of the code generation information;
and the object code information determining unit is used for determining the code generation information as the object code information if the format of the code generation information passes the verification.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the method further includes:
a correction code information generation unit for generating correction code information corresponding to the code generation information based on the development specification requirement information if the code generation information format check fails after the format check of the design format of the code generation information;
and the correction code information sending unit is used for sending the correction code information to the development terminal and determining target code information based on the feedback code information sent by the development terminal.
On the basis of any optional technical scheme in the embodiment of the invention, optionally, the development specification requirement information comprises default requirement information and/or custom requirement information;
the code generation information verification module 11 includes:
and the second format checking unit is used for carrying out format checking on the design format of the code generation information based on the default requirement information and/or the custom requirement information.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the apparatus further includes:
the frame template modification information determining module is used for determining the frame template modification information of the code generator based on the pre-stored historical service codes and the historical code frames corresponding to the historical service codes;
and the frame template updating module is used for updating the frame template set in the code generator based on the frame template modification information.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the framework template modification information determining module includes:
and the information determining unit is used for determining at least one of the package name modification information, the package path modification information, the interface name modification information, the entity name modification information and the entity path modification information of the frame template.
On the basis of any optional technical scheme in the embodiment of the present invention, optionally, the method further includes:
the modification feedback information receiving unit is used for sending the modification information of the frame template to the development terminal and receiving the modification feedback information sent by the development terminal before updating the frame template set in the code generator;
a framework template update module comprising:
and the frame template updating unit is used for updating the frame template set in the code generator based on the frame template modification information if the modification feedback information is the modification approval information.
According to the technical scheme of the embodiment of the invention, the code generation information preset in the database is obtained, wherein the code generation information comprises table information and/or field information; the method comprises the steps of carrying out format verification on a design format of code generation information based on prestored development standard requirement information, determining target code information based on a verification result, ensuring that the target code information is code information meeting the development standard requirement, inputting the target code information into a pre-constructed code generator, generating a target code frame, and sending the target code frame to a development terminal so that the development terminal generates a target service code based on the target code frame. The embodiment of the invention can ensure that the generated target service code meets the requirement of development specification, improve the rationality of design and avoid increasing the management cost of the code at the later stage.
It should be noted that, in the embodiment of the service code generation apparatus, each included unit and module are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
Fig. 4 is a schematic structural diagram of an electronic device implementing the service code generation method according to the embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 20 includes at least one processor 21, and a memory communicatively connected to the at least one processor 21, such as a Read Only Memory (ROM) 22, a Random Access Memory (RAM) 23, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 21 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 22 or the computer program loaded from the storage unit 28 into the Random Access Memory (RAM) 23. In the RAM23, various programs and data necessary for the operation of the electronic apparatus 20 can also be stored. The processor 21, the ROM22, and the RAM23 are connected to each other via a bus 24. An input/output (I/O) interface 25 is also connected to bus 24.
A number of components in the electronic device 20 are connected to the I/O interface 25, including: an input unit 26 such as a keyboard, a mouse, etc.; an output unit 27 such as various types of displays, speakers, and the like; a storage unit 28, such as a magnetic disk, optical disk, or the like; and a communication unit 29 such as a network card, modem, wireless communication transceiver, etc. The communication unit 29 allows the electronic device 20 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 21 may be any of various general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of the processor 21 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 21 performs the various methods and processes described above, such as the service code generation method.
In some embodiments, the service code generation method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 28. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 20 via the ROM22 and/or the communication unit 29. When the computer program is loaded into the RAM23 and executed by the processor 21, one or more steps of the service code generation method described above may be performed. Alternatively, in other embodiments, the processor 21 may be configured to perform the service code generation method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired result of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for generating a service code, comprising:
acquiring code generation information preset in a database; wherein the code generation information comprises table information and/or field information;
based on pre-stored development specification requirement information, format verification is carried out on the design format of the code generation information, and target code information is determined based on the verification result;
inputting the target code information into a pre-constructed code generator, generating a target code frame, and sending the target code frame to a development terminal so that the development terminal generates a target service code based on the target code frame.
2. The method of claim 1, wherein the format checking the design format of the code generation information, and determining the target code information based on the checking result comprises:
carrying out format verification on the design format of the code generation information;
and if the format of the code generation information passes the verification, determining the code generation information as the target code information.
3. The method of claim 2, further comprising, after the format checking the design format of the code generation information:
if the code generation information format is not verified, generating correction code information corresponding to the code generation information based on the development specification requirement information;
and sending the correction code information to the development terminal, and determining the target code information based on the feedback code information sent by the development terminal.
4. The method of claim 1, wherein the development specification requirement information comprises default requirement information and/or custom requirement information;
the format verification of the design format of the code generation information based on the pre-stored development specification requirement information comprises:
and carrying out format verification on the design format of the code generation information based on the default requirement information and/or the custom requirement information.
5. The method of claim 1, further comprising:
determining frame template modification information of a code generator based on pre-stored historical service codes and historical code frames corresponding to the historical service codes;
and updating the frame template set in the code generator based on the frame template modification information.
6. The method of claim 5, wherein determining the frame template modification information of the code generator comprises:
determining at least one of package name modification information, package path modification information, interface name modification information, entity name modification information and entity path modification information of the framework template.
7. The method of claim 5, further comprising, prior to the updating the framework template set in the code generator:
sending the frame template modification information to the development terminal, and receiving modification feedback information sent by the development terminal;
the updating the frame template set in the code generator based on the frame template modification information comprises:
and if the modification feedback information is modification approval information, updating the frame template set in the code generator based on the frame template modification information.
8. A service code generation apparatus, comprising:
the code generation information acquisition module is used for acquiring preset code generation information in a database; wherein the code generation information comprises table information and/or field information;
the code generation information checking module is used for carrying out format checking on the design format of the code generation information based on pre-stored development specification requirement information and determining target code information based on the checking result;
and the object code frame generating module is used for inputting the object code information into a pre-constructed code generator, generating an object code frame and sending the object code frame to a development terminal so that the development terminal generates an object service code based on the object code frame.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the business code generation method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions for causing a processor to implement the service code generation method of any one of claims 1-7 when executed.
CN202211160800.0A 2022-09-22 2022-09-22 Business code generation method and device, electronic equipment and storage medium Pending CN115421728A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211160800.0A CN115421728A (en) 2022-09-22 2022-09-22 Business code generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211160800.0A CN115421728A (en) 2022-09-22 2022-09-22 Business code generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115421728A true CN115421728A (en) 2022-12-02

Family

ID=84203676

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211160800.0A Pending CN115421728A (en) 2022-09-22 2022-09-22 Business code generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115421728A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117075910A (en) * 2023-10-12 2023-11-17 北京集度科技有限公司 Signal service conversion system, code generation method, vehicle, and program product

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117075910A (en) * 2023-10-12 2023-11-17 北京集度科技有限公司 Signal service conversion system, code generation method, vehicle, and program product
CN117075910B (en) * 2023-10-12 2024-01-16 北京集度科技有限公司 Signal service conversion system, code generation method, vehicle, and program product

Similar Documents

Publication Publication Date Title
CN112597754A (en) Text error correction method and device, electronic equipment and readable storage medium
CN116562249A (en) Form generation method, form generation device, electronic equipment and medium
CN115421728A (en) Business code generation method and device, electronic equipment and storage medium
CN113806038A (en) Task scheduling method, device, electronic equipment, storage medium and program product
CN115860877A (en) Product marketing method, device, equipment and medium
CN115964021A (en) Demand issuing method and device, electronic equipment and storage medium
CN115600038A (en) Page rendering method, device, equipment and medium
CN114141236B (en) Language model updating method and device, electronic equipment and storage medium
CN115309730A (en) Data auditing method and device, electronic equipment and storage medium
CN117668114A (en) Data synchronization method, device, equipment and medium
CN117931180A (en) Page layout generation method, device, equipment and storage medium
CN116069636A (en) Code review method and device, electronic equipment and storage medium
CN116233051A (en) Page sharing method, device and equipment for applet and storage medium
CN115237420A (en) Code generation method and device, electronic equipment and computer readable storage medium
CN115879567A (en) Operation processing method and device, electronic equipment and storage medium
CN113722344A (en) Data production method, data production device, electronic device, storage medium, and program product
CN115268880A (en) Code generation method and device, electronic equipment and storage medium
CN115525614A (en) Data access method, device, equipment, system and storage medium
CN110874361A (en) Data processing method, data processing device, storage medium and computer equipment
CN115167855A (en) Front-end page generation method, device and equipment applied to matching transaction system
CN116303614A (en) Method, system, equipment and storage medium for processing raw and cooked data
CN115794255A (en) Data processing method and device, electronic equipment and storage medium
CN115757097A (en) Test case generation method and device, electronic equipment and storage medium
CN117596141A (en) Message assembling method, device, equipment and storage medium
CN116301978A (en) System upgrading method, device, equipment and storage medium

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