App privacy compliance detection method and device

Through ASM insertion technology, the dynamic control framework for privacy compliance was built, which solved the problems of high cost and low efficiency in App privacy compliance detection, realized privacy compliance control in the development stage, and improved the privacy security and development efficiency of App. , ensuring the comprehensiveness and integrity of privacy compliance.

CN119026126AInactive Publication Date: 2024-11-26SHANDONG CITY COMMERCIAL BANK COOP ALLIANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411495618.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2024-11-26
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology relies on Root permissioned devices and manual audits in App privacy compliance detection, which is cost-effective and inefficient, cannot perceive compliance issues in real time, and lacks privacy compliance constraints in the development stage, which increases privacy compliance risks.

Method used

Use ASM instrumentation technology to build a dynamic management and control framework for privacy compliance, declare privacy permissions and business scenarios during the development stage, monitor the call frequency and behavior of sensitive system APIs in real time, generate privacy compliance reports, and ensure that the app complies with regulations when collecting and using data. .

Benefits of technology

By performing privacy compliance control during the development stage, compliance risks and costs are reduced, the privacy security and development efficiency of the app are improved, the comprehensiveness and integrity of privacy compliance are ensured, and the violations of third-party SDKs are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026126A_ABST
    Figure CN119026126A_ABST
Patent Text Reader

Abstract

The invention discloses an App privacy compliance detection method and device, and belongs to the technical field of information security, and the method comprises the steps: constructing a privacy compliance dynamic management and control framework implanted with privacy compliance specifications, and carrying out the management and control of system API behaviors related to user information; when a service layer of the App has a requirement for accessing system resources or functions, scanning global codes by using an ASM instrumentation technology, inserting proxy layer codes of an API of a sensitive system into a calling position, performing App service privacy check, and managing and controlling privacy compliance conditions of the service layer; after the App is started, checking the calling frequency of the App, and managing and controlling the calling frequency of the application to the API of the sensitive system in real time; and in an App privacy compliance management and control process, related information is collected, and a privacy compliance report is generated. According to the method, the necessity and the source of an App service scene can be checked, the problem of a client privacy compliance technology is solved, and the privacy compliance and the security of an application are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an App privacy compliance detection method and device, in particular to an Android APP privacy compliance detection method and device based on ASM plugging technology, belonging to the field of information security technology. Background Art

[0002] App privacy compliance testing is a process of evaluating and ensuring that mobile applications (Apps) comply with relevant laws and regulations when processing user personal information. This process includes checking the compliance of the App's privacy policy text (formal compliance) and the compliance at the code level (substantive compliance). The goal of the test is to help companies and developers identify App privacy compliance-related risks in advance from multiple dimensions such as personal information collection, permission usage scenarios, over-scope collection, privacy policies, and third-party SDKs, and avoid major risks such as regulatory notifications and application delisting. The main reason for App privacy compliance testing is to protect users' personal information and prevent it from being illegally collected and used. In addition, all Apps submitted for listing on the market or various platforms need to undergo privacy compliance testing. Only if they pass the test and there is no other content that violates the review rules can the App be launched normally. If the App privacy compliance test fails, the App will be rejected and not allowed to be listed, and then the illegal content will be rectified. Only after the rectification is completed can it be listed. Actively fulfilling compliance obligations can reduce compliance costs. If you encounter users with a strong sense of rights protection, civil litigation-related costs will also be incurred.

[0003] Currently, the inspection of sensitive system API calls in the market mainly relies on devices with root permissions and monitoring with the help of the XPosed framework. This traditional method is not only costly and requires customized Android devices, but also has high manpower and time costs. In addition, it relies on manual review, which is time-consuming and inefficient.

[0004] In addition, the application itself cannot perceive compliance issues in real time, resulting in an inability to effectively respond to sudden privacy compliance risks. In addition, this traditional method has many hidden problems. First, in terms of privacy compliance detection, the traditional method is usually to detect after the application is released. Once a problem is detected after the release, it has to be reworked and repaired, which is an extremely time-consuming and labor-intensive process. What's more serious is that this situation can easily cause great losses to the company. Second, the current market lacks a development framework that combines privacy compliance specifications. This makes it difficult for development specifications to take into account privacy compliance, and there is a lack of clear guidance and constraints in the development process. At the same time, it is also impossible to effectively constrain the violations of the introduced third-party SDK, further increasing the privacy compliance risk. Summary of the invention

[0005] In order to solve the above problems, the present invention proposes an App privacy compliance detection method and device for electronic banking, which can check the necessity and source of App business scenarios and solve the technical problems of client privacy compliance.

[0006] The technical solution adopted by the present invention to solve the technical problem is: In a first aspect, an embodiment of the present invention provides an App privacy compliance detection method, comprising the following steps: Step S1, constructing a privacy compliance dynamic management and control framework embedded with privacy compliance specifications, wherein the privacy compliance dynamic management and control framework declares privacy permissions, declares business scenarios for the use of privacy permissions, and stipulates the frequency of use of privacy permissions during the App development phase, thereby implementing management and control over the system API behaviors involving user information called by the application and its integrated third-party SDK; Step S2: When the business layer of the App needs to access system resources or functions, the ASM plug-in technology is used to scan the global code and insert the proxy layer code of the sensitive system API into the call location to perform App business privacy checks and control the privacy compliance of the business layer; Step S3: After the App is started, the App call frequency is checked to control the application's call frequency to sensitive system APIs in real time; Step S4, during the App privacy compliance management process, collect relevant information and generate a privacy compliance report. The relevant information includes the time, source, privacy permissions involved and business scenarios of the call.

[0007] As a possible implementation method of this embodiment, the privacy compliance dynamic management and control framework has the functions of performing App business privacy checking, App call frequency checking and App compliance report collection; the App business privacy checking function is used to manage the App privacy compliance at the business layer to ensure that the App complies with relevant laws and regulations when collecting, using and storing user data; the App call frequency checking function is used to manage the frequency of API calls to ensure that the frequency of API calls is within the prescribed range of App privacy compliance to avoid excessive occupation of system resources by applications to prevent impact on device performance or user privacy; the App compliance report collection function is responsible for collecting and organizing the results of App privacy compliance checks and generating reports to facilitate developers and managers to know the privacy protection status of applications.

[0008] As a possible implementation of this embodiment, the global code includes application self-developed component code and third-party SDK code.

[0009] As a possible implementation of this embodiment, step S2 includes the following steps: When the App business layer needs to access system resources or functions, the component layer calls the system API; The privacy compliance dynamic control framework intervenes before the system API is called. Based on the privacy permission definition table pre-defined in the development phase, it accurately examines whether the business layer's calls to sensitive system APIs meet privacy compliance requirements. For each business scenario, it is agreed to declare the privacy permissions it relies on during the development phase, and these declarations are stored as important configuration files in the business scenario privacy permission table; When a user triggers a business scenario and causes a call to the corresponding sensitive system API, the corresponding privacy permission is first looked up from the privacy permission definition table based on the sensitive system API identifier, and then the business scenario privacy permission table is queried to see whether the scenario has been declared. If it has been declared, the user is allowed to continue calling; if it has not been declared, it is released in the production environment and sent to APM for recording and analysis in a timely manner. For non-production environments, the call is directly blocked and a forced pop-up window is displayed to remind the user.

[0010] As a possible implementation of this embodiment, step S3 includes the following steps: Configure a call frequency limit for each private information, and store the limit information in a private information call frequency table; When the App is started, the overclocking call check mechanism is activated to control the frequency of the application's calls to sensitive system APIs in real time; If it is detected that the frequency of collecting personal information exceeds the frequency threshold, an APM alarm will be sent in the production environment so that relevant personnel can understand and take corresponding measures in time; in a non-production environment, the user behavior will be directly blocked, and a pop-up window will be popped up to remind the overclocked call stack, so that the user can clearly understand the specific situation of the call frequency exceeding the standard.

[0011] As a possible implementation of this embodiment, step S4 includes the following steps: In the process of controlling the calls to sensitive system APIs, relevant information is automatically collected, including the time and source of the calls, the privacy permissions involved, and the business scenarios; Organize and analyze the collected relevant information to generate detailed privacy compliance reports.

[0012] In a second aspect, an embodiment of the present invention provides an App privacy compliance detection device, including: A control framework construction module is used to build a dynamic privacy compliance control framework that embeds privacy compliance specifications. The dynamic privacy compliance control framework declares privacy permissions, business scenarios for using privacy permissions, and agrees on the frequency of using privacy permissions during the App development phase, thereby implementing control over the system API behaviors involving user information called by the application and its integrated third-party SDKs; The business privacy check module is used to scan the global code using ASM plug-in technology and insert the proxy layer code of sensitive system APIs into the call location when the business layer of the App needs to access system resources or functions, to perform App business privacy checks and control the privacy compliance of the business layer; The call frequency check module is used to check the app call frequency after the app is started, and to control the application's call frequency to sensitive system APIs in real time; The compliance report generation module is used to collect relevant information and generate a privacy compliance report during the App privacy compliance management process. The relevant information includes the time and source of the call, the privacy permissions involved, and the business scenarios.

[0013] As a possible implementation method of this embodiment, the privacy compliance dynamic management and control framework has the functions of performing App business privacy checking, App call frequency checking and App compliance report collection; the App business privacy checking function is used to manage the App privacy compliance at the business layer to ensure that the App complies with relevant laws and regulations when collecting, using and storing user data; the App call frequency checking function is used to manage the frequency of API calls to ensure that the frequency of API calls is within the prescribed range of App privacy compliance to avoid excessive occupation of system resources by applications to prevent impact on device performance or user privacy; the App compliance report collection function is responsible for collecting and organizing the results of App privacy compliance checks and generating reports to facilitate developers and managers to know the privacy protection status of applications.

[0014] As a possible implementation of this embodiment, the global code includes application self-developed component code and third-party SDK code.

[0015] As a possible implementation of this embodiment, the business privacy checking module is specifically used to: When the App business layer needs to access system resources or functions, the component layer calls the system API; The privacy compliance dynamic control framework intervenes before the system API is called. Based on the privacy permission definition table pre-defined in the development phase, it accurately examines whether the business layer's calls to sensitive system APIs meet privacy compliance requirements. For each business scenario, it is agreed to declare the privacy permissions it relies on during the development phase, and these declarations are stored as important configuration files in the business scenario privacy permission table; When a user triggers a business scenario and causes a call to the corresponding sensitive system API, the corresponding privacy permission is first looked up from the privacy permission definition table based on the sensitive system API identifier, and then the business scenario privacy permission table is queried to see whether the scenario has been declared. If it has been declared, the user is allowed to continue calling; if it has not been declared, it is released in the production environment and sent to APM for recording and analysis in a timely manner. For non-production environments, the call is directly blocked and a forced pop-up window is displayed to remind the user.

[0016] As a possible implementation of this embodiment, the calling frequency checking module is specifically used to: Configure a call frequency limit for each private information, and store the limit information in a private information call frequency table; When the App is started, the overclocking call check mechanism is activated to control the frequency of the application's calls to sensitive system APIs in real time; If it is detected that the frequency of collecting personal information exceeds the frequency threshold, an APM alarm will be sent in the production environment so that relevant personnel can understand and take corresponding measures in time; in a non-production environment, the user behavior will be directly blocked, and a pop-up window will be popped up to remind the overclocked call stack, so that the user can clearly understand the specific situation of the call frequency exceeding the standard.

[0017] As a possible implementation of this embodiment, the compliance report generation module is specifically used to: In the process of controlling the calls to sensitive system APIs, relevant information is automatically collected, including the time and source of the calls, the privacy permissions involved, and the business scenarios; Organize and analyze the collected relevant information to generate detailed privacy compliance reports.

[0018] The beneficial effects of the technical solution of the embodiment of the present invention are as follows: The present invention stipulates the number of sensitive system API calls, usage frequency and business scenarios during the development phase, and checks the necessity and source of its business scenarios. By scanning the global code, the proxy layer code is automatically inserted into the API call location before the code is executed. In this way, whenever a sensitive API is called, detailed information can be monitored and recorded in real time. The present invention can check the necessity and source of the App business scenario, solve the technical problems of client privacy compliance, and improve the privacy compliance and security of the application. Compared with the prior art, the present invention has the following advantages: (1) Strong control during the development phase to reduce risks and costs: The privacy compliance dynamic control framework based on ASM plug-in technology puts privacy compliance control in the development phase and regulates the calls to sensitive system APIs from the source. In this way, detailed agreements can be made on API calls during the development phase, and the control application is strictly executed according to the agreement during runtime, which greatly improves the privacy compliance and security of the application.

[0019] (2) Comprehensive compliance and precise positioning to ensure application security: The privacy compliance dynamic management framework based on ASM plug-in technology can comprehensively scan the global code (including the application itself and the introduced third-party SDK) and output detailed privacy compliance reports to help developers quickly locate and solve problems, ensuring the comprehensiveness and completeness of privacy compliance and effectively restraining violations by third-party SDKs.

[0020] (3) Get rid of hardware dependence and expand the scope of application: The privacy compliance dynamic management and control framework based on ASM plug-in technology does not require specific hardware equipment and complex frameworks, which lowers the threshold and cost of technology application. This allows the technology to be applied in a wider range of environments, greatly broadening the application areas of the technology.

[0021] (4) Improve efficiency, reduce costs, and accelerate the development process: The privacy compliance dynamic management framework based on ASM plug-in technology uses automated code plug-in and monitoring. ASM plug-in technology reduces the workload of manual review. The automated process used can quickly and accurately plug and monitor the code, greatly shortening the privacy compliance cycle.

[0022] An App privacy compliance detection device according to the technical solution of an embodiment of the present invention has the same beneficial effects as an App privacy compliance detection method according to the technical solution of an embodiment of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 is a flow chart of an App privacy compliance detection method according to an exemplary embodiment; Figure 2 is a schematic diagram of the structure of an App privacy compliance detection device according to an exemplary embodiment; Figure 3 This is a flowchart of an APP privacy compliance according to an exemplary embodiment; Figure 4 is an example diagram showing a WifiInfo.getSSID proxy call according to an exemplary embodiment; Figure 5 The present invention is a flowchart of a privacy authority check in a business scenario according to an exemplary embodiment. DETAILED DESCRIPTION

[0024] In order to more clearly illustrate the technical features of the solution of the present invention, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings.

[0025] The terms are explained below.

[0026] SDK: The abbreviation of “Software Development Kit”, which is translated into Chinese as “Software Development Kit”. SDK is a set of tools, libraries, documentation and sample codes to help developers create applications or software.

[0027] ASM: ASM in Java is a very popular Java bytecode manipulation and analysis framework. It was developed by the ObjectWeb community and is used to directly modify existing classes or dynamically generate classes, all at the Java binary bytecode level. ASM provides some core components and rich APIs that can be used to read, write, modify, and generate Java bytecode.

[0028] Transform: Starting from version 1.5.0-beta1, the Android Gradle tool includes the Transform API, which allows third-party plug-ins to operate on .class files before converting compiled class files into dex files.

[0029] APM: Application Performance Management. It is a tool for monitoring and optimizing application performance. It can capture application running problems in real time, help developers quickly locate and solve them, ensure smooth application operation, and improve user experience. APM is widely used in various applications, including mobile clients, web applications, and enterprise applications.

[0030] The present invention constructs a dynamic privacy compliance management and control framework, which aims to embed privacy compliance specifications into the development framework, declare privacy permissions, declare business scenarios for the use of privacy permissions, and agree on the frequency of use of privacy permissions during the development stage, so as to implement management and control over the behavior of Android applications and their integrated third-party SDKs calling system APIs (referred to as sensitive system APIs) involving user information.

[0031] The present invention focuses on achieving privacy compliance of applications in the development phase. Through ASM plug-in technology, the number of sensitive system API calls, usage frequency and business scenarios are agreed upon in the development phase, and the necessity and source of the business scenarios are checked. By implanting privacy compliance specifications into the development framework, the developed applications have privacy compliance in the initial stage, thereby solving the problem of sensitive system API compliance in the client side, and can be widely used in the field of Android application development.

[0032] like Figure 1 As shown, an App privacy compliance detection method provided by an embodiment of the present invention includes the following steps: Step S1, constructing a privacy compliance dynamic management and control framework embedded with privacy compliance specifications, wherein the privacy compliance dynamic management and control framework declares privacy permissions, declares business scenarios for the use of privacy permissions, and stipulates the frequency of use of privacy permissions during the App development phase, thereby implementing management and control over the system API behaviors involving user information called by the application and its integrated third-party SDK; Step S2: When the business layer of the App needs to access system resources or functions, the ASM plug-in technology is used to scan the global code and insert the proxy layer code of the sensitive system API into the call location to perform App business privacy checks and control the privacy compliance of the business layer; Step S3: After the App is started, the App call frequency is checked to control the application's call frequency to sensitive system APIs in real time; Step S4, during the App privacy compliance management process, collect relevant information and generate a privacy compliance report. The relevant information includes the time, source, privacy permissions involved and business scenarios of the call.

[0033] As a possible implementation method of this embodiment, the privacy compliance dynamic management and control framework has the functions of performing App business privacy checking, App call frequency checking and App compliance report collection; the App business privacy checking function is used to manage the App privacy compliance at the business layer to ensure that the App complies with relevant laws and regulations when collecting, using and storing user data; the App call frequency checking function is used to manage the frequency of API calls to ensure that it is within the prescribed range of App privacy compliance to avoid excessive occupation of system resources by applications to prevent affecting device performance or user privacy; the App compliance report collection function is responsible for collecting and organizing the results of App privacy compliance checks and generating reports to facilitate developers and managers to know the privacy protection status of the application.

[0034] As a possible implementation of this embodiment, the global code includes application self-developed component code and third-party SDK code.

[0035] As a possible implementation of this embodiment, step S2 includes the following steps: When the App business layer needs to access system resources or functions, the component layer calls the system API; The privacy compliance dynamic control framework intervenes before the system API is called. Based on the privacy permission definition table pre-defined in the development phase, it accurately examines whether the business layer's calls to sensitive system APIs meet privacy compliance requirements. For each business scenario, it is agreed to declare the privacy permissions it relies on during the development phase, and these declarations are stored as important configuration files in the business scenario privacy permission table; When a user triggers a business scenario and causes a call to the corresponding sensitive system API, the corresponding privacy permission is first looked up from the privacy permission definition table based on the sensitive system API identifier, and then the business scenario privacy permission table is queried to see whether the scenario has been declared. If it has been declared, the user is allowed to continue calling; if it has not been declared, it is released in the production environment and sent to APM for recording and analysis in a timely manner. For non-production environments, the call is directly blocked and a forced pop-up window is displayed to remind the user.

[0036] As a possible implementation of this embodiment, step S3 includes the following steps: Configure a call frequency limit for each private information, and store the limit information in a private information call frequency table; When the App is started, the overclocking call check mechanism is activated to control the frequency of the application's calls to sensitive system APIs in real time; If it is detected that the frequency of collecting personal information exceeds the frequency threshold, an APM alarm will be sent in the production environment so that relevant personnel can understand and take corresponding measures in time; in a non-production environment, the user behavior will be directly blocked, and a pop-up window will be popped up to remind the overclocked call stack, so that the user can clearly understand the specific situation of the call frequency exceeding the standard.

[0037] As a possible implementation of this embodiment, step S4 includes the following steps: In the process of controlling the calls to sensitive system APIs, relevant information is automatically collected, including the time and source of the calls, the privacy permissions involved, and the business scenarios; Organize and analyze the collected relevant information to generate a detailed privacy compliance report.

[0038] In a second aspect, an embodiment of the present invention provides an App privacy compliance detection device, including: A control framework construction module is used to build a dynamic privacy compliance control framework that embeds privacy compliance specifications. The dynamic privacy compliance control framework declares privacy permissions, business scenarios for using privacy permissions, and agrees on the frequency of using privacy permissions during the App development phase, thereby implementing control over the system API behaviors involving user information called by the application and its integrated third-party SDKs; The business privacy check module is used to scan the global code using ASM plug-in technology and insert the proxy layer code of sensitive system APIs into the call location when the business layer of the App needs to access system resources or functions, to perform App business privacy checks and control the privacy compliance of the business layer; The call frequency check module is used to check the app call frequency after the app is started, and to control the application's call frequency to sensitive system APIs in real time; The compliance report generation module is used to collect relevant information and generate a privacy compliance report during the App privacy compliance management process. The relevant information includes the time and source of the call, the privacy permissions involved, and the business scenarios.

[0039] As a possible implementation method of this embodiment, the privacy compliance dynamic management and control framework has the functions of performing App business privacy checking, App call frequency checking and App compliance report collection; the App business privacy checking function is used to manage the App privacy compliance at the business layer to ensure that the App complies with relevant laws and regulations when collecting, using and storing user data; the App call frequency checking function is used to manage the frequency of API calls to ensure that it is within the prescribed range of App privacy compliance to avoid excessive occupation of system resources by applications to prevent affecting device performance or user privacy; the App compliance report collection function is responsible for collecting and organizing the results of App privacy compliance checks and generating reports to facilitate developers and managers to know the privacy protection status of the application.

[0040] As a possible implementation of this embodiment, the global code includes application self-developed component code and third-party SDK code.

[0041] As a possible implementation of this embodiment, the business privacy checking module is specifically used to: When the App business layer needs to access system resources or functions, the component layer calls the system API; The privacy compliance dynamic control framework intervenes before the system API is called. Based on the privacy permission definition table pre-defined in the development phase, it accurately examines whether the business layer's calls to sensitive system APIs meet privacy compliance requirements. For each business scenario, it is agreed to declare the privacy permissions it relies on during the development phase, and these declarations are stored as important configuration files in the business scenario privacy permission table; When a user triggers a business scenario and causes a call to the corresponding sensitive system API, the corresponding privacy permission is first looked up from the privacy permission definition table based on the sensitive system API identifier, and then the business scenario privacy permission table is queried to see whether the scenario has been declared. If it has been declared, the user is allowed to continue calling; if it has not been declared, it is released in the production environment and sent to APM for recording and analysis in a timely manner. For non-production environments, the call is directly blocked and a forced pop-up window is displayed to remind the user.

[0042] As a possible implementation of this embodiment, the calling frequency checking module is specifically used to: Configure a call frequency limit for each private information, and store the limit information in a private information call frequency table; When the App is started, the overclocking call check mechanism is activated to control the frequency of the application's calls to sensitive system APIs in real time; If it is detected that the frequency of collecting personal information exceeds the frequency threshold, an APM alarm will be sent in the production environment so that relevant personnel can understand and take corresponding measures in time; in a non-production environment, the user behavior will be directly blocked, and a pop-up window will be popped up to remind the overclocked call stack, so that the user can clearly understand the specific situation of the call frequency exceeding the standard.

[0043] As a possible implementation of this embodiment, the compliance report generation module is specifically used to: In the process of controlling the calls to sensitive system APIs, relevant information is automatically collected, including the time and source of the calls, the privacy permissions involved, and the business scenarios; Organize and analyze the collected relevant information to generate a detailed privacy compliance report.

[0044] The present invention uses ASM plug-in technology to scan the global code (covering the APP itself and third-party SDKs) and insert the proxy layer code of the sensitive system API into the calling location. The proxy layer pre-arranges the capture of sensitive system API call information, call time, call scenario, and source, and implements strict permission control for each sensitive system API. At the same time, a privacy compliance report is generated, thereby embedding privacy compliance specifications into the development framework to ensure that the developed application meets privacy compliance requirements.

[0045] The main functions of the privacy compliance dynamic management framework include App business privacy check, App call frequency check and App compliance report collection.

[0046] App business privacy check is used to control the privacy compliance of the business layer and ensure that the application complies with relevant laws and regulations when collecting, using and storing user data. The specific process of App business privacy check is as follows.

[0047] 1. When the business layer of the application needs to access system resources or functions, it will call the system API through the component layer.

[0048] 2. The privacy compliance framework intervenes before the system API is called. Based on the privacy permission definition table pre-defined in the development phase, it accurately reviews whether the business layer's calls to sensitive system APIs comply with privacy compliance requirements.

[0049] 3. For each business scenario, the system will agree to declare the privacy permissions it relies on during the development phase, and store these declarations as important configuration files in the business scenario privacy permissions table.

[0050] 4. When a user triggers a business scenario and triggers a call to the corresponding sensitive system API, the system will first look up the corresponding privacy permission from the privacy permission definition table based on the sensitive system API identifier. Then, check whether the scenario has been declared from the business scenario privacy permission table. If it has been declared, the user is allowed to continue calling; if it has not been declared, it is released in the production environment, but it will be sent to APM for recording and analysis in a timely manner. For non-production environments, the call is directly blocked and a pop-up window is forced to remind the user to ensure that the user's privacy security is protected to the greatest extent.

[0051] App call frequency check is used to control the frequency of API calls to ensure that it is within the scope of privacy compliance and to prevent the application from excessively occupying system resources to prevent affecting device performance or user privacy. The specific process of App call frequency check is as follows.

[0052] 1. For each private information, the system configures a call frequency limit and stores this limit information in the private information call frequency table.

[0053] 2. When the application is started, the overclocking call check mechanism is activated. The system will control the frequency of applications calling sensitive system APIs in real time.

[0054] 3. If it is detected that the frequency of collecting personal information exceeds the frequency threshold, an APM alarm will be sent in the production environment so that relevant personnel can understand and take corresponding measures in time; in the non-production environment, the user behavior will be directly blocked, and a pop-up window will be popped up to remind the stack of overclocked calls, so that users can clearly understand the specific circumstances of the call frequency exceeding the standard.

[0055] App compliance report collection is responsible for collecting and organizing the results of privacy compliance checks, and then generating reports to help developers and managers understand the privacy protection status of their apps. The specific process of App compliance report collection is as follows.

[0056] 1. When the system manages and controls calls to sensitive system APIs, it will automatically collect relevant information, including the time and source of the calls, the privacy permissions involved, business scenarios, etc.

[0057] 2. This information will be collated and analyzed to generate a detailed privacy compliance report.

[0058] 3. Compliance reports provide developers and managers with a comprehensive view of the privacy compliance status of their applications, helping them quickly identify and resolve potential compliance issues and ensure that applications always comply with privacy protection regulations.

[0059] like Figure 3 As shown in the figure, the APP privacy compliance process covers the business layer, component layer, privacy compliance framework and operating system core.

[0060] Users trigger services and interact with native pages and H5 pages. As the interfaces that users directly contact, native pages and H5 pages have the functions of displaying information and receiving user input.

[0061] The business layer achieves its own functions by calling self-developed components and third-party SDKs. Self-developed components are modules developed within the application, while third-party SDKs are software development kits introduced from outside to provide specific functions.

[0062] When the business layer needs to access system resources or functions, it will call the system API through the component layer. These system APIs are interfaces provided by the operating system that allow applications to access the hardware and software resources of the device.

[0063] Before the system API is called, the request will first reach the privacy compliance framework. This framework acts as a proxy layer for the system API, responsible for checking and managing API calls to ensure that the application's behavior complies with privacy protection regulations.

[0064] After being checked and managed by the privacy compliance framework, API calls will be released to the system core for processing. The system core is responsible for executing API calls and providing the required functions for the application.

[0065] During the compilation of the Android application, two custom Transforms, CollectTransform and ReplaceTransform, are written to fully scan the global code, including the code of the application itself and third-party SDKs. These Transforms can accurately collect and identify the locations where the application or third-party SDKs call sensitive system APIs. Then, using an efficient code replacement mechanism, all locations that originally called sensitive system APIs are replaced with the corresponding proxy layer code. Figure 4 As shown in the figure, taking the call of WifiInfo.getSSID as an example, first, the developer triggers the business operation in the development stage; then, the upper-layer component tries to call the WifilInfo.getSSID method to obtain the Wi-Fi SSID information; then, the request passes through the privacy compliance framework, which performs privacy checks and management by calling WifilInfoProxy.getSSID; finally, the checked call is released to the system core to perform the actual WifilInfo.getSSID operation, ensuring that the application behavior complies with privacy protection regulations.

[0066] In order to more effectively manage and monitor the calls of sensitive system APIs, permission definitions are designed for each sensitive system API and used as key configuration files. The definition examples are shown in Table 1.

[0067] Table 1 Privacy authority definition table

[0068] Taking WifiInfo.getSSID as an example, it not only clarifies its corresponding privacy permission flag as PRIVACY_PERMISSION_SSID, but also lists related aliases, such as SSID. Such permission definitions enable developers to accurately identify and control calls to sensitive system APIs, ensuring that the access and use of user privacy information during application operation complies with strict privacy protection regulations.

[0069] For each business scenario, the privacy permissions it relies on are clearly declared to provide strong data support for the permission checks of subsequent scenarios, and these declarations are used as important configuration files. Examples of privacy permissions declared by scenarios are shown in Table 2.

[0070] Table 2 Business scenario privacy permission table

[0071] When a user triggers a business scenario and causes a call to the corresponding sensitive system API, the system will first accurately search for the corresponding privacy permission from the privacy permission definition table based on the sensitive system API identifier. Then, it will in-depth query from the business scenario privacy permission table whether the scenario has been declared. If it has been declared, the user can continue to call it without worry; if it has not been declared, it will also be released in the production environment, but it will be sent to APM for recording and analysis in a timely manner. For non-production environments, the call will be decisively blocked directly, and a pop-up window will be forced to remind the user to ensure that the user's privacy security is protected to the greatest extent.

[0072] Configure the call frequency limit for each privacy information. The configuration is shown in Table 3.

[0073] Table 3 Information call frequency table

[0074] When the application is started, the overclocking call check mechanism is activated. When the developer detects that the frequency of collecting personal information exceeds the frequency threshold, an APM alarm is sent in the production environment. In non-production environments, user behavior is directly blocked and a pop-up window is displayed to remind the overclocking call stack.

[0075] like Figure 5As shown in the figure, the business scenario privacy permission check process is as follows. When a user starts to trigger a business scenario and triggers a sensitive API call, the system will immediately read the privacy permission definition table to confirm the relevant privacy permissions. Then, the system will further read the scenario privacy permission table to conduct a comprehensive check on the permission declaration of the business scenario. If the corresponding matching records can be found in the privacy permission definition table and the scenario privacy permission table, it means that the permission use of the business scenario is legal and necessary, and the system will release the user's call operation. However, if the permission declaration of the business scenario is not found in the scenario privacy permission table, the system will take different measures according to different environments. In a production environment, the system will release the user's call, but will send this event and related stack information to APM for subsequent analysis and monitoring. In a non-production environment, the system will directly block the user's call operation and force a pop-up window to remind the user that the call may have potential privacy risks.

[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method for detecting App privacy compliance, characterized in that: The steps include: Step S1, constructing a privacy compliance dynamic management and control framework embedded with privacy compliance specifications, wherein the privacy compliance dynamic management and control framework declares privacy permissions, declares business scenarios for the use of privacy permissions, and stipulates the frequency of use of privacy permissions during the App development phase, thereby implementing management and control over the system API behaviors involving user information called by the application and its integrated third-party SDK; Step S2: When the business layer of the App needs to access system resources or functions, the ASM plug-in technology is used to scan the global code and insert the proxy layer code of the sensitive system API into the call location to perform App business privacy checks and control the privacy compliance of the business layer; Step S3: After the App is started, the App call frequency is checked to control the application's call frequency to sensitive system APIs in real time; Step S4, during the App privacy compliance management process, collect relevant information and generate a privacy compliance report. The relevant information includes the time, source, privacy permissions involved and business scenarios of the call.

2. The method for detecting App privacy compliance according to claim 1, characterized in that: The dynamic privacy compliance management and control framework has the functions of App business privacy checking, App call frequency checking and App compliance report collection; the App business privacy checking function is used to control the App privacy compliance at the business layer to ensure that the App complies with relevant laws and regulations when collecting, using and storing user data; the App call frequency checking function is used to control the frequency of API calls to ensure that the frequency of API calls is within the prescribed range of App privacy compliance; the App compliance report collection function is responsible for collecting and organizing the results of App privacy compliance checks and generating reports.

3. The method for detecting App privacy compliance according to claim 1, characterized in that: The global code includes application self-developed component code and third-party SDK code.

4. The method for detecting App privacy compliance according to claim 1, characterized in that: The step S2 comprises the following steps: When the App business layer needs to access system resources or functions, the component layer calls the system API; The privacy compliance dynamic control framework intervenes before the system API is called. Based on the privacy permission definition table pre-defined in the development phase, it accurately examines whether the business layer's calls to sensitive system APIs meet privacy compliance requirements. For each business scenario, it is agreed to declare the privacy permissions it relies on during the development phase, and these declarations are stored as important configuration files in the business scenario privacy permission table; When a user triggers a business scenario and causes a call to the corresponding sensitive system API, the corresponding privacy permission is first searched from the privacy permission definition table according to the sensitive system API identifier, and then the business scenario privacy permission table is checked to see whether the scenario has been declared. If it has been declared, the user is allowed to continue calling; If it is not declared, it will be released in the production environment and sent to APM for recording and analysis in a timely manner. For non-production environments, the call will be directly blocked and a pop-up window will be forced to remind the user.

5. The method for detecting App privacy compliance according to claim 1, characterized in that: The step S3 comprises the following steps: Configure a call frequency limit for each private information, and store the limit information in a private information call frequency table; When the App is started, the overclocking call check mechanism is activated to control the frequency of the application's calls to sensitive system APIs in real time; If it is detected that the frequency of collecting personal information exceeds the frequency threshold, an APM alarm will be sent in the production environment so that relevant personnel can understand and take corresponding measures in time; in a non-production environment, the user behavior will be directly blocked, and a pop-up window will be popped up to remind the overclocked call stack, so that the user can clearly understand the specific situation of the call frequency exceeding the standard.

6. The method for detecting App privacy compliance according to any one of claims 1 to 5, characterized in that: The step S4 comprises the following steps: In the process of controlling the calls to sensitive system APIs, relevant information is automatically collected, including the time and source of the calls, the privacy permissions involved, and the business scenarios; Organize and analyze the collected relevant information to generate detailed privacy compliance reports.

7. An App privacy compliance detection device, characterized in that: include: A control framework construction module is used to build a dynamic privacy compliance control framework that embeds privacy compliance specifications. The dynamic privacy compliance control framework declares privacy permissions, business scenarios for using privacy permissions, and agrees on the frequency of using privacy permissions during the App development phase, thereby implementing control over the system API behaviors involving user information called by the application and its integrated third-party SDKs; The business privacy check module is used to scan the global code using ASM plug-in technology and insert the proxy layer code of sensitive system APIs into the call location when the business layer of the App needs to access system resources or functions, to perform App business privacy checks and control the privacy compliance of the business layer; The call frequency check module is used to check the app call frequency after the app is started, and to control the application's call frequency to sensitive system APIs in real time; The compliance report generation module is used to collect relevant information and generate a privacy compliance report during the App privacy compliance management process. The relevant information includes the time and source of the call, the privacy permissions involved, and the business scenarios.

8. The App privacy compliance detection device according to claim 7, characterized in that: The dynamic privacy compliance management and control framework has the functions of App business privacy checking, App call frequency checking and App compliance report collection; the App business privacy checking function is used to control the App privacy compliance at the business layer to ensure that the App complies with relevant laws and regulations when collecting, using and storing user data; the App call frequency checking function is used to control the frequency of API calls to ensure that the frequency of API calls is within the prescribed range of App privacy compliance; the App compliance report collection function is responsible for collecting and organizing the results of App privacy compliance checks and generating reports.

9. The App privacy compliance detection device according to claim 7, characterized in that: The business privacy checking module is specifically used for: When the App business layer needs to access system resources or functions, the component layer calls the system API; The privacy compliance dynamic control framework intervenes before the system API is called. Based on the privacy permission definition table pre-defined in the development phase, it accurately examines whether the business layer's calls to sensitive system APIs meet privacy compliance requirements. For each business scenario, it is agreed to declare the privacy permissions it relies on during the development phase, and these declarations are stored as important configuration files in the business scenario privacy permission table; When a user triggers a business scenario and causes a call to the corresponding sensitive system API, the corresponding privacy permission is first searched from the privacy permission definition table according to the sensitive system API identifier, and then the business scenario privacy permission table is checked to see whether the scenario has been declared. If it has been declared, the user is allowed to continue calling; If it is not declared, it will be released in the production environment and sent to APM for recording and analysis in a timely manner. For non-production environments, the call will be directly blocked and a pop-up window will be forced to remind the user.

10. The App privacy compliance detection device according to claim 7, characterized in that: The calling frequency checking module is specifically used for: Configure a call frequency limit for each private information, and store the limit information in a private information call frequency table; When the App is started, the overclocking call check mechanism is activated to control the frequency of the application's calls to sensitive system APIs in real time; If it is detected that the frequency of collecting personal information exceeds the frequency threshold, an APM alarm will be sent in the production environment so that relevant personnel can understand and take corresponding measures in time; in a non-production environment, the user behavior will be directly blocked, and a pop-up window will be popped up to remind the overclocked call stack, so that the user can clearly understand the specific situation of the call frequency exceeding the standard.

Citation Information

Patent Citations

  • APP privacy compliance detection method and device, electronic equipment and storage medium

    CN116522389A

  • Detection method, device and equipment for APP privacy compliance

    CN116719713A