Code generation method, device and equipment and storage medium

A code generation and code technology, applied in the field of cloud computing, can solve the problems of negative impact of business functions, cumbersome use and maintenance process, etc.

Pending Publication Date: 2020-09-04
BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF6 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

At present, most of the commonly used Go language code generation solutions are based on static file generation. The use and maintenan

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Code generation method, device and equipment and storage medium
  • Code generation method, device and equipment and storage medium
  • Code generation method, device and equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

[0026] figure 1 A flow chart of a code generation method provided by an embodiment of the present application is shown, and the method includes:

[0027] S101, in the first language environment, write the code of the first business logic according to the description method of the preset declarative application program interface API, the code of the first business lo...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a code generation method, device and equipment and a storage medium, and relates to the technical field of cloud computing, in particular to the technical field of software. According to the specific implementation scheme, the code generation method comprises the steps: writing a code of a first business logic in a first language environment, wherein the code of the first service logic is used for describing a function corresponding to the first service logic, the code of the first service logic is written according to a preset description mode of a declarative application program interface API, and a first specific syntax tree is obtained after writing is completed; converting the first specific syntax tree into a first abstract syntax tree based on a predeterminedsyntax analysis algorithm; and converting the first abstract syntax tree into a second language code through an interpreter, wherein the second language code is used for executing a function corresponding to the first business logic. By utilizing the embodiment of the invention, dynamic description of the target code can be realized.

Description

technical field [0001] The present application relates to the technical field of cloud computing, specifically to the technical field of software, and more specifically to a code generation method, device, device and storage medium. This application can be applied to the computer field. Background technique [0002] Among various computer programming languages, Go language has the advantages of concise syntax, high-speed operation, parallel processing package, and open source. It can be used as a system programming language equipped with giant central servers such as WEB servers or storage clusters. For high-performance distributed systems, the Go language has higher development efficiency than most other languages, but it provides massive parallel support and has great advantages in server-side development. At present, most of the commonly used Go language code generation solutions are generated based on static files. The use and maintenance process is cumbersome, which ha...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F8/20G06F8/30G06F8/41
CPCG06F8/24G06F8/315G06F8/425G06F8/436G06F8/447
Inventor 焦煦然
Owner BEIJING BAIDU NETCOM SCI & TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products