Code compiling method and device

A compiling method and code technology, applied in the direction of code compiling, program code conversion, program control device, etc., can solve the problem of user security not being guaranteed, and achieve the effect of security guarantee and security improvement

Pending Publication Date: 2019-03-12
北京顶象技术有限公司
View PDF2 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, since Java has a logical and complete description document, the code of Java is ...

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 compiling method and device
  • Code compiling method and device
  • Code compiling method and device

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0028] see figure 1 , the embodiment of the present application provides an electronic device 10 , and the electronic device 10 may include: a memory 11 , a communication module 12 , a bus 13 and a processor 14 . The processor 14 , the communication module 12 and the memory 11 are connected through the bus 13 . The processor 14 is used to execute executable modules, such as computer programs, stored in the memory 11 . figure 1 The illustrated components and structures of the electronic device 10 are exemplary and not limiting, and the electronic device 10 may also have other components and structures as desired.

[0029] The memory 11 may include a high-speed random access memory (Random Access Memory RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. In this embodiment, the memory 11 stores programs required to execute the code compilation method.

[0030] The bus 13 may be an ISA bus, a PCI bus, an EISA bus, or the li...

no. 2 example

[0034] This embodiment provides a method for compiling code. It should be noted that the steps shown in the flowchart of the accompanying drawings may be executed in a computer system such as a set of computer-executable instructions, and although shown in the flowchart A logical order is presented, but in some cases steps shown or described may be performed in an order different from that herein. This embodiment will be described in detail below.

[0035] see figure 2 In a code compiling method provided in this embodiment, the code encryption compiling method includes: step S100, step S200, step S300 and step S400.

[0036] Step S100: Obtain the Java bytecode to be compiled in the Java class file.

[0037] Step S200: Compile the Java bytecode to be compiled into an intermediate expression to be compiled.

[0038] Step S300: Obtain an analysis result according to the analysis of the intermediate expression to be compiled.

[0039] Step S400: Compile the multiple lines of ...

no. 3 example

[0064] see image 3 , the embodiment of the present application provides a code compiling device 100, the code compiling device 100 is applied to electronic equipment, and the code compiling device 100 includes:

[0065] Obtaining module 110, configured to obtain the Java bytecode to be compiled in the Java class file.

[0066] The first compilation module 120 is configured to compile the to-be-compiled Java bytecode into a to-be-compiled intermediate expression.

[0067] The analysis module 130 is configured to obtain an analysis result according to the analysis of the intermediate expression to be compiled.

[0068] The second compiling module 140 is configured to compile the multiple lines of codes in the intermediate expression to be compiled into one-to-one corresponding multiple lines of CPP codes line by line according to the analysis result.

[0069] A generating module 150, configured to generate a library file according to the multi-line CPP code.

[0070] An index ...

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

Embodiments of the present application provide a code compilation method and apparatus, which relate to the technical field of data processing. The method comprises the following steps: obtaining a Java bytecode to be compiled in a Java class file; Compiling the Java bytecode to be compiled into an intermediate expression to be compiled; Obtaining an analysis result according to the analysis of the intermediate expression to be compiled; According to the analysis results, the multi-line code in the intermediate expression to be compiled is compiled into one-to-one corresponding multi-line CPPcode line by line. Because the CPP code is difficult to be analyzed, the Java bytecode is finally converted into many lines of CPP code to run, which improves the security and solves the technical problem that the security of the user can not be guaranteed due to the very easy reverse analysis of the attacker of the Java code.

Description

technical field [0001] The present application relates to the technical field of data processing, and in particular, to a method and apparatus for compiling code. Background technique [0002] At present, as a widely used computer programming language, Java has the characteristics of cross-platform, object-oriented, generic programming, etc. It has been widely used in various application development. [0003] The Java code can be run on the Java virtual machine after being compiled and released directly. However, since Java has a logical and complete description document, the Java code is very easy to be reversely analyzed by the attacker, resulting in the security for the user cannot be guaranteed. SUMMARY OF THE INVENTION [0004] The present application is to provide a method and apparatus for compiling code to effectively improve the above-mentioned defects. [0005] In order to achieve the above purpose, the embodiments of the present application are achieved in the...

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/41G06F9/455G06F21/53
CPCG06F8/41G06F9/45558G06F21/53G06F2009/45587
Inventor 陈树华泮晓波
Owner 北京顶象技术有限公司
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