Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Complete code generation method and device, equipment and storage medium

A code generation and code technology, applied in the computer field, can solve the problems of cumbersome process, inconvenient maintenance, code is not concise enough, etc., to achieve the effect of simple code reproduction, simplicity and maintainability

Active Publication Date: 2020-03-10
GUANGZHOU HUYA INFORMATION TECH CO LTD
View PDF5 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Due to the wide variety of permissions, the application for each permission requires technicians to implement codes. The process is cumbersome and the codes are not concise enough to facilitate maintenance.

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
  • Complete code generation method and device, equipment and storage medium
  • Complete code generation method and device, equipment and storage medium
  • Complete code generation method and device, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] figure 1 It is a flowchart of a complete code generation method provided by Embodiment 1 of the present invention. This embodiment is applicable to the automatic generation of function module codes, and can be executed by a complete code generation device. The complete code generating device can be realized by means of software and / or hardware, and the complete code generating device is a computer, a mobile phone, a tablet, an interactive smart tablet, and the like. In one embodiment, a code editor or compiler is installed in the complete code generation device. In this embodiment, a computer is used as a complete code generation device and a compiler is installed as an example for description. This embodiment does not limit the functions realized by the functional module, and this embodiment uses dynamic permission application to describe in detail.

[0042] In this embodiment, the dynamic permissions at least include camera permissions, microphone permissions, locat...

Embodiment 2

[0065] figure 2 It is a flowchart of a complete code generation method provided by Embodiment 2 of the present invention. This embodiment is further refined on the basis of the above embodiments. In this embodiment, editing of code source files in a compiler is taken as an example for illustration , the compiler can search for target tags by integrating with the APT tool. refer to figure 2 , the method specifically includes the following steps S210-S260:

[0066] S210. Determine that a compilation instruction for the code source file is detected.

[0067] In this implementation, the compile instruction is a trigger instruction for the compiler to compile the code source file, which can be triggered by detecting that the user clicks the compile button set on the compiler, or by detecting the input of a shortcut key corresponding to the compile instruction.

[0068] This embodiment does not limit the generation time of the complete code, which may be generated after the com...

Embodiment 3

[0098] Figure 4 It is a schematic structural diagram of a complete code generation device provided by Embodiment 3 of the present invention. This embodiment is applicable to the automatic generation of function module codes, and specifically the function module can be used for dynamic permission application. refer to Figure 4 , the complete code generating device specifically includes: a target label identification module 310 , a target adding code generating module 320 , an adding position determining module 330 and a complete code acquiring module 340 .

[0099] The target tag identification module 310 is configured to perform identification processing on the code source file, and if it is determined that the target tag is identified in the code source file, obtain a standard template code matching the target tag.

[0100] The target adding code generation module 320 is configured to generate a target adding code corresponding to the target tag according to the standard ...

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 embodiment of the invention discloses a complete code generation method and device, equipment and a storage medium. According to the method, a code source file is recognized, If it is determined that a target label is recognized in the code source file, a standard template code matched with the target label is obtained; generating a target adding code corresponding to the target label according to the standard template code; determining an adding position of the target adding code in the code source file according to the position of the target label in the code source file, and adding thetarget adding code at the adding position; codes in a new code source file obtained after recognition processing is finished serve as complete codes, the problem that the code implementation process in dynamic permission application is tedious is solved, simple and convenient code reproduction is achieved, and the codes have conciseness and maintainability.

Description

technical field [0001] The embodiments of the present invention relate to the field of computer technology, and in particular, to a complete code generation method, device, device and storage medium. Background technique [0002] With the development of computer technology, the amount of code for a single computer program is increasing, resulting in the code not being streamlined enough to facilitate development and maintenance. For example, in a mobile phone application, it is necessary to write code to complete the application for dynamic permissions. The specific permissions include at least camera permissions, microphone permissions, address book access permissions, and photo access permissions. Due to the wide variety of permissions, the application for each permission requires technical personnel to implement codes. The process is cumbersome, and the codes are not concise enough to facilitate maintenance. Contents of the invention [0003] The present invention prov...

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/33G06F8/36
CPCG06F8/33G06F8/36Y02D10/00
Inventor 李武军
Owner GUANGZHOU HUYA INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products