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

A method and an apparatus for compressing codes

A technology for compressing codes and codes, applied in the computer field, can solve the problems of missed detection, high missed detection rate of compressed code segments, and inability to detect, etc., to achieve the effect of reducing the missed detection rate

Active Publication Date: 2019-01-11
BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, during the debugging and running of the application, there will be situations where classes are referenced by incomplete strings, that is, a class is referenced in the form of incomplete strings, but the server cannot detect the use of this class due to the script automation algorithm. , and the class is deleted, resulting in missed detection
Since the commonly used method of compressing code segments cannot detect classes referenced in the form of incomplete strings, it will cause the problem of high missed detection rate of compressed code segments

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
  • A method and an apparatus for compressing codes
  • A method and an apparatus for compressing codes
  • A method and an apparatus for compressing codes

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0048] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0049] The embodiment of the present application provides a method for compressing code, which can be applied to the server, and the server can run and debug the application program, and compile the debugged application program to form an APP (Application, application program) for users Download, install, and run through the terminal. The server includes the background server of various websites facing users. The method can also be applied to terminals, and the terminals include mobile phones, tablet computers and other electronic devices on which APP can be installed.

[0050] A class is a complex data type. The class does not exist in memory and cannot be directly manipulated. Only when it is instantiated as an object can the class be manipulated. Therefore, when a certa...

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 method and an apparatus for compressing codes, belonging to the field of computer technology. The method includes: acquiring a code of a first application stored in advance; obtaining all class names in the code through a preset class name obtaining algorithm to obtain a first class set; obtaining a class name of a class used in the running processof the first application program, and obtaining a second class set; obtaining a difference set between the first class set and the second class set to obtain a third class set, wherein the third classset includes a class name that is a class name of a class that is not used by the first application program in the running process. Through adoption of the application, the missed detection rate canbe reduced.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to a method and device for compressing codes. Background technique [0002] Because iOS (iphone Operating System, apple mobile phone operating system) limits the code segment size of the application program installed in the mobile terminal, when developing the application program, the developer needs to consider compressing the code segment size of the application program. [0003] When minifying a code segment, it is common to remove classes that are not used in the application. The specific process is: before publishing a certain application program, the server first obtains the class names of all classes in the application program through the class name acquisition algorithm. Then in the process of debugging and running the application, the server detects whether a certain class is referenced or instantiated in the form of a class name string through a script automat...

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/41G06F11/36
CPCG06F8/24G06F8/41G06F11/3612
Inventor 刘智杰吴宪杜建庚
Owner BEIJING QIYI CENTURY SCI & 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