CN111796832B - Hot patch file generation method, device, equipment and storage medium - Google Patents

Hot patch file generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN111796832B
CN111796832B CN202010616037.2A CN202010616037A CN111796832B CN 111796832 B CN111796832 B CN 111796832B CN 202010616037 A CN202010616037 A CN 202010616037A CN 111796832 B CN111796832 B CN 111796832B
Authority
CN
China
Prior art keywords
file
target
replaced
hot patch
generating
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.)
Active
Application number
CN202010616037.2A
Other languages
Chinese (zh)
Other versions
CN111796832A (en
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.)
Suzhou 360 Intelligent Security Technology Co Ltd
Original Assignee
Suzhou 360 Intelligent Security 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 Suzhou 360 Intelligent Security Technology Co Ltd filed Critical Suzhou 360 Intelligent Security Technology Co Ltd
Priority to CN202010616037.2A priority Critical patent/CN111796832B/en
Publication of CN111796832A publication Critical patent/CN111796832A/en
Application granted granted Critical
Publication of CN111796832B publication Critical patent/CN111796832B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis

Abstract

The invention relates to the technical field of computers, and discloses a hot patch file generation method, a device, equipment and a storage medium, wherein the method comprises the following steps: comparing the source file with the target file to determine an object to be replaced; carrying out syntactic analysis on the target file, and determining target data corresponding to the object to be replaced according to a syntactic analysis result; and generating a DEX byte code according to the target data, and generating a hot patch file according to the DEX byte code. The target file is analyzed in syntax to determine the target data corresponding to the object to be replaced, and the hot patch file is generated according to the target data, so that the effect of generating the hot patch file conveniently and quickly is achieved.

Description

Hot patch file generation method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a hot patch file.
Background
The existing system has a lot of bugs, and in the prior art, the repair of the system bugs is generally implemented by means of system updating, but the writing period of the updating package in this way is usually several months, even several years, and the updating period is very long.
At present, a system bug can be repaired through a patch file, a traditional patch generating mode generally performs some updates according to bug information in a manual mode, writes the updated functions into a corresponding patch file, and then compiles the updated functions, but the process of generating the patch file in the mode is very complex and needs a lot of time.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a hot patch file generation method, a hot patch file generation device, hot patch file generation equipment and a storage medium, and aims to solve the technical problem of how to conveniently and quickly generate a hot patch file.
In order to achieve the above object, the present invention provides a method for generating a hot patch file, including the steps of:
comparing the source file with the target file to determine an object to be replaced;
performing syntactic analysis on the target file, and determining target data corresponding to the object to be replaced according to a syntactic analysis result;
and generating a DEX byte code according to the target data, and generating a hot patch file according to the DEX byte code.
Optionally, the parsing the target file and determining the target data corresponding to the object to be replaced according to a result of the parsing specifically includes:
performing lexical analysis on the target file to obtain data to be processed;
performing syntactic analysis on the to-be-processed data based on preset language characteristics to generate a to-be-processed syntactic tree;
and determining target data corresponding to the object to be replaced according to the syntax tree to be processed.
Optionally, the data to be processed includes: a sequence of words;
the lexical analysis of the target file to obtain the data to be processed specifically includes:
acquiring target file data of the target file, and extracting a character sequence from the target file data;
converting the character sequence into the word sequence;
correspondingly, the parsing the to-be-processed data based on the preset language features to generate a to-be-processed syntax tree specifically includes:
and carrying out syntactic analysis on the word sequence based on preset language characteristics to generate a syntactic tree to be processed.
Optionally, the converting the character sequence into a word sequence specifically includes:
extracting characters to be processed from the character sequence, and determining a logic sequence corresponding to the characters to be processed;
converting the characters to be processed into words to be processed based on a preset word forming rule;
and generating a word sequence according to the word to be processed and the logic sequence.
Optionally, the parsing the word sequence based on the preset language features to generate a syntax tree to be processed includes:
combining the word sequences based on preset language features to obtain grammatical phrases;
recognizing a grammar category corresponding to the grammar phrase, and carrying out grammar check on the grammar phrase based on the grammar category;
judging whether the grammar checking result is a preset result or not;
and when the grammar checking result is the preset result, generating a grammar tree to be processed according to the grammar phrase.
Optionally, the determining, according to the syntax tree to be processed, target data corresponding to the object to be replaced specifically includes:
performing semantic analysis on the syntax tree to be processed based on preset semantic annotation to obtain a target syntax tree;
and extracting target data corresponding to the object to be replaced from the target syntax tree.
Optionally, the extracting, from the target syntax tree, target data corresponding to the object to be replaced specifically includes:
acquiring a first function stack corresponding to the object to be replaced in the target syntax tree, and acquiring a second function stack corresponding to the object to be replaced in the source file;
generating change information according to the first function stack and the second function stack;
updating the target syntax tree according to the change information to obtain an updated target syntax tree;
and extracting target data corresponding to the object to be replaced from the updated target syntax tree.
Optionally, the generating a DEX bytecode according to the target data, and generating a hot patch file according to the DEX bytecode specifically includes:
extracting JAVA source code from the target data;
compiling the JAVA source code to obtain a CLASS byte code;
generating DEX byte codes according to the CLASS byte codes;
and generating a hot patch file according to the DEX byte code.
Optionally, the generating a hot patch file according to the DEX bytecode specifically includes:
generating an APK file according to the DEX byte code;
and taking the APK file as a hot patch file.
Optionally, the comparing the source file with the target file to determine the object to be replaced specifically includes:
acquiring source file data of a source file and acquiring target file data of a target file;
comparing the source file data with the target file data;
determining a code or function that distinguishes between the source file data and the target file data according to the comparison result;
and taking the distinguished codes or functions as objects to be replaced.
Optionally, after the generating a DEX bytecode according to the target data and generating a hot patch file according to the DEX bytecode, the method further includes:
storing the hot patch file to a backup storage area of a system;
when an operation instruction input by a user is received, extracting the hot patch file from the backup storage area;
and performing vulnerability repair on the system based on the operation instruction and the hot patch file.
Optionally, after performing bug fixing on the system based on the operation instruction and the hot patch file, the method further includes:
detecting whether the bug fixing is completed;
when the bug repairing is completed, acquiring a replaced file after repairing is completed;
comparing the replaced file with the target file;
and deleting the hot patch file when the replaced file is the same as the target file.
In addition, in order to achieve the above object, the present invention further provides a hot patch file generating apparatus, including:
the file comparison module is used for comparing the source file with the target file to determine an object to be replaced;
the target determining module is used for carrying out syntactic analysis on the target file and determining target data corresponding to the object to be replaced according to a syntactic analysis result;
and the patch generating module is used for generating a DEX byte code according to the target data and generating a hot patch file according to the DEX byte code.
Optionally, the target determining module is further configured to perform lexical analysis on the target file to obtain to-be-processed data;
the target determination module is further used for carrying out syntactic analysis on the to-be-processed data based on preset language features to generate a to-be-processed syntactic tree;
the target determining module is further configured to determine target data corresponding to the object to be replaced according to the syntax tree to be processed.
Optionally, the target determining module is further configured to perform semantic analysis on the syntax tree to be processed based on a preset semantic annotation, so as to obtain a target syntax tree;
the target determining module is further configured to extract target data corresponding to the object to be replaced from the target syntax tree.
Optionally, the patch generating module is further configured to extract JAVA source code from the target data;
the patch generating module is further configured to compile the JAVA source code to obtain a CLASS bytecode;
the patch generating module is further configured to generate a DEX bytecode according to the CLASS bytecode;
the patch generating module is further used for generating a hot patch file according to the DEX byte code.
Optionally, the hot patch file generating apparatus further includes a bug fixing module, configured to store the hot patch file in a backup storage area of a system;
the vulnerability repairing module is further used for extracting the hot patch file from the backup storage area when an operation instruction input by a user is received;
and the vulnerability repairing module is also used for performing vulnerability repairing on the system based on the operation instruction and the hot patch file.
In addition, in order to achieve the above object, the present invention further provides a hot patch file generating apparatus, including: the hot patch file generation method comprises the steps of realizing the hot patch file generation method, and storing the hot patch file generation program on a memory and running on a processor.
In addition, to achieve the above object, the present invention further provides a storage medium having a hot patch file generation program stored thereon, wherein the hot patch file generation program, when executed by a processor, implements the steps of the hot patch file generation method as described above.
The hot patch file generation method provided by the invention compares the source file with the target file to determine the object to be replaced; performing syntactic analysis on the target file, and determining target data corresponding to the object to be replaced according to a syntactic analysis result; and generating a DEX byte code according to the target data, and generating a hot patch file according to the DEX byte code. The target file is analyzed in syntax to determine the target data corresponding to the object to be replaced, and then the hot patch file is generated according to the target data, so that the effect of generating the hot patch file conveniently and quickly is achieved.
Drawings
Fig. 1 is a schematic structural diagram of a hotpatch file generation device of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a hot patch file generation method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a method for generating a hot patch file according to the present invention;
FIG. 4 is a diagram of a syntax tree structure of a second embodiment of a method for generating a hot patch file according to the present invention;
FIG. 5 is a flowchart illustrating a method for generating a hot patch file according to a third embodiment of the present invention;
FIG. 6 is a flowchart illustrating a method for generating a hot patch file according to a fourth embodiment of the present invention;
fig. 7 is a functional block diagram of a hot patch file generation apparatus according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a hotpatch file generation device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the hot patch file generating apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to implement connection communication among these components. The user interface 1003 may comprise a Display screen (Display), an input unit such as keys, and the optional user interface 1003 may also comprise a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., a WI-FI interface). The Memory 1005 may be a Random Access Memory (RAM) Memory or a non-volatile Memory (non-volatile Memory), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the device configuration shown in FIG. 1 does not constitute a limitation of a hotpatch file generation device, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, the memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a hot patch file generation program.
In the hot patch file generation apparatus shown in fig. 1, the network interface 1004 is mainly used for connecting an external network and performing data communication with other network apparatuses; the user interface 1003 is mainly used for connecting to a user equipment and performing data communication with the user equipment; the apparatus of the present invention calls a hot patch file generation program stored in the memory 1005 through the processor 1001, and executes the hot patch file generation method provided by the embodiment of the present invention.
Based on the hardware structure, the embodiment of the hot patch file generation method is provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for generating a hot patch file according to a first embodiment of the present invention.
In a first embodiment, the hot patch file generation method includes the following steps:
step S10, comparing the source file with the target file to determine the object to be replaced.
It should be noted that the execution subject in this embodiment may be a hot patch file generation device, and may also be other devices that can implement the same or similar functions.
It should be noted that the target in the embodiment may be an Android system, and may also be another system, which is not limited in this embodiment. The source file and the target file may be files of an Android system, and may also be files of an application program in the Android system, which is not limited in this embodiment.
It should be understood that the source file is a file that needs to be replaced and is a file with a vulnerability, the target file is a file that is determined to be replaced and is a file that has overcome the vulnerability, and the target file may be determined by a user selection or may be determined by a system automatic selection, which is not limited in this embodiment.
It can be understood that source file data of a source file may be acquired, target file data of a target file may be acquired, the source file data and the target file data are compared, a code or a function having a difference between the source file data and the target file data is determined according to a comparison result, the code or the function having the difference is taken as an object to be replaced, and the object to be replaced may also be determined by other comparison methods, which is not limited in this embodiment.
And S20, performing syntactic analysis on the target file, and determining target data corresponding to the object to be replaced according to a syntactic analysis result.
It should be noted that, the target file data of the target file may be obtained first, the character sequence is extracted from the target file data, the character sequence is converted into a word sequence, the word sequence is parsed based on the language features of the JAVA language to generate a syntax tree to be processed, then the syntax tree to be processed is parsed based on the features of the Android and the semantic annotations to obtain a target syntax tree, and the target data corresponding to the object to be replaced is extracted from the target syntax tree.
It should be understood that, since the object to be replaced may be a code or a function, the target data corresponding to the object to be replaced may be code data or function data, which is not limited in this embodiment.
It is understood that the syntax tree is a graphical representation of the sentence structure, which represents the derivation result of the sentence, and is useful for understanding the hierarchy of the sentence syntax structure, that is, the syntax tree is the tree formed when the derivation is performed according to a certain rule.
And S30, generating a DEX byte code according to the target data, and generating a hot patch file according to the DEX byte code.
It should be noted that the hot patch refers to some codes capable of repairing a software bug, and is a way to repair a product software bug quickly and at low cost, and a file corresponding to the hot patch is a hot patch file.
It should be understood that, after the target data corresponding to the object to be replaced is determined, a DEX bytecode may be generated according to the target data, and then a hot patch file may be generated according to the DEX bytecode, which may be specifically performed by extracting a JAVA source code from the target data, compiling the JAVA source code to obtain a CLASS bytecode, then generating a DEX bytecode according to the CLASS bytecode, generating an APK file according to the DEX bytecode, and using the APK file as a hot patch file, which may also be implemented in other manners, which is not limited in this embodiment.
It can be understood that, in the embodiment, the hot patch file is for the Android system, and the generated hot patch file is a patch file that can directly run under the Android system, so that the vulnerability repairing efficiency can be improved.
In the embodiment, the source file is compared with the target file to determine the object to be replaced; carrying out syntactic analysis on the target file, and determining target data corresponding to the object to be replaced according to a syntactic analysis result; and generating a DEX byte code according to the target data, and generating a hot patch file according to the DEX byte code. The target file is analyzed in syntax to determine the target data corresponding to the object to be replaced, and then the hot patch file is generated according to the target data, so that the effect of generating the hot patch file conveniently and quickly is achieved.
In an embodiment, as shown in fig. 3, a second embodiment of the method for generating a hot patch file according to the present invention is proposed based on the first embodiment, where the step S20 includes:
step S201, performing lexical analysis on the target file to obtain data to be processed.
It should be noted that the data to be processed may be a word sequence, target file data of a target file is obtained, a character sequence is extracted from the target file data, the character sequence is converted into a word sequence, syntactic analysis is performed on the word sequence based on preset linguistic features, and a syntax tree to be processed is generated, where the lexical analysis may be performed by a lexical analyzer program, which is not limited in this embodiment.
It should be understood that, since the solution of the present embodiment is directed to the Android system, and file data in the Android system is substantially in the JAVA language, the preset language features may be language features of the JAVA language.
It can be understood that the target file data is composed of a character sequence, and therefore, the target file data of the target file can be obtained, then the character sequence is extracted from the target file data, then the character sequence is converted into a word sequence, lexical analysis is already completed after the word sequence is obtained, then, syntactic analysis is performed on the word sequence based on JAVA language features, and a to-be-processed syntactic tree is generated according to a syntactic analysis result, where the syntactic analysis can be performed by a syntactic analyzer program, which is not limited in this embodiment.
Further, the step of converting the character sequence into a word sequence includes:
extracting characters to be processed from the character sequence, and determining a logic sequence corresponding to the characters to be processed; converting the characters to be processed into words to be processed based on a preset word forming rule; and generating a word sequence according to the word to be processed and the logic sequence.
It should be understood that the character sequence in this embodiment may be a character string, where the character string is a string of characters composed of numbers, letters and underlines, and the character string is a continuous sequence of symbols or numerical values in the programming.
It should be understood that, besides a plurality of characters to be processed, the character sequence also includes a logic sequence corresponding to the characters to be processed, where the logic sequence refers to an arrangement relationship between the characters to be processed, and the preset word formation rule may be a word formation rule of JAVA language.
It can be understood that after determining the characters to be processed and the logical sequence corresponding to the characters to be processed, the characters to be processed may be converted into words to be processed based on the word formation rule of JAVA language, and since only the representation form of the characters to be processed is converted in the process of converting the characters to be processed into words to be processed and the logical sequence thereof is not changed, a word sequence may be generated according to the words to be processed obtained by the conversion and the logical sequence.
In this embodiment, characters to be processed are extracted from a character sequence, a logic sequence corresponding to the characters to be processed is determined, the characters to be processed are converted into words to be processed based on a preset word formation rule, and a word sequence is generated according to the words to be processed and the logic sequence. Therefore, the word sequence is generated in a lexical analysis mode and used for subsequent syntactic analysis, and the accuracy and the efficiency of the syntactic analysis are improved.
And S202, performing syntactic analysis on the to-be-processed data based on preset language characteristics, and generating a to-be-processed syntactic tree.
In a specific implementation, for example, when the expression obtained after parsing is 1+3 (4-1) +2, the generated syntax tree to be processed is as shown in fig. 4, and fig. 4 is a syntax tree structure diagram of one representation of the syntax tree to be processed, and other expressions, or codes and functions, may also be obtained after parsing, and accordingly other syntax trees to be processed may be generated, which is not limited in this embodiment.
Further, the step S202 includes:
combining the word sequences based on preset language features to obtain grammatical phrases; recognizing a grammar category corresponding to the grammar phrase, and carrying out grammar check on the grammar phrase based on the grammar category; judging whether the grammar checking result is a preset result or not; and when the grammar checking result is the preset result, generating a grammar tree to be processed according to the grammar phrase.
It should be noted that, the word sequences are combined based on the language features of the JAVA language to obtain the grammatical phrases, and then the grammatical domains corresponding to the grammatical phrases are identified, where the grammatical domains are generalizations of grammatical meanings represented by various grammatical forms, and include all explicit grammatical forms and invisible grammatical forms from the grammatical forms, and include all structural meanings, functional meanings and expression meanings from the grammatical meanings.
It should be understood that, after the grammar category corresponding to the grammar phrase is identified, the grammar phrase may be subjected to grammar check based on the grammar category, and whether a grammar check result is a preset result is determined, where the preset result may be that the grammar check passes, and this embodiment does not limit this.
It can be understood that when the grammar check result is check pass, the grammar analysis is stated to have no problem, and the grammar tree to be processed is generated according to the generated grammar phrases.
In the embodiment, a grammar phrase is obtained by combining the word sequences based on preset language features, a grammar category corresponding to the grammar phrase is identified, grammar check is performed on the grammar phrase based on the grammar category, and whether a grammar check result is a preset result is judged; and when the grammar checking result is the preset result, generating a grammar tree to be processed according to the grammar phrases. The word sequences are combined to obtain the grammar phrases, then grammar check is carried out on the grammar phrases, and the grammar trees to be processed are generated according to the grammar phrases when the grammar phrases pass the grammar trees, so that the grammar trees to be processed are accurately generated according to lexical analysis results, and the generation efficiency of the grammar trees is improved.
Step S203, determining target data corresponding to the object to be replaced according to the syntax tree to be processed.
Further, the step S203 includes:
and performing semantic analysis on the syntax tree to be processed based on preset semantic annotations to obtain a target syntax tree, and extracting target data corresponding to the object to be replaced from the target syntax tree.
It should be noted that the preset semantic annotation may be an Android semantic annotation, semantic analysis may be performed on the syntax tree to be processed based on the Android features and the semantic annotation to obtain a target syntax tree with semantic logic, target data corresponding to an object to be replaced is extracted from the target syntax tree, and the target data may be a code or a function, which is not limited in this embodiment.
It should be understood that semantic analysis is performed on the syntax tree to be processed based on the features and semantic annotations of the Android, so that the generated target syntax tree can conform to the features and syntax of the Android, and the target syntax tree has the logic of the Android. Since the object to be replaced is a function or code applied to Android, target data having logic corresponding to the object to be replaced may be extracted from the target syntax tree.
In this embodiment, a target syntax tree is obtained by performing semantic analysis on the syntax tree to be processed based on preset semantic annotations, and target data corresponding to the object to be replaced is extracted from the target syntax tree. And obtaining the target syntax tree through semantic analysis, and extracting the target data corresponding to the object to be replaced, so that the target data corresponding to the object to be replaced can be conveniently and accurately extracted from the target syntax tree, and the accuracy of the generated hot patch file is further improved.
Further, the step of extracting the target data corresponding to the object to be replaced from the target syntax tree includes:
acquiring a first function stack corresponding to the object to be replaced in the target syntax tree, and acquiring a second function stack corresponding to the object to be replaced in the source file; generating change information according to the first function stack and the second function stack; updating the target syntax tree according to the change information to obtain an updated target syntax tree; and extracting target data corresponding to the object to be replaced from the updated target syntax tree.
It should be noted that, the function or code corresponding to the object to be replaced in the target syntax tree may not be called directly because the context has changed and is originally called in a native function stack, but now, after the context changes, there is no way to call directly what has some rights, and by means of a reverse manner, the functions are given the rights that can be called or accessed, and the changed information is updated into the target syntax tree to obtain the updated target syntax tree.
It should be understood that, the object to be replaced is already known, but because the function or code corresponding to the object to be replaced has a logical relationship with other codes, the logical problem can be corrected through the analysis of the syntax tree.
It can be understood that the first function stack corresponding to the object to be replaced may be obtained from the target syntax tree, the second function stack corresponding to the object to be replaced in the source file may be obtained, and then the first function stack and the second function stack may be compared to determine the change information, where the change information may be logic change information, or may be other information, which is not limited in this embodiment. And then updating the target syntax tree according to the change information to obtain an updated target syntax tree, and extracting target data corresponding to the object to be replaced from the updated target syntax tree.
In this embodiment, a first function stack corresponding to the object to be replaced in the target syntax tree is obtained, and a second function stack corresponding to the object to be replaced in the source file is obtained; generating change information according to the first function stack and the second function stack; updating the target syntax tree according to the change information to obtain an updated target syntax tree; and extracting target data corresponding to the object to be replaced from the updated target syntax tree. The target data corresponding to the object to be replaced is directly extracted from the target syntax tree, and the logical problem of the code of the extracted target data and other codes can exist, so that the change information can be generated according to the first function stack in the target syntax tree and the second function stack in the source file, the target syntax tree is updated according to the change information, the target data corresponding to the object to be replaced is extracted from the updated target syntax tree, and the problem that the logical problem exists between the target data and other codes can be solved.
In a specific implementation, assuming that a source file a (a leaky file) to be replaced is obtained and a target file to be replaced is B, first, it can be found which functions need to be replaced, for example, a function needs to be replaced, and at this time, syntax analysis can be performed on the target file B: reading the whole file, performing lexical analysis, performing syntactic analysis based on the characteristics of JAVA language to generate an abstract syntax tree to be processed, performing semantic analysis according to the characteristics of Android and semantic annotations, generating a target syntax tree with semantic logic after the analysis is completed, and extracting a replaced function from the target syntax tree, wherein the function is in the target syntax tree.
In the embodiment, the target file is analyzed by a lexical method to obtain data to be processed; performing syntactic analysis on the data to be processed based on preset language features to generate a syntactic tree to be processed; and determining target data corresponding to the object to be replaced according to the syntax tree to be processed. Therefore, lexical analysis is performed on the target file firstly, then syntactic analysis is performed, a to-be-processed syntactic tree is generated, target data are determined according to the to-be-processed syntactic tree, and accuracy and efficiency of obtaining the target data are improved.
In an embodiment, as shown in fig. 5, a third embodiment of the hot patch file generation method according to the present invention is proposed based on the first embodiment or the second embodiment, and in this embodiment, the description is made based on the first embodiment, and the step S30 includes:
step S301, extracting a JAVA source code from the target data.
It should be noted that, JAVA format is used when writing JAVA code, but it is not convenient to directly generate DEX bytecode according to JAVA format code, so JAVA source code in JAVA format can be extracted from target data first, converted, and then regenerated into DEX bytecode.
It can be understood that after determining the target data corresponding to the object to be replaced, the JAVA source code may be directly extracted from the target data.
Step S302, the JAVA source code is compiled to obtain the CLASS byte code.
It should be noted that there are 4 file types in Android, which are JAVA, CLASS, DEX, and APK, respectively, where a JAVA file is an application source file. The Android itself is written in JAVA for a considerable part, and applications of the Android must be developed using JAVA.
It should be understood that the CLASS file is a JAVA compiled target file, unlike J2SE, JAVA compiled into CLASS can be run directly, but the CLASS file on the Android platform cannot be run directly on the Android. Since Google uses its own Dalvik to run applications, CLASS here must not run in the JAVA environment of Android Dalvik, which is actually only an intermediate target file in the compilation process and needs to be converted into a DEX file before running on Dalvik.
Step S303, a DEX byte code is generated according to the CLASS byte code.
It should be understood that the DEX file is an executable file on the Android platform, because the Android virtual machine executes not JAVA bytecode, but another bytecode: the DEX-format bytecode can be used for converting the CLASS bytecode into the DEX bytecode after the JAVA code is compiled to obtain the CLASS bytecode.
And step S304, generating a hot patch file according to the DEX byte code.
Further, the step S304 includes:
and generating an APK file according to the DEX byte code, and taking the APK file as a hot patch file.
The APK file is an extension of the Android installation package, and after the DEX byte code is generated, the APK file can be generated according to the DEX byte code, and the generated APK file is used as a hot patch file.
It should be understood that, the reason why the APK file is generated according to the DEX bytecode and is used as the hot patch file rather than directly using the DEX bytecode as the hot patch file is that the APK file is a file that can be directly run, and if the APK file is used as the hot patch file, the hot patch file can be directly run for repairing when the bug repair is performed; if the DEX bytecode is directly used as the hot patch file, the DEX bytecode can be repaired only after being processed during bug repair, the process is complex, and the repair efficiency is also influenced.
In this embodiment, the APK file is generated according to the DEX bytecode and is used as a hot patch file, so that the APK file generated by the DEX bytecode is used as a hot patch file, and the hot patch file can be directly run during bug fixing, thereby improving the bug fixing efficiency.
In the embodiment, a JAVA source code is extracted from the target data; compiling the JAVA source code to obtain a CLASS byte code; generating DEX byte codes according to the CLASS byte codes; and generating a hot patch file according to the DEX byte code. Therefore, the DEX byte codes corresponding to the target data are generated firstly, and then the hot patch files capable of running directly are generated according to the DEX byte codes and used for subsequent bug fixing, and the bug fixing efficiency is improved.
In an embodiment, as shown in fig. 6, a fourth embodiment of the hot patch file generation method according to the present invention is proposed based on the first embodiment or the second embodiment, and in this embodiment, the description is made based on the first embodiment, and the step S10 includes:
step S101 acquires source file data of a source file, and acquires target file data of a target file.
It should be noted that the source file is a file to be replaced in the system, and is a file with a leak, and may be named as file a, the target file is a determined file to be replaced, and is a file that has overcome the leak, and may be named as file B, and the target file may be determined by a user selection or may be determined by a system automatic selection, which is not limited in this embodiment.
It should be understood that the source file data may be extracted from the source file, and the target file data may also be extracted from the target file, where the source file data and the target file data may be code data, function data, a combination of code data and function data, and other data, which is not limited in this embodiment.
Step S102, comparing the source file data with the target file data.
It will be appreciated that after source file data of a source file and target file data of a target file are obtained, the source file data and the target file data may be compared, and differences between the source file data and the target file data may be determined by way of the comparison.
Step S103, determining codes or functions with differences between the source file data and the target file data according to the comparison result.
It should be understood that a difference between the source file data and the target file data may be determined from the comparison result, data in which a difference exists between the source file data and the target file data may be determined, and then a code or a function in which a difference exists may be further determined from the data in which a difference exists.
In a specific implementation, for example, the source file data of the file a and the target file data of the file B are compared, data having a difference between the source file data and the target file data can be determined according to a comparison result, then a code or a function corresponding to the data having a difference is searched, and the code or the function having a difference between the source file data and the target file data can be determined through the above manner.
It should be understood that the codes or functions mentioned in this embodiment may be a single code or function, or a combination of multiple codes or functions, and this embodiment is not limited thereto.
And step S104, taking the codes or the functions with the differences as objects to be replaced.
It should be understood that if there is a code or function having a difference between the source file data and the target file data, it indicates that there may be a bug in the code or function having a difference, and the code or function having a difference needs to be replaced, so that the code or function having a difference can be used as an object to be replaced.
Further, after the step S30, the method further includes:
storing the hot patch file to a backup storage area of a system; when an operation instruction input by a user is received, extracting the hot patch file from the backup storage area; and performing vulnerability repair on the system based on the operation instruction and the hot patch file.
It should be noted that, since it takes a certain time to perform bug fixing on the system according to the hot patch file, and some users may not want to perform bug fixing in the process of using software, the hot patch file may be stored in the backup storage area of the system after the hot patch file is generated. If the operation instruction of the user is not received, no operation is firstly taken; when an operation instruction input by a user is received, which indicates that bug fixing is needed at the moment, the hot patch file stored before is extracted from the backup storage area, and then bug fixing is carried out on the system based on the operation instruction and the hot patch file.
It should be understood that if the above steps are not taken, the vulnerability fix is performed directly according to the hot patch file after the hot patch file is generated, but at this time, the user may be operating or the user does not want to perform the vulnerability fix currently, and therefore, the user operation may be affected.
In this embodiment, the hot patch file is stored in a backup storage area of the system; when an operation instruction input by a user is received, extracting the hot patch file from the backup storage area; and performing vulnerability repair on the system based on the operation instruction and the hot patch file. Through the steps, the steps of vulnerability repair according to the hot patch file are more flexible, the hot patch file is called to carry out vulnerability repair when a user wants to carry out vulnerability repair, the flexibility of vulnerability repair is improved, and when the repair is carried out can be carried out according to the selection of the user.
Further, after the bug fixing is performed on the system based on the operation instruction and the hot patch file, the method further includes:
detecting whether the bug fixing is finished; when the bug repairing is completed, acquiring a replaced file after repairing is completed; comparing the replaced file with the target file; and deleting the hot patch file when the replaced file is the same as the target file.
It should be noted that, because the bug fix needs to be continued for a period of time, the bug fix can be detected in real time or periodically to detect whether the bug fix is completed, and when the bug fix is completed, the replaced file after the fix is completed is obtained.
It should be understood that the source file is file a, and after the bug fix is performed on the hot patch file, the file a is modified to obtain a new file a, where the new file a is a replaced file.
It can be understood that, because the hot patch file is generated according to the object to be replaced, which is different between the target file and the source file, and the bug fixing is performed, the replaced file after the fixing is completed should be the same as the target file, and if the replaced file is different from the target file, it indicates that a certain problem may exist, and the fixing is not successful; if the replaced file is the same as the target file, the bug fix is successful, and since the bug fix is successful, the generated hot patch file plays the role of the replaced file, so that the hot patch file is not meaningful to be continuously left, and the hot patch file can be deleted in order to save storage space.
It should be understood that, by judging whether the bug fixing is successful or not through the above steps, the hot patch file is deleted when the bug fixing is successful, so that the storage space is saved.
In this embodiment, whether the bug fixing is completed is detected; when the bug repairing is completed, acquiring a replaced file after repairing is completed; comparing the replaced file to the target file; and deleting the hot patch file when the replaced file is the same as the target file. The method can detect whether the bug fixing is finished or not, obtain the replaced file after the bug fixing is finished, and delete the hot patch file when the replaced file is the same as the target file, so that the hot patch file can be deleted under the condition of ensuring that the bug fixing is finished, the stored file data is reduced, and the storage capacity of the hard disk is improved.
In the embodiment, source file data of a source file is obtained, and target file data of a target file is obtained; comparing the source file data with the target file data; code or function for determining a difference between the source file data and the target file data according to the comparison result; and taking the distinguished codes or functions as objects to be replaced. Therefore, the object to be replaced is determined by comparing the source file data of the source file with the target file data of the target file, and the accuracy of determining the object to be replaced is guaranteed.
In addition, an embodiment of the present invention further provides a storage medium, where a hot patch file generation program is stored, and the hot patch file generation program implements the steps of the hot patch file generation method described above when executed by a processor.
Since the storage medium adopts all technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and no further description is given here.
In addition, referring to fig. 7, an embodiment of the present invention further provides a hot patch file generating apparatus, where the hot patch file generating apparatus includes:
and the file comparison module 10 is used for comparing the source file with the target file to determine the object to be replaced.
It should be understood that the source file is a file that needs to be replaced and is a file with a vulnerability, the target file is a determined file to be replaced and is a file that has overcome the vulnerability, and the target file may be determined by a user selection or may be determined by a system automatic selection, which is not limited in this embodiment.
It can be understood that source file data of a source file may be acquired, target file data of a target file may be acquired, the source file data and the target file data are compared, a code or a function having a difference between the source file data and the target file data is determined according to a comparison result, the code or the function having the difference is taken as an object to be replaced, and the object to be replaced may also be determined by other comparison methods, which is not limited in this embodiment.
And the target determining module 20 is configured to perform syntax analysis on the target file, and determine target data corresponding to the object to be replaced according to a syntax analysis result.
It should be noted that, the target file data of the target file may be obtained first, the character sequence is extracted from the target file data, the character sequence is converted into a word sequence, the word sequence is parsed based on the language features of the JAVA language to generate a syntax tree to be processed, the syntax tree to be processed is parsed based on the features of the Android and the semantic annotations to obtain a target syntax tree, and the target data corresponding to the object to be replaced is extracted from the target syntax tree.
It should be understood that, since the object to be replaced may be a code or a function, the target data corresponding to the object to be replaced may be code data or function data, which is not limited in this embodiment.
It is understood that the syntax tree is a graphical representation of the sentence structure, which represents the derivation result of the sentence, and is useful for understanding the hierarchy of the sentence syntax structure, that is, the syntax tree is the tree formed when the derivation is performed according to a certain rule.
And a patch generating module 30, configured to generate a DEX bytecode according to the target data, and generate a hot patch file according to the DEX bytecode.
It should be noted that the hot patch refers to some codes capable of repairing a software bug, and is a way to repair a product software bug quickly and at low cost, and a file corresponding to the hot patch is a hot patch file.
It should be understood that, after the target data corresponding to the object to be replaced is determined, a DEX bytecode may be generated according to the target data, and then a hot patch file may be generated according to the DEX bytecode, where the specific steps may be extracting a JAVA source code from the target data, compiling the JAVA source code to obtain a CLASS bytecode, then generating the DEX bytecode according to the CLASS bytecode, generating an APK file according to the DEX bytecode, and using the APK file as a hot patch file, which is also applicable to other manners, and this embodiment is not limited thereto.
It can be understood that, in the embodiment, the hot patch file is generated for the Android system, and the generated hot patch file is a patch file that can directly run in the Android system, so that the bug fixing efficiency can be improved.
In the embodiment, the source file is compared with the target file to determine the object to be replaced; carrying out syntactic analysis on the target file, and determining target data corresponding to the object to be replaced according to a syntactic analysis result; and generating a DEX byte code according to the target data, and generating a hot patch file according to the DEX byte code. The target file is analyzed in syntax to determine the target data corresponding to the object to be replaced, and the hot patch file is generated according to the target data, so that the effect of generating the hot patch file conveniently and quickly is achieved.
In an embodiment, the target determining module 20 is further configured to perform lexical analysis on the target file to obtain to-be-processed data; performing syntactic analysis on the to-be-processed data based on preset language characteristics to generate a to-be-processed syntactic tree; and determining target data corresponding to the object to be replaced according to the syntax tree to be processed.
In an embodiment, the target determining module 20 is further configured to obtain target file data of the target file, and extract a character sequence from the target file data; converting the character sequence into the word sequence; and carrying out syntactic analysis on the word sequence based on preset language features to generate a syntax tree to be processed.
In an embodiment, the target determining module 20 is further configured to extract characters to be processed from the character sequence, and determine a logic sequence corresponding to the characters to be processed; converting the characters to be processed into words to be processed based on a preset word forming rule; and generating a word sequence according to the word to be processed and the logic sequence.
In an embodiment, the target determining module 20 is further configured to combine the word sequences based on preset language features to obtain a grammatical phrase; recognizing a grammar category corresponding to the grammar phrase, and carrying out grammar check on the grammar phrase based on the grammar category; judging whether the grammar checking result is a preset result or not; and when the grammar checking result is the preset result, generating a grammar tree to be processed according to the grammar phrase.
In an embodiment, the target determining module 20 is further configured to perform semantic analysis on the syntax tree to be processed based on a preset semantic annotation, so as to obtain a target syntax tree; and extracting target data corresponding to the object to be replaced from the target syntax tree.
In an embodiment, the target determining module 20 is further configured to obtain a first function stack corresponding to the object to be replaced in the target syntax tree, and obtain a second function stack corresponding to the object to be replaced in the source file; generating change information according to the first function stack and the second function stack; updating the target syntax tree according to the change information to obtain an updated target syntax tree; and extracting target data corresponding to the object to be replaced from the updated target syntax tree.
In an embodiment, the patch generating module 30 is further configured to extract JAVA source code from the target data; compiling the JAVA source code to obtain a CLASS byte code; generating a DEX bytecode according to the CLASS bytecode; and generating a hot patch file according to the DEX byte code.
In an embodiment, the patch generating module 30 is further configured to generate an APK file according to the DEX bytecode; and taking the APK file as a hot patch file.
In an embodiment, the file comparison module 10 is further configured to obtain source file data of a source file, and obtain target file data of a target file; comparing the source file data with the target file data; code or function for determining a difference between the source file data and the target file data according to the comparison result; and taking the code or the function with the difference as an object to be replaced.
In an embodiment, the hot patch file generation apparatus further includes a bug fix module, configured to store the hot patch file in a backup storage area of a system; when an operation instruction input by a user is received, extracting the hot patch file from the backup storage area; and performing vulnerability repair on the system based on the operation instruction and the hot patch file.
In an embodiment, the bug fixing module is further configured to detect whether the bug fixing is completed; when the bug fixing is completed, acquiring a replaced file after the fixing is completed; comparing the replaced file with the target file; and deleting the hot patch file when the replaced file is the same as the target file.
Other embodiments or specific implementation methods of the hot patch file generation apparatus according to the present invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) readable by an estimator as described above, and includes instructions for enabling an intelligent device (e.g. a mobile phone, an estimator, a hot patch file generation device, an air conditioner, or a network hot patch file generation device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (16)

1. A hot patch file generation method is characterized by comprising the following steps:
comparing a source file with a target file to determine an object to be replaced, wherein the source file is a file to be replaced and is a file with a leak, and the target file is a determined file to be replaced and is a file which overcomes the leak;
carrying out syntactic analysis on the target file, and determining target data corresponding to the object to be replaced according to a syntactic analysis result;
generating a DEX byte code according to the target data, and generating a hot patch file according to the DEX byte code;
wherein, comparing the source file with the target file to determine the object to be replaced specifically includes:
acquiring source file data of a source file and acquiring target file data of a target file;
comparing the source file data with the target file data;
code or function for determining a difference between the source file data and the target file data according to the comparison result;
taking the distinguished codes or functions as objects to be replaced;
the parsing the target file and determining the target data corresponding to the object to be replaced according to a parsing result specifically includes:
performing lexical analysis on the target file to obtain data to be processed;
performing syntactic analysis on the data to be processed based on preset language features to generate a syntactic tree to be processed;
and determining target data corresponding to the object to be replaced according to the syntax tree to be processed.
2. The method of hot patch file generation as claimed in claim 1, wherein said data to be processed comprises: a sequence of words;
the lexical analysis is performed on the target file to obtain data to be processed, and the method specifically comprises the following steps:
acquiring target file data of the target file, and extracting a character sequence from the target file data;
converting the character sequence into the word sequence;
correspondingly, the parsing the to-be-processed data based on the preset language features to generate a to-be-processed syntax tree specifically includes:
and carrying out syntactic analysis on the word sequence based on preset language characteristics to generate a syntactic tree to be processed.
3. The method for generating a hot patch file according to claim 2, wherein converting the character sequence into a word sequence specifically includes:
extracting characters to be processed from the character sequence, and determining a logic sequence corresponding to the characters to be processed;
converting the characters to be processed into words to be processed based on a preset word forming rule;
and generating a word sequence according to the word to be processed and the logic sequence.
4. The method for generating a hotpatch file as claimed in claim 2, wherein said parsing said word sequence based on predetermined linguistic features to generate a syntax tree to be processed comprises:
combining the word sequences based on preset language features to obtain grammatical phrases;
recognizing a grammar category corresponding to the grammar phrase, and carrying out grammar check on the grammar phrase based on the grammar category;
judging whether the grammar checking result is a preset result or not;
and when the grammar checking result is the preset result, generating a grammar tree to be processed according to the grammar phrase.
5. The method for generating a hot patch file according to claim 1, wherein the determining target data corresponding to the object to be replaced according to the syntax tree to be processed specifically includes:
performing semantic analysis on the syntax tree to be processed based on preset semantic annotation to obtain a target syntax tree;
and extracting target data corresponding to the object to be replaced from the target syntax tree.
6. The method for generating a hot patch file as claimed in claim 5, wherein the extracting the target data corresponding to the object to be replaced from the target syntax tree specifically comprises:
acquiring a first function stack corresponding to the object to be replaced in the target syntax tree, and acquiring a second function stack corresponding to the object to be replaced in the source file;
generating change information according to the first function stack and the second function stack;
updating the target syntax tree according to the change information to obtain an updated target syntax tree;
and extracting target data corresponding to the object to be replaced from the updated target syntax tree.
7. The method for generating a hot patch file according to any one of claims 1 to 6, wherein the generating a DEX bytecode according to the target data and generating a hot patch file according to the DEX bytecode specifically includes:
extracting JAVA source code from the target data;
compiling the JAVA source code to obtain a CLASS byte code;
generating DEX byte codes according to the CLASS byte codes;
and generating a hot patch file according to the DEX byte code.
8. The method for generating a hot patch file according to claim 7, wherein the generating a hot patch file according to the DEX bytecode specifically includes:
generating an APK file according to the DEX byte code;
and taking the APK file as a hot patch file.
9. The method for generating a hot patch file according to any one of claims 1 to 6, wherein after the generating a DEX bytecode according to the target data and the generating a hot patch file according to the DEX bytecode, the method further comprises:
storing the hot patch file to a backup storage area of a system;
when an operation instruction input by a user is received, extracting the hot patch file from the backup storage area;
and performing vulnerability repair on the system based on the operation instruction and the hot patch file.
10. The method of hot patch file generation as claimed in claim 9, wherein after said bug fix of said system based on said operating instructions and said hot patch file, further comprising:
detecting whether the bug fixing is finished;
when the bug repairing is completed, acquiring a replaced file after repairing is completed;
comparing the replaced file with the target file;
and deleting the hot patch file when the replaced file is the same as the target file.
11. A hot-patch file generation apparatus, characterized by comprising:
the file comparison module is used for comparing the source file with the target file to determine an object to be replaced, wherein the source file is a file to be replaced and is a leaky file, and the target file is a determined file to be replaced and is a file which overcomes the vulnerability;
the target determining module is used for carrying out syntactic analysis on the target file and determining target data corresponding to the object to be replaced according to a syntactic analysis result;
the patch generation module is used for generating a DEX byte code according to the target data and generating a hot patch file according to the DEX byte code;
the file comparison module specifically comprises: acquiring source file data of a source file and acquiring target file data of a target file; comparing the source file data with the target file data; determining a code or function that distinguishes between the source file data and the target file data according to the comparison result; taking the distinguished codes or functions as objects to be replaced;
the target determination module specifically includes: performing lexical analysis on the target file to obtain data to be processed; performing syntactic analysis on the data to be processed based on preset language features to generate a syntactic tree to be processed; and determining target data corresponding to the object to be replaced according to the syntax tree to be processed.
12. The apparatus for generating a hot patch file according to claim 11, wherein the goal determining module specifically includes: performing semantic analysis on the syntax tree to be processed based on preset semantic annotations to obtain a target syntax tree; and extracting target data corresponding to the object to be replaced from the target syntax tree.
13. The apparatus for generating a hot patch file according to claim 11, wherein the patch generating module specifically includes: extracting JAVA source code from the target data; compiling the JAVA source code to obtain a CLASS byte code; generating a DEX bytecode according to the CLASS bytecode; and generating a hot patch file according to the DEX byte code.
14. The apparatus of claim 11, wherein the apparatus further comprises a bug fix module to store the hot patch file to a backup storage area of a system; when an operation instruction input by a user is received, extracting the hot patch file from the backup storage area; and performing vulnerability repair on the system based on the operation instruction and the hot patch file.
15. A hot-patch file generation device characterized by comprising: a memory, a processor and a hotpatch file generation program stored on the memory and executable on the processor, the hotpatch file generation program being configured with steps to implement the hotpatch file generation method as claimed in any one of claims 1 to 10.
16. A storage medium having stored thereon a hot patch file generation program which, when executed by a processor, realizes the steps of the hot patch file generation method according to any one of claims 1 to 10.
CN202010616037.2A 2020-06-30 2020-06-30 Hot patch file generation method, device, equipment and storage medium Active CN111796832B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010616037.2A CN111796832B (en) 2020-06-30 2020-06-30 Hot patch file generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010616037.2A CN111796832B (en) 2020-06-30 2020-06-30 Hot patch file generation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111796832A CN111796832A (en) 2020-10-20
CN111796832B true CN111796832B (en) 2022-11-04

Family

ID=72809801

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010616037.2A Active CN111796832B (en) 2020-06-30 2020-06-30 Hot patch file generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111796832B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306493A (en) * 2020-10-23 2021-02-02 广州博冠信息科技有限公司 Hot repair patch generation method and device, storage medium and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354045A (en) * 2014-08-21 2016-02-24 中兴通讯股份有限公司 Patch making method and apparatus and patch activation method and apparatus
CN105786537A (en) * 2014-12-24 2016-07-20 中兴通讯股份有限公司 Hot patch realization method and device
CN106502725A (en) * 2016-09-30 2017-03-15 歌尔科技有限公司 The upgrade method of application program, equipment and electronic equipment
CN111209004A (en) * 2019-12-30 2020-05-29 北京健康之家科技有限公司 Code conversion method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354045A (en) * 2014-08-21 2016-02-24 中兴通讯股份有限公司 Patch making method and apparatus and patch activation method and apparatus
CN105786537A (en) * 2014-12-24 2016-07-20 中兴通讯股份有限公司 Hot patch realization method and device
CN106502725A (en) * 2016-09-30 2017-03-15 歌尔科技有限公司 The upgrade method of application program, equipment and electronic equipment
CN111209004A (en) * 2019-12-30 2020-05-29 北京健康之家科技有限公司 Code conversion method and device

Also Published As

Publication number Publication date
CN111796832A (en) 2020-10-20

Similar Documents

Publication Publication Date Title
US10146532B2 (en) Apparatus and method for detecting code cloning of software
US10261889B2 (en) Techniques for edit-and-continue and enhanced optimized debugging on optimized code
US7493596B2 (en) Method, system and program product for determining java software code plagiarism and infringement
AU2004232058B2 (en) Method and system for detecting vulnerabilities in source code
CN106951228B (en) Method and device for processing differences in version iteration
CN108139891B (en) Method and system for generating suggestions to correct undefined token errors
US11579856B2 (en) Multi-chip compatible compiling method and device
CN107526625B (en) Java intelligent contract security detection method based on bytecode inspection
US10331425B2 (en) Automated source code adaption to inject features between platform versions
CN107451474B (en) Software bug fixing method and device for terminal
EP2939111A1 (en) Extending a development environment
US7917899B2 (en) Program development apparatus, method for developing a program, and a computer program product for executing an application for a program development apparatus
US9311077B2 (en) Identification of code changes using language syntax and changeset data
KR20190015285A (en) Query optimizer for CPU utilization and code refactoring
WO2018125363A1 (en) Systems and/or methods for type inference from machine code
CN107643893B (en) Program detection method and device
KR20170014613A (en) Electronic Device, Compilation Method, and Computer Readable Recording Medium
CN112612502A (en) Patch generation method, device, equipment and storage medium
US6625807B1 (en) Apparatus and method for efficiently obtaining and utilizing register usage information during software binary translation
CN112230988A (en) Interface document generation method and device, computer equipment and storage medium
CN111796832B (en) Hot patch file generation method, device, equipment and storage medium
CN111596970B (en) Method, device, equipment and storage medium for dynamic library delay loading
CN111158667B (en) Code injection method and device, electronic equipment and storage medium
JP6651974B2 (en) Information processing apparatus, compiling method and compiler program
CN105786465A (en) Scripting language execution method and device

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
GR01 Patent grant
GR01 Patent grant