Confusion file processing method, electronic equipment, storage medium and program product

By adding preset upload plug-ins to the packaging side, automatically uploading obfuscated files and performing classified storage on the server side, the problem of low efficiency in code protection and application abnormal positioning is solved, and the effect of saving labor costs and improving user experience is achieved.

CN119004415APending Publication Date: 2024-11-22上海瑞家信息技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411075720.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In the prior art, code protection methods are difficult to effectively prevent reverse engineering, and manually uploading obfuscated files during application exceptions leads to waste of labor costs and poor user experience.

Method used

Add a pre-installed upload plug-in to the packaging side, automatically upload obfuscated files, and classify and store them on the server side to timely locate application abnormal problems.

Benefits of technology

Save labor costs, improve the efficiency of applying abnormal problem location, improve user experience, and upload obfuscated files in time through pre-installed upload plug-ins, reducing waiting time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119004415A_ABST
    Figure CN119004415A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a confused file processing method, electronic equipment, a storage medium and a program product. In the embodiment of the invention, a preset uploading plug-in is added at a packaging end, and in the process that the packaging end generates an installation package according to an installation package generation task of a target application, if the installation package generation task comprises a confusion task generation mark and an uploading mark, the uploading plug-in is called, and a generated confusion file is uploaded to a server. And thus, the server side can perform subsequent exception positioning on the target application. The mode of automatically uploading the confusion file of the target application through the preset uploading plug-in replaces manual uploading, so that the labor cost is saved. Besides, the preset uploading plug-in is called to upload the generated confusion file, the confusion file can be uploaded in time after the confusion file is generated, the waiting time for uploading the target confusion file after the target application is abnormal is saved, the problem positioning efficiency is improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an obfuscated file processing method, electronic device, storage medium and program product. Background Art

[0002] With the development of computer technology, various programming codes can be installed on various application devices and are widely used in web, app and server development. If the compiled code package is directly applied to the server during code application, once the server is hacked or the file is leaked during the process of uploading the code package, criminals can easily obtain the source code through reverse engineering, infer the code logic, and thus find system vulnerabilities and attack. Therefore, it is a consensus in the industry to protect the code. At present, the way to protect the code is to confuse the code through obfuscation tools and generate an obfuscated file that stores the mapping relationship between the code before and after obfuscation.

[0003] The obfuscated file can be used to analyze and locate the specific problem code on the server side when an exception occurs in the application. Usually, after an exception occurs in the application (APP), the obfuscated file is manually uploaded to the server side, which not only wastes labor costs, but also affects the efficiency of locating the problem, and the user experience is not good. Summary of the invention

[0004] Multiple aspects of the present application provide an obfuscated file processing method, electronic device, storage medium and program product, which are used to save labor costs in obtaining obfuscated files, thereby improving the efficiency of locating application abnormalities based on obfuscated files and enhancing the user experience.

[0005] An embodiment of the present application provides an obfuscated file processing method, which is applied to a packaging end, and the method includes: receiving an installation package generation task for a target application, wherein the installation package generation task includes at least the name and version information of the target application; according to the installation package generation task, obtaining the source code of the target application, and compiling the source code of the target application to obtain an intermediate bytecode file; when the installation package generation task includes an obfuscation task mark, according to the obfuscation task mark, obfuscating the intermediate bytecode file to obtain the obfuscated file of the target application; when the installation package generation task includes an upload task mark, according to the upload task mark, calling a preset upload plug-in to obtain the obfuscated file; uploading the obfuscated file, the name and version information of the target application to a server, so that the server can locate the abnormal problem of the target application according to the abnormal stack information and the obfuscated file generated by the target application.

[0006] Another embodiment of the present application also provides another obfuscated file processing method, which is applied to a server, and the method includes: receiving obfuscated files of at least one application under various version information uploaded by a packaging end, and different version information corresponds to different obfuscated files; the obfuscated files are obtained by obfuscating the intermediate bytecode files of the application according to the obfuscated task mark when the application installation package generation task includes an obfuscated task mark; the packaging end generates corresponding obfuscated files in the process of generating installation package files of each application under various version information and calls a preset upload plug-in to upload the corresponding obfuscated files; according to the name and version information of at least one application, the obfuscated files of at least one application under various version information are classified and stored; receiving target exception stack information sent by a target terminal device, the target exception stack information is stack information generated when an abnormal situation occurs during the operation of a target application on the target terminal device, and the target application is any application of the at least one application; according to the name and version information of the target application, determining the target obfuscated file in the stored obfuscated files; and locating the abnormal problem of the target application according to the target exception stack information and the obfuscated information in the target obfuscated file.

[0007] An embodiment of the present application also provides an electronic device, which includes: a memory and a processor; a computer program is stored in the memory, and the processor is coupled to the memory to execute the computer program to implement the steps in the above method.

[0008] An embodiment of the present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to implement the steps in the above method.

[0009] An embodiment of the present application also provides a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the processor is enabled to implement the steps in the above method.

[0010] In an embodiment of the present application, a preset upload plug-in is added to the packaging end. When the packaging end generates an installation package according to the installation package generation task of the target application, after compiling the source code of the target application to obtain the compiled intermediate bytecode file, if the installation package generation task includes an obfuscation task generation mark, the obfuscated file of the target application is obtained, and if the installation package task includes an upload mark, the upload plug-in is called to upload the obfuscated file to the server. On the one hand, the method of automatically uploading the obfuscated file of the target application through the preset upload plug-in replaces manual uploading, saving labor costs. On the other hand, if there is an upload mark in the packaging task, the preset upload plug-in is called to upload the generated obfuscated file, and the obfuscated file can be uploaded in time after the obfuscated file is generated.

[0011] Furthermore, after receiving obfuscated files of at least one application under various versions, the server classifies and stores the obfuscated files under various version information based on the name and version information of at least one application; after receiving the target exception stack information sent by the target terminal device, the target application can be abnormally located according to the target exception stack information and the obfuscated information in the target obfuscated file. Among them, the obfuscated file is uploaded to the server through a preset upload plug-in during the packaging process of the installation package or after the packaging is completed, rather than being uploaded to the server after the target application has an abnormality, which can save the waiting time for uploading the target obfuscated file after the target application has an abnormality, improve the efficiency of locating the problem, and enhance the user experience; in addition, the obfuscated files are classified and stored on the server according to the application name and version information, which is convenient for timely acquisition of the required target obfuscated files, which is conducive to further improving the efficiency of locating abnormal problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0013] Figure 1 A schematic diagram of the structure of an obfuscated file processing system provided by an exemplary embodiment of the present application;

[0014] Figure 2a A schematic diagram of a flow chart of data processing on a server side provided for another exemplary embodiment of the present application;

[0015] Figure 2b A schematic diagram of another process flow of data processing on the server side provided for another exemplary embodiment of the present application;

[0016] Figure 3 A flowchart of an obfuscated file processing method provided for another exemplary embodiment of the present application;

[0017] Figure 4 A flowchart of another obfuscated file processing method provided for yet another exemplary embodiment of the present application;

[0018] Figure 5 A schematic diagram of the structure of an obfuscated file processing device provided for another exemplary embodiment of the present application;

[0019] Figure 6 A schematic diagram of the structure of another obfuscated file processing device provided by another exemplary embodiment of the present application;

[0020] Figure 7 A schematic structural diagram of an electronic device provided as yet another exemplary embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0022] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0023] In view of the technical problem that manually uploading the obfuscated file to the server after an exception occurs in the application (APP), it will not only waste labor costs, but also affect the efficiency of locating the problem and cause poor user experience. In an embodiment of the present application, a preset upload plug-in is added to the packaging end. In the process of generating an installation package according to the installation package generation task of the target application, the packaging end compiles the source code of the target application to obtain the compiled intermediate bytecode file. If the installation package generation task includes an obfuscation task generation mark, the obfuscated file of the target application is obtained, and if the installation package task includes an upload mark, the upload plug-in is called to upload the obfuscated file to the server. On the one hand, the method of automatically uploading the obfuscated file of the target application through the preset upload plug-in replaces manual uploading, saving labor costs. On the other hand, if there is an upload mark in the packaging task, the preset upload plug-in is called to upload the generated obfuscated file, and the obfuscated file can be uploaded in time after the obfuscated file is generated.

[0024] Furthermore, after receiving obfuscated files of at least one application under various versions, the server classifies and stores the obfuscated files under various version information based on the name and version information of at least one application; after receiving the target exception stack information sent by the target terminal device, the target application can be abnormally located according to the target exception stack information and the obfuscated information in the target obfuscated file. Among them, the obfuscated file is uploaded to the server through a preset upload plug-in during the packaging of the installation package, rather than being uploaded to the server after the target application has an abnormality, which can save the waiting time for uploading the target obfuscated file after the target application has an abnormality, improve the efficiency of locating the problem, and enhance the user experience; in addition, the obfuscated files are classified and stored on the server according to the application name and version information, which is convenient for timely acquisition of the required target obfuscated files, which is conducive to further improving the efficiency of locating abnormal problems.

[0025] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0026] Figure 1 The following is a schematic diagram of the structure of an obfuscated file processing system provided by an exemplary embodiment of the present application. Figure 1 As shown, the system includes: a packaging end 10, a terminal device 20 and a server end 30, and the packaging end 10, the terminal device 20, and the server end 30 are communicatively connected with each other.

[0027] Among them, the communication connection between the packaging end 10, the terminal device 20, and the service end 30 can be a wired or wireless communication connection. Optionally, in the case of wireless communication connection, the communication connection between each end can be achieved through a mobile network. Accordingly, the network standard of the mobile network can be any one of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+ (LTE+), 5G, WiMax or new network standards that will appear in the future. Optionally, each end can also be located in the same local area network. In the case of wireless communication connection, each end can also achieve communication connection through Bluetooth, WiFi, infrared, zigbee or NFC.

[0028] This embodiment does not limit the implementation form of the terminal device 20. The terminal device 20 can be any smart device with a display, communication capability, Internet access capability, and support for user interaction. For example, the terminal device 20 can be a smart handheld device, such as a smart phone, a tablet computer, a desktop device, such as a laptop or a desktop computer, a smart wearable device, such as a smart watch, a smart bracelet, etc., and can also be various smart home appliances with displays, such as a smart TV, a smart large screen, or a smart robot.

[0029] In addition, the terminal device 20 can install various types of applications, and this embodiment does not limit the types of applications, for example, it can be a shopping application, a short video application, or a learning application, etc. In addition, the application can be an independent APP, or a small program that depends on an independent APP (i.e., a main program) to run, and this is not limited.

[0030] This embodiment does not limit the implementation form of the server 30. The server 30 can be a single server device, a single cloud server or a cloud server array, or a virtual machine (VM) or container running in a single cloud server or a cloud server array. In addition, the server 30 can also refer to other computing devices with corresponding service capabilities, such as computers and other terminal devices (running service programs). When the server 30 is a cloud server or virtual machine, the server 30 can be deployed on a physical device.

[0031] In this embodiment, the obfuscated file processing system may further include a development terminal 40, where developers can write source code for each application and store the source code of each application in association with version information of each application locally. The source code is the original script for writing the application, which is usually written in a programming language such as Java, Kotlin or C++. When developers write source code, they need to follow the grammatical rules of the relevant programming language to ensure that the code can run smoothly.

[0032] In this embodiment, the installation package generation task of the target application can be sent from the development end 40 to the packaging end 10. The development end 40 sending the installation package generation task for the target application to the packaging end 10 can be actively triggered by the developer, or the sending time of the installation package generation task for the target application can be set in advance on the development end 40. When the sending time arrives, the development end 40 automatically sends the installation package generation task for the target application to the packaging end 10. This embodiment does not limit this.

[0033] In this embodiment, when a demand for generating an installation package for a target application is generated, the development end 40 sends an installation package generation task for the target application to the packaging end 10; after receiving the installation package generation task for the target application, the packaging end 10 can obtain the source code of the target application according to the installation package generation task.

[0034] The installation package generation task at least includes the name and version information of the target application, for example, the version number of the target application. Accordingly, when obtaining the source code of the target application according to the installation package generation task, the source code of the target application can be obtained from the development end 40 according to the name and version information of the target application. Accordingly, according to the installation package generation task, the source code of the target application is obtained. An optional implementation is to obtain the source code of the target application according to the name and version information of the target application.

[0035] Further, after obtaining the source code of the target application, the packaging end 10 performs a packaging process for the source code of the target application. First, the source code of the target application is compiled to obtain an intermediate bytecode file. During the compilation stage, the compiler converts the original source code into bytecode. For example, the Java compiler (javac) compiles the Java source code into bytecode (.class file), and the Kotlin compiler (kotlinc) compiles the Kotlin source code into bytecode. These bytecode files are cross-platform and can be executed on any device that supports Java or Kotlin.

[0036] Optionally, the source code of the target application is compiled to obtain an intermediate bytecode file, including: obtaining the source code of the target application according to the name and version information of the target application; preprocessing the source code of the target application using the target compiler to obtain a syntax tree, the preprocessing including at least one of lexical analysis, syntax analysis, syntax tree traversal and semantic analysis; converting the syntax tree into an intermediate bytecode using the target compiler to obtain an intermediate bytecode file.

[0037] Among them, lexical analysis refers to using the target compiler to decompose the source code into multiple key codes. Specifically, the lexical analyzer of the target compiler can be used to decompose the source code into a series of morphemes (Tokens), such as morphemes can be keywords, identifiers, constants and operators, etc. Syntax analysis refers to using the target compiler to combine multiple key codes into a syntax tree according to the syntax rules of the source code. Specifically, the syntax analyzer of the target compiler can be used to combine morphemes into syntax units according to the syntax rules of the programming language, and construct an abstract syntax tree. Syntax tree traversal refers to using the target compiler to identify the various key parts in the source code. Specifically, the syntax tree traverser of the target compiler can be used to traverse each node of the syntax tree to identify the various key parts in the code, such as function definitions, loops, conditional statements, etc. Semantic analysis refers to using the target compiler to check the correctness of the semantics of the source code. Specifically, the semantic analyzer of the target compiler can be used to perform semantic analysis on each key part to check the correctness of the semantics of the source code, such as type checking, scope resolution, etc. The target compiler may be, for example, a GCC (GNU Compiler Collection) compiler, an MSVC (Microsoft Visual C++) compiler, a Javac compiler, etc., which is not limited in this embodiment.

[0038] Further optionally, the syntax tree is converted into an intermediate bytecode using a target compiler to obtain an intermediate bytecode file, including: optimizing the syntax tree using a syntax tree optimizer of the target compiler, the optimization at least including eliminating dead code, constant folding, etc.; selecting a suitable intermediate representation for the syntax tree using a representation selector of the target compiler, the intermediate identification form at least including three-address code, four-tuple form, etc.; converting the syntax tree into an intermediate representation (IR) form using a representation converter of the target compiler; optimizing the generated intermediate representation form using an intermediate representation optimizer of the target compiler, the optimization at least including loop optimization, branch optimization, register allocation, etc.; converting the intermediate representation form into a target code using a code generator of the target compiler, the target code being the intermediate bytecode; and outputting the intermediate bytecode file based on the intermediate bytecode.

[0039] Because programming languages ​​are widely used, they are currently more popular programming languages, and programming platforms such as the Java platform can be installed on a large number of different applicable devices and are widely used in web, app and server development. When applying the code, if the compiled package is directly placed on the server, once the server is hacked or the file is leaked during the upload of the compiled package, criminals can easily obtain the code through reverse engineering, infer the code logic, and find system vulnerabilities to attack.

[0040] In response to this, an obfuscation method for obfuscating the compiled code is introduced. The obfuscation method is specifically to add an obfuscation task mark in the installation package generation task. The obfuscation task mark indicates that after the source code is compiled to obtain the intermediate bytecode file, the intermediate bytecode file is obfuscated, and the compiled code is converted into a functionally equivalent but difficult to read and understand form. More specifically, the published code is reorganized and processed to generate an obfuscated file that stores the mapping relationship between the code before and after obfuscation, so that the processed code can perform the same function as the code before processing, and the obfuscated code is difficult to decompile. Even if the decompilation is successful, it is difficult to derive the true semantics of the program. Code obfuscation can effectively increase the difficulty of reverse cracking the application.

[0041] In summary, when the installation package generation task includes an obfuscation task tag, the intermediate bytecode file is obfuscated according to the obfuscation task tag to obtain an obfuscated file of the target application. The obfuscated file may be a mapping file.

[0042] Among them, the obfuscation task mark includes multiple sub-marks, and there is a fixed mark order between the multiple sub-marks. Each sub-mark corresponds to a first local intermediate bytecode in sequence, and the first local intermediate bytecodes corresponding to each sub-mark have an original execution order. Based on this, according to the obfuscation task mark, the intermediate bytecode file is obfuscated to obtain the obfuscated file of the target application, including: while keeping the mark order between the multiple sub-marks unchanged, the multiple first local intermediate bytecodes arranged in the original execution order are positionally obfuscated to obtain the second local intermediate bytecode file corresponding to each sub-mark after position obfuscation; according to the mark order between the multiple sub-marks and the second local intermediate bytecode corresponding to each sub-mark, the obfuscated file of the target application is obtained. For example, multiple sub-tags are arranged in the tag order: tag 1, tag 2, tag 3, tag 4, tag 5, and tag 1 to tag 5 respectively mark the first local intermediate byte code A, the first local intermediate byte code B, the first local intermediate byte code C, the first local intermediate byte code D, and the first local intermediate byte code E. After the position obfuscation process, tag 1 to tag 5 may respectively mark the first local intermediate byte code E, the first local intermediate byte code D, the first local intermediate byte code C, the first local intermediate byte code B, and the first local intermediate byte code A, that is, the bytecode composed in the order of the first local intermediate byte code E, the first local intermediate byte code D, the first local intermediate byte code C, the first local intermediate byte code B, and the first local intermediate byte code A can be regarded as the second intermediate byte code, and the first local intermediate byte code E, the first local intermediate byte code D, the first local intermediate byte code C, the first local intermediate byte code B, and the first local intermediate byte code A are respectively the second local intermediate byte codes at the corresponding local positions of the second intermediate byte code.

[0043] Further, in an embodiment of the present application, an upload task mark can be added to the installation package generation task, and the obfuscated file of the target application can be uploaded according to the upload task mark. Among them, the upload task mark is used to indicate that after the obfuscated file of the target application is generated, it is uploaded to the server 30. In this way, the obfuscated file is uploaded to the server through a preset upload plug-in during the packaging of the installation package, rather than being uploaded to the server after the target application is abnormal. This can save the waiting time for uploading the target obfuscated file after the target application is abnormal, improve the efficiency of problem location, and enhance the user experience. In an embodiment of the present application, the specific implementation method of the upload task mark is not limited. For example, it can be a specific symbol or a specific field in the installation package generation task. Any marking information or marking method that can indicate that the obfuscated file of the target application is uploaded to the server 30 after it is generated is applicable to the embodiment of the present application.

[0044] In some embodiments, according to the upload task mark included in the installation package generation task, the obfuscated file of the target application is uploaded, including: according to the upload task mark, calling the preset upload plug-in to obtain the obfuscated file of the target application; uploading the obfuscated file of the target application and the name and version information of the target application to the server 30, so that the server 30 can locate the abnormal problem of the target application according to the abnormal stack information and obfuscated file generated by the target application. In this embodiment, the traditional packaging end 10 is improved so that the packaging end 10 has the ability to identify the obfuscated task mark and the upload task mark, and the upload plug-in is pre-configured on the packaging end 10, and the packaging end 10 has the ability to call the upload plug-in, so that the packaging end 10 can finally realize the function of automatically uploading the obfuscated file to the server 30 during the installation package file generation process based on the ability to identify the obfuscated task mark and the upload task mark and the ability to call the upload plug-in. Among them, the preset upload plug-in can be, for example, a Gradle plug-in, a FancyUpload plug-in, a SwfUploadPanel plug-in, an uploadify plug-in or a jcUpload plug-in, etc. Among them, the FancyUpload plug-in is a multi-file upload component that uses Flash and Ajax (MooTools) technology to implement an upload progress bar, similar to SWFUpload. The SwfUploadPanel plug-in is a multi-file upload panel developed by combining SwfUpload v2.0.2 and ExtJS2.0.x. The uploadify plug-in is a file upload jQuery plug-in based on Flash technology. The jcUpload plug-in is an Ajax file upload component implemented with Flash and jQuery, which is easy to customize the appearance.

[0045] Optionally, calling a preset upload plug-in to obtain the obfuscated file of the target application includes: determining whether the installation package file is the final version of the installation package file; if so, calling the preset upload plug-in to parse the obfuscated file from the installation package file and upload it to the server 30.

[0046] Optionally, determining whether the installation package file is a final version of the installation package file includes: generating an installation package file of the target application based on the intermediate bytecode file; matching version information of the installation package file of the target application with version information of the final version; if the match is successful, determining that the installation package file is a final version of the installation package file.

[0047] Optionally, in the process of generating the installation package file of the target application based on the intermediate bytecode file, in addition to obfuscating the intermediate bytecode file, at least one of conversion operation, packaging operation, signing operation and alignment operation is performed on the obfuscated file. The following is a detailed description taking the Android system as an example.

[0048] The conversion operation is: after the compilation phase, the bytecode will be processed by the D8 and R8 toolchains of the Android SDK and converted into the DEX (Android executable file) format. The DEX file is a binary format optimized for the Android platform, which is smaller and more efficient than the original bytecode file.

[0049] Packaging operation: The APK packaging tool (aapt or aapt2) of the Android SDK will package the DEX file, resource files (such as pictures, audio, video, etc.) and application metadata (such as AndroidManifest.xml) into a file called unsigned APK. This file contains all the content required for the application to run.

[0050] Signature operation: Since the Android platform requires all applications to have a valid digital signature, developers need to use a key (keychain) to sign the unsigned APK. The purpose of signing is to verify the integrity of the application and to ensure the identity of the source. Signature tools (such as apksigner or jarsigner) will add digital signature information to the APK file.

[0051] Alignment operation: align the signed APK files. This process ensures that the APK files take up less resources when running on the device and increases the application loading speed. The Android SDK provides the zipalign tool to align APK files.

[0052] It should be noted that, when the obfuscation task mark is not included in the installation package generation task, the installation package file of the target application is generated according to the intermediate bytecode file. In this case, the installation package file of the target application is directly generated based on the intermediate bytecode file, and no obfuscation file is generated. Among them, the packaging end 10 has the dual functions of generating obfuscation files and not generating obfuscation files. Whether to generate obfuscation files can be determined by the development end 40 according to application requirements. For some applications with low security requirements or some applications that need to be open source, you can choose not to generate obfuscation files, and directly generate installation package files based on intermediate bytecode files, which can improve the generation efficiency of installation package files and reduce generation costs; on the contrary, for some applications with high security requirements or non-open source, you can choose to generate obfuscation files and generate installation package files based on obfuscation files. In addition, in the case where the obfuscation task mark is not included in the installation package generation task, the packaging end 10 can also determine the application type of the target application based on the name and version information of the target application; compare the application type of the target application with the default application type, and when the application type of the target application is the default application type, after generating the bytecode file, the intermediate bytecode file can be automatically obfuscated to obtain the obfuscated file of the target application, and then generate the installation package file based on the obfuscated file. Among them, the default application type is some application types with higher security requirements, and these applications need to generate installation package files based on obfuscated files by default.

[0053] In this embodiment, the packaging end 10 sends the obfuscated files of at least one application under various version information to the server end 30; correspondingly, the server end 30 receives the obfuscated files of at least one application under various version information uploaded by the packaging end 10, and classifies and stores the obfuscated files of at least one application under various version information according to the name and version information of the at least one application, and stores them in a non-relational database.

[0054] In an alternative embodiment, if Figure 2a As shown, receiving an obfuscated file of at least one application under various version information uploaded by the packaging end 10 includes: running a first listening script, the first listening script is used to listen on a first listening port and receive an obfuscated file of at least one application under various version information uploaded by the packaging end 10.

[0055] Accordingly, according to the name and version information of at least one application, the obfuscated files of at least one application under various version information are classified and stored, including: whenever the first monitoring script receives an obfuscated file, a storage path is assigned to the obfuscated file, and the obfuscated file is stored according to the storage path, such as in the first database; the mapping relationship between the storage path of the obfuscated file and the name and version information of the application to which it belongs is added to the obfuscated file mapping relationship list, and the obfuscated file mapping relationship list is stored, such as in the cache. The obfuscated files are classified and stored at the server 30 according to the application name and version information, which facilitates the timely acquisition of the required target obfuscated files, and is conducive to further improving the efficiency of locating abnormal problems.

[0056] In this embodiment, when an abnormal situation occurs during the operation of the target application by the target terminal device 20, target abnormal stack information is sent to the server 30. The abnormal stack information is stack information generated when an abnormal situation occurs during the operation of the target application, and the target application is any application in at least one application. Accordingly, the server 30 receives the target abnormal stack information and determines the target obfuscated file from the obfuscated files of at least one application under various version information according to the name and version information of the target application.

[0057] In an alternative embodiment, if Figure 2b As shown, receiving the target exception stack information sent by the target terminal device 20 includes: running a second listening script, the second listening script is used to listen to and receive the exception stack information sent by each terminal device 20 on the second listening port; after listening to the target exception stack information sent by any terminal device 20, the target exception stack information and the name and current version information of the target application to which it belongs are associated and stored, such as stored in a second database, and the storage address of the target exception stack information is output, wherein the target exception stack information and the name and current version information of the target application to which it belongs are collectively referred to as the obfuscated crash information. The terminal device 20 that sends the target exception stack information is the target terminal device. The first database can be a relational database, and the second database can be a non-relational database; or, the first database can be a non-relational database, and the second database can be a relational database, which is not limited in this embodiment. Figure 2a and 2b The first database is a relational database and the second database is a non-relational database for exemplary display, but it does not constitute a limitation to the embodiments of the present application.

[0058] Furthermore, after determining the target obfuscation file, the server 30 can also locate the abnormal problem of the target application according to the target exception stack information and the obfuscation information in the target obfuscation file, wherein the target exception stack information at least includes the executed code lines and their obfuscated execution order and the abnormal description information.

[0059] In an optional embodiment, according to the obfuscation information in the target exception stack information and the target obfuscation file, the target application is located for the exception problem, including: according to the storage address of the target exception stack information, the target exception stack information and the name and current version information of the target application to which it belongs are obtained from the second database; according to the name and current version information of the target application to which the target exception stack belongs, the obfuscation file mapping relationship list is queried to determine the storage path of the target obfuscation file corresponding to the target application under the current version information; according to the storage path of the target obfuscation file, the target obfuscation file is read from the first database, and the target obfuscation file at least includes the original execution order and the obfuscation execution order corresponding to each code line before and after the obfuscation; according to the obfuscation execution order of the run code line contained in the target exception stack information, the restoration operation is performed, and the original execution order of the run code line is determined from the target obfuscation file; according to the run code line, the original execution order of the run code line and the exception description information, the problem code in the run code line is determined. Among them, after determining the original execution order of the run code line, the original execution order of the run code line can also be stored in the first database.

[0060] Furthermore, the obfuscated file processing system also includes: a management end, which has a display page, and the display page can display the problem code in the executed code line to facilitate developers to view the problem code.

[0061] The technical solution provided by the above-mentioned embodiments of the present application is to add a preset upload plug-in to the packaging end. When the packaging end generates an installation package according to the installation package generation task of the target application, after compiling the source code of the target application to obtain the compiled intermediate bytecode file, if the installation package generation task includes an obfuscation task generation mark, the obfuscated file of the target application is obtained, and if the installation package task includes an upload mark, the upload plug-in is called to upload the obfuscated file to the server. On the one hand, the method of automatically uploading the obfuscated file of the target application through the preset upload plug-in replaces manual uploading, saving labor costs. On the other hand, if there is an upload mark in the packaging task, the preset upload plug-in is called to upload the generated obfuscated file, and the obfuscated file can be uploaded in time after the obfuscated file is generated.

[0062] Furthermore, after receiving obfuscated files of at least one application under various versions, the server classifies and stores the obfuscated files under various version information based on the name and version information of at least one application; after receiving the target exception stack information sent by the target terminal device, the target application can be abnormally located according to the target exception stack information and the obfuscated information in the target obfuscated file. Among them, the obfuscated file is uploaded to the server through a preset upload plug-in during the packaging of the installation package, rather than being uploaded to the server after the target application has an abnormality, which can save the waiting time for uploading the target obfuscated file after the target application has an abnormality, improve the efficiency of locating the problem, and enhance the user experience; in addition, the obfuscated files are classified and stored on the server according to the application name and version information, which is convenient for timely acquisition of the required target obfuscated files, which is conducive to further improving the efficiency of locating abnormal problems.

[0063] Figure 3 A flowchart of a method for processing obfuscated files provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the method includes:

[0064] 301. Receive an installation package generation task for a target application, where the installation package generation task includes at least the name and version information of the target application;

[0065] 302. According to the installation package generation task, the source code of the target application is obtained, and the source code of the target application is compiled to obtain an intermediate bytecode file;

[0066] 303. When the installation package generation task includes an obfuscation task mark, the intermediate bytecode file is obfuscated according to the obfuscation task mark to obtain an obfuscated file of the target application;

[0067] 304. When the installation package generation task includes an upload task tag, a preset upload plug-in is called according to the upload task tag to obtain the obfuscated file;

[0068] 305. Upload the obfuscated file and the name and version information of the target application to the server, so that the server can locate the abnormal problem of the target application according to the abnormal stack information and the obfuscated file generated by the target application.

[0069] In some embodiments, according to the installation package generation task, the source code of the target application is obtained, and the source code of the target application is compiled to obtain an intermediate bytecode file, including: obtaining the source code of the target application according to the name and version information of the target application; selecting a target compiler according to the programming language of the source code; using the target compiler to preprocess the source code of the target application to obtain a syntax tree; using the target compiler to convert the syntax tree into an intermediate bytecode to obtain an intermediate bytecode file.

[0070] Further optionally, it also includes: based on the intermediate bytecode file, performing at least one of conversion operation, packaging operation, signing operation and alignment operation on the obfuscated file to generate an installation package file of the target application.

[0071] In some embodiments, the obfuscation task tag includes multiple sub-tags, the multiple sub-tags have a fixed tag order, each sub-tag corresponds to a first local intermediate bytecode in sequence, and the first local intermediate bytecodes corresponding to each sub-tag have an original execution order. Accordingly, according to the obfuscation task tag, the intermediate bytecode file is obfuscated to obtain the obfuscated file of the target application, including: while keeping the tag order between the multiple sub-tags unchanged, the multiple first local intermediate bytecodes arranged in the original execution order are positionally obfuscated to obtain the second local intermediate bytecode file corresponding to each sub-tag after the position obfuscation; according to the tag order between the multiple sub-tags and the second local intermediate bytecode corresponding to each sub-tag, the obfuscated file of the target application is obtained.

[0072] In some embodiments, calling a preset upload plug-in to obtain an obfuscated file includes: determining whether the installation package file is the final version of the installation package file; if so, calling the preset upload plug-in to parse the obfuscated file from the installation package file and upload it to the server.

[0073] Further optionally, when the obfuscation task mark is not included in the installation package generation task, at least one of conversion operation, packaging operation, signing operation, alignment operation and packaging operation is performed according to the intermediate bytecode file to generate an installation package file of the target application.

[0074] The detailed implementation and beneficial effects of each step in the method of this embodiment have been described in detail in the aforementioned embodiments and will not be elaborated here.

[0075] Figure 4 A flowchart of another obfuscated file processing method provided in an embodiment of the present application. The method is applied to the server, such as Figure 4 As shown, the method includes:

[0076] 401. Receive obfuscated files of at least one application under various version information uploaded by the packaging end, where different version information corresponds to different obfuscated files; the obfuscated files are obtained by obfuscating the intermediate bytecode files of the application according to the obfuscated task mark when the application installation package generation task includes an obfuscated task mark; the packaging end generates the corresponding obfuscated files in the process of generating the installation package files of each application under various version information and calls a preset upload plug-in to upload the obfuscated files;

[0077] 402. Classify and store obfuscated files of at least one application under various version information according to the name and version information of at least one application;

[0078] 403. Receive target exception stack information sent by the target terminal device, where the target exception stack information is stack information generated when an exception occurs during the running of a target application on the target terminal device, and the target application is any application of at least one application;

[0079] 404. Determine a target obfuscated file from obfuscated files of at least one application under various version information according to the name and version information of the target application;

[0080] 405. According to the target exception stack information and the obfuscation information in the target obfuscation file, locate the exception problem of the target application.

[0081] In some embodiments, receiving an obfuscated file of at least one application under various version information uploaded by a packaging end includes: running a first listening script, the first listening script being used to listen on a first listening port and receive an obfuscated file of at least one application under various version information uploaded by a packaging end.

[0082] Correspondingly, according to the name and version information of at least one application, the obfuscated files of at least one application under various version information are classified and stored, including: whenever the first listening script receives an obfuscated file, a storage path is assigned to the obfuscated file, and the obfuscated file is stored according to the storage path, such as storing the obfuscated file in the first database according to the storage path; the mapping relationship between the storage path of the obfuscated file and the name and version information of the application to which it belongs is added to the obfuscated file mapping relationship list, and the obfuscated file mapping relationship list is stored, such as in a cache.

[0083] In some embodiments, receiving target exception stack information sent by a target terminal device includes: running a second listening script, the second listening script being used to listen to and receive exception stack information sent by each terminal device on a second listening port; after listening to the target exception stack information sent by any terminal device, the target exception stack information and the name and current version information of the target application to which it belongs are associated and stored, such as storing in a second database, and outputting the storage address of the target exception stack information.

[0084] In some embodiments, the target exception stack information at least includes the executed code lines and their obfuscated execution order and exception description information. Accordingly, according to the obfuscated information in the target exception stack information and the target obfuscated file, the target application is located for the exception problem, including: obtaining the target exception stack information and the name and current version information of the target application to which it belongs according to the storage address of the target exception stack information; querying the obfuscated file mapping relationship list according to the name and current version information of the target application to which the target exception stack information belongs to determine the storage path of the target obfuscated file corresponding to the target application under the current version information; reading the target obfuscated file according to the storage path of the target obfuscated file, the target obfuscated file at least including the original execution order of each code line before and after obfuscation and the obfuscated execution order after obfuscation; determining the original execution order of the executed code line from the target obfuscated file according to the obfuscated execution order of the executed code line contained in the target exception stack information; determining the problem code in the executed code line according to the executed code line, the original execution order of the executed code line and the exception description information.

[0085] The detailed implementation and beneficial effects of each step in the method of this embodiment have been described in detail in the aforementioned embodiments and will not be elaborated here.

[0086] Figure 5 The following is a schematic diagram of the structure of an obfuscated file processing device provided in an embodiment of the present application. Figure 5 As shown, the device comprises:

[0087] The task receiving module 51 is used to receive an installation package generation task for a target application, where the installation package generation task includes at least the name and version information of the target application;

[0088] A code acquisition module 52 is used to acquire the source code of the target application according to the installation package generation task, and compile the source code of the target application to obtain an intermediate bytecode file;

[0089] The obfuscation processing module 53 is used to perform obfuscation processing on the intermediate bytecode file according to the obfuscation task mark when the installation package generation task includes an obfuscation task mark, so as to obtain an obfuscated file of the target application;

[0090] The plug-in calling module 54 is used to call a preset upload plug-in according to the upload task mark to obtain the obfuscated file when the installation package generation task includes an upload task mark;

[0091] The upload module 55 is used to upload the obfuscated file, the name and version information of the target application to the server, so that the server can locate the abnormal problem of the target application according to the abnormal stack information and the obfuscated file generated by the target application.

[0092] Further optionally, it also includes: a generation module, which is used to perform at least one of conversion operations, packaging operations, signing operations, and alignment operations on the obfuscated file based on the intermediate bytecode file to generate an installation package file for the target application.

[0093] In some embodiments, the code acquisition module 52 generates a task based on the installation package, acquires the source code of the target application, and compiles the source code of the target application to obtain an intermediate bytecode file. The code acquisition module 52 is specifically used to: acquire the source code of the target application based on the name and version information of the target application; select a target compiler based on the programming language of the source code; use the target compiler to preprocess the source code of the target application to obtain a syntax tree; use the target compiler to convert the syntax tree into an intermediate bytecode to obtain an intermediate bytecode file.

[0094] In some embodiments, the obfuscation task tag includes multiple sub-tags, and there is a fixed tag order between the multiple sub-tags. Each sub-tag corresponds to a first local intermediate bytecode in sequence, and the first local intermediate bytecodes corresponding to each sub-tag have an original execution order. Accordingly, when the obfuscation processing module 53 performs obfuscation processing on the intermediate bytecode file according to the obfuscation task tag to obtain the obfuscated file of the target application, it is specifically used to: while keeping the tag order between the multiple sub-tags unchanged, perform position obfuscation processing on the multiple first local intermediate bytecodes arranged in the original execution order to obtain the second local intermediate bytecode file after position obfuscation processing corresponding to each sub-tag; according to the tag order between the multiple sub-tags and the second local intermediate bytecode corresponding to each sub-tag, obtain the obfuscated file of the target application.

[0095] In some embodiments, the plug-in calling module 54, when used to call a preset upload plug-in to obtain an obfuscated file, is specifically used to: determine whether the installation package file is the final version of the installation package file; if so, call the preset upload plug-in to parse the obfuscated file from the installation package file and upload it to the server.

[0096] Further optionally, the generation module is also used to generate an installation package file for the target application by performing conversion operations, packaging operations, signing operations, alignment operations, and at least one of packaging operations according to the intermediate bytecode file when the obfuscation task mark is not included in the installation package generation task.

[0097] The detailed implementation methods and beneficial effects of the execution steps of each module in the method of this embodiment have been described in detail in the aforementioned embodiments and will not be elaborated here.

[0098] Figure 6 This is a schematic diagram of the structure of another obfuscated file processing device provided in an embodiment of the present application. Figure 6As shown, the device comprises:

[0099] The obfuscated file receiving module 61 is used to receive obfuscated files of at least one application under various version information uploaded by the packaging end, and different version information corresponds to different obfuscated files; the obfuscated file is obtained by obfuscating the intermediate bytecode file of the application according to the obfuscated task mark when the application installation package generation task includes an obfuscated task mark; the packaging end generates the corresponding obfuscated file in the process of generating the installation package file of each application under various version information and calls the preset upload plug-in to upload the obfuscated file;

[0100] The obfuscated file storage module 62 is used to classify and store obfuscated files of at least one application under various version information according to the name and version information of at least one application;

[0101] The stack information receiving module 63 is used to receive target exception stack information sent by the target terminal device, where the target exception stack information is stack information generated when an exception occurs during the operation of a target application on the target terminal device, and the target application is any application in at least one application;

[0102] The obfuscated file determination module 64 is used to determine the target obfuscated file from the stored obfuscated files according to the name and version information of the target application;

[0103] The problem locating module 65 is used to locate the abnormal problem of the target application according to the target abnormal stack information and the obfuscation information in the target obfuscation file.

[0104] In some embodiments, when the file receiving module 61 is used to receive obfuscated files of at least one application under various version information uploaded by the packaging end, it is specifically used to: run a first listening script, and the first listening script is used to listen on a first listening port and receive obfuscated files of at least one application under various version information uploaded by the packaging end.

[0105] Accordingly, when the file storage module 62 is used to classify and store obfuscated files of at least one application under various version information according to the name and version information of at least one application, it is specifically used to: whenever the first listening script receives an obfuscated file, assign a storage path to the obfuscated file, and store the obfuscated file according to the storage path, such as storing the obfuscated file in the first database; add the mapping relationship between the storage path of the obfuscated file and the name and version information of the application to which it belongs to a list of obfuscated file mapping relationships, and store the list of obfuscated file mapping relationships, such as storing it in a cache.

[0106] In some embodiments, when the stack information receiving module 63 is used to receive the target exception stack information sent by the target terminal device, it is specifically used to: run a second listening script, the second listening script is used to listen to and receive the exception stack information sent by each terminal device on the second listening port; after listening to the target exception stack information sent by any terminal device, the target exception stack information and the name and current version information of the target application to which it belongs are associated and stored, such as storing it in a second database, and outputting the storage address of the target exception stack information.

[0107] In some embodiments, the target exception stack information at least includes the executed code lines and their obfuscated execution order and exception description information. When the problem location module 65 is used to locate the exception problem of the target application according to the obfuscated information in the target exception stack information and the target obfuscated file, it is specifically used to: obtain the target exception stack information and the name and current version information of the target application to which it belongs from the second database according to the storage address of the target exception stack information; query the obfuscated file mapping relationship list according to the name and current version information of the target application to which the target exception stack information belongs, so as to determine the storage path of the target obfuscated file corresponding to the target application under the current version information; read the target obfuscated file from the first database according to the storage path of the target obfuscated file, and the target obfuscated file at least includes the original execution order corresponding to each code line before and after obfuscation and the obfuscated execution order corresponding to the obfuscation after obfuscation; determine the original execution order of the executed code line from the target obfuscated file according to the obfuscated execution order of the executed code line contained in the target exception stack information; determine the problem code in the executed code line according to the executed code line, the original execution order of the executed code line and the exception description information.

[0108] The detailed implementation methods and beneficial effects of the execution steps of each module in the method of this embodiment have been described in detail in the aforementioned embodiments and will not be elaborated here.

[0109] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device includes: a memory 70a and a processor 70b; the memory 70a stores a computer program, and the processor 70b is coupled to the memory 70a and is used to execute the computer program to implement the following steps:

[0110] An installation package generation task for a target application is received, wherein the installation package generation task includes at least the name and version information of the target application; according to the installation package generation task, the source code of the target application is obtained, and the source code of the target application is compiled to obtain an intermediate bytecode file; when an obfuscation task mark is included in the installation package generation task, the intermediate bytecode file is obfuscated according to the obfuscation task mark to obtain an obfuscated file of the target application; when an upload task mark is included in the installation package generation task, a preset upload plug-in is called according to the upload task mark to obtain the obfuscated file; the obfuscated file and the name and version information of the target application are uploaded to a server, so that the server can locate the abnormal problem of the target application according to the abnormal stack information and the obfuscated file generated by the target application.

[0111] Further optionally, the processor 70b is also used to perform at least one of a conversion operation, a packaging operation, a signing operation, and an alignment operation on the obfuscated file based on the intermediate bytecode file to generate an installation package file of the target application.

[0112] In some embodiments, the processor 70b generates a task based on the installation package, obtains the source code of the target application, and compiles the source code of the target application to obtain an intermediate bytecode file. The processor 70b is specifically used to: obtain the source code of the target application based on the name and version information of the target application; select a target compiler based on the programming language of the source code; use the target compiler to preprocess the source code of the target application to obtain a syntax tree; use the target compiler to convert the syntax tree into an intermediate bytecode to obtain an intermediate bytecode file.

[0113] In some embodiments, the obfuscation task tag includes multiple sub-tags, the multiple sub-tags have a fixed tag order, each sub-tag corresponds to a first local intermediate bytecode in sequence, and the first local intermediate bytecodes corresponding to each sub-tag have an original execution order. Accordingly, according to the obfuscation task tag, the intermediate bytecode file is obfuscated to obtain the obfuscated file of the target application, including: while keeping the tag order between the multiple sub-tags unchanged, the multiple first local intermediate bytecodes arranged in the original execution order are positionally obfuscated to obtain the second local intermediate bytecode file corresponding to each sub-tag after the position obfuscation; according to the tag order between the multiple sub-tags and the second local intermediate bytecode corresponding to each sub-tag, the obfuscated file of the target application is obtained.

[0114] In some embodiments, when the processor 70b is used to call a preset upload plug-in to obtain an obfuscated file, it is specifically used to: determine whether the installation package file is the final version of the installation package file; if so, call the preset upload plug-in to parse the obfuscated file from the installation package file and upload it to the server.

[0115] Further optionally, the processor 70b is also used to generate an installation package file of the target application by performing conversion operations, packaging operations, signing operations, alignment operations and at least one of packaging operations according to the intermediate bytecode file when the obfuscation task mark is not included in the installation package generation task.

[0116] Similarly, based on the structure of the above electronic device, the processor 70b is coupled to the memory 70a to execute the computer program to implement the following steps:

[0117] Receive obfuscated files of at least one application under various version information uploaded by the packaging end, and different version information corresponds to different obfuscated files; the obfuscated files are obtained by obfuscating the intermediate bytecode files of the application according to the obfuscation task mark when the obfuscation task mark is included in the application installation package generation task; the packaging end generates the corresponding obfuscated files in the process of generating the installation package files of each application under various version information and calls a preset upload plug-in to upload the obfuscated files; according to the name and version information of at least one application, the obfuscated files of at least one application under various version information are classified and stored; receive target exception stack information sent by the target terminal device, the target exception stack information is the stack information generated when an abnormal situation occurs during the operation of the target application on the target terminal device, and the target application is any application of the at least one application; according to the name and version information of the target application, determine the target obfuscated file in the obfuscated files storing at least one application under various version information; locate the abnormal problem of the target application according to the target exception stack information and the obfuscated information in the target obfuscated file.

[0118] In some embodiments, when the processor 70b is used to receive obfuscated files of at least one application under various version information uploaded by the packaging end, it is specifically used to: run a first listening script, and the first listening script is used to listen on a first listening port and receive obfuscated files of at least one application under various version information uploaded by the packaging end.

[0119] Accordingly, when the processor 70b is used to classify and store obfuscated files of at least one application under various version information according to the name and version information of at least one application, it is specifically used to: whenever the first listening script receives an obfuscated file, assign a storage path to the obfuscated file, and store the obfuscated file according to the storage path, such as storing the obfuscated file in the first database; add the mapping relationship between the storage path of the obfuscated file and the name and version information of the application to which it belongs to a list of obfuscated file mapping relationships, and store the list of obfuscated file mapping relationships, such as storing it in a cache.

[0120] In some embodiments, when the processor 70b is used to receive target exception stack information sent by a target terminal device, it is specifically used to: run a second listening script, the second listening script is used to listen to and receive exception stack information sent by each terminal device on a second listening port; after listening to the target exception stack information sent by any terminal device, the target exception stack information and the name and current version information of the target application to which it belongs are associated and stored, such as storing it in a second database, and outputting the storage address of the target exception stack information.

[0121] In some embodiments, the target exception stack information at least includes the executed code lines and their obfuscated execution order and exception description information. When the processor 70b is used to locate the exception problem of the target application according to the obfuscated information in the target exception stack information and the target obfuscated file, it is specifically used to: obtain the target exception stack information and the name and current version information of the target application to which it belongs from the second database according to the storage address of the target exception stack information; query the obfuscated file mapping relationship list according to the name and current version information of the target application to which the target exception stack information belongs, so as to determine the storage path of the target obfuscated file corresponding to the target application under the current version information; read the target obfuscated file from the first database according to the storage path of the target obfuscated file, and the target obfuscated file at least includes the original execution order corresponding to each code line before and after obfuscation and the obfuscated execution order corresponding to the obfuscation after obfuscation; determine the original execution order of the executed code line from the target obfuscated file according to the obfuscated execution order of the executed code line contained in the target exception stack information; determine the problem code in the executed code line according to the executed code line, the original execution order of the executed code line and the exception description information.

[0122] In addition, if Figure 7 As shown, the electronic device also includes: a communication component 70c, a display 70d, a power component 70e, an audio component 70f and other components. Figure 7 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 7 Components shown.

[0123] The detailed implementation methods and beneficial effects of the steps executed by each device in the method of this embodiment have been described in detail in the aforementioned embodiments and will not be elaborated on here.

[0124] An embodiment of the present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to implement the steps in the above method embodiment.

[0125] An embodiment of the present application also provides a computer program product, which includes a computer program / instruction. When the computer program / instruction is executed by a processor, the processor is enabled to implement the steps in the above method embodiment.

[0126] The above-mentioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0127] The above-mentioned communication component is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

[0128] The above-mentioned display includes a screen, and the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0129] The power supply assembly provides power to various components of the device where the power supply assembly is located. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply assembly is located.

[0130] The above-mentioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (Microphone, MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.

[0131] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-readable storage media (including but not limited to disk storage, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage, etc.) containing computer-usable program code.

[0132] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0133] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0134] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0135] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interface, network interface and memory.

[0136] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0137] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0138] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0139] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for processing obfuscated files, characterized in that: Applied to the packaging end, the method includes: Receiving an installation package generation task for a target application, wherein the installation package generation task includes at least the name and version information of the target application; According to the installation package generation task, the source code of the target application is obtained, and the source code of the target application is compiled to obtain an intermediate bytecode file; In the case where the installation package generation task includes an obfuscation task mark, the intermediate bytecode file is obfuscated according to the obfuscation task mark to obtain an obfuscated file of the target application; In the case where the installation package generation task includes an upload task mark, calling a preset upload plug-in according to the upload task mark to obtain the obfuscated file; The obfuscated file, the name and version information of the target application are uploaded to the server, so that the server can locate the abnormal problem of the target application according to the abnormal stack information generated by the target application and the obfuscated file.

2. The method according to claim 1, characterized in that: Also includes: Based on the obfuscated file, at least one of a conversion operation, a packaging operation, a signing operation, and an alignment operation is performed on the obfuscated file to generate an installation package file of the target application.

3. The method according to claim 1, characterized in that According to the installation package generation task, the source code of the target application is obtained, and the source code of the target application is compiled to obtain an intermediate bytecode file, including: Acquire the source code of the target application according to the name and version information of the target application; Selecting a target compiler according to the programming language of the source code; Preprocessing the source code of the target application using the target compiler to obtain a syntax tree; The target compiler is used to convert the syntax tree into an intermediate bytecode to obtain an intermediate bytecode file.

4. The method according to claim 1, characterized in that: The obfuscation task tag includes a plurality of sub-tags, the plurality of sub-tags have a fixed tag order, each sub-tag corresponds to a first local intermediate bytecode in sequence, and the first local intermediate bytecodes corresponding to each sub-tag have an original execution order; According to the obfuscation task mark, the intermediate bytecode file is obfuscated to obtain the obfuscated file of the target application, including: Under the condition that the tag order between the multiple sub-tags remains unchanged, the multiple first partial intermediate bytecodes arranged in the original execution order are subjected to position obfuscation processing to obtain a second partial intermediate bytecode file after the position obfuscation processing corresponding to each sub-tag; The obfuscated file of the target application is obtained according to the tag order between the multiple sub-tags and the second local intermediate bytecode corresponding to each sub-tag.

5. The method according to claim 2, characterized in that: Call the preset upload plug-in to obtain the obfuscated file, including: Determine whether the installation package file is a final version of the installation package file; If so, the preset upload plug-in is called to parse the obfuscated file from the installation package file and upload it to the server.

6. The method according to claim 1, characterized in that Also includes: When the obfuscation task mark is not included in the installation package generation task, at least one of conversion operation, packaging operation, signing operation, alignment operation and packaging operation is performed according to the intermediate bytecode file to generate the installation package file of the target application.

7. A method for processing obfuscated files, characterized in that: Applied to the server, including: Receive obfuscated files of at least one application under various version information uploaded by the packaging end, where different version information corresponds to different obfuscated files; the obfuscated files are obtained by obfuscating the intermediate bytecode files of the application according to the obfuscated task mark when the application installation package generation task includes the obfuscated task mark; the packaging end generates the corresponding obfuscated files in the process of generating the installation package files of each application under various version information and calls a preset upload plug-in to upload the obfuscated files; According to the name and version information of the at least one application, classified and stored the obfuscated files of the at least one application under various version information; Receiving target exception stack information sent by a target terminal device, wherein the target exception stack information is stack information generated when an exception occurs during the running of a target application on the target terminal device, and the target application is any application of the at least one application; Determine a target obfuscated file from the stored obfuscated files according to the name and version information of the target application; According to the target exception stack information and the obfuscation information in the target obfuscation file, the abnormal problem of the target application is located.

8. The method according to claim 7, characterized in that Receive obfuscated files of at least one application under various version information uploaded by the packaging end, including: Running a first monitoring script, wherein the first monitoring script is used to monitor and receive obfuscated files of the at least one application under various version information uploaded by the packaging end on a first monitoring port; Accordingly, according to the name and version information of the at least one application, the obfuscated files of the at least one application under various version information are classified and stored, including: Whenever the first monitoring script receives an obfuscated file, a storage path is allocated to the obfuscated file, and the obfuscated file is stored according to the storage path; The mapping relationship between the storage path of the obfuscated file and the name and version information of the application to which it belongs is added to the obfuscated file mapping relationship list, and the obfuscated file mapping relationship list is stored.

9. The method according to claim 7, characterized in that: Receive target exception stack information sent by the target terminal device, including: Running a second monitoring script, wherein the second monitoring script is used to monitor and receive exception stack information sent by each terminal device on a second monitoring port; After monitoring the target exception stack information sent by any terminal device, the target exception stack information and the name and current version information of the target application to which it belongs are associated and stored, and the storage address of the target exception stack information is output.

10. The method according to claim 9, characterized in that The target exception stack information at least includes the executed code lines and their obfuscated execution order and exception description information; According to the target exception stack information and the obfuscation information in the target obfuscation file, locating the abnormal problem of the target application includes: According to the storage address of the target exception stack information, the target exception stack information and the name and current version information of the target application to which the target exception stack information belongs are obtained; According to the name and current version information of the target application to which the target exception stack information belongs, query the obfuscation file mapping relationship list to determine the storage path of the target obfuscation file corresponding to the target application under the current version information; Reading the target obfuscated file according to the storage path of the target obfuscated file, wherein the target obfuscated file at least includes the original execution order of each code line before obfuscation and the obfuscated execution order of each code line after obfuscation; Determining the original execution order of the executed code lines from the target obfuscated file according to the obfuscated execution order of the executed code lines contained in the target exception stack information; Determine the problematic code in the executed code line according to the executed code line, the original execution order of the executed code line and the exception description information.

11. An electronic device, characterized in that: include: Memory and processor; The memory stores a computer program, and the processor is coupled to the memory for executing the computer program to implement the steps in the method according to any one of claims 1 to 6 or 7 to 10.

12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is enabled to implement the steps of the method according to any one of claims 1 to 6 or 7 to 10.

13. A computer program product, characterized in that The computer program product comprises a computer program / instruction, which, when executed by a processor, enables the processor to implement the steps of any one of the methods of claims 1-6 or 7-10.