Interface file scanning method, device, electronic device and computer readable medium
The target application platform is parsed through the interface file scanning method and a private interface file group is generated, which solves the problem of failure to parse private API interfaces in the existing technology and improves the success rate of application uploads.
Patent Information
- Application Number
- CN202111079520.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-15
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2041-09-15
AI Technical Summary
The existing technology fails to effectively parse the private API interface in the target application platform, resulting in the application upload failure.
Through the interface file scanning method, the resource framework files of the target platform program are scanned according to the preset interface identification group, and the public interface, compiled files and private interfaces are extracted, and the target private interface file group is generated, and the interfaces in the application file are adjusted. Reduce the probability of upload failure.
It realizes a complete analysis of the private API interface in the target application platform, accurately identify the private API interface in the application file package, and reduces the probability of application upload failure.
Smart Images

Figure CN113741905B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to an interface file scanning method, device, electronic device, and computer-readable medium. Background Art
[0002] At present, before uploading an application (APP) to an operating system application platform (e.g., an IOS application platform), the application file package is usually parsed to prevent the application APP from failing to be uploaded due to the presence of private API interfaces called in the application file. At present, the method of parsing the application APP file package is usually to identify whether there is a private API interface called in the application APP file package by a technician.
[0003] However, the above method usually has the following technical problems: the private API interface in the target application platform is not parsed, resulting in the inability to determine whether there is a called private API interface in the application file package based on the private API interface in the target application platform, which can easily cause subsequent application APP upload failure. Summary of the invention
[0004] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0005] Some embodiments of the present disclosure propose an interface file scanning method, device, electronic device, and computer-readable medium to solve one of the technical problems mentioned in the above background technology section.
[0006] In a first aspect, some embodiments of the present disclosure provide an interface file scanning method, the method comprising: scanning and processing each header file included in a first resource framework file corresponding to a target platform program according to a preset first interface identification group, to obtain a first interface file group corresponding to the above-mentioned first interface identification group; extracting the first public interface file included in the above-mentioned first resource framework file corresponding to the first public interface identification in the preset first public interface identification group, to obtain the first public interface file group; scanning and processing each compiled file included in the above-mentioned first resource framework file according to a preset second public interface identification group, to obtain a second public interface file group corresponding to the above-mentioned second public interface identification group; scanning and processing each header file included in the second resource framework file corresponding to the above-mentioned target platform program according to a preset private interface identification group, to obtain a private interface file group corresponding to the above-mentioned private interface identification group; generating a target private interface file group based on the above-mentioned first interface file group, the above-mentioned first public interface file group, the above-mentioned second public interface file group and the above-mentioned private interface file group.
[0007] Optionally, the above method also includes: decompiling the application file to be uploaded to obtain a target executable file; symbolizing the above target executable file to obtain a string text; scanning the above string text according to a preset second interface identification group to obtain an executable interface file group corresponding to the above second interface identification group.
[0008] Optionally, the method further includes: determining whether there exists an executable interface file in the executable interface file group corresponding to the target private interface file in the target private interface file group; in response to determining that there exists an executable interface file in the executable interface file group corresponding to the target private interface file in the target private interface file group as the interface file to be adjusted, to obtain the interface file group to be adjusted; and adjusting the interface files in the application file to be uploaded according to the interface file group to be adjusted.
[0009] Optionally, the above-mentioned scanning and processing of each header file included in the first resource framework file corresponding to the target platform program according to the preset first interface identification group to obtain a first interface file group corresponding to the above-mentioned first interface identification group includes: for each header file included in the above-mentioned first resource framework file, executing the following scanning steps: scanning out the interface file corresponding to the above-mentioned first interface identification group in each interface file included in the above-mentioned header file; filtering processing each scanned interface file to generate a filtering interface file to obtain a filtering interface file group; adding the filtering interface file in the above-mentioned filtering interface file group that meets the first preset condition as the first interface file to the preset first interface file group.
[0010] Optionally, the above-mentioned extraction of the first public interface file corresponding to the first public interface identifier in the preset first public interface identifier group included in the above-mentioned first resource framework file to obtain the first public interface file group includes: for each header file included in the above-mentioned first resource framework file, performing the following extraction steps: extracting the interface file corresponding to the first public interface identifier in the above-mentioned first public interface identifier group from each interface file included in the above-mentioned header file as an alternative interface file to obtain an alternative interface file group; filtering each alternative interface file in the above-mentioned alternative interface file group to generate a filtered alternative interface file to obtain a filtered alternative interface file group; adding the filtered alternative interface file in the above-mentioned filtered alternative interface file group that meets the second preset condition as the first public interface file to the preset first public interface file group.
[0011] Optionally, the above-mentioned scanning and processing of each compiled file included in the above-mentioned first resource framework file according to the preset second public interface identification group to obtain the second public interface file group corresponding to the above-mentioned second public interface identification group includes: for each compiled file included in the above-mentioned first resource framework file, executing the following scanning steps: decompressing the above-mentioned compiled file to obtain a decompressed compiled file; scanning out the primary key field corresponding to the above-mentioned second public interface identification group in each primary key field included in the above-mentioned decompressed compiled file as the second public interface file; and adding each scanned second public interface file to the preset second public interface file group.
[0012] Optionally, the above-mentioned scanning and processing of each header file included in the second resource framework file corresponding to the above-mentioned target platform program according to the preset private interface identification group to obtain a private interface file group corresponding to the above-mentioned private interface identification group includes: for each header file included in the above-mentioned second resource framework file, performing the following scanning steps: scanning out the interface file corresponding to the above-mentioned private interface identification group from each interface file included in the above-mentioned header file as the second alternative interface file to obtain the second alternative interface file group; filtering processing on each interface file in the above-mentioned second alternative interface file group to generate a second filtered alternative interface file to obtain the second filtered alternative interface file group; adding the second filtered alternative interface file in the above-mentioned second filtered alternative interface file group that meets the third preset condition as a private interface file to the preset private interface file group.
[0013] In a second aspect, some embodiments of the present disclosure provide an interface file scanning device, the device comprising: a first scanning unit, configured to scan and process each header file included in a first resource framework file corresponding to a target platform program according to a preset first interface identification group, to obtain a first interface file group corresponding to the above-mentioned first interface identification group; an extraction unit, configured to extract the first public interface file included in the above-mentioned first resource framework file corresponding to the first public interface identification in the preset first public interface identification group, to obtain the first public interface file group; a second scanning unit, configured to scan and process each compiled file included in the above-mentioned first resource framework file according to a preset second public interface identification group, to obtain a second public interface file group corresponding to the above-mentioned second public interface identification group; a third scanning unit, configured to scan and process each header file included in the second resource framework file corresponding to the above-mentioned target platform program according to a preset private interface identification group, to obtain a private interface file group corresponding to the above-mentioned private interface identification group; a generation unit, configured to generate a target private interface file group based on the above-mentioned first interface file group, the above-mentioned first public interface file group, the above-mentioned second public interface file group and the above-mentioned private interface file group.
[0014] Optionally, the device also includes: a decompilation unit, configured to decompile the application file to be uploaded to obtain a target executable file; a symbolization unit, configured to symbolize the above-mentioned target executable file to obtain a string text; and a string scanning unit, configured to scan the above-mentioned string text according to a preset second interface identification group to obtain an executable interface file group corresponding to the above-mentioned second interface identification group.
[0015] Optionally, the device also includes: a first determination unit, configured to determine whether there is an executable interface file in the above-mentioned executable interface file group that corresponds to the target private interface file in the above-mentioned target private interface file group; a second determination unit, configured to, in response to determining the existence, determine the executable interface file in the above-mentioned executable interface file group that corresponds to the target private interface file in the above-mentioned target private interface file group as the interface file to be adjusted, so as to obtain the interface file group to be adjusted; and an adjustment unit, configured to adjust the interface files in the above-mentioned application file to be uploaded according to the above-mentioned interface file group to be adjusted.
[0016] Optionally, the first scanning unit is further configured to: for each header file included in the above-mentioned first resource framework file, perform the following scanning steps: scan out the interface files corresponding to the above-mentioned first interface identification group in each interface file included in the above-mentioned header file; filter each scanned interface file to generate a filtered interface file to obtain a filtered interface file group; add the filtered interface file in the above-mentioned filtered interface file group that meets the first preset condition as the first interface file to the preset first interface file group.
[0017] Optionally, the extraction unit is further configured to: for each header file included in the above-mentioned first resource framework file, perform the following extraction steps: extract the interface file corresponding to the first public interface identifier in the above-mentioned first public interface identifier group from each interface file included in the above-mentioned header file as an alternative interface file, and obtain an alternative interface file group; filter each alternative interface file in the above-mentioned alternative interface file group to generate a filtered alternative interface file, and obtain a filtered alternative interface file group; add the filtered alternative interface file in the above-mentioned filtered alternative interface file group that meets the second preset condition as the first public interface file to the preset first public interface file group.
[0018] Optionally, the second scanning unit is further configured to: for each compiled file included in the above-mentioned first resource framework file, perform the following scanning steps: decompress the above-mentioned compiled file to obtain a decompressed compiled file; scan the primary key fields corresponding to the above-mentioned second public interface identification group in each primary key field included in the above-mentioned decompressed compiled file as the second public interface file; add each scanned second public interface file to the preset second public interface file group.
[0019] Optionally, the third scanning unit is further configured to: for each header file included in the above-mentioned second resource framework file, perform the following scanning steps: scan out the interface file corresponding to the above-mentioned private interface identification group in each interface file included in the above-mentioned header file as the second alternative interface file, and obtain the second alternative interface file group; filter each interface file in the above-mentioned second alternative interface file group to generate a second filtered alternative interface file, and obtain the second filtered alternative interface file group; add the second filtered alternative interface file in the above-mentioned second filtered alternative interface file group that meets the third preset condition as a private interface file to the preset private interface file group.
[0020] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.
[0021] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.
[0022] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the interface file scanning method of some embodiments of the present disclosure, the private API interface in the target application platform can be completely parsed, so that the private API interface called in the file package of the APP can be accurately parsed according to the private API interface in the target application platform. Thus, the probability of subsequent application APP upload failure is reduced. Specifically, the reason for the subsequent application APP upload failure is that the private API interface in the target application platform is not parsed, resulting in the inability to determine whether there is a called private API interface in the file package of the application according to the private API interface in the target application platform, which easily causes the subsequent application APP upload failure. Based on this, the interface file scanning method of some embodiments of the present disclosure, first, according to the preset first interface identification group, the first resource framework file corresponding to the target platform program includes each header file scanned and processed to obtain the first interface file group corresponding to the above-mentioned first interface identification group. Thus, the interface file in the first resource framework file can be completely scanned, which is convenient for the subsequent scanning of the private interface file in the first resource framework file. Secondly, the first public interface file corresponding to the first public interface identification in the preset first public interface identification group included in the above-mentioned first resource framework file is extracted to obtain the first public interface file group. Thus, the public interface files in the first resource framework file can be extracted, which is convenient for the subsequent identification of the private interface files in the first resource framework file. Then, according to the preset second public interface identification group, the various compiled files included in the above-mentioned first resource framework file are scanned and processed to obtain the second public interface file group corresponding to the above-mentioned second public interface identification group. Thus, the interface files in the various compiled files (compiler documents) included in the first resource framework file can be scanned. Then, according to the preset private interface identification group, the various header files included in the second resource framework file corresponding to the above-mentioned target platform program are scanned and processed to obtain the private interface file group corresponding to the above-mentioned private interface identification group. Thus, the private interface files called in the second resource framework file can be scanned. Finally, based on the above-mentioned first interface file group, the above-mentioned first public interface file group, the above-mentioned second public interface file group and the above-mentioned private interface file group, the target private interface file group is generated. Thus, the private API interface in the target platform program (target application platform) can be completely scanned. Furthermore, it is convenient to accurately parse the private API interface called in the file package of the application APP according to the private API interface in the target application platform. This makes it easier to adjust the private API interface in the file package of the application APP later, so as to reduce the probability of failure in uploading the application APP. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0024] Figure 1 is a schematic diagram of an application scenario of the interface file scanning method of some embodiments of the present disclosure;
[0025] Figure 2 is a flow chart of some embodiments of the interface file scanning method according to the present disclosure;
[0026] Figure 3 is a flow chart of other embodiments of the interface file scanning method according to the present disclosure;
[0027] Figure 4 is a flow chart of some further embodiments of the interface file scanning method according to the present disclosure;
[0028] Figure 5 is a schematic diagram of the structure of some embodiments of the interface file scanning device according to the present disclosure;
[0029] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0030] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0031] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0032] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0033] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0035] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0036] Figure 1 It is a schematic diagram of an application scenario of the interface file scanning method according to some embodiments of the present disclosure.
[0037] exist Figure 1 In the application scenario, first, the computing device 101 can scan and process the various header files included in the first resource framework file 103 corresponding to the target platform program according to the preset first interface identification group 102, and obtain the first interface file group 104 corresponding to the above-mentioned first interface identification group 102. Secondly, the computing device 101 can extract the first public interface file included in the above-mentioned first resource framework file 103 corresponding to the first public interface identification in the preset first public interface identification group 105, and obtain the first public interface file group 106. Then, the computing device 101 can scan and process the various compiled files included in the above-mentioned first resource framework file 103 according to the preset second public interface identification group 107, and obtain the second public interface file group 108 corresponding to the above-mentioned second public interface identification group 107. Then, the computing device 101 can scan and process the various header files included in the second resource framework file 110 corresponding to the above-mentioned target platform program according to the preset private interface identification group 109, and obtain the private interface file group 111 corresponding to the above-mentioned private interface identification group 109. Finally, the computing device 101 may generate a target private interface file group 112 based on the first interface file group 104 , the first public interface file group 106 , the second public interface file group 108 , and the private interface file group 111 .
[0038] It should be noted that the computing device 101 can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, or as a single software or software module. No specific limitation is made here.
[0039] It should be understood that Figure 1 The number of computing devices in the embodiment is only illustrative. Any number of computing devices may be provided according to implementation requirements.
[0040] Continue to refer Figure 2 , shows a process 200 of some embodiments of the interface file scanning method according to the present disclosure. The interface file scanning method comprises the following steps:
[0041] Step 201 : Scan and process each header file included in the first resource framework file corresponding to the target platform program according to a preset first interface identification group to obtain a first interface file group corresponding to the first interface identification group.
[0042] In some embodiments, for each header file included in the first resource framework file corresponding to the target platform program, the execution body of the interface file scanning method (eg Figure 1 The computing device 101 shown in the figure can scan the interface file of the corresponding preset first interface identification group from each interface file included in the above header file as the first interface file. Thus, the first interface file group is obtained. Here, the target platform program may refer to the application platform of the current target operating system (for example, the application store of the IOS application platform). Here, the target platform program can be used for uploading an application (APP). Here, the interface in the target platform program includes: a public API (Published API) interface, an unpublished API (Unpublished API) interface, and a private API (Unpublished API) interface. Here, the API (Published API) interface and the unpublished API (Unpublished API) interface are set in the first resource framework file (for example, Framework file). Here, the private API (Unpublished API) interface is set in the second resource framework file (for example, Private Framework file). Here, the preset first interface identification group may refer to the first interface identification group composed of the interface identifications of multiple API interfaces called when the developer develops the first resource framework file (for example, Framework file) of the target platform program. Here, the first interface identification group includes multiple public interface identifications and unpublished interface identifications. Here, the public interface identifier can represent the interface identifier of a public API (Published API) interface. Here, the unpublished interface identifier can represent the interface identifier of an unpublished API (Unpublished API) interface. Here, the interface file included in the header file can refer to a code block that calls the interface. In practice, for each header file included in the first resource framework file corresponding to the target platform program, the above-mentioned execution entity can scan out the interface file whose interface identifier is the same as the first interface identifier in the above-mentioned first interface identifier group from the various interface files included in the above-mentioned header file as the first interface file.
[0043] Step 202: extract the first public interface file corresponding to the first public interface identifier in the preset first public interface identifier group included in the first resource framework file to obtain the first public interface file group.
[0044] In some embodiments, for each header file included in the first resource framework file corresponding to the target platform program file, the execution subject can extract, from the various interface files included in the header file, an interface file whose interface identifier is the same as the first public interface identifier in the first public interface identifier group as the first public interface file. Here, the first public interface identifier in the first public interface identifier group can represent the interface identifier of a public API (Published API) interface.
[0045] Step 203: Scan and process the compiled files included in the first resource framework file according to the preset second public interface identification group to obtain a second public interface file group corresponding to the second public interface identification group.
[0046] In some embodiments, for each compiled file included in the first resource framework file corresponding to the target platform program file, the above-mentioned execution subject can scan out the interface file corresponding to the preset second public interface identification group from the various interface files included in the above-mentioned compiled file as the second public interface file. Thus, the second public interface file group is obtained. Here, the preset second public interface identification group can refer to the second public interface identification group composed of the interface identifications of multiple public API interfaces called when the developer develops the compiled document (for example, Xcode built-in document) in the first resource framework file. Here, the compiled file can refer to the built-in document of the compiler (Xcode) in the first resource framework file. In practice, for each compiled file included in the first resource framework file, the above-mentioned execution subject can scan out the interface file whose interface identification is the same as the first interface identification in the above-mentioned first interface identification group from the various interface files included in the above-mentioned compiled file as the second public interface file. Thus, the second public interface file group corresponding to the above-mentioned second public interface identification group is obtained.
[0047] Step 204 , scanning and processing each header file included in the second resource framework file corresponding to the target platform program according to the preset private interface identification group, to obtain a private interface file group corresponding to the private interface identification group.
[0048] In some embodiments, for each header file included in the second resource framework file corresponding to the target platform program, the above-mentioned execution subject can scan out the interface file of the corresponding preset private interface identification group from the various interface files included in the above-mentioned header file as a private interface file. Thus, a private interface file group is obtained. Here, the preset private interface identification group can refer to a private interface identification group composed of interface identifications of multiple private API interfaces called when the developer develops the second resource framework file (for example, PrivateFramework file) of the target platform program. In practice, for each header file included in the second resource framework file corresponding to the target platform program file, the above-mentioned execution subject can scan out the interface file whose interface identification is the same as the private interface identification in the above-mentioned private interface identification group from the various interface files included in the above-mentioned header file as a private interface file. Thus, a private interface file group corresponding to the above-mentioned private interface identification group is obtained.
[0049] Step 205: Generate a target private interface file group based on the first interface file group, the first public interface file group, the second public interface file group and the private interface file group.
[0050] In some embodiments, based on the first interface file group, the first public interface file group, the second public interface file group, and the private interface file group, the execution entity may generate a target private interface file group by the following steps:
[0051] The first step is to remove the first interface files in the first interface file group that are the same as the first public interface files in the first public interface file group to update the first interface file group and obtain the updated first interface file group as the first updated interface file group.
[0052] The second step is to remove the first update interface file in the first update interface file group that is the same as the second public interface file in the second public interface file group, so as to update the first update interface file group and obtain the second update interface file group.
[0053] The third step is to combine the second update interface file group and the private interface file group to generate a combined interface file group as the target private interface file group. Here, the combination process may refer to a splicing process. That is, the second update interface file group and the private interface file group may be spliced into a combination.
[0054] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the interface file scanning method of some embodiments of the present disclosure, the private API interface in the target application platform can be completely parsed, so that the private API interface called in the file package of the APP can be accurately parsed according to the private API interface in the target application platform. Thus, the probability of subsequent application APP upload failure is reduced. Specifically, the reason for the subsequent application APP upload failure is that the private API interface in the target application platform is not parsed, resulting in the inability to determine whether there is a called private API interface in the file package of the application according to the private API interface in the target application platform, which easily causes the subsequent application APP upload failure. Based on this, the interface file scanning method of some embodiments of the present disclosure, first, according to the preset first interface identification group, the first resource framework file corresponding to the target platform program includes each header file scanned and processed to obtain the first interface file group corresponding to the above-mentioned first interface identification group. Thus, the interface file in the first resource framework file can be completely scanned, which is convenient for the subsequent scanning of the private interface file in the first resource framework file. Secondly, the first public interface file corresponding to the first public interface identification in the preset first public interface identification group included in the above-mentioned first resource framework file is extracted to obtain the first public interface file group. Thus, the public interface files in the first resource framework file can be extracted, which is convenient for the subsequent identification of the private interface files in the first resource framework file. Then, according to the preset second public interface identification group, the various compiled files included in the above-mentioned first resource framework file are scanned and processed to obtain the second public interface file group corresponding to the above-mentioned second public interface identification group. Thus, the interface files in the various compiled files (compiler documents) included in the first resource framework file can be scanned. Then, according to the preset private interface identification group, the various header files included in the second resource framework file corresponding to the above-mentioned target platform program are scanned and processed to obtain the private interface file group corresponding to the above-mentioned private interface identification group. Thus, the private interface files called in the second resource framework file can be scanned. Finally, based on the above-mentioned first interface file group, the above-mentioned first public interface file group, the above-mentioned second public interface file group and the above-mentioned private interface file group, the target private interface file group is generated. Thus, the private API interface in the target platform program (target application platform) can be completely scanned. Furthermore, it is convenient to accurately parse the private API interface called in the file package of the application APP according to the private API interface in the target application platform. This makes it easier to adjust the private API interface in the file package of the application APP later, so as to reduce the probability of failure in uploading the application APP.
[0055] Further references Figure 3 , showing some other embodiments of the interface file scanning method according to the present disclosure. The interface file scanning method comprises the following steps:
[0056] Step 301 : Scan and process each header file included in the first resource framework file corresponding to the target platform program according to a preset first interface identification group to obtain a first interface file group corresponding to the first interface identification group.
[0057] In some embodiments, the execution body of the interface file scanning method (eg Figure 1 The computing device 101) shown can scan and process each header file included in the first resource framework file corresponding to the target platform program according to a preset first interface identification group to obtain a first interface file group corresponding to the above-mentioned first interface identification group.
[0058] In practice, the execution subject may perform the following scanning steps for each header file included in the first resource framework file:
[0059] The first step is to scan out the interface files corresponding to the first interface identification group in the interface files included in the header file. In practice, the execution subject can scan out the interface files whose interface identification included in the interface files included in the header file is the same as the first interface identification in the first interface identification group.
[0060] The second step is to filter each scanned interface file to generate a filter interface file and obtain a filter interface file group. Here, the filter process can be to remove code comments and special characters (for example, backspace "\b", carriage return "\r") in the interface file.
[0061] The third step is to add the filtering interface file that meets the first preset condition in the above filtering interface file group as the first interface file to the preset first interface file group. Here, the first preset condition can be "the interface file type of the filtering interface file is the target type". Here, the target type can be any of the following: OC (Object C) class, Swift class, C class (C method).
[0062] Step 302: extract the first public interface file corresponding to the first public interface identifier in the preset first public interface identifier group included in the first resource framework file to obtain a first public interface file group.
[0063] In some embodiments, the execution subject may extract the first public interface file corresponding to the first public interface identifier in the preset first public interface identifier group included in the first resource framework file to obtain the first public interface file group.
[0064] In practice, the execution subject may perform the following extraction steps for each header file included in the first resource framework file:
[0065] The first step is to extract the interface file corresponding to the first public interface identifier in the first public interface identifier group from the various interface files included in the header file as the candidate interface file, and obtain the candidate interface file group. In practice, the execution subject can extract the interface file whose interface identifier included in the various interface files included in the header file is the same as the first public interface identifier in the first public interface identifier group as the candidate interface file, and obtain the candidate interface file group.
[0066] The second step is to filter each candidate interface file in the above candidate interface file group to generate a filtered candidate interface file and obtain a filtered candidate interface file group. Here, the filtering process can be to remove code comments and special characters in the interface file.
[0067] The third step is to add the filter candidate interface file that meets the second preset condition in the above filter candidate interface file group as the first public interface file to the preset first public interface file group. Here, the second preset condition can be "the interface file type of the filter candidate interface file is the target type". Here, the target type can be any of the following: OC (Object C) class, Swift class, C class (C method).
[0068] Step 303: for each compiled file included in the first resource framework file, perform the following scanning steps:
[0069] Step 3031, decompress the above compiled file to obtain a decompressed compiled file.
[0070] In some embodiments, the execution subject may decompress the compiled file to obtain a decompressed compiled file. In practice, the execution subject may decompress the compiled file using a lossless compression algorithm (LZFSE) to obtain a decompressed compiled file. Here, the decompressed compiled file may be a file in JSON format.
[0071] Step 3032: Scan the primary key fields in the decompressed compiled file and the primary key fields corresponding to the second public interface identification group as the second public interface file.
[0072] In some embodiments, the execution subject may scan the primary key field in each primary key field included in the decompressed compiled file and the primary key field having the same primary key identifier as the second public interface identifier in the second public interface identifier group as the second public interface file. Here, the primary key field included in the decompressed compiled file may refer to the code field for calling the interface in the decompressed compiled file. Here, the primary key identifier may refer to the interface identifier.
[0073] Step 3033: Add each scanned second public interface file to a preset second public interface file group.
[0074] In some embodiments, the execution entity may add each scanned second public interface file to a preset second public interface file group.
[0075] Step 304 , scanning and processing each header file included in the second resource framework file corresponding to the target platform program according to the preset private interface identification group, to obtain a private interface file group corresponding to the private interface identification group.
[0076] In some embodiments, the execution subject may scan and process each header file included in the second resource framework file corresponding to the target platform program according to a preset private interface identification group to obtain a private interface file group corresponding to the private interface identification group.
[0077] In practice, the execution subject may perform the following scanning steps for each header file included in the second resource framework file:
[0078] The first step is to scan out the interface files corresponding to the private interface identification group in the various interface files included in the header file as the second candidate interface files, and obtain the second candidate interface file group. In practice, the execution subject can scan out the interface files whose interface identifications included in the various interface files included in the header file are the same as the private interface identifications in the private interface identification group as the second candidate interface files, and obtain the second candidate interface file group.
[0079] The second step is to filter each interface file in the second candidate interface file group to generate a second filtered candidate interface file and obtain a second filtered candidate interface file group. Here, the filtering process may be to remove code comments and special characters in the interface file.
[0080] The third step is to add the second filter candidate interface file that meets the third preset condition in the above second filter candidate interface file group as a private interface file to the preset private interface file group. Here, the third preset condition can be "the interface file type of the second filter candidate interface file is the target type". Here, the target type can be any one of the following: OC (Object C) class, Swift class, C class (C method).
[0081] Step 305: Generate a target private interface file group based on the first interface file group, the first public interface file group, the second public interface file group and the private interface file group.
[0082] In some embodiments, the specific implementation of step 305 and the technical effects brought about can be referred to Figure 2 The corresponding step 205 in the embodiments will not be described in detail here.
[0083] from Figure 3 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 3 The process 300 in some corresponding embodiments can scan the interface files of the C class and the Swift class corresponding to the first resource framework file and the second resource framework file. Thus, the private interface files in the target platform program (IOS application platform) can be completely scanned. Thus, it is convenient to accurately parse the private API interface called in the file package of the APP according to the private API interface in the target application platform.
[0084] Further references Figure 4 , showing some further embodiments of the interface file scanning method according to the present disclosure. The interface file scanning method comprises the following steps:
[0085] Step 401 : Scan and process each header file included in the first resource framework file corresponding to the target platform program according to a preset first interface identification group to obtain a first interface file group corresponding to the first interface identification group.
[0086] Step 402: extract the first public interface file corresponding to the first public interface identifier in the preset first public interface identifier group included in the first resource framework file to obtain the first public interface file group.
[0087] Step 403: Scan and process the compiled files included in the first resource framework file according to the preset second public interface identification group to obtain a second public interface file group corresponding to the second public interface identification group.
[0088] Step 404 , scanning and processing each header file included in the second resource framework file corresponding to the target platform program according to the preset private interface identification group, to obtain a private interface file group corresponding to the private interface identification group.
[0089] Step 405: Generate a target private interface file group based on the first interface file group, the first public interface file group, the second public interface file group and the private interface file group.
[0090] In some embodiments, the specific implementation of steps 401-405 and the technical effects brought about can be referred to Figure 2 The corresponding steps 201-205 in the embodiments are not described in detail here.
[0091] Step 406, decompile the application file to be uploaded to obtain a target executable file.
[0092] In some embodiments, the execution body of the interface file scanning method (eg Figure 1 The computing device 101 shown in the figure can call a reverse tool (class-dump tool) to decompile the application file to be uploaded to obtain a target executable file. Here, the application file to be uploaded can refer to the APP file to be uploaded to the target platform program (IOS application platform).
[0093] Step 407: symbolize the target executable file to obtain a string text.
[0094] In some embodiments, the execution subject may perform symbolic processing on the target executable file through the strings command to obtain a string text. Here, the string text may refer to the code text of the target executable file.
[0095] Step 408: Scan the above character string text according to the preset second interface identification group to obtain an executable interface file group corresponding to the above second interface identification group.
[0096] In some embodiments, the execution subject can scan the interface files whose interface identifiers included in the various interface files included in the string text are the same as the second interface identifier in the second interface identifier group as executable interface files to obtain an executable interface file group. Here, the preset second interface identifier group can refer to a second interface identifier group composed of the interface identifiers of various interfaces called by developers when developing the application file to be uploaded.
[0097] Step 409: determine whether there is an executable interface file in the executable interface file group corresponding to the target private interface file in the target private interface file group.
[0098] In some embodiments, the execution subject may determine whether there is an executable interface file in the executable interface file group that is the same as the target private interface file in the target private interface file group.
[0099] Step 410: In response to the determination of existence, the executable interface file in the executable interface file group corresponding to the target private interface file in the target private interface file group is determined as the interface file to be adjusted, thereby obtaining the interface file group to be adjusted.
[0100] In some embodiments, in response to determining the existence, the execution subject may determine the executable interface file in the executable interface file group that is identical to the target private interface file in the target private interface file group as the interface file to be adjusted, thereby obtaining the interface file group to be adjusted.
[0101] Step 411: Adjust the interface files in the application program files to be uploaded according to the interface file group to be adjusted.
[0102] In some embodiments, for each interface file to be adjusted in the above-mentioned interface file group to be adjusted, the above-mentioned execution subject can adjust the interface file included in the above-mentioned application file to be uploaded that is the same as the above-mentioned interface file to be adjusted. Here, the adjustment method can be: deleting the above-mentioned interface file, or replacing the above-mentioned interface file with a public interface file with the same function.
[0103] from Figure 4 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 4 The process 400 in some corresponding embodiments completes the parsing of the private API interface called in the APP to be uploaded, and completes the adjustment of the private API interface called in the APP to be uploaded. Thereby, the probability of APP upload failure is reduced. In addition, by adjusting the private API interface called in the APP to be uploaded, the security risks of the application APP are also reduced. For example, the called private API interface may contain a program virus, which may lead to information leakage of users using the application APP. In this way, by adjusting the private API interface called in the application APP to be uploaded, the security risks brought by the called private API interface are eliminated.
[0104] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of an interface file scanning device, and these device embodiments are similar to Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0105] like Figure 5As shown, the interface file scanning device 500 of some embodiments includes: a first scanning unit 501, an extracting unit 502, a second scanning unit 503, a third scanning unit 504 and a generating unit 505. Among them, the first scanning unit 501 is configured to scan and process the various header files included in the first resource framework file corresponding to the target platform program according to the preset first interface identification group, and obtain the first interface file group corresponding to the above-mentioned first interface identification group; the extraction unit 502 is configured to extract the first public interface file included in the above-mentioned first resource framework file corresponding to the first public interface identification in the preset first public interface identification group, and obtain the first public interface file group; the second scanning unit 503 is configured to scan and process the various compiled files included in the above-mentioned first resource framework file according to the preset second public interface identification group, and obtain the second public interface file group corresponding to the above-mentioned second public interface identification group; the third scanning unit 504 is configured to scan and process the various header files included in the second resource framework file corresponding to the above-mentioned target platform program according to the preset private interface identification group, and obtain the private interface file group corresponding to the above-mentioned private interface identification group; the generation unit 505 is configured to generate the target private interface file group based on the above-mentioned first interface file group, the above-mentioned first public interface file group, the above-mentioned second public interface file group and the above-mentioned private interface file group.
[0106] Optionally, the device 500 also includes: a decompilation unit, configured to decompile the application file to be uploaded to obtain a target executable file; a symbolization unit, configured to symbolize the above-mentioned target executable file to obtain a string text; and a string scanning unit, configured to scan the above-mentioned string text according to a preset second interface identification group to obtain an executable interface file group corresponding to the above-mentioned second interface identification group.
[0107] Optionally, the device 500 also includes: a first determination unit, configured to determine whether there is an executable interface file in the above-mentioned executable interface file group that corresponds to the target private interface file in the above-mentioned target private interface file group; a second determination unit, configured to, in response to determining the existence, determine the executable interface file in the above-mentioned executable interface file group that corresponds to the target private interface file in the above-mentioned target private interface file group as the interface file to be adjusted, so as to obtain the interface file group to be adjusted; and an adjustment unit, configured to adjust the interface files in the above-mentioned application file to be uploaded according to the above-mentioned interface file group to be adjusted.
[0108] Optionally, the first scanning unit 501 is further configured to: for each header file included in the above-mentioned first resource framework file, perform the following scanning steps: scan out the interface files corresponding to the above-mentioned first interface identification group in each interface file included in the above-mentioned header file; filter each scanned interface file to generate a filtered interface file to obtain a filtered interface file group; add the filtered interface file in the above-mentioned filtered interface file group that meets the first preset condition as the first interface file to the preset first interface file group.
[0109] Optionally, the extraction unit 502 is further configured to: for each header file included in the above-mentioned first resource framework file, perform the following extraction steps: extract the interface file corresponding to the first public interface identifier in the above-mentioned first public interface identifier group from each interface file included in the above-mentioned header file as an alternative interface file, and obtain an alternative interface file group; filter each alternative interface file in the above-mentioned alternative interface file group to generate a filtered alternative interface file, and obtain a filtered alternative interface file group; add the filtered alternative interface file in the above-mentioned filtered alternative interface file group that meets the second preset condition as the first public interface file to the preset first public interface file group.
[0110] Optionally, the second scanning unit 503 is further configured to: for each compiled file included in the above-mentioned first resource framework file, perform the following scanning steps: decompress the above-mentioned compiled file to obtain a decompressed compiled file; scan the primary key fields corresponding to the above-mentioned second public interface identification group in each primary key field included in the above-mentioned decompressed compiled file as the second public interface file; add each scanned second public interface file to the preset second public interface file group.
[0111] Optionally, the third scanning unit 504 is further configured to: for each header file included in the above-mentioned second resource framework file, perform the following scanning steps: scan out the interface file corresponding to the above-mentioned private interface identification group in each interface file included in the above-mentioned header file as the second alternative interface file, and obtain the second alternative interface file group; filter each interface file in the above-mentioned second alternative interface file group to generate a second filtered alternative interface file, and obtain the second filtered alternative interface file group; add the second filtered alternative interface file in the above-mentioned second filtered alternative interface file group that meets the third preset condition as a private interface file to the preset private interface file group.
[0112] It is understood that the units described in the device 500 are similar to those described in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 500 and the units included therein, and will not be described in detail here.
[0113] Reference below Figure 6 , which shows an electronic device (eg, Figure 1 The electronic devices in some embodiments of the present disclosure may include but are not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0114] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0115] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0116] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0117] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0118] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0119] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: scans and processes the header files included in the first resource framework file corresponding to the target platform program according to the preset first interface identification group to obtain the first interface file group corresponding to the first interface identification group; extracts the first public interface file included in the first resource framework file corresponding to the first public interface identification in the preset first public interface identification group to obtain the first public interface file group; scans and processes the compiled files included in the first resource framework file according to the preset second public interface identification group to obtain the second public interface file group corresponding to the second public interface identification group; scans and processes the header files included in the second resource framework file corresponding to the target platform program according to the preset private interface identification group to obtain the private interface file group corresponding to the private interface identification group; generates the target private interface file group based on the first interface file group, the first public interface file group, the second public interface file group and the private interface file group.
[0120] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0121] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0122] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor comprising a first scanning unit, an extraction unit, a second scanning unit, a third scanning unit and a generation unit. Among them, the names of these units do not constitute a limitation on the units themselves in certain cases, for example, the extraction unit may also be described as "a unit that scans out the first public interface file corresponding to the first public interface identifier in the preset first public interface identifier group from the above-mentioned first resource framework file, and obtains the first public interface file group".
[0123] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0124] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. An interface file scanning method, comprising: According to the preset first interface identification group, each header file included in the first resource framework file corresponding to the target platform program is scanned and processed to obtain a first interface file group corresponding to the first interface identification group; Extracting the first public interface file corresponding to the first public interface identifier in the preset first public interface identifier group included in the first resource framework file to obtain a first public interface file group; Scanning and processing each compiled file included in the first resource framework file according to the preset second public interface identification group to obtain a second public interface file group corresponding to the second public interface identification group; According to a preset private interface identification group, each header file included in the second resource framework file corresponding to the target platform program is scanned and processed to obtain a private interface file group corresponding to the private interface identification group; A target private interface file group is generated based on the first interface file group, the first public interface file group, the second public interface file group, and the private interface file group.
2. The method according to claim 1, wherein: The method further comprises: Decompile the uploaded application file to obtain the target executable file; Performing symbolic processing on the target executable file to obtain a string text; According to the preset second interface identification group, the character string text is scanned and processed to obtain an executable interface file group corresponding to the second interface identification group.
3. The method according to claim 2, wherein: The method further comprises: Determine whether there is an executable interface file in the executable interface file group that corresponds to the target private interface file in the target private interface file group; In response to determining that the target private interface file exists, determining the executable interface file in the executable interface file group corresponding to the target private interface file in the target private interface file group as the interface file to be adjusted, thereby obtaining the interface file group to be adjusted; According to the interface file group to be adjusted, the interface files in the application file to be uploaded are adjusted.
4. The method according to claim 1, wherein: The method of scanning and processing each header file included in the first resource framework file corresponding to the target platform program according to the preset first interface identification group to obtain a first interface file group corresponding to the first interface identification group includes: For each header file included in the first resource framework file, the following scanning steps are performed: Scanning out the interface files corresponding to the first interface identification group from among the interface files included in the header file; Performing filtering processing on each scanned interface file to generate a filtering interface file and obtain a filtering interface file group; The filtering interface files in the filtering interface file group that meet the first preset condition are added as first interface files to the preset first interface file group.
5. The method according to claim 1, wherein: The step of extracting the first public interface file corresponding to the first public interface identifier in the preset first public interface identifier group included in the first resource framework file to obtain the first public interface file group includes: For each header file included in the first resource framework file, the following extraction steps are performed: Extracting the interface files corresponding to the first public interface identifier in the first public interface identifier group from the interface files included in the header file as candidate interface files to obtain a candidate interface file group; Performing filtering processing on each candidate interface file in the candidate interface file group to generate a filtered candidate interface file, thereby obtaining a filtered candidate interface file group; The filtering candidate interface files in the filtering candidate interface file group that meet the second preset condition are added as first public interface files to the preset first public interface file group.
6. The method according to claim 1, wherein: The scanning and processing of each compiled file included in the first resource framework file according to the preset second public interface identification group to obtain a second public interface file group corresponding to the second public interface identification group includes: For each compiled file included in the first resource framework file, the following scanning steps are performed: Decompressing the compiled file to obtain a decompressed compiled file; Scanning out the primary key field corresponding to the second public interface identification group from among the primary key fields included in the decompressed compiled file as the second public interface file; Each scanned second public interface file is added to a preset second public interface file group.
7. The method according to claim 1, wherein: The method of scanning and processing each header file included in the second resource framework file corresponding to the target platform program according to the preset private interface identification group to obtain a private interface file group corresponding to the private interface identification group includes: For each header file included in the second resource framework file, the following scanning steps are performed: Scanning out the interface files corresponding to the private interface identification group from the interface files included in the header file as second candidate interface files to obtain a second candidate interface file group; Filtering each interface file in the second candidate interface file group to generate a second filtered candidate interface file, thereby obtaining a second filtered candidate interface file group; The second filtering candidate interface files in the second filtering candidate interface file group that meet the third preset condition are added as private interface files to the preset private interface file group.
8. An interface file scanning device, comprising: A first scanning unit is configured to scan and process each header file included in the first resource framework file corresponding to the target platform program according to a preset first interface identification group, and obtain a first interface file group corresponding to the first interface identification group; An extracting unit is configured to extract a first public interface file corresponding to a first public interface identifier in a preset first public interface identifier group and included in the first resource framework file to obtain a first public interface file group; A second scanning unit is configured to scan and process each compiled file included in the first resource framework file according to a preset second public interface identification group to obtain a second public interface file group corresponding to the second public interface identification group; A third scanning unit is configured to scan and process each header file included in the second resource framework file corresponding to the target platform program according to a preset private interface identification group, and obtain a private interface file group corresponding to the private interface identification group; The generating unit is configured to generate a target private interface file group based on the first interface file group, the first public interface file group, the second public interface file group and the private interface file group.
9. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Identification method for application program, device thereof, electronic equipment and medium
CN110427190A
Code compiling method, device and system, computer device and storage medium
CN110531984A
Log generation and storage method and device for smart contract, equipment and storage medium
CN112419057A
Task encryption method and device, electronic equipment and computer readable medium
CN113032818A
Generating program classes for use with localized resources
US20040261054A1
