Application Processing Method and Apparatus, Electronic Device, Computer Readable Storage Medium
By analyzing application installation packages to measure and modify code similarity, the method addresses the issue of unnecessary rejections by ensuring distinct code, enhancing the efficiency of application processing.
Patent Information
- Application Number
- CN202410642442.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2044-05-22
AI Technical Summary
In the prior art, applications are rejected due to high similarity to existing applications when submitting application store review, especially when there is a large amount of the same code in the business strategy and product route, resulting in an incorrect rejection.
By obtaining the application installation package, measuring the similarity between applications, determining the application to be processed, and performing similarity reduction processing on its code, generating the processed installation package, and using decompilation and modification of the bytecode or source code to reduce the similarity.
Quantitative measurement and targeted reduction of similarity between applications are achieved, labor costs are reduced, and the success rate of application passing audit is improved.
Smart Images

Figure CN118427635B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial computers, specifically to the technical fields such as program processing, and particularly to an application processing method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] In the tide of the digital economy, application programs have become key products with rapid growth and far-reaching influence. Despite the detailed documents on how to pass application reviews, thousands of application submissions are still rejected by the app store every day.
[0003] One reason for the app store to reject new application programs is that it is found to be "similar" to existing application programs. Therefore, if a developer's application program heavily borrows from existing application programs, or looks like a derivative of the original application program, the corresponding application program is highly likely to be rejected. Summary of the Invention
[0004] The present disclosure provides an application processing method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
[0005] According to a first aspect, there is provided an application processing method, the method comprising: obtaining application installation packages of at least two applications; based on the application installation packages, measuring the similarity between any two of the at least two applications to obtain a similarity measurement result between any two applications; based on the similarity measurement result, determining a to-be-processed application among the at least two applications; and based on the installation package of the to-be-processed application, performing similarity reduction processing on the code of the to-be-processed application and generating a processed installation package of the to-be-processed application.
[0006] According to a second aspect, there is provided an application processing apparatus, the apparatus comprising: an obtaining unit configured to obtain application installation packages of at least two applications; a measuring unit configured to measure the similarity between any two of the at least two applications based on the application installation packages to obtain a similarity measurement result between any two applications; a determining unit configured to determine a to-be-processed application among the at least two applications based on the similarity measurement result; and a processing unit configured to perform similarity reduction processing on the code of the to-be-processed application based on the installation package of the to-be-processed application and generate a processed installation package of the to-be-processed application.
[0007] According to a third aspect, there is provided an electronic device, the electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in any implementation manner of the first aspect.
[0008] According to a fourth aspect, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method described in any implementation manner of the first aspect.
[0009] According to a fifth aspect, there is provided a computer program product including a computer program which, when executed by a processor, implements the method described in any implementation manner of the first aspect.
[0010] For the application processing method and apparatus provided in the embodiments of the present disclosure, first, obtain application installation packages of at least two applications; secondly, based on the application installation packages, measure the similarity between any two of the at least two applications to obtain a similarity measurement result between any two applications; thirdly, based on the similarity measurement result, determine a to-be-processed application among the at least two applications; finally, based on the installation package of the to-be-processed application, perform a similarity reduction process on the code of the to-be-processed application and generate a processed installation package of the to-be-processed application. Thus, based on the application installation packages, the similarity between any two applications is measured, providing a means for quantifying and measuring the similarity formed by the applications themselves, and the specific value of the similarity between the codes of the applications can be traced back from the result; based on the installation package of the to-be-processed application, a similarity reduction process is performed on the to-be-processed application to obtain a processed installation package, and a targeted similarity reduction work can be carried out, effectively achieving the goal of reducing the similarity between different applications and saving labor costs.
[0011] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understandable through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:
[0013] Figure 1 is a flowchart of an embodiment of the application processing method according to the present disclosure;
[0014] Figure 2 is a schematic structural diagram of the present disclosure for processing applications and software toolkits;
[0015] Figure 3 is a flowchart of another embodiment of the application processing method according to the present disclosure;
[0016] Figure 4 is a schematic structural diagram of an embodiment of the application processing apparatus according to the present disclosure;
[0017] Figure 5 is a block diagram of an electronic device for implementing the application processing method of the embodiments of the present disclosure. Detailed implementation manners
[0018] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to assist in understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, descriptions of well-known functions and structures are omitted below for clarity and conciseness.
[0019] A business strategy usually has several different product lines, and these product lines correspond to different mobile applications (Apps). When these mobile applications are first submitted to the app store or when an application for version upgrade is submitted to the app store, they often encounter the problem of being "misjudged" by the store's review system. The main reason is that the store's review system believes that there is a large amount of identical code in these different mobile applications, and thus believes that these mobile applications submitted for review are "similar", resulting in a rejection operation. However, these mobile applications are software carriers for normal R & D based on business strategies and product lines, involving multiple different businesses. During the R & D process, a commonly used R & D mode in the industry to improve production efficiency is to unify the basic framework layers of various types and functions in the software source code. Corresponding to the code level, it is manifested as a highly reusable form. And this mode will inevitably cause a large amount of completely identical source code content in different mobile applications. As a result, it triggers a "misjudged" rejection operation by the store during the review process.
[0020] In the traditional technology, the similarity between multiple applications cannot be effectively compared intuitively and quantitatively. The commonly used means are as follows: starting from the source code corresponding to each application. First, carefully sort out and compare all the source code of a typical project in an application program, and estimate the overall proportion of similar code and different code in the source code through manual statistics and calculations, and make an overall estimate by lines.
[0021] In the traditional technology, for the case where the source code of the SDK (Software Development Kit) cannot be obtained at all, the statistics of the SDK source code that cannot be obtained are cancelled, and only the self-developed part of the source code of the mobile application and the similar SDK are statistically analyzed, and the measurement of the application similarity is relatively rough.
[0022] In order to effectively measure the similarity of applications and reduce the similarity between similar applications, the present disclosure proposes an application processing method. Figure 1 Flow 100 according to an embodiment of the application processing method of the present disclosure is shown. The above application processing method includes the following steps:
[0023] Step 101: Obtain the application installation packages of at least two applications.
[0024] In this embodiment, an installer package is a file used for installing and uninstalling software programs, usually containing all components, dependent libraries, configuration information, etc. of the application program. In this embodiment, the applications involved all refer to application programs, and the application installation package is the installation package of the application program, that is, the application installation package is a file used for installing and uninstalling the application program. The application installation packages of at least two applications mean that each application among the at least two applications has its own application installation package, and the application programs in the at least two application programs can be installed or uninstalled through the application installation package.
[0025] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of the involved application installation packages are performed after authorization and comply with relevant laws and regulations.
[0026] In this embodiment, the at least two applications may include applications that have been published in the application store or applications to be published to the application store. At this time, it is impossible to know whether each application among the at least two applications is similar and the similarity situation.
[0027] Optionally, the at least two applications may include applications that have been published in a third-party platform or applications to be published to the third-party platform. At this time, it is impossible to know whether each application among the at least two applications is similar and the similarity situation.
[0028] Step 102: Based on the application installation packages, measure the similarity between any two applications among the at least two applications to obtain the similarity measurement result between any two applications.
[0029] In this embodiment, the application installation package includes the bytecode of the source code for compiling the application program. By decompiling the bytecode, most of the source code of the application program can be restored. The above step 102 includes: determining the bytecode of each application among the at least two applications based on the application installation packages of the at least two applications; decompiling the bytecode of each application to obtain the decompiled source code of each application; performing discrete processing on the decompiled source code to obtain multiple code units in the decompiled source code; calculating the similarity between the code units of any two applications among the at least two applications to obtain a code unit group with a similarity greater than the similarity threshold; dividing the number of code units in the code unit group multiplied by two by the number of all code units in the any two applications to obtain a similarity ratio; in response to the similarity ratio being greater than the similarity threshold, determining that the similarity measurement result between the any two applications is that the any two applications are similar.
[0030] In this embodiment, the above code unit is a word or symbol in the code. By discretizing the decompiled source code at the word or symbol granularity, the similarity between applications can be effectively measured, providing a reliable measurement means for reducing the similarity between applications. The above similarity threshold can be determined based on development requirements. For example, the similarity threshold is 80%.
[0031] In this embodiment, from the perspective of the application store, measuring the similarity between any two of at least two applications through the application installation package provides a reliable measurement means for the measurement of application similarity.
[0032] As Figure 2 shown, the similarity measurement system is used to implement step 102 to obtain the similarity measurement result between any two applications. The interaction mode of the similarity measurement system can be a script automation mode. The similarity measurement system has a visual management platform. There are two options on the entry page for comparing similarities on the platform, corresponding to the application installation packages of two applications respectively.
[0033] Step 103, based on the similarity measurement result, determine the application to be processed among at least two applications.
[0034] In this embodiment, the application to be processed is an application that needs to regenerate the installation package. By processing the application to be processed or its installation package, a processed installation package of the application to be processed can be generated.
[0035] In this embodiment, the similarity measurement result includes: two applications are similar, or two applications are not similar. The above step 103 includes: in response to the similarity measurement result including that two applications are similar, determining the importance levels of the two applications in the similarity measurement result; determining the application with the lower importance level among the two applications as the application to be processed. Generally, applications with higher importance levels are not allowed to change the installation package. Therefore, the similarity of the application with a lower importance level among the two similar applications is reduced.
[0036] Step 104, based on the installation package of the application to be processed, perform similarity reduction processing on the code of the application to be processed and generate a processed installation package of the application to be processed.
[0037] In this embodiment, the code of the application to be processed can be the source code of the application to be processed, or the code of the application to be processed can also be the bytecode of the application to be processed. Bytecode refers to the intermediate code that has been compiled but is independent of specific machine code and needs to be translated by an interpreter before it can become machine code.
[0038] In this embodiment, the similarity reduction processing means converting the current code of the application to be processed into another code, and the converted code does not affect the function of the application to be processed.
[0039] In this embodiment, different similarity reduction processes can be performed based on the existence of the source code of the application to be processed. The above step 104 includes: detecting whether the application to be processed has source code (for example, by looking up a table, etc.); in response to detecting that the application to be processed has source code, determining the source code of the application to be processed based on the installation package of the application to be processed; modifying the source code so that the modified source code is completely different from the source code of each application among at least two applications, and generating a processed installation package of the application to be processed based on the modified source code. It should be noted that obtaining the installation package from the source code of the application can be processed through specific tools on a specific platform, and the process of obtaining the processed installation package from the modified source code will not be elaborated here.
[0040] Optionally, the above step 104 may further include: in response to detecting that the application to be processed does not have source code, obtaining the bytecode of the application to be processed based on the installation package of the application to be processed; modifying the bytecode of the application to be processed to obtain application bytecode; and generating a processed installation package of the application to be processed based on the application bytecode. Here, the application bytecode is the modified bytecode of the application to be processed, and compared with the bytecode of the application to be processed, the application bytecode does not affect the function of the application.
[0041] The above step 104 may further include: replacing the application installation package of the application to be processed with the processed installation package, and then, based on the processed installation package, measuring the similarity between the application to be processed and the other applications among at least two applications except the application to be processed, determining the similarity measurement result between the application to be processed and the other applications, and verifying the processing effect of the similarity reduction process by the similarity measurement result between the application to be processed and the other applications.
[0042] In this embodiment, the above application processing method may further include: sending the processed installation package to the application store, which can ensure that the judgment result of the application store for the application to be processed is: not similar to other applications.
[0043] As Figure 2 shown, the inter-application obfuscation system is used to implement step 103 and step 104 to obtain the processed installation packages of each application. The interaction of the inter-application obfuscation system is fully automated and can achieve full automation processing during the compilation period. The user only needs to integrate the tool chain into the project in the project engineering and make corresponding configurations. In the CI / CD stage of the project, full automation processing will be achieved through the tool chain, and the resulting product is an obfuscated apk / aab installation package. Comparing the processed product with the product not processed by this system, the similarity is reduced.
[0044] The application processing method provided by the embodiments of the present disclosure can be completely quantified and measured based on the similarity of the application's own composition. The specific value of the code similarity between applications can be traced back from the results, so as to carry out targeted similarity reduction work. The processing process of the present disclosure can be implemented from multiple scenarios and trial directions to effectively achieve the goal of reducing the similarity between mobile applications corresponding to different services.
[0045] The application processing method provided by the embodiments of the present disclosure includes: first, obtaining the application installation packages of at least two applications; second, based on the application installation packages, measuring the similarity between any two of the at least two applications to obtain the similarity measurement results between any two applications; third, based on the similarity measurement results, determining the application to be processed among the at least two applications; finally, based on the installation package of the application to be processed, performing similarity reduction processing on the code of the application to be processed and generating the processed installation package of the application to be processed. Thus, based on the application installation packages, measuring the similarity between any two applications provides a means for quantifying and measuring the similarity of the application's own composition, and the specific value of the code similarity between applications can be traced back from the results; based on the installation package of the application to be processed, performing similarity reduction processing on the application to be processed to obtain the processed installation package can carry out targeted similarity reduction work, effectively achieving the goal of reducing the similarity between different applications and saving labor costs.
[0046] In some embodiments of the present disclosure, the above application processing method further includes: detecting whether there are the same software toolkits in the application installation packages; in response to detecting that there are the same software toolkits in the application installation packages, detecting whether there is the source code of the software toolkits; in response to detecting that there is no source code of the software toolkits, modifying the bytecode in the software toolkits to obtain the toolkit bytecode; adding the toolkit bytecode to the installation package of the application corresponding to the software toolkits.
[0047] Figure 3 Flow 300 shows another embodiment of the application processing method according to the present disclosure. The above application processing method includes the following steps:
[0048] Step 301, obtaining the application installation packages of at least two applications.
[0049] Step 302, based on the application installation packages, measuring the similarity between any two of the at least two applications to obtain the similarity measurement results between any two applications.
[0050] Step 303, based on the similarity measurement results, determining the application to be processed among the at least two applications.
[0051] Step 304: Based on the installation package of the application to be processed, reduce the similarity of the code of the application to be processed and generate a processed installation package of the application to be processed.
[0052] It should be understood that the operations and features in the above Step 301 - Step 304 respectively correspond to the operations and features in Step 101 - 104. Therefore, the descriptions of the operations and features in Step 101 - 104 above also apply to Step 301 - Step 304 and will not be elaborated here.
[0053] Step 305: Detect whether there is the same software development kit in the application installation package; if it is detected that there is the same software development kit in the application installation package, execute Step 306; if it is not detected that there is the same software development kit in the application installation package, execute Step 308.
[0054] In this embodiment, the software development kit (SDK) is a set of tools, libraries, documents, and sample codes designed specifically for developing software or applications for a certain platform or service. By using the SDK, it is convenient to utilize the functions and interfaces provided by the target platform or service without having to write a large amount of underlying code by oneself.
[0055] Step 306: Detect whether there is the source code of the software development kit; if it is detected that there is no source code of the software development kit, execute Step 307; if it is detected that there is the source code of the software development kit, execute Step 309.
[0056] In this embodiment, the source code is also the source code. The source code of the software development kit refers to the code of the most original program for writing the software development kit and is also the program code written in a certain programming language.
[0057] Step 307: Modify the bytecode in the software development kit to obtain toolkit bytecode; add the toolkit bytecode to the installation package of the application corresponding to the software development kit, and then execute Step 308.
[0058] In this embodiment, the above-mentioned modification of the bytecode in the software development kit to obtain toolkit bytecode includes: exhaustively listing the generation strategies of the bytecode of the software development kit, generating various sub-bytecodes using each generation strategy, and each sub-bytecode does not affect the actual function of the software development kit; adding various sub-bytecodes to the bytecode in the software development kit to obtain at least two kinds of toolkit bytecodes of the software development kit; the above-mentioned adding the toolkit bytecode to the installation package of the application corresponding to the software development kit includes: adding each kind of toolkit bytecode to the installation packages of the respective applications corresponding to the software development kit so that the bytecodes of the software development kits in the installation packages of the respective applications are completely different.
[0059] In this embodiment, in the case of no source code, all the files that make up the software toolkit have been compiled into JAVA platform binary files when the SDK is output. The modification of the bytecode of the software toolkit includes: modifying the bytecode of specific files of the software toolkit. Among them, for application integration requirements, the specific files can be the jar / aar files of the software toolkit.
[0060] Optionally, the bytecode of the software toolkit can also be modified based on the characteristics of each application to obtain the toolkit bytecode of each application; the toolkit bytecode of each application is added to the installation package of each application. Among them, the above-mentioned each application refers to each application among all applications that have the same software toolkit in the application installation package. The above-mentioned modification of the bytecode of the software toolkit based on the characteristics of each application to obtain the toolkit bytecode of each application includes: setting unique bytecode for the application according to the unique business characteristics of each application relative to other applications, and adding the unique bytecode to the bytecode of the software toolkit of the application, so as to achieve the purpose of modifying the bytecode of the software toolkit.
[0061] As Figure 2 shown in an example, App A to App E are all applications among at least two applications. The boxed application framework is the application installation package of the application, and SDK X is the same software toolkit among at least two applications. At this time, the same software toolkit can be the software toolkit in two similar applications or the software toolkit in two dissimilar applications. In Figure 2 , SDK X is processed by an internal SDK processing system or an external SDK processing system to obtain SDKX-A corresponding to App A, SDK X-B corresponding to App B, SDK X-C corresponding to App C, SDK X-D corresponding to App D, and SDKX-E corresponding to App E. Among them, SDK X-A to SDK X-E are all modified software toolkits relative to SDK X. The modified software toolkits of each application are sequentially integrated under each application. Among them, the internal SDK processing system is used to modify the source code of the software toolkit with source code to obtain the modified source code; the external SDK processing system is used to modify the bytecode of the software toolkit without source code to obtain the toolkit bytecode.
[0062] In this embodiment, the internal SDK processing system can be a script system for processing the internal SDK that holds the SDK source code. The execution process of the script system is on the local machine, so there are many links and processes that require a large amount of manual intervention. To achieve an automated effect, the internal SDK processing system can be optimized by integrating with the CI / CD platform. After the optimization and upgrade, the interaction of the system is transferred from the local machine to the CI / CD platform. Any source code repository corresponding to an SDK on the CI / CD platform can mount this system. After mounting, the target product is directly produced during the execution of CI. The process resources corresponding to the target product can be snapshotted and stored.
[0063] In this embodiment, the external SDK refers to various SDKs directly dependent on the project or through Maven dependencies. The characteristics of these SDKs are non-self-developed and all come from third parties. The external SDK processing system can implement the technical processing process of modifying the bytecode for a specific SDK, ultimately achieving the purpose of modifying the internal code of the specific SDK. For bytecode modification, the external SDK processing system can adopt two optimization methods with a parallel relationship.
[0064] The first optimization method is to develop an automated script. The local JAVA execution process is combined with the automated script for control and scheduling. The overall entry point for the user is the script entry point, the input is the SDK to be processed, and the processed SDK is the output. The script processing omits a large number of intermediate links that require manual intervention. Both the SDK file to be processed and the processed SDK file are on the local machine. However, manual participation is still required in the execution and parameter adjustment of the script. The second optimization method is to fully automate the system by developing an automated toolchain based on the Gradle plugin, and incorporate the "JAVA bytecode modification technical solution for the SDK" into the plugin itself to achieve fully automated processing of the entire process of external SDKs without SDK source code during the compilation period.
[0065] Step 308, end.
[0066] Step 309, modify the source code to obtain the modified source code; add the modified source code to the installation package corresponding to the software toolset, and then execute Step 308.
[0067] In this embodiment, the modification of the source code to obtain the modified source code includes: enumerating the generation strategies of the source code of the software toolkit, generating various sub-codes using each generation strategy, and each sub-code does not affect the actual function of the software toolkit; adding various sub-source codes to the source code in the software toolkit to obtain at least two toolkit bytecode source codes of the software toolkit; the above-mentioned adding the toolkit bytecode source code to the installation package of the application corresponding to the software toolkit includes: adding each toolkit bytecode source code to the installation packages of the respective applications corresponding to the software toolkit, so that the source code of the software toolkit in each application installation package is completely different.
[0068] Optionally, it is also possible to modify the source code of the software toolkit based on the respective characteristics of each application to obtain the modified source code of each application; add the toolkit bytecode source code of each application to the installation package of each application. Among them, the above-mentioned each application refers to each application among all applications with the same software toolkit in the application installation package, and the above-mentioned modifying the source code of the software toolkit based on the respective characteristics of each application to obtain the toolkit bytecode source code of each application includes: setting a unique source code for the application according to the unique business characteristics of the application relative to other applications, where the unique source code does not apply the functions of the software toolkit, and adding the unique source code to the source code of the software toolkit of the application to achieve the purpose of modifying the source code of the software toolkit.
[0069] The application processing method provided in this embodiment, when detecting that at least two application installation packages have the same software toolkit, detects whether there is the source code of the software toolkit; when there is no source code of the software toolkit, modifies the bytecode in the software toolkit, and adds the toolkit bytecode to the installation package of the application corresponding to the software toolkit. Thus, the purpose of modifying the software toolkit without source code is achieved, and the similarity of the software toolkit is reduced; when detecting that there is the source code of the software toolkit, modifying the source code can make the same software toolkits in each of the at least two applications different in terms of source code and compilation process, and does not affect the functions of each application, reducing the similarity of each application and improving the user experience.
[0070] Optionally, the above-mentioned application processing method further includes: detecting whether there are the same software toolkits in the application installation package; in response to detecting that there are the same software toolkits in the application installation package, detecting whether there is the source code of the software toolkit; in response to detecting that there is no source code of the software toolkit, modifying the names of the software toolkits of different applications so that the same software toolkits in each application installation package have different names; adding the software toolkits with different names to the installation packages of the respective applications.
[0071] Optionally, the above application processing method further includes: in response to detecting source code with the same software toolkit, detecting whether the same software toolkit belongs to similar applications in the similarity metric result; if it is detected that the same software toolkit belongs to similar applications in the similarity metric result, no processing is performed on the same software toolkit.
[0072] In this embodiment, since the same software toolkit belongs to similar applications in the similarity metric result, when performing similarity reduction processing on the applications to be processed in similar applications, similarity reduction processing will be performed on the same software toolkit.
[0073] In some alternative implementation manners of the present disclosure, the above-mentioned in response to detecting source code with a software toolkit, modifying the source code to obtain the modified source code includes: determining the modification type of the software toolkit based on the composition and characteristics of the source code of the software toolkit; modifying the source code based on the modification type to obtain the modified source code.
[0074] In this alternative implementation manner, various modification types can be set for the software toolkit based on the composition and characteristics, and the source code composition, characteristics, and modification types are recorded in a table. After obtaining the composition and / or characteristics of different software toolkits, the modification type of the software toolkit can be obtained by looking up this table.
[0075] In this alternative implementation manner, the source code of the software toolkit refers to a code collection that encapsulates specific functions or interfaces. The composition of the source code of the software toolkit includes: different combinations of functions or interfaces; the characteristics of the source code include: the specific functional characteristics of different functions or interfaces.
[0076] In this embodiment, the modification types include: adding a code block and adding an assignment statement. Among them, the added code block refers to a code program with an operation strategy, and the operation strategy can be a conventional mathematical operation, such as addition and subtraction; the added assignment statement refers to defining a variable and continuously assigning values to the variable; generally, compared with adding a code block, the memory occupied by the source code after adding an assignment statement is relatively large. Based on the composition and characteristics of the source code of the software toolkit, determine the size of the space occupied by the source code; based on the space occupied by the source code, determine the modification type, and use the modification type to modify the source code to obtain the modified source code.
[0077] The method for modifying the source code provided by this alternative implementation manner first determines the modification type of the software toolkit based on the composition and characteristics of the source code of the software toolkit; modifies the source code based on the modification type to obtain the modified source code, which improves the diversity and reliability of the modified source code.
[0078] In some alternative implementations of the present disclosure, the above method of measuring the similarity between any two of at least two applications based on the application installation package to obtain the similarity measurement result between any two applications includes: decompiling the application installation package to obtain the disassembly language code; obtaining the program code based on the disassembly language code; discretizing the program code to obtain multiple code units of at least two applications; for any two of at least two applications, calculating the Jaccard coefficient value of the two applications based on the same code units and different code units in the two applications; and in response to the Jaccard coefficient value satisfying the similarity measurement condition, determining that the similarity measurement result between the two applications among at least two applications is that the two applications are similar.
[0079] In this alternative implementation, the Jaccard coefficient value is the value obtained by calculating the Jaccard coefficient. The Jaccard coefficient is used to compare the differences and similarities between two samples. Given two sets A and B, the Jaccard coefficient of the two sets is the intersection of A and B divided by the union of A and B. The higher the Jaccard coefficient, the higher the similarity between the two samples.
[0080] In this alternative implementation, for the applications running under the current operating system, the above method of decompiling the application installation package to obtain the disassembly language code includes: decompiling the application installation package of the application to generate the disassembly language code corresponding to the virtual machine of the current operating system. For example, if the current operating system is the Android system, the disassembly language code is smali code (the disassembly language of the Android virtual machine). The above method of obtaining the program code based on the disassembly language code includes: restoring the smali code to Java code.
[0081] The method for obtaining the similarity measurement result provided by this alternative implementation decompiles the application installation package to obtain the disassembly language code; obtains the program code based on the disassembly language code; discretizes the program code to obtain multiple code units; calculates the Jaccard coefficient value for any two of at least two applications based on the same code units and different code units in the two applications; and when the Jaccard coefficient value satisfies the similarity measurement condition, determines that the similarity measurement result between the two applications is that the two applications are similar, which improves the accuracy of measuring the similarity between applications.
[0082] In some alternative implementations of the present disclosure, the above method of determining the application to be processed among at least two applications based on the similarity measurement result includes: in response to the similarity measurement result indicating that two applications are similar, detecting whether both applications are applications to be released; and in response to both applications being applications to be released, taking any one of the two applications or the two applications as the application to be processed.
[0083] In this alternative implementation, the application to be released is the application to be released to the application store. After obtaining the application to be released, the application store compares the similarity between the application to be released and the installed packages of the released applications. Treating the application to be released as the application to be processed can perform similarity reduction processing on the application to be processed in advance to prevent the application store from rejecting the application to be released. Among them, the released application refers to the application that has been released in the application store, and the released application is the application that has undergone similarity detection by the application store.
[0084] The method for determining the application to be processed among two applications provided by this alternative implementation, when the two applications are similar, if both applications are applications to be released, either one of the two applications or the two applications are regarded as the application to be processed, which improves the reliability of obtaining the application to be processed.
[0085] Optionally, based on the similarity measurement result, determining the application to be processed among at least two applications further includes: in response to having an application to be released and a released application among the two applications, regarding the application to be released as the application to be processed.
[0086] In some alternative implementations of the present disclosure, the above-mentioned method of reducing the similarity of the code of the application to be processed based on the installed package of the application to be processed and generating the processed installed package of the application to be processed includes: determining the application source code of the application to be processed based on the installed package of the application to be processed; modifying the application source code to obtain the modified application source code; generating the processed installed package of the application to be processed based on the modified application source code.
[0087] In this alternative implementation, the code of the application to be processed is the application source code of the application to be processed. The application source code refers to the code of the most original program for writing the application, and the working language used by the programmer during the process of writing the program is the application source code.
[0088] In this alternative implementation, modifying the application source code to obtain the modified application source code includes: adding a code block to the application source code, and the code block is the code that does not affect the function of the application source code, so as to obtain the modified application source code.
[0089] The method for generating the processed installed package of the application to be processed provided by this alternative implementation, when the application to be processed has application source code, by modifying the application source code of the application to be processed and generating the processed installed package of the application to be processed based on the modified application source code, is easy to implement and improves the reliability of obtaining the processed installed package.
[0090] In some alternative implementations of the present disclosure, the above-mentioned method of reducing the similarity of the code of the application to be processed based on the installation package of the application to be processed and generating a processed installation package of the application to be processed includes: determining the bytecode of the application to be processed based on the installation package of the application to be processed; modifying the bytecode of the application to be processed to obtain application bytecode; and generating a processed installation package of the application to be processed based on the application bytecode.
[0091] In this alternative implementation, the code of the application to be processed is the bytecode in the installation package of the application to be processed. When there is no application source code for the application to be processed, it is possible to directly modify the bytecode in the installation package of the application to be processed to reduce the similarity between the application to be processed and other applications, which is simple to implement and provides a reliable implementation method for obtaining the processed installation package of the application to be processed.
[0092] In some alternative implementations of the present disclosure, the above-mentioned method of modifying the bytecode of the application to be processed to obtain application bytecode includes: running a pre-set code processing plug-in to enable the code processing plug-in to generate random bytecode and inserting the random bytecode into the bytecode of the application to be processed to obtain application bytecode.
[0093] In this alternative implementation, a plug-in (also known as addin, add-in, addon or add-on, and also translated as plug-in) is a program written according to a certain specification of an application programming interface. It can only run on the system platform specified by the program (possibly supporting multiple platforms) and cannot run independently of the specified platform because the plug-in needs to call the function library or data provided by the original pure system.
[0094] In this alternative implementation, the code processing plug-in is a pre-set plug-in that can randomly generate random bytecode with the function of not affecting the application. Compared with scripts or programs, the code processing plug-in realizes integration and improves the effect of automatic code processing.
[0095] The method for obtaining application bytecode provided by this alternative implementation improves the reliability of obtaining application bytecode by generating and inserting random bytecode for the application to be processed through a pre-set code processing plug-in.
[0096] In some alternative implementations of the present disclosure, the above-mentioned method of reducing the similarity of the code of the application to be processed based on the installation package of the application to be processed and generating a processed installation package of the application to be processed includes: determining the bytecode of the application to be processed based on the installation package of the application to be processed; obtaining the decompiled source code of the application to be processed based on the bytecode of the application to be processed; modifying the decompiled source code to obtain the modified source code; and generating a processed installation package of the application to be processed based on the modified source code.
[0097] In this alternative implementation, the decompiled source code is the code obtained after decompiling the bytecode of the application to be processed.
[0098] In this alternative implementation, modifying the decompiled source code to obtain the modified source code means: adding a module that does not affect the application function to the decompiled source code to obtain the modified source code. Among them, the module that does not affect the application function can be a code block or an assignment statement written in the language of the decompiled source code, etc.
[0099] In this alternative implementation, after obtaining the modified source code, the modified source code can be processed by conventional configuration and packaging tools to obtain the processed installation package. That is, the method of generating the processed installation package from the modified source code is the same as the traditional method of generating the installation package from the source code.
[0100] The method for obtaining the processed installation package provided by this alternative implementation first obtains the bytecode of the application to be processed, obtains the decompiled source code based on the bytecode of the application to be processed, modifies the decompiled source code to obtain the modified source code; based on the modified source code, generates the processed installation package of the application to be processed, providing a reliable implementation for obtaining the processed installation package.
[0101] Further referring to Figure 4 , as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an application processing device. This device embodiment corresponds to Figure 1 the method embodiment shown, and this device can be specifically applied to various electronic devices.
[0102] As shown in Figure 4 , the application processing device 400 provided in this embodiment includes: an acquisition unit 401, a measurement unit 402, a determination unit 403, and a processing unit 404. Among them, the above-mentioned acquisition unit 401 can be configured to acquire the application installation packages of at least two applications. The above-mentioned measurement unit 402 can be configured to measure the similarity between any two of the at least two applications based on the application installation packages to obtain the similarity measurement result between any two applications. The above-mentioned determination unit 403 can be configured to determine the application to be processed among the at least two applications based on the similarity measurement result. The above-mentioned processing unit 404 can be configured to reduce the similarity of the code of the application to be processed based on the installation package of the application to be processed and generate the processed installation package of the application to be processed.
[0103] In this embodiment, in the application processing device 400: the specific processing of the acquisition unit 401, the measurement unit 402, the determination unit 403, and the processing unit 404 and the technical effects brought by them can be respectively referred to Figure 1For the relevant descriptions of steps 101, 102, 103, and 104 in the corresponding embodiments, they will not be elaborated here.
[0104] In some alternative implementation manners of this embodiment, the above device 400 further includes: a first detection unit (not shown in the figure), and the first detection unit is configured to detect whether there is the same software toolkit in the application installation package; in response to detecting that there is the same software toolkit in the application installation package, detect whether there is the source code of the software toolkit; in response to detecting that there is no source code of the software toolkit, modify the bytecode in the software toolkit to obtain toolkit bytecode; and add the toolkit bytecode to the installation package of the application corresponding to the software toolkit.
[0105] In some alternative implementation manners of this embodiment, the above device 400 further includes: a second detection unit (not shown in the figure), and the second detection unit can be configured to: in response to detecting that there is the source code of the software toolkit, modify the source code to obtain the modified source code; and add the modified source code to the installation package corresponding to the software toolkit.
[0106] In some alternative implementation manners of this embodiment, the second detection unit is further configured to: determine the modification type of the software toolkit based on the composition and features of the source code of the software toolkit; and modify the source code based on the modification type to obtain the modified source code.
[0107] In some alternative implementation manners of this embodiment, the above metric unit 402 is further configured to: decompile the application installation package to obtain the disassembly language code; obtain the program code based on the disassembly language code; discretize the program code to obtain multiple code units of at least two applications; for any two of the at least two applications, calculate the Jaccard coefficient value of the two applications based on the same code units and different code units in the two applications; and in response to the Jaccard coefficient value satisfying the similarity metric condition, determine that the similarity metric result between the two applications is that the two applications are similar.
[0108] In some alternative implementation manners of this embodiment, the above determination unit 403 is further configured to: in response to the similarity metric result that two applications are similar, detect whether both of the two applications are applications to be released; and in response to both of the two applications being applications to be released, take any one of the two applications or the two applications as the application to be processed.
[0109] In some alternative implementation manners of this embodiment, the above processing unit 404 is further configured to: determine the application source code of the application to be processed based on the installation package of the application to be processed; modify the application source code to obtain the modified application source code; and generate the processed installation package of the application to be processed based on the modified application source code.
[0110] In some alternative implementation manners of this embodiment, the above processing unit 404 is further configured to: determine the bytecode of the application to be processed based on the installation package of the application to be processed; modify the bytecode of the application to be processed to obtain the application bytecode; and generate the processed installation package of the application to be processed based on the application bytecode.
[0111] In some alternative implementation manners of this embodiment, the above processing unit 404 is further configured to: run a pre-set code processing plug-in to enable the code processing plug-in to generate random bytecodes and insert the random bytecodes into the bytecode of the application to be processed to obtain the application bytecode.
[0112] In some alternative implementation manners of this embodiment, the above processing unit 404 is further configured to: determine the bytecode of the application to be processed based on the installation package of the application to be processed; obtain the decompiled source code of the application to be processed based on the bytecode of the application to be processed; modify the decompiled source code to obtain the modified source code; and generate the processed installation package of the application to be processed based on the modified source code.
[0113] For the application processing apparatus provided in the embodiment of the present disclosure, first, the acquisition unit 401 acquires the application installation packages of at least two applications; second, the measurement unit 402 measures the similarity between any two of the at least two applications based on the application installation packages to obtain the similarity measurement result between any two applications; third, the determination unit 403 determines the application to be processed among the at least two applications based on the similarity measurement result; and finally, the processing unit 404 reduces the similarity of the code of the application to be processed based on the installation package of the application to be processed to obtain the processed installation package of the application to be processed. Thus, from the perspective of the application store, by measuring the similarity between any two applications based on the application installation packages, a quantization and measurement means is provided for the similarity formed by the applications themselves, and the specific value of the code similarity between the applications can be traced back from the result; by reducing the similarity of the application to be processed based on the installation package of the application to be processed to obtain the processed installation package, targeted similarity reduction work can be carried out, effectively achieving the goal of reducing the similarity between different applications and saving labor costs.
[0114] In the technical solution of the present disclosure, the processing of collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information involved all complies with the provisions of relevant laws and regulations and does not violate public order and good customs.
[0115] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, and a computer program product.
[0116] Figure 5 A schematic block diagram of an exemplary electronic device 500 that can be used to implement the embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0117] As Figure 5 shown, the device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0118] Multiple components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a magnetic disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0119] The computing unit 501 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 executes the various methods and processes described above, such as the application processing method. For example, in some embodiments, the application processing method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the application processing method described above can be executed. Alternatively, in other embodiments, the computing unit 501 can be configured to execute the application processing method in any other suitable way (e.g., by means of firmware).
[0120] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), system-on-chip systems (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a dedicated or general-purpose programmable processor, receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0121] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable application processing devices, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code can be executed entirely on the machine, partially on the machine, executed partially on the machine as an independent software package and partially on a remote machine, or executed entirely on a remote machine or server.
[0122] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0123] To provide for interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic, speech, or tactile input).
[0124] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of a communication network include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0125] A computer system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is generated by computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
[0126] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution disclosed in this disclosure can be achieved, and no limitation is imposed herein.
[0127] The above specific embodiments do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub - combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the protection scope of this disclosure.
Claims
1. An application processing method, the method comprising: Obtaining application installation packages of at least two applications; Based on the application installation packages, measuring the similarity between any two of the at least two applications to obtain a similarity measurement result between the any two applications; The measuring the similarity between any two of the at least two applications based on the application installation packages to obtain a similarity measurement result between the any two applications includes: based on the application installation packages, determining the bytecode of each application; decompiling the bytecode of each application to obtain the decompiled source code of each application; performing discrete processing on the decompiled source code to obtain multiple code units in the decompiled source code; calculating the similarity between the code units of any two of the at least two applications to obtain a code unit group with a similarity greater than a similarity threshold; dividing the number of code units in the code unit group multiplied by two by the number of all code units in the any two applications to obtain a similarity ratio; in response to the similarity ratio being greater than the similarity threshold, determining that the similarity measurement result between the any two applications is that the any two applications are similar; Based on the similarity measurement result, determining a to-be-processed application among the at least two applications; Based on the installation package of the to-be-processed application, performing similarity reduction processing on the code of the to-be-processed application and generating a processed installation package of the to-be-processed application.
2. The method according to claim 1, the method further comprising: Detecting whether there are the same software toolkits in the application installation packages; In response to detecting that there are the same software toolkits in the application installation packages, detecting whether there is the source code of the software toolkits; In response to detecting that there is no source code of the software toolkits, modifying the bytecode in the software toolkits to obtain toolkit bytecode; Adding the toolkit bytecode to the installation package of the application corresponding to the software toolkits.
3. The method according to claim 2, the method further comprising: In response to detecting that there is the source code of the software toolkits, modifying the source code to obtain modified source code; Adding the modified source code to the installation package corresponding to the software toolkits.
4. The method according to claim 3, wherein, The in response to detecting that there is the source code of the software toolkits, modifying the source code to obtain modified source code includes: Based on the composition and characteristics of the source code of the software toolkits, determining the modification type of the software toolkits; Based on the modification type, modifying the source code to obtain modified source code.
5. The method according to any one of claims 1 to 4, wherein The measuring the similarity between any two of the at least two applications based on the application installation packages to obtain a similarity measurement result between the any two applications includes: Performing decompilation processing on the application installation packages to obtain disassembly language code; Based on the disassembly language code, obtaining program code; Performing discrete processing on the program code to obtain multiple code units of the at least two applications; For any two of the at least two applications, calculate the Jaccard coefficient value of the two applications based on the same code units and different code units in the two applications; In response to the Jaccard coefficient value satisfying the similarity metric condition, determine that the similarity metric result between the two applications is that the two applications are similar.
6. The method according to any one of claims 1-4, wherein, Based on the similarity metric result, determining the application to be processed among the at least two applications includes: In response to the similarity metric result being that two applications are similar, detect whether both of the two applications are applications to be released; In response to both of the two applications being applications to be released, use any one of the two applications or the two applications as the application to be processed.
7. The method according to any one of claims 1-4, wherein Based on the installation package of the application to be processed, performing similarity reduction processing on the code of the application to be processed and generating a processed installation package of the application to be processed includes: Based on the installation package of the application to be processed, determine the application source code of the application to be processed; Modify the application source code to obtain a modified application source code; Based on the modified application source code, generate a processed installation package of the application to be processed.
8. The method according to any one of claims 1 to 4, wherein Based on the installation package of the application to be processed, performing similarity reduction processing on the code of the application to be processed and generating a processed installation package of the application to be processed includes: Based on the installation package of the application to be processed, determine the bytecode of the application to be processed; Modify the bytecode of the application to be processed to obtain application bytecode; Based on the application bytecode, generate a processed installation package of the application to be processed.
9. The method according to claim 8, wherein, The modifying the bytecode of the application to be processed to obtain application bytecode includes: Run a pre-set code processing plugin to cause the code processing plugin to generate random bytecodes and insert the random bytecodes into the bytecode of the application to be processed to obtain application bytecode.
10. The method according to any one of claims 1-4, wherein Based on the installation package of the application to be processed, performing similarity reduction processing on the code of the application to be processed and generating a processed installation package of the application to be processed includes: Based on the installation package of the application to be processed, determine the bytecode of the application to be processed; Based on the bytecode of the application to be processed, obtain the decompiled source code of the application to be processed; Modify the decompiled source code to obtain a modified source code; Based on the modified source code, generate a processed installation package of the application to be processed.
11. An application processing device, the device includes: An acquisition unit configured to acquire application installation packages of at least two applications; A measurement unit configured to measure the similarity between any two of the at least two applications based on the application installation packages to obtain a similarity measurement result between the any two applications; the measurement unit is further configured to: based on the application installation packages, determine the bytecode of each application; decompile the bytecode of each application to obtain the decompiled source code of each application; perform discretization processing on the decompiled source code to obtain multiple code units in the decompiled source code; Calculate the similarity of the code units of any two of the at least two applications to obtain a group of code units with a similarity greater than the similarity threshold; divide the number of code units in the code unit group multiplied by two by the number of all code units in the any two applications to obtain a similarity ratio. In response to the similarity ratio being greater than the similarity threshold, determine that the similarity measurement result between the any two applications is that the any two applications are similar. A determination unit configured to determine a to-be-processed application among the at least two applications based on the similarity measurement result. A processing unit configured to perform similarity reduction processing on the code of the to-be-processed application based on the installation package of the to-be-processed application and generate a processed installation package of the to-be-processed application.
12. The apparatus according to claim 11, wherein the apparatus further comprises: A first detection unit configured to detect whether there is the same software toolkit in the application installation package. In response to detecting that there is the same software toolkit in the application installation package, detect whether there is the source code of the software toolkit. In response to detecting that there is no source code of the software toolkit, modify the bytecode in the software toolkit to obtain toolkit bytecode. Add the toolkit bytecode to the installation package of the application corresponding to the software toolkit.
13. The apparatus according to claim 12, wherein the apparatus further comprises: A second detection unit configured to: in response to detecting that there is the source code of the software toolkit, modify the source code to obtain modified source code. Add the modified source code to the installation package corresponding to the software toolkit.
14. The apparatus according to claim 13, wherein, The second detection unit is further configured to: determine the modification type of the software toolkit based on the composition and characteristics of the source code of the software toolkit; modify the source code based on the modification type to obtain modified source code.
15. The device according to any one of claims 11-14, wherein, The measurement unit is further configured to: decompile the application installation package to obtain disassembly language code; obtain program code based on the disassembly language code; perform discretization processing on the program code to obtain multiple code units of the at least two applications. For any two of the at least two applications, calculate the Jaccard coefficient value of the two applications based on the same code units and different code units in the two applications. In response to the Jaccard coefficient value satisfying the similarity measurement condition, determine that the similarity measurement result between the two applications is that the two applications are similar.
16. The device according to any one of claims 11-14, wherein, The determination unit is further configured to: In response to the similarity measurement result being that two applications are similar, detect whether both of the two applications are to-be-released applications; in response to both of the two applications being to-be-released applications, use any one of the two applications or the two applications as the to-be-processed application.
17. The device according to any one of claims 11 - 14, wherein, The processing unit is further configured to: determine the application source code of the to-be-processed application based on the installation package of the to-be-processed application; modify the application source code to obtain modified application source code; generate a processed installation package of the to-be-processed application based on the modified application source code.
18. The device according to any one of claims 11-14, wherein, The processing unit is further configured to: determine the bytecode of the application to be processed based on the installation package of the application to be processed; modify the bytecode of the application to be processed to obtain application bytecode; Generate a processed installation package of the application to be processed based on the application bytecode.
19. The apparatus according to claim 18, wherein, The processing unit is further configured to: run a pre-set code processing plugin, so that the code processing plugin generates random bytecode and inserts the random bytecode into the bytecode of the application to be processed to obtain application bytecode.
20. The device according to any one of claims 11 - 14, wherein The processing unit is further configured to: determine the bytecode of the application to be processed based on the installation package of the application to be processed; Generate the decompiled source code of the application to be processed based on the bytecode of the application to be processed; Modify the decompiled source code to obtain the modified source code; Generate a processed installation package of the application to be processed based on the modified source code.
21. An electronic device, characterized in that, Comprising: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1-10.
22. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-10.
23. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-10.
Citation Information
Patent Citations
Application detection method and device, computer equipment and readable storage medium
CN112148305A
Method and device for detecting similar application programs
CN117807453A