Application processing method, apparatus, device, and storage medium
By performing static scanning and pre-verification before obtaining the application file package from the program development platform, the problem of uncontrollable application release time is solved, a more efficient development process is achieved, and time and resources are saved.
Patent Information
- Application Number
- CN202111681781.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2041-12-30
AI Technical Summary
In the existing technology, the release time of applications is uncontrollable, and multiple rework and code modifications will increase development time and waste development resources.
Before the program development platform obtains the application file package, a static scan is performed to obtain static attribute information and running attribute information, and a pre-verification is performed based on this information. If it does not meet the requirements, corrections are made until it meets the pre-verification requirements and is provided to the program publishing platform.
By repeatedly pre-checking and promptly modifying file packages that do not meet the requirements, the uncontrollability of the application launch time is reduced, saving time costs and development resources.
Smart Images

Figure CN114489696B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to an application processing method and device, equipment and storage medium. BACKGROUND
[0002] With the development of computer technology, in order to meet the needs of users for different functions, various application programs have emerged. Taking the mobile terminal of the ios system as an example, it supports various application programs including but not limited to games, calendars, photo libraries and the like. The application program development end is responsible for developing the code of the application program, and after packaging the code into the installation package of the application program, it submits the application program to the application program publishing end; the application program publishing end verifies the installation package of the application program, and after the verification is passed, it publishes the installation package of the application program to the application store for users to download and use the application program.
[0003] In the above process, if the installation package of the application program does not pass the verification, the application program publishing end will return the installation package of the application program to the development end, and the development end will rework and modify the code of the application program again and repackage and upload it, which leads to uncontrollable release time of the application program, and multiple rework and modification of the code will also increase the development time and waste the development resources. SUMMARY
[0004] The present application provides an application processing method, device, equipment and storage medium, which can save time cost and development resources.
[0005] The present application provides an application processing method, device, equipment and storage medium, which can save time cost and development resources.
[0006] The application further provides an application program processing device, comprising: an obtaining module, a scanning module, a pre-checking module, a correcting module and a providing module; the obtaining module is configured to obtain a first file package corresponding to an application program from a program development platform; the scanning module is configured to perform static scanning on the first file package to obtain static attribute information and running state attribute information corresponding to the first file package; the pre-checking module is configured to perform pre-checking on the first file package according to the static attribute information and the running state attribute information corresponding to the first file package; the correcting module is configured to, in the case that the first file package does not meet the pre-checking requirement, obtain a second file package obtained by correcting the first file package according to the static attribute information and the running state attribute information until a second file package meeting the pre-checking requirement is obtained; and the providing module is configured to provide the second file package to a program publishing platform, so that the program publishing platform checks the second file package and publishes the second file package externally after the checking is passed.
[0007] The application further provides an application program processing device, comprising: a memory and a processor; the memory is configured to store a computer program; and the processor is coupled to the memory and configured to execute the computer program to implement the steps in the application program processing method provided by the application.
[0008] The application further provides a computer readable storage medium storing a computer program, which causes a processor to implement the steps in the application program processing method provided by the application when the computer program is executed by the processor.
[0009] In the embodiments of the application, the first file package corresponding to the application program is obtained from the program development platform, the static attribute information and the running state attribute information corresponding to the first file package are obtained by performing static scanning on the first file package before the first file package is provided to the program publishing platform, the first file package is pre-checked based on the static attribute information and the running state attribute information, the second file package obtained by correcting the first file package is obtained in the case that the first file package does not meet the pre-checking requirement, and the second file package meeting the pre-checking requirement is obtained until the second file package meeting the pre-checking requirement is obtained, and the second file package meeting the pre-checking requirement is provided to the program publishing platform. In the whole process, the first file package can be repeatedly pre-checked based on the static attribute information and the running state attribute information, the file package not meeting the pre-checking requirement can be modified in time, the problem that the online time of the application program is uncontrollable is reduced, and the time cost and the development resource are saved. BRIEF DESCRIPTION OF DRAWINGS
[0010] The accompanying drawings, which are included to provide a further understanding of the application and constitute a part of this application, illustrate certain illustrative embodiments of the application and together with the description serve to explain the application. In the drawings:
[0011] Figure 1A flowchart of an application processing method provided by an exemplary embodiment of the present application;
[0012] Figure 2 A flowchart of another application processing method provided by an exemplary embodiment of the present application;
[0013] Figure 3 A schematic structural diagram of an application processing device provided by an exemplary embodiment of the present application;
[0014] Figure 4 A schematic structural diagram of an application processing device provided in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0015] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0016] In view of the problem that the release time of applications in the prior art is uncontrollable and that multiple rework and code modifications will increase development time and waste development resources, in an embodiment of the present application, a first file package corresponding to the application is obtained from a program development platform. Before providing the first file package to the program release platform, a static scan is performed on the first file package to obtain static attribute information and runtime attribute information corresponding to the first file package. Based on the static attribute information and runtime attribute information, the first file package is pre-verified. If it does not meet the pre-verification requirements, a second file package that corrects the first file package is obtained, until a second file package that meets the pre-verification requirements is obtained, and the second file package that meets the pre-verification requirements is provided to the program release platform. During the entire process, the first file package can be repeatedly pre-verified, and the file package that does not meet the pre-verification requirements can be modified in a timely manner based on the static attribute information and runtime attribute information, thereby reducing the problem of uncontrollable application launch time and saving time, cost and development resources.
[0017] The following describes in detail the technical solutions provided by various embodiments of the present application in conjunction with the accompanying drawings.
[0018] Figure 1 A flowchart of an application processing method provided in an exemplary embodiment of the present application.
[0019] like Figure 1 As shown, the method includes:
[0020] 101. obtaining a first file package corresponding to the application program from a program development platform;
[0021] 102. performing static scanning on the first file package to obtain static attribute information and running state attribute information corresponding to the first file package;
[0022] 103. performing pre-verification on the first file package according to the static attribute information and the running state attribute information corresponding to the first file package;
[0023] 104. in a case where the first file package does not meet the pre-verification requirement, obtaining a second file package obtained by modifying the first file package according to the static attribute information and the running state attribute information, until a second file package meeting the pre-verification requirement is obtained;
[0024] 105. providing the second file package meeting the pre-verification requirement to a program publishing platform, so that the program publishing platform verifies the second file package and publishes the second file package externally after the verification is passed.
[0025] In the embodiment, the program development platform is a platform for a development technician to generate an application program. The application program can be an application (Application) on a smart phone or an application software on a computer, etc. The first file package is obtained by packing files generated by pre-processing, compiling, assembling or linking, etc. on source code of the application program. For example, the first file package can include but is not limited to: an executable file, a linking information file and some resource files (pictures or audio and video contents, etc.). The first file package can be but is not limited to: an installation package of the application program or a software development kit (Software Development Kit, SDK), etc., and is not limited to this. The installation package of the application program can be an installation package of the application program in an Android system (Android Package, APK) or an installation package of the application program in an IOS system (iPhone Application, IPA). The SDK can be a tool kit independent of the APK or the IPA, or a tool kit included in the APK or the IPA.
[0026] In the embodiment, after the first file package is acquired, the first file package can be statically scanned to obtain static attribute information and running state attribute information corresponding to the first file package. The static scanning of the first file package refers to scanning the first file package corresponding to the application program by using technologies such as lexical analysis, syntax analysis, control flow, and data flow analysis without running the application program. The static attribute information and the running state attribute information corresponding to the first file package can be obtained by using an automatic scanning tool to automatically scan the first file package. In the whole process, no manual intervention is required, manpower cost is saved, and the data analysis of the first file package is more accurate and efficient, and the time cost caused by the fact that the first file package does not meet the requirements is reduced. The implementation form of the automatic scanning tool can include but is not limited to plug-ins, applets, or APPs, etc. Optionally, the static attribute information of the first file package can be at least one of basic information, architecture information, private framework information, and private API information of the first file package; and the running state attribute information of the first file package can be, but is not limited to, the size of the storage space occupied by each module in the first file package, and information of a module whose occupied storage space exceeds a set storage space threshold.
[0027] In the embodiment, after the static attribute information and the dynamic attribute information of the first file package are determined, the first file package can be pre-verified according to the static attribute information and the running state attribute information corresponding to the first file package. The pre-verification is a method of auditing the static attribute information and the running state attribute information of the first file package based on pre-verification requirements. The pre-verification requirements are not limited and are related to the types of the attribute information of the first file package. For example, the signature in the static attribute information can be verified to determine the security of the first file package; or it is verified whether the private API information in the static attribute information is legal to determine whether the application program calls a specific API; or the size of the storage space occupied by each module in the running state attribute information is obtained, and the modules are shrinked according to the size of the storage space occupied by each module to reduce the storage space occupied by the application program, etc.
[0028] It should be noted that after determining the static attribute information and dynamic attribute information of the first file package, the static attribute information and running attribute information corresponding to the first file package can also be output or visualized. For example, the static attribute information and running attribute information can be visualized on the execution device of the application processing method, or the static attribute information and running attribute information corresponding to the first file package can be output to other devices. The other devices can be terminal devices such as mobile phones and computers, and the terminal devices can visualize the static attribute information and running attribute information. The other devices can also be server devices, and the server devices can perform cloud display on the static attribute information and running attribute information. Among them, the static attribute information and running attribute information corresponding to the first file package can be visualized in the form of tables, texts, or statistical charts such as pie charts and line charts.
[0029] In this embodiment, if a first file package does not meet the pre-verification requirements, a second file package is obtained by modifying the first file package based on the static attribute information and the runtime attribute information, until a second file package that meets the pre-verification requirements is obtained. The method for obtaining the second file package is not limited. For example, if the static attribute information and the runtime attribute information corresponding to the first file package are visualized, the first file package can be provided to an application developer, who can modify the first file package on an application development platform based on the visualized static attribute information and the runtime attribute information of the first file package to obtain the second file package. For another example, the first file package and its static attribute information and the runtime attribute information can be input into an automated code checking tool, which can then modify the first file package to obtain the second file package. Furthermore, if the second file package does not meet the pre-verification requirements, the application developer can modify the second file package until a second file package that meets the pre-verification requirements is obtained, or the automated code checking tool can modify the second file package until a second file package that meets the pre-verification requirements is obtained. The pre-verification requirements can be dynamically and flexibly configured based on the application requirements to meet the pre-verification requirements of different applications and improve application release efficiency.
[0030] In this embodiment, regardless of the implementation method for obtaining the second file package, if a second file package that meets the pre-verification requirements is obtained, the second file package that meets the pre-verification requirements can be provided to the program publishing platform, which verifies the second file package and releases the second file package to the outside world after the verification passes.
[0031] In the embodiments of the present application, the first file package corresponding to the application program is obtained from the program development platform, the first file package is statically scanned to obtain static attribute information and running state attribute information corresponding to the first file package before the first file package is provided to the program publishing platform, the first file package is pre-verified based on the static attribute information and the running state attribute information, in the case where the first file package does not meet the pre-verification requirement, a second file package for modifying the first file package is obtained until a second file package meeting the pre-verification requirement is obtained, and the second file package meeting the pre-verification requirement is provided to the program publishing platform. In the whole process, the first file package can be pre-verified, and the file package not meeting the pre-verification requirement can be modified in time, thereby reducing the uncontrollable problem of the online time of the application program.
[0032] In an optional embodiment, in the case where the first file package meets the pre-verification requirement, the first file package can be directly provided to the program publishing platform, the first file package is verified by the program publishing platform and is published externally after the verification is passed.
[0033] In an optional embodiment, a static scanning is performed on a first file package to obtain static attribute information corresponding to the first file package, including: a first information storage file corresponding to the first file package is obtained by parsing the first file package by using an automatic code detection tool; and the static attribute information corresponding to the first file package is obtained by analyzing the first information storage file; wherein the static attribute information includes at least one of basic information, architecture information, private framework information and private API information of the first file package. The first information storage file is a file obtained by splitting a file in the first file package. For example, as shown in step 205 in Figure 2 , in the case where the first file package is an IPA package, the IPA package is parsed to obtain an executable file, basic information and some resource files corresponding to the IPA package. For example, as shown in step 209 in Figure 2 , the basic information of the application program (such as an APP) can be checked to determine whether there is an illegal parameter in the basic information, for example, whether the version information in the basic information is the latest version is judged, if it is not the latest version, it is considered that the version information is illegal, the running of the automatic code detection tool is ended, or a log file is printed. Further, as shown in step 210 in Figure 2 , signature information can be obtained from the basic information, the signature is verified, and subsequent operations are performed in the case where the verification is passed. For example, as shown in step 211 in Figure 2 , the path of the executable file (Math-O) file can be obtained, and a tmp file is created, which is the first information storage file. In addition, as shown in step 212 in Figure 2As shown in step 207 in the method, after the first file package is parsed, a file timestamp can also be generated, based on which the executable file parsed from the IPA package or the TMP file created is uniquely identified. In addition, as shown in step 208 in the method, after the IPA package is parsed, a Message Digest 5 (MD5) file corresponding to the first file package can also be generated. The MD5 algorithm can calculate the MD5 hash value of the first file package through an irreversible string transformation, and theoretically, any two different files will not have the same MD5 hash value. The MD5 file is used to verify the first file package to determine the integrity and security of the first file package. If the MD5 value in the first file package is different from the MD5 value generated based on the first file package, it indicates that the first file package has been modified, and the security of the first file package needs to be further confirmed. If the MD5 value in the first file package is the same as the MD5 value generated based on the first file package, it indicates that the first file package has not been modified. Figure 2
[0034] In an optional embodiment, in the case where the first file package is an installation package of an application program, the implementation of analyzing the first information storage file to obtain the static attribute information corresponding to the first file package includes: analyzing the information attribute file in the first information storage file to obtain the basic information of the first file package. For example, in the case where the first information storage file is implemented as a tmp file, the tmp file includes an executable file (Mach-O) and an information attribute file (info.plist file). The info.plist file is a file used by the application program to store meta information, and the meta information includes the basic information of the first file package, which includes but is not limited to: name, version number, certificate signing company, certificate validity period, certificate signature, certificate expiration time, file path, MD5, storage space size, etc.
[0035] In addition, the first executable file in the first information storage file can also be decompiled to obtain a first text document corresponding to the first executable file; and based on the first text document, the architecture information, private framework information, and private API information of the first file package are obtained. For example, in the case where the first information storage file is implemented as a tmp file, the Mach-O file included in the tmp file is the first executable file, which is decompiled to obtain a readable first text document corresponding to the Mach-O file; and based on the first text, the architecture information, private framework information, and private API information corresponding to the first file package are obtained. As shown in step 209 in the method, Figure 2 The step 212-213 in the method 200 is illustrated by taking the architecture information as an example, but is not limited thereto. The architecture information includes, but is not limited to, arm64, armv7, armv7s, etc. The framework information is the information of the SDK package included in the first file package. The private API information is the private API information required to be called by the SDK package.
[0036] In an optional embodiment, in the case that the first file package is a development kit in the installation package, after the first executable file in the first information storage file is decompiled to obtain a first text document corresponding to the first executable file, the first text document can be searched to obtain at least one first permission collection method used by the development kit; a first permission collection method matching a second permission collection method preset as a target permission collection method, wherein the target permission collection method is part of the static attribute information corresponding to the first file package. For example, the second permission collection method preset is a permission collection method that is not allowed to be called by the SDK package. If the SDK package is a tool kit in a chat application, the chat application does not have the positioning permission of the user, and the second permission collection method preset includes the positioning permission collection method, the first executable file in the SDK package is decompiled to obtain the first text document, the first text document is searched to obtain the first permission method used by the SDK package, and if the first permission method includes the positioning permission collection method, the positioning permission collection method in the SDK package is taken as the target permission collection method, and the target permission collection method is part of the static attribute information corresponding to the first file package (such as the SDK package). For example, Figure 2 As shown in the step 218 in the method 200, the executable file (Math-O) in the SDK package, i.e., the first executable file, can be decompiled to create a first text document, and the first text document is searched to obtain the first permission collection method used by the development kit. For example, Figure 2 As shown in the step 219 in the method 200, the first permission collection method used by the SDK package can be searched through the selector reference (Sel-Ref) pointer, and the first permission collection method is used to obtain the positioning data, the camera data, or the microphone data. For example, Figure 2 As shown in the step 220 in the method 200, the target permission collection method in the second permission collection method is matched.
[0037] In the embodiment, in the case that the first file package is a development kit, the first executable file in the first information storage file can be decompiled to obtain a header file corresponding to the development kit; the header file is searched based on a preset keyword to obtain a target keyword in the header file; and the target keyword is part of the static attribute information corresponding to the first file package. For example,Figure 2 In step 221, the first executable file is decompiled using a dump to obtain a header file (.h file) corresponding to the SDK package; Figure 2 In step 222, the header file may be searched based on a preset keyword to obtain a target keyword in the header file.
[0038] In addition, Figure 2 In steps 206-208, if the first file package is determined to be an SDK package, the SDK package is parsed to obtain the executable files, resource files, and the MD5 corresponding to the SDK package. After parsing the SDK package, a file timestamp corresponding to the SDK package is generated. This file timestamp uniquely identifies the file parsed from the SDK package and is used to distinguish files parsed from the SDK package at other times. Furthermore, an MD5 value corresponding to the SDK package can be generated and verified against the MD5 value included in the SDK package to determine the security and integrity of the SDK package.
[0039] In an optional embodiment, static scanning of the first file package is performed to obtain the running state attribute information corresponding to the first file package, including: parsing the first file package to obtain the link information file corresponding to the first file package, and creating a second information storage file corresponding to the link information file; wherein the link information file is used to describe the composition of each module in the first file package, such as the size of the storage space occupied by each module. If the first file package is an IPA package, the link information file can be a link map (Linkmap) file, and the second information storage file corresponding to the link information file can be a tmp file, such as Figure 2 In step 214, the linkmap file is parsed and tmp is created. After the second information storage file is created, the second executable file in the second information storage file can be analyzed to obtain the size of the storage space occupied by each module in the first file package and the information of the modules whose occupied storage space exceeds the set storage space threshold. The size of the storage space occupied by each module in the first file package and the information of the modules whose occupied storage space exceeds the set storage space threshold are used as the running state attribute information corresponding to the first file package. Among them, the size of the storage space occupied by each module in the first file package corresponds to Figure 2 In step 217, the size of each code module is counted; the information of the module whose storage space occupied by the first file package exceeds the set storage space threshold corresponds to Figure 2 In step 216, the storage space threshold may be set to 100k or other values;
[0040] Optionally, the method provided in the embodiments of the present application further comprises: decompiling the second executable file to obtain a second text document corresponding to the second executable file; determining the information of the unused module in the first file package according to the second text document; and taking the information of the unused module in the first file package as part of the running state attribute information corresponding to the first file package. The implementation of determining the information of the unused module in the first file package according to the second text document is not limited, for example, the second text document corresponding to the second executable file includes a DATA segment, all method classes in the second executable file are obtained from a class list in the DATA segment, and the referenced method classes are obtained from the parameters (classrefs) in the DATA segment, and the information of the unused module is determined based on all the method classes in the second executable file and the referenced method classes.
[0041] In an optional embodiment, before the static scanning of the first file package to obtain the static attribute information and the running state attribute information corresponding to the first file package, it is determined whether the first file package is legal according to the file suffix of the first file package; and in the case that the first file package is legal, the static scanning of the first file package is performed to obtain the static attribute information and the running state attribute information corresponding to the first file package. For example, Figure 2 In step 203, a command for determining whether the first file package is legal is needed, and in the case that the first file package is not legal, the running of the automatic code detection tool is ended or a log file is printed. In the case that the first file package is legal, as shown in step 204 of Figure 2 The first file package is further identified as an application installation package or a development tool package. The way of identifying whether the first file package is legal can be: determining the suffix of the first file package, and if the suffix of the first file package is a set suffix, for example, the set suffix is “.ipa”, “.apk” or “.sdk”, it is determined that the first file package is legal; and if the suffix of the first file package is not the set suffix, it is determined that the first file package is not legal. Further, as shown in step 204 of Figure 2 The process of identifying the first file package is illustrated, for example, the first file package is identified as an IPA package or an SDK package according to the suffix of the first file package.
[0042] In the embodiment, the first file package can be automatically scanned by the automatic code detection tool, as shown in step 201 of Figure 2 The script corresponding to the automatic code detection tool is executed, and the automatic code detection tool can run under a Windows operating system, a Linux operating system or a Mac operating system, as shown in step 202. Figure 2In step 202, the first file package can be dragged into a designated folder provided by the automated code detection tool, and a static scan is performed on the first file package in the designated folder. Figure 2 In steps 218, 211, and 221, if the path of the Mach-O file is illegal, the Mach-O file cannot be obtained, the Mach-O file is wrong, or the Mach-O file is not a standard Mach-O file, the Mach-O file parameters are considered illegal, and the application processing method is terminated, or a log is printed. Figure 2 In step 214, if the Linkmap file is not valid, does not exist, or is not a standard Linkmap file, the Linkmap file parameters are considered invalid, and the automatic code detection tool is terminated, or a log is printed. Figure 3 In step 223, after obtaining the static attribute information and the running attribute information corresponding to the first file package, the static attribute information and the running attribute information can be summarized and the summary result can be automatically output, for example, through table output.
[0043] It should be noted that the execution entity of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution entity of steps 101 to 103 can be device A; for another example, the execution entity of steps 101 and 102 can be device A, and the execution entity of step 103 can be device B; and so on.
[0044] In addition, some of the processes described in the above embodiments and the accompanying drawings include multiple operations that appear in a specific order, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or may be executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0045] Figure 3 This is a schematic diagram of the structure of an application processing device provided by an exemplary embodiment of the present application. Figure 4 As shown, the application processing device includes: an acquisition module 31 , a scanning module 32 , a pre-checking module 33 , a correction module 34 and a providing module 35 .
[0046] The acquisition module 31 is configured to acquire a first file package corresponding to an application program from a program development platform.
[0047] The scanning module 32 is configured to perform static scanning on the first file package to obtain static attribute information and running state attribute information corresponding to the first file package.
[0048] The pre-checking module 33 is configured to perform pre-checking on the first file package according to the static attribute information and the running state attribute information corresponding to the first file package.
[0049] The correction module 34 is configured to, in a case where the first file package does not meet pre-checking requirements, acquire a second file package obtained by correcting the first file package according to the static attribute information and the running state attribute information until a second file package meeting the pre-checking requirements is obtained.
[0050] The providing module 35 is configured to provide the second file package to a program publishing platform, so that the program publishing platform checks the second file package and publishes the second file package externally after the checking is passed.
[0051] In an optional embodiment, the providing module 35 is further configured to, in a case where the first file package meets the pre-checking requirements, provide the first file package to the program publishing platform, so that the program publishing platform checks the first file package and publishes the first file package externally after the checking is passed.
[0052] In an optional embodiment, the scanning module 32 is specifically configured to: perform parsing on the first file package to obtain a first information storage file corresponding to the first file package; and perform analysis on the first information storage file to obtain the static attribute information corresponding to the first file package; wherein the static attribute information includes at least one of basic information, architecture information, private framework information and private API information of the first file package.
[0053] In an optional embodiment, the first file package is an installation package of the application program, and the scanning module 32 is specifically configured to: perform analysis on an information attribute file in the first information storage file to obtain the basic information of the first file package; and perform decompilation on a first executable file in the first information storage file to obtain a first text document corresponding to the first executable file; and obtain the architecture information, the private framework information and the private API information of the first file package according to the first text document.
[0054] In an optional embodiment, the first file package is a development kit in the installation package, and after the first executable file in the first information storage file is decompiled to obtain a first text document corresponding to the first executable file, the scanning module 32 is further configured to: search the first text document to obtain at least one first permission acquisition method used by the development kit; and take the first permission acquisition method that matches the second pre-set permission acquisition method as a target permission acquisition method; wherein the target permission acquisition method is part of the static attribute information corresponding to the first file package.
[0055] In an optional embodiment, the application program processing apparatus further comprises: a decompiling module and a determining module; the decompiling module is configured to decompile the first executable file in the first information storage file to obtain a header file corresponding to the development kit; and the determining module is configured to search the header file based on a pre-set keyword to obtain a target keyword in the header file; wherein the target keyword is part of the static attribute information corresponding to the first file package.
[0056] In an optional embodiment, the scanning module 32 is specifically configured to: parse the first file package to obtain a link information file corresponding to the first file package, and create a second information storage file corresponding to the link information file; analyze a second executable file in the second information storage file to obtain information about sizes of storage spaces occupied by modules in the first file package and modules whose occupied storage spaces exceed a set storage space threshold; and take the information about the sizes of the storage spaces occupied by the modules in the first file package and the modules whose occupied storage spaces exceed the set storage space threshold as the run-time attribute information corresponding to the first file package.
[0057] In an optional embodiment, the decompiling module is further configured to decompile the second executable file to obtain a second text document corresponding to the second executable file; and the determining module is further configured to: determine information about unused modules in the first file package according to the second text document; and take the information about the unused modules in the first file package as part of the run-time attribute information corresponding to the first file package.
[0058] In an optional embodiment, before the static scanning of the first file package to obtain the static attribute information and the run-time attribute information corresponding to the first file package, the determining module is further configured to: determine whether the first file package is legal according to a file suffix name of the first file package; and in the case that the first file package is legal, perform the static scanning of the first file package to obtain the static attribute information and the run-time attribute information corresponding to the first file package.
[0059] The application program processing apparatus provided by the embodiment of the present application obtains a first file package corresponding to an application program from a program development platform, performs static scanning on the first file package to obtain static attribute information and running state attribute information corresponding to the first file package before the first file package is provided to a program publishing platform, performs pre-verification on the first file package based on the static attribute information and the running state attribute information, obtains a second file package for modifying the first file package in the case that the first file package does not meet the pre-verification requirement, and obtains the second file package meeting the pre-verification requirement until the second file package meeting the pre-verification requirement is obtained, and provides the second file package meeting the pre-verification requirement to the program publishing platform. In the whole process, the first file package can be repeatedly pre-verified based on the static attribute information and the running state attribute information, and the file package not meeting the pre-verification requirement can be modified in time, so that the problem that the online time of the application program is uncontrollable is reduced, and the time cost and the development resource are saved.
[0060] Figure 4 A structural schematic diagram of an application program processing device provided for the exemplary embodiment of the present application is shown in FIG. 1. As shown in the figure, the device comprises a memory 44 and a processor 45. Figure 4
[0061] The memory 44 is configured to store computer programs and can be configured to store various data to support the operation on the application program processing device. Examples of the data include instructions of any application program or method for operating on the application program processing device.
[0062] The memory 44 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 memory, flash memory, magnetic disk or optical disk.
[0063] The processor 45 is coupled to the memory 44 and is configured to execute the computer programs in the memory 44 to: obtain a first file package corresponding to an application program from a program development platform; perform static scanning on the first file package to obtain static attribute information and running state attribute information corresponding to the first file package; perform pre-verification on the first file package according to the static attribute information and the running state attribute information corresponding to the first file package; in the case that the first file package does not meet the pre-verification requirement, obtain a second file package obtained by modifying the first file package according to the static attribute information and the running state attribute information, until a second file package meeting the pre-verification requirement is obtained; and provide the second file package meeting the pre-verification requirement to a program publishing platform, so that the program publishing platform verifies the second file package and publishes the second file package externally after the verification is passed.
[0064] In an optional embodiment, the processor 45 is further configured to: in a case where the first file package meets the pre-checking requirement, provide the first file package to the program publishing platform, so that the program publishing platform checks the first file package and publishes the first file package externally after passing the check.
[0065] In an optional embodiment, when the processor 45 performs the static scanning on the first file package to obtain the static attribute information corresponding to the first file package, the processor 45 is specifically configured to: parse the first file package to obtain a first information storage file corresponding to the first file package; analyze the first information storage file to obtain the static attribute information corresponding to the first file package; and the static attribute information includes at least one of basic information, architecture information, private framework information and private API information of the first file package.
[0066] In an optional embodiment, the first file package is an installation package of an application program, and when the processor 45 analyzes the first information storage file to obtain the static attribute information corresponding to the first file package, the processor 45 is specifically configured to: analyze an information attribute file in the first information storage file to obtain the basic information of the first file package; and decompile a first executable file in the first information storage file to obtain a first text document corresponding to the first executable file; and obtain the architecture information, the private framework information and the private API information of the first file package according to the first text document.
[0067] In an optional embodiment, the first file package is a development tool package in the installation package, and after the processor 45 decompiles the first executable file in the first information storage file to obtain the first text document corresponding to the first executable file, the processor 45 is further configured to: search the first text document to obtain at least one first permission acquisition method used by the development tool package; and match the first permission acquisition method with a second pre-set permission acquisition method as a target permission acquisition method; and the target permission acquisition method is part of the static attribute information corresponding to the first file package.
[0068] In an optional embodiment, the processor 45 is further configured to: decompile the first executable file in the first information storage file to obtain a header file corresponding to the development tool package; search the header file based on a pre-set keyword to obtain a target keyword in the header file; and the target keyword is part of the static attribute information corresponding to the first file package.
[0069] In an optional embodiment, the processor 45, when performing the static scanning on the first file package to obtain the running state attribute information corresponding to the first file package, is specifically configured to: parse the first file package to obtain a link information file corresponding to the first file package, and create a second information storage file corresponding to the link information file; analyze the second executable file in the second information storage file to obtain the size of the storage space occupied by each module in the first file package, and information of the module whose occupied storage space exceeds the set storage space threshold; and take the size of the storage space occupied by each module in the first file package and the information of the module whose occupied storage space exceeds the set storage space threshold as the running state attribute information corresponding to the first file package.
[0070] In an optional embodiment, the processor 45 is further configured to: decompile the second executable file to obtain a second text document corresponding to the second executable file; determine the information of the unused module in the first file package according to the second text document; and take the information of the unused module in the first file package as part of the running state attribute information corresponding to the first file package.
[0071] In an optional embodiment, before the processor 45 performs the static scanning on the first file package to obtain the static attribute information and the running state attribute information corresponding to the first file package, the processor 45 is further configured to: determine whether the first file package is legal according to the file suffix name of the first file package; and perform the static scanning on the first file package to obtain the static attribute information and the running state attribute information corresponding to the first file package in the case that the first file package is legal.
[0072] The application program processing device provided in the embodiments of the present application obtains the first file package corresponding to the application program from the program development platform, performs the static scanning on the first file package to obtain the static attribute information and the running state attribute information corresponding to the first file package before providing the first file package to the program publishing platform, performs the pre-verification on the first file package based on the static attribute information and the running state attribute information, obtains the second file package for modifying the first file package in the case that the first file package does not meet the pre-verification requirement, and provides the second file package meeting the pre-verification requirement to the program publishing platform. In the whole process, the first file package can be repeatedly pre-verified based on the static attribute information and the running state attribute information, and the file package not meeting the pre-verification requirement can be modified in time, thereby reducing the uncontrollable problem of the application program online time and saving the time cost and development resources.
[0073] Further, as shown in Figure 4 The application program processing device further includes a communication component 46, a display 47, a power component 48, an audio component 49, and other components. Figure 4 Part of the components are only schematically shown, and it does not mean that the application program processing device only includes Figure 4The illustrated components. It should be noted that Figure 1 The components within the dashed line box are optional components, not mandatory components, and can be determined according to the product form of the application processing device.
[0074] Correspondingly, the embodiment of the present application further provides a computer readable storage medium storing a computer program, when the computer program is executed by a processor, the processor can implement the method provided by the embodiment of the present application. Figure 4 The steps in the method illustrated.
[0075] The above Figure 4 The 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, or the like, or a combination thereof. In an example embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In an example embodiment, the communication component further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0076] The above Figure 4 The display includes a screen, which can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense a touch, a slide, and a gesture on the touch panel. The touch sensor can not only sense a boundary of a touch or a slide movement, but also detect a duration and a pressure related to a touch or a slide operation.
[0077] The above Figure 4 The power component provides power to various components of the device where the power component is located. The power component can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device where the power component is located.
[0078] The above Figure 1 The audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) that is configured to receive an external audio signal when the device where the audio component is located is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory or transmitted via the communication component. In some embodiments, the audio component further includes a speaker for outputting audio signals.
[0079] It should be noted that cloud display refers to an information display mode based on cloud computing. In a running mode of the cloud display, a running subject of an application processing method and a presentation subject of visual information are separated, data storage corresponding to the application processing method and running can be completed on a cloud display server, and a cloud display client functions to receive and send data and present a picture. For example, the cloud display client can be a display device close to a user side and having a data transmission function, such as a mobile terminal, a television, a computer, a palm computer, and the like. However, an electronic terminal for processing information data is the cloud display server in the cloud. When browsing information, a user operates the cloud display client to send an operation instruction to the cloud display server, the cloud display server displays a related picture according to the operation instruction, encodes and compresses data, returns the cloud display client through a network, and finally decodes and outputs corresponding visual data through the cloud display client, for example, static attribute information and running state attribute information corresponding to a first file package.
[0080] Those skilled in the art should understand that embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt a computer program product in the form of being implemented on one or more computer usable storage media containing computer usable program codes (including but not limited to disk memory, CD-ROM, optical memory, and the like).
[0081] The present application is described with reference to flowcharts and / or block diagrams according to the method, device (system), and computer program product of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams 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 devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that carries out the functions specified in one or more flows and / or blocks.
[0082] These computer program instructions can also be stored in a computer readable memory that can direct the computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer readable memory produce a product including instruction apparatus, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that carries out the functions specified in one or more flows and / or blocks.
[0083] These computer program instructions can also be loaded into computer or other programmable data processing devices to cause a series of operational steps to be performed on the computer or other programmable devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable devices provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1
[0084] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0085] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) about which the computer stores information about an operating system, application software, and / or the like. Memory is an example of computer readable media.
[0086] Computer readable media includes permanent and non-permanent, moveable and non- moveable media that can be implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change 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, compact disc read-only memory (CD-ROM), digital versatile disks (DVDs) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that is accessible to a computing device. According to the definition provided herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.
[0087] It is also important to note that the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0088] The above merely provides an example of the present application, and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall fall into the scope of claims of the present application.
Claims
1. A method for processing an application, characterized in that: include: Obtaining a first file package corresponding to the application from a program development platform, wherein the first file package is obtained by packaging files generated by performing at least one operation on source code of the application, wherein the at least one operation includes a compile operation; Performing a static scan on the first file package to obtain static attribute information and operational attribute information corresponding to the first file package, wherein the operational attribute information includes at least one of a storage space occupied by each module in the first file package, information about modules whose storage space occupied exceeds a set storage space threshold, and information about unused modules; Pre-verifying the first file package according to the static attribute information and the running attribute information corresponding to the first file package; If the first file package does not meet the pre-verification requirement, obtain a second file package obtained by correcting the first file package according to the static attribute information and the running attribute information, until a second file package that meets the pre-verification requirement is obtained; Providing the second file package that meets the pre-verification requirements to the program publishing platform, so that the program publishing platform verifies the second file package and publishes the second file package after passing the verification; The static scanning of the first file package to obtain static attribute information corresponding to the first file package includes: Parsing the first file package to obtain a first information storage file corresponding to the first file package; If the first file package is an installation package of the application, analyzing the information attribute file in the first information storage file to obtain basic information of the first file package; and decompiling the first executable file in the first information storage file to obtain a first text document corresponding to the first executable file; and obtaining architecture information, private framework information, and private API information of the first file package based on the first text document, wherein the basic information, architecture information, private framework information, and private API information of the first file package are part of the static attribute information corresponding to the first file package; If the first file package is a development toolkit in the installation package, after decompiling the first executable file in the first information storage file to obtain the first text document corresponding to the first executable file, the first text document is searched to obtain at least one first permission collection method used by the development toolkit; the first permission collection method that matches the pre-set second permission collection method is used as the target permission collection method, wherein the target permission collection method is part of the information in the static attribute information corresponding to the first file package.
2. The method according to claim 1, characterized in that Also includes: If the first file package meets the pre-verification requirements, the first file package is provided to a program publishing platform, so that the program publishing platform verifies the first file package and releases the first file package after passing the verification.
3. The method according to claim 1, characterized in that Also includes: Decompiling the first executable file in the first information storage file to obtain a header file corresponding to the development toolkit; The header file is searched based on a preset keyword to obtain a target keyword in the header file; wherein the target keyword is used as part of the static attribute information corresponding to the first file package.
4. The method according to claim 1, wherein Performing a static scan on the first file package to obtain running state attribute information corresponding to the first file package includes: Parsing the first file package to obtain a link information file corresponding to the first file package, and creating a second information storage file corresponding to the link information file; Analyzing the second executable file in the second information storage file to obtain the size of the storage space occupied by each module in the first file package and information about the module whose storage space occupied exceeds a set storage space threshold; The size of the storage space occupied by each module in the first file package and information about the module whose occupied storage space exceeds a set storage space threshold are used as the running state attribute information corresponding to the first file package.
5. The method according to claim 4, characterized in that Also includes: Decompiling the second executable file to obtain a second text document corresponding to the second executable file; Determining, according to the second text document, information about unused modules in the first file package; The information of unused modules in the first file package is used as part of the running state attribute information corresponding to the first file package.
6. The method according to any one of claims 1 to 5, characterized in that Before statically scanning the first file package to obtain static attribute information and running attribute information corresponding to the first file package, the method further includes: determining whether the first file package is legal based on the file suffix of the first file package; If the first file package is legal, a static scan is performed on the first file package to obtain static attribute information and running attribute information corresponding to the first file package.
7. An application processing device, characterized in that: include: Acquisition module, scanning module, pre-verification module, correction module and provision module; The acquisition module is configured to acquire a first file package corresponding to the application from a program development platform, wherein the first file package is obtained by packaging files generated by performing at least one operation on the source code of the application, wherein the at least one operation includes a compile operation; The scanning module is configured to statically scan the first file package to obtain static attribute information and operational attribute information corresponding to the first file package, wherein the operational attribute information includes at least one of the size of the storage space occupied by each module in the first file package, information on modules whose storage space occupied exceeds a set storage space threshold, and information on unused modules; The pre-verification module is configured to pre-verify the first file package according to the static attribute information and the running attribute information corresponding to the first file package; The correction module is configured to, if the first file package does not meet the pre-verification requirement, obtain a second file package obtained by correcting the first file package according to the static attribute information and the running attribute information, until a second file package meeting the pre-verification requirement is obtained; The providing module is configured to provide the second file package to a program publishing platform, so that the program publishing platform can verify the second file package and publish the second file package after passing the verification; The static scanning of the first file package to obtain static attribute information corresponding to the first file package includes: Parsing the first file package to obtain a first information storage file corresponding to the first file package; If the first file package is an installation package of the application, analyzing the information attribute file in the first information storage file to obtain basic information of the first file package; and decompiling the first executable file in the first information storage file to obtain a first text document corresponding to the first executable file; and obtaining architecture information, private framework information, and private API information of the first file package based on the first text document, wherein the architecture information, private framework information, and private API information of the first file package are part of the static attribute information corresponding to the first file package; If the first file package is a development toolkit in the installation package, after decompiling the first executable file in the first information storage file to obtain the first text document corresponding to the first executable file, the first text document is searched to obtain at least one first permission collection method used by the development toolkit; the first permission collection method that matches the pre-set second permission collection method is used as the target permission collection method, wherein the target permission collection method is part of the information in the static attribute information corresponding to the first file package.
8. An application processing device, characterized in that: include: memory and processor; The memory is used to store computer programs; The processor, coupled to the memory, is configured to execute the computer program to implement the steps in the method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to implement the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Device and method of processing application installation package
CN105915623A
Software release method and device and computer readable storage medium
CN109710262A