SDK permission calling method and device based on AI

Through the AI-based SDK permission call method, the target reflection system and HOOK operations are used to generate log information, which solves the problems of difficulty and low efficiency of permission call monitoring in the prior art, and achieves the effect of simplifying the monitoring process and improving rectification efficiency.

CN119323045AActive Publication Date: 2025-01-17彩讯科技股份有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411879146.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-01-17
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

In the existing technology, the monitoring and management of permission calls have problems such as high threshold, high operation difficulty, high rectification of third-party SDKs and low efficiency. Especially in the context of the rapid development of mobile Internet applications, a new technology is urgently needed. Scheme to simplify the monitoring process of SDK permission call.

Method used

Using AI-based SDK permission call method, by building the target reflection system of the target system, performing HOOK operations of the target API to generate log information, determining the SDK permission call results, and intercepting operations and encapsulating them based on the log information to reduce the third-party SDK Remediation difficulty and improve rectification efficiency.

Benefits of technology

It has achieved simplified the monitoring process of SDK permission call, reduced the technical threshold and operation difficulty, improved the rectification efficiency of third-party SDKs, provided an accurate permission call data basis, and improved the security protection of user information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119323045A_ABST
    Figure CN119323045A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an AI-based SDK permission calling method and device, and relates to the technical field of computers. The method comprises the following steps: constructing a target reflection system corresponding to a target system; under the condition that the version of the target system is determined to be larger than a preset version, target HOOK operation is executed on a target API based on the target reflection system to generate target log information, the target API comprises an API corresponding to the sensitive operation and / or an API corresponding to the permission request operation, and the target log information comprises target interaction node feature data; and determining an SDK permission calling result according to the target log information. In this way, the SDK permission calling monitoring process can be simplified, the technical threshold and operation difficulty of SDK permission calling monitoring are reduced, the rectification difficulty of the third-party SDK is reduced, and the rectification efficiency of the third-party SDK is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to an AI-based SDK permission calling method and device. Background Art

[0002] At present, with the rapid development of mobile Internet applications, the monitoring and management of permission calls are becoming increasingly important.

[0003] In the related technologies, the process of calling permissions is mainly based on creating a virtual sandbox and customizing the read-only memory (ROM). The above methods have technical problems such as high threshold of monitoring technology, high difficulty in operation, difficulty in rectifying the third-party software development kit (SDK), and low efficiency.

[0004] Therefore, a new technical solution is urgently needed to solve the above technical problems. Summary of the invention

[0005] According to the embodiments of the present application, an AI-based SDK permission calling method and device are provided, which can simplify the SDK permission calling monitoring process, reduce the technical threshold and operational difficulty of SDK permission calling monitoring, reduce the difficulty of rectification of third-party SDKs, and improve the rectification efficiency of third-party SDKs.

[0006] In a first aspect of the present application, an AI-based SDK permission calling method is proposed, comprising: Construct a target reflection system corresponding to the target system; When it is determined that the version of the target system is greater than the preset version, based on the target reflection system, a target HOOK operation is performed on the target API to generate target log information, wherein the target API includes: an API corresponding to a sensitive operation, and / or an API corresponding to a permission request operation, and the target log information includes: target interaction node feature data; Determine the SDK permission call result based on the target log information.

[0007] In some feasible implementations, before determining the SDK permission call result according to the target log information, the method further includes: When it is determined that the version of the target system is less than or equal to the preset version, based on the target system, a target HOOK operation is performed on the target API to generate target log information.

[0008] In some feasible implementations, when it is determined that the version of the target system is greater than the preset version, based on the target reflection system, performing a target HOOK operation on the target API to generate target log information includes: Control the target APP to execute the target code; Inject the target SDK permission call request of the target APP based on the target HOOK operation to generate the target log information; Among them, the target SDK permission call request includes: a phone status permission call request, a file read permission call request, a camera call permission request, a microphone call permission request, and / or a location permission call request.

[0009] In some feasible implementations, determining the SDK permission call result according to the target log information includes: Trigger the target http request to obtain the packet capture results of the target log information; According to the packet capture result, the SDK permission call result is determined, wherein the SDK permission call result includes: the permission call result of the target APP and / or the permission call result of the third-party SDK.

[0010] In some feasible implementations, the above method further includes: Execute the target interception operation according to the SDK permission call result.

[0011] In some feasible implementations, the above-mentioned execution of the target interception operation according to the SDK permission call result includes: If it is determined based on the SDK permission call result that the SDK call permissions executed by the target APP exceed the minimum permission set corresponding to the target APP, Perform target filtering operations based on the target blacklist package name to make the target SDK return an error callback result.

[0012] In some feasible implementations, the above-mentioned execution of the target interception operation according to the SDK permission call result further includes: Generate a target model function according to the target interaction node feature data; According to the target model function, the target interception operation probability parameter is determined; The target interception operation is performed according to the target interception operation probability parameter.

[0013] In some feasible implementations, the above method further includes: Perform target encapsulation operations on the target SDK dynamic interface.

[0014] In a second aspect of the present application, an AI-based SDK permission calling device is provided, which is used to implement the AI-based SDK permission calling method as described above, and the device includes: A construction unit, used for constructing a target reflection system corresponding to the target system; An execution unit, configured to, when determining that the version of the target system is greater than a preset version, perform a target HOOK operation on the target API based on the target reflection system to generate target log information, wherein the target API includes: an API corresponding to a sensitive operation, and / or an API corresponding to a permission request operation, and the target log information includes: target interaction node feature data; The determination unit is used to determine the SDK permission call result according to the target log information.

[0015] In a third aspect of the present application, an electronic device is provided, comprising a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions are used by the processor to execute the AI-based SDK permission calling method as described in any of the above items when the processor is running.

[0016] The AI-based SDK permission calling method and device provided in the embodiment of the present application, wherein the method includes: constructing a target reflection system corresponding to the target system; when it is determined that the version of the target system is greater than the preset version, based on the target reflection system, performing a target HOOK operation on the target API to generate target log information, wherein the target API includes: an API corresponding to sensitive operations, and / or an API corresponding to permission request operations; determining the SDK permission calling result according to the target log information. The present application can simplify the SDK permission calling monitoring process, reduce the technical threshold and operational difficulty of SDK permission calling, reduce the difficulty of rectification of third-party SDKs, and improve the rectification efficiency of third-party SDKs.

[0017] It should be understood that the contents described in the Summary of the Invention are not intended to limit the key or important features of the embodiments of the present application, nor are they intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and other features, advantages and aspects of the embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein: Figure 1 A flowchart of an AI-based SDK permission calling method provided in an embodiment of the present application; Figure 2 A flowchart of another AI-based SDK permission calling method provided in an embodiment of the present application; Figure 3 A flowchart of another AI-based SDK permission calling method provided in an embodiment of the present application; Figure 4 A flowchart of another AI-based SDK permission calling method provided in an embodiment of the present application; Figure 5 A structural schematic diagram of an AI-based SDK permission calling device provided in an embodiment of the present application; Figure 6 A structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0020] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0021] In a first aspect of an embodiment of the present application, an AI-based SDK permission calling method is proposed. Figure 1-Figure 4 A schematic diagram of a process of calling an SDK permission method 100 based on AI provided in an embodiment of the present application is shown in FIG. Figure 1-Figure 4 As shown, the method 100 includes: Step S1, constructing a target reflection system corresponding to the target system.

[0022] Exemplarily, the target systems mentioned above may include: Android system, iOS system, Windows system, etc., which are not specifically limited here.

[0023] Exemplarily, the target reflection system includes: a reflection framework corresponding to the target system. Specifically, the reflection framework includes: a HOOK framework.

[0024] It should be noted that, in the process of performing a target HOOK operation on a target API, it is usually necessary to obtain the signature of the target system or add the whitelist permission before the corresponding reflection operation can be performed. Due to the above limitations, it is impossible to directly perform the HOOK operation on the target API. Based on this, the method 100 of the present application proposes the following step S2: Step S2, when it is determined that the version of the target system is greater than the preset version, based on the target reflection system, a target HOOK operation is performed on the target API to generate target log information, wherein the target API includes: an API corresponding to sensitive operations, and / or, an API corresponding to permission request operations, and the target log information includes: target interaction node feature data.

[0025] Exemplarily, the above preset versions can be defined according to the actual SDK permission monitoring requirements of the target users, and are not specifically limited here.

[0026] Exemplarily, the target reflection system may include: a variety of HOOK functions. Specifically, when it is necessary to perform HOOK operations on different types of target APIs, the target HOOK functions corresponding to the target APIs may be enabled to generate the target log information. It should be noted that the target HOOK operation is used to record all permission call behaviors of the target API to generate the target log information.

[0027] It should be noted that the above-mentioned target log information is used to record sensitive operations, and / or key feature information of permission request operations. Among them, the above-mentioned key feature information may include: information related to file operations, information related to network operations, information related to registry operations, information related to permission checks, and information related to permission upgrades, etc. The above-mentioned target interaction node feature data may include: collecting target page control ID feature data, all text feature data of the target page, target application permission name feature data, API call frequency feature data, the title feature data of the previous page of the target page, all text feature data of the previous page of the target page, the control ID feature data of the previous page of the target page, device status feature data, and / or application signature feature data.

[0028] Specifically, the above-mentioned file operation related information may include: file operation path information; file operation type information, such as: read, write, create and delete, etc.; file operation result information, such as: operation failure or operation success, etc.; file operation time information, such as: file operation timestamp information; file operation calling object information, such as: process name, process identifier (Process Identifier, PID), etc.

[0029] Specifically, the above-mentioned network operation-related information may include: connection address information, such as: target IP address; port number information, such as: target port number; operation type information, such as: connection operation, sending operation, receiving operation, etc.; data volume information, such as: the amount of data sent or received; operation result information, such as: operation success or operation failure, etc.; operation time information, such as: timestamp information of the operation; calling object information of the network operation, such as: process name, process identifier (Process Identifier, PID), etc.

[0030] Specifically, the above-mentioned registry operation related information may include: registry key path information; operation type information, such as: read, write, delete, etc.; operation result information, such as: operation success or operation failure; operation time information, such as: timestamp information when the operation occurred; calling object information of the registry operation, such as: process name, process identifier (Process Identifier, PID), etc.

[0031] Specifically, the above-mentioned permission check related information may include: security identifier information (Security Identifier, SID); permission check result information; permission check operation time information, such as: timestamp information when the permission check operation occurs; calling object information of the permission check operation, such as: process name, process identifier (Process Identifier, PID), etc.

[0032] Specifically, the above-mentioned permission upgrade related information may include: the name information of the upgraded permission; the operation result information of the permission upgrade, such as: operation success or operation failure; time information of the permission upgrade operation, such as: timestamp information when the permission upgrade operation occurs; calling object information of the permission upgrade operation, such as: process name, process identifier (ProcessIdentifier, PID), etc.

[0033] Exemplarily, the above sensitive operations may include: file operations, network operations, and registry operations, etc. The above permission request operations may include: activation request operations of target electronic device target hardware and target information retrieval request operations, etc.

[0034] Specifically, taking the Android system as an example, when it is determined that the version of the Android system is greater than 8.0, a target HOOK operation can be performed on the target API based on the reflection class of the target reflection system to generate target log information.

[0035] In some feasible implementations, in step S2, when it is determined that the version of the target system is greater than the preset version, based on the target reflection system, performing a target HOOK operation on the target API to generate target log information includes: Step S21, controlling the target APP to execute the target code.

[0036] Step S22, injecting a target SDK permission call request into the target APP based on the target HOOK operation to generate target log information; wherein the target SDK permission call request includes: a phone status permission call request, a file read permission call request, a camera call permission request, a microphone call permission request, and / or a positioning permission call request.

[0037] Exemplarily, the target APP can be controlled to execute its own target code so that all operations of the target APP go through the SDK management class of the target HOOK framework.

[0038] Exemplarily, the entry point of the target APP may be determined. The entry point of a Windows application may be: WinMain function or main function. For an Android application, the entry point may be onCreate of MainActivity.

[0039] Exemplarily, after determining the entry point of the target APP, the target code is automatically injected. Specifically, the SDK management class of the HOOK framework can be injected into the target APP based on the dynamic link library injection technology. Alternatively, the source code of the target APP can also be modified to directly call the initialization program of the SDK management class at the entry point.

[0040] Exemplarily, after the target code is automatically injected, the HOOK framework can be initialized. Specifically, when the target APP is started, the initialization procedure of the SDK management class is called to ensure that all relevant APIs are HOOKed. It should be noted that key APIs can be HOOKed to ensure that all sensitive operations and permission request operations go through the HOOK framework.

[0041] Exemplarily, the target API may include: GetPhoneStatus for determining the phone status permission call request. The target API may also include: CreateFile for determining the file read permission call request. The target API may also include: OpenCamera for determining the camera call permission request. The target API may also include: OpenMicrophone for determining the microphone call permission request. The target API may also include: GetLocation for the location permission call request.

[0042] Based on this, when it is determined that the version of the target system is greater than the preset version, the above method can be achieved by controlling the target APP to execute the target code, so that the target APP can automatically perform a pre-self-inspection operation on its own SDK permission call process without waiting for the third party to issue the privacy detection report results. By injecting the target SDK permission call request into the target APP based on the target HOOK operation to generate target log information, it can provide an accurate data basis for the subsequent SDK permission call management of the target APP, thereby saving development and testing time, simplifying the SDK permission call monitoring process, and reducing the technical threshold and operational difficulty of SDK permission calls.

[0043] In some feasible implementations, in step S3, the SDK permission call result is determined according to the target log information. The method 100 further includes: Step S3, when it is determined that the version of the target system is less than or equal to the preset version, based on the target system, a target HOOK operation is performed on the target API to generate target log information.

[0044] Exemplarily, taking the Android system as an example, when it is determined that the version of the Android system is less than or equal to 8.0, the target HOOK operation is directly performed on the target API to generate the above-mentioned target log information.

[0045] Based on this, the above method can realize hierarchical control of the SDK permission calls of the target APP according to the version information of the target system. When it is determined that the version of the target system is less than or equal to the preset version, based on the target system, the target HOOK operation is directly performed on the target API to generate target log information. This is beneficial to reduce the resource occupation of the target API execution target HOOK operation process when the version of the target system is less than or equal to the preset version. While ensuring the operating efficiency of the target electronic device, it provides an accurate data basis for the subsequent control of the SDK permission calls of the target APP, thereby improving the efficiency of SDK permission call monitoring.

[0046] Step S4, determining the SDK permission call result according to the target log information.

[0047] Exemplarily, the target log information may include: non-compliant calling behaviors, and / or compliant calling behaviors. The non-compliant calling behaviors include: calling behaviors executed by the target APP without the consent of the target user. The compliant calling behaviors include: calling behaviors executed by the target APP with the consent of the target user.

[0048] Exemplarily, the target log information in the target log may be read, and according to the target log information, the target structured data may be parsed and generated, and according to the target structured data, the SDK permission call result may be extracted.

[0049] Based on this, the AI-based SDK permission calling method provided by this application includes: building a target reflection system corresponding to the target system; when it is determined that the version of the target system is greater than the preset version, based on the target reflection system, performing a target HOOK operation on the target API to generate target log information, wherein the target API includes: an API corresponding to sensitive operations, and / or an API corresponding to permission request operations; according to the target log information, determining the SDK permission calling result. Based on the above-mentioned target reflection system, this application can get rid of the high-version reflection restriction of the target system. It can perform HOOK operations on the target API without obtaining the signature of the target system or adding whitelist permissions. It is beneficial to accurately record the target API permission call behavior through the above-mentioned target log information, and provide an accurate data basis for the subsequent SDK permission call control of the target APP, which is beneficial to simplify the SDK permission call monitoring process, reduce the technical threshold and operation difficulty of SDK permission call monitoring, and improve the efficiency of SDK permission call monitoring.

[0050] In some feasible implementations, the above step S4, determining the SDK permission call result according to the target log information, includes: Step S41, triggering a target http request to obtain a packet capture result of target log information.

[0051] It should be noted that, according to the format of the target log, a target http request can be initiated for the target log to obtain the packet capture result of the target log information.

[0052] Exemplarily, the packet capture result of the above log information can be obtained according to a network packet capture tool. The network packet capture tool may include: Wireshark, Fiddler, etc. The packet capture result can be recorded in the captured_log.txt file.

[0053] Step S42, determining the SDK permission call result according to the packet capture result, wherein the SDK permission call result includes: the permission call result of the target APP and / or the permission call result of the third-party SDK.

[0054] Exemplarily, the above-mentioned packet capture results can be parsed to determine the permission call results of the target APP and / or the permission call results of the third-party SDK.

[0055] Based on this, the above method triggers the target http request, obtains the packet capture results of the target log information, and determines the SDK permission call results according to the packet capture results. It can request the SDK permission call results in the form of a network request, so that the target user can view the SDK permission call results in real time without waiting until a round of testing is over. It is beneficial to improve the friendliness of the target user to view the SDK permission call results, and is beneficial to further improve the SDK permission call monitoring efficiency. Among them, the above SDK permission call results include: the permission call results of the target APP, and / or, the permission call results of the third-party SDK, which is beneficial to realize dual monitoring of the APP host and / or, the third-party SDK, and is beneficial to reduce the difficulty of rectification of the third-party SDK and improve the rectification efficiency of the third-party SDK.

[0056] In some feasible implementations, the method 100 further includes: Step S5, executing the target interception operation according to the SDK permission call result.

[0057] For example, the SDK permission call result can be parsed, and when it is determined that the actual permission call range of the target APP exceeds the preset permissions corresponding to the target APP, the corresponding target interception operation is performed on the above-exceeded target permissions. The above-mentioned preset permissions can be defined by the target system or the target user.

[0058] Based on this, the above method can achieve accurate triggering of target interception operations when the actual permission access range of the target APP exceeds the preset range, so as to enhance the protection of the target user's information security.

[0059] In some feasible implementations, the above step S5, performing the target interception operation according to the SDK permission call result, includes: Step S51, when it is determined according to the SDK permission call result that the SDK call permission executed by the target APP exceeds the minimum permission set corresponding to the target APP, a target filtering operation is performed according to the target blacklist package name to make the target SDK return an error callback result.

[0060] Exemplarily, the permission blacklist and package name blacklist of the target system may be read. The file name of the permission blacklist may be: blacklist.txt. The package name blacklist may be package_blacklist.txt. The permission blacklist and package name blacklist of the target system may be user-defined.

[0061] Exemplarily, the SDK permission call result can be analyzed to determine the permission range actually called by the target APP and the package name corresponding to the calling object. The permission range and package name actually called are compared with the minimum permission set and the package name corresponding to the minimum permission set to determine the exceeded target permissions and corresponding package names, and a target filtering operation is performed based on the exceeded target permissions and corresponding package names, so that when the target APP requests SDK call permissions, the target SDK returns an error callback result.

[0062] Based on this, the above method can be implemented to directly intercept the permission call request of the above target APP based on the above target blacklist package name when the SDK call permission actually executed by the target APP exceeds the minimum permission set corresponding to the target APP, so that the above target APP cannot call the API of the target system, thereby improving the protection of the target user's information security and improving the compliance of the permissions actually called by the target APP with the privacy agreement.

[0063] It should be noted that if it is determined that a third party cannot modify the target SDK, a separate management operation can be performed to control and intercept sensitive permissions of the target SDK without replacing the target SDK. Based on this, it is beneficial to improve the protection of the privacy security of target user information during the operation of the target APP while ensuring the stable operation of the target APP, and improve the compliance of the target APP's operation process.

[0064] In some feasible implementations, the above step S5, performing the target interception operation according to the SDK permission call result, further includes: Step S52, generating a target model function according to the target interaction node feature data.

[0065] Step S53, determining the target interception operation probability parameter according to the target model function.

[0066] Step S54, executing the target interception operation according to the target interception operation probability parameter.

[0067] Exemplarily, the target interaction node characteristic data may include: collecting target page control ID characteristic data, all text characteristic data of the target page, target application permission name characteristic data, API call frequency characteristic data, title characteristic data of the page before the target page, all text characteristic data of the page before the target page, control ID characteristic data of the page before the target page, device status characteristic data, and / or application signature characteristic data.

[0068] Exemplarily, a preprocessing operation may be performed on the target interactive node feature data to generate a corresponding target code.

[0069] Specifically, based on tag coding, the above-mentioned target page control ID feature data, the control ID feature data of the page before the target page, the device status feature data and the application signature feature data, and / or the permission name feature data of the target application can be encoded respectively to generate target numerical data.

[0070] Specifically, based on the bag-of-words model in Word2Vec, the target text data can be generated according to all the text feature data of the target page, all the text feature data of the page before the target page, and / or the title feature data of the page before the target page.

[0071] Specifically, combined target feature data may be generated based on the target numerical data, target text data, and / or API call frequency feature data, wherein the target feature data may include: ID feature combination data, and / or page text similarity score data.

[0072] It should be noted that the ID feature combination data is generated by combining the target page control ID feature data and the control ID feature data of the page before the target page. The page text similarity score data is generated by combining all text feature data of the target page and all text feature data of the page before the target page.

[0073] It should be noted that, in some feasible implementations, the API call frequency feature data may be standardized to generate API call frequency standardized feature data.

[0074] Exemplarily, a target model function may be generated based on the above-mentioned combined target feature data and the above-mentioned API call frequency standardized feature data, and trained based on the following formula to determine the target interception operation probability parameter: ; in, Used to represent the target interception operation probability parameter, Used to represent the preset activation function Sigmoid, Used to represent feature data vectors, Used to indicate a preset offset. Used to represent the weight corresponding to the feature data vector.

[0075] It should be noted that the feature data vector Contains vector elements corresponding to multiple feature data. Specifically, the feature data vector It can be expressed as follows: ; in, is the feature data vector, is the vector element corresponding to the first feature data, is the vector element corresponding to the second characteristic data, is the vector element corresponding to the third characteristic data, is the vector element corresponding to the fourth characteristic data.

[0076] It should be noted that the weight corresponding to the feature data vector It may include a plurality of weight elements corresponding to the vector elements corresponding to the plurality of feature data. Specifically, the weight corresponding to the feature data vector It can be expressed as follows: ; in, is the weight corresponding to the feature data vector, for The corresponding weight, for The corresponding weight, for The corresponding weight, for The corresponding weight.

[0077] For example, based on the above formulas (1) to (3), if the determined target interception operation probability parameter is greater than or equal to the preset probability parameter, the target interception operation is performed, and if the determined target interception operation probability parameter is less than the preset probability parameter, the target interception operation is not performed. The above preset probability parameter is set according to actual needs.

[0078] Based on this, based on the above steps S52~S53, it is possible to accurately generate a target model function based on the target interaction node feature data in the log collection, accurately determine the target interception operation probability parameters based on the target model function, and accurately perform the target interception operation according to the above target interception operation probability parameters, thereby further improving the accuracy of the target interception operation.

[0079] In some feasible implementations, the method 100 further includes: Step S6, performing a target encapsulation operation on the target SDK dynamic interface.

[0080] Exemplarily, a target middle layer class may be created, wherein the target middle layer class may be used to perform target encapsulation operations on the target SDK dynamic interface. Specifically, an authorized target user may be predefined in the target middle layer class so that the authorized target user can access the target SDK dynamic interface, so that the target user can expand the interface according to different usage scenarios.

[0081] Based on this, the above method can improve the applicability and scalability of the method by performing a target encapsulation operation on the target SDK dynamic interface.

[0082] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0083] The above is an introduction to the method embodiment. The following is a further explanation of the scheme described in this application through an apparatus embodiment.

[0084] According to a second aspect of an embodiment of the present application, an AI-based SDK permission calling device is proposed, which is used to implement the AI-based SDK permission calling method as described above. Figure 5 A structural diagram of an AI-based SDK permission calling device 200 provided in an embodiment of the present application is shown as follows: Figure 5 As shown, the apparatus 200 includes: a construction unit 210 , an execution unit 220 , and a determination unit 230 .

[0085] A construction unit 210, configured to construct a target reflection system corresponding to the target system; The execution unit 220 is used to perform a target HOOK operation on the target API based on the target reflection system to generate target log information when it is determined that the version of the target system is greater than the preset version, wherein the target API includes: an API corresponding to a sensitive operation and / or an API corresponding to a permission request operation, and the target log information includes: target interaction node feature data; The determination unit 230 is used to determine the SDK permission calling result according to the target log information.

[0086] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0087] Figure 6 A structural schematic diagram of an electronic device provided in an embodiment of the present application.

[0088] like Figure 6As shown, the electronic device 300 includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 508 into the random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the terminal device or the server are also stored. The CPU 301, the ROM 302, and the RAM 303 are connected to each other through the bus 304. The input / output (I / O) interface 305 is also connected to the bus 304.

[0089] The following components are connected to the I / O interface 305: an input section 306 including a keyboard, a mouse, etc.; an output section 307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed, so that a computer program read therefrom is installed into the storage section 308 as needed.

[0090] In particular, according to an embodiment of the present application, the above method flow steps can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a machine-readable medium, and the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 309, and / or installed from the removable medium 311. When the computer program is executed by the central processing unit (CPU) 301, the above-mentioned functions defined in the system of the present application are executed.

[0091] It should be noted that the computer-readable medium shown in the present application 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 the present application, 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 the present application, 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. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, 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 appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0092] 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 application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of the code, and the aforementioned module, 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 alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two 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 box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0093] The units or modules involved in the embodiments described in the present application may be implemented by software or hardware. The units or modules described may also be arranged in a processor. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves.

[0094] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of application involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the aforementioned application concept. For example, the above features are replaced with (but not limited to) technical features with similar functions applied in the present application.

Claims

1. An AI-based SDK permission calling method, characterized in that: include: Construct a target reflection system corresponding to the target system; In the case where it is determined that the version of the target system is greater than the preset version, based on the target reflection system, a target HOOK operation is performed on the target API to generate target log information, wherein the target API includes: an API corresponding to a sensitive operation, and / or, an API corresponding to a permission request operation, and the target log information includes: target interaction node feature data; Determine the SDK permission call result based on the target log information.

2. The method according to claim 1, characterized in that Before determining the SDK permission call result according to the target log information, the method further includes: In a case where it is determined that the version of the target system is less than or equal to the preset version, based on the target system, the target HOOK operation is performed on the target API to generate the target log information.

3. The method according to claim 1, characterized in that In the case where it is determined that the version of the target system is greater than the preset version, based on the target reflection system, performing a target HOOK operation on the target API to generate target log information includes: Control the target APP to execute the target code; Injecting a target SDK permission call request of the target APP based on the target HOOK operation to generate the target log information; The target SDK permission call request includes: a phone status permission call request, a file read permission call request, a camera call permission request, a microphone call permission request, and / or a location permission call request.

4. The method according to claim 3, characterized in that Determining the SDK permission call result according to the target log information includes: Trigger the target http request to obtain the packet capture result of the target log information; The SDK permission calling result is determined according to the packet capture result, wherein the SDK permission calling result includes: the permission calling result of the target APP and / or the permission calling result of a third-party SDK.

5. The method according to claim 4, characterized in that Also includes: According to the SDK permission call result, the target interception operation is performed.

6. The method according to claim 5, characterized in that The executing the target interception operation according to the SDK permission calling result includes: In the case where it is determined based on the SDK permission call result that the SDK call permission executed by the target APP exceeds the minimum permission set corresponding to the target APP, Perform target filtering operations based on the target blacklist package name to make the target SDK return an error callback result.

7. The method according to claim 6, characterized in that The performing the target interception operation according to the SDK permission calling result further includes: Generate a target model function according to the target interaction node feature data; Determining a target interception operation probability parameter according to the target model function; A target interception operation is performed according to the target interception operation probability parameter.

8. The method according to any one of claims 1 to 7, characterized in that Also includes: Perform target encapsulation operations on the target SDK dynamic interface.

9. An AI-based SDK permission calling device, characterized in that: For implementing the method according to claim 1, the device comprises: A construction unit, used for constructing a target reflection system corresponding to the target system; An execution unit, configured to, when determining that the version of the target system is greater than a preset version, perform a target HOOK operation on a target API based on the target reflection system to generate target log information, wherein the target API includes: an API corresponding to a sensitive operation, and / or an API corresponding to a permission request operation, and the target log information includes: target interaction node feature data; The determination unit is used to determine the SDK permission call result according to the target log information.

10. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions are used to execute the method according to any one of claims 1 to 8 when the processor is executed.

Citation Information

Patent Citations

  • Data query method and device applied to multi-system interaction, equipment, medium and product

    CN116662430A

  • Method and system for realizing Android data acquisition through reflection

    CN116775172A

  • Permission calling monitoring method and device and electronic equipment

    CN116956272A