Privacy protocol generation method and device based on call chain analysis, equipment and medium

By constructing call chain relationships and dynamic priority conflict detection algorithms, privacy protocols in the fields of fintech and healthcare/elderly care are automatically generated, solving the problem of low efficiency in manual drafting and improving the efficiency and accuracy of protocol generation.

CN121967065APending Publication Date: 2026-05-01CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-05
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In the fields of fintech and healthcare/elderly care, existing technologies rely on manual methods for drafting and revising privacy agreements, which are inefficient and make it difficult to effectively manage application privacy agreements.

Method used

By collecting permission call behavior in the target application code, constructing call chain relationships, and combining dynamic priority conflict detection algorithms, privacy statement information is obtained from heterogeneous data sources to generate the target privacy protocol, replacing manual line-by-line code review and achieving automated consistency verification and conflict early warning.

Benefits of technology

It improves the efficiency of privacy management systems in generating application privacy agreements, enhances the accuracy and completeness of privacy agreements, and reduces legal and user trust risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121967065A_ABST
    Figure CN121967065A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data analysis, and discloses a privacy protocol generation method and device based on call chain analysis, equipment and a medium, and the method comprises the steps: determining a target call chain relation according to an authority call behavior; target privacy declaration information is obtained, consistency verification is carried out on the target privacy declaration information through a conflict detection algorithm, and conflict warning information is generated; and generating a target privacy protocol according to the privacy protocol template, the target call chain relationship and the conflict warning information. In this way, the call chain relation is constructed by collecting the permission call behaviors, and a low-efficiency mode in the prior art is replaced. By acquiring and verifying privacy declaration information and combining a conflict detection algorithm, automatic consistency verification is performed on the multi-source privacy declaration information, conflicts are found and early warned, and a privacy protocol is generated, so that the method and the device can be applied to the business fields of financial science and technology, medical health, old-age care and the like; and the efficiency of generating the privacy protocol of the application program by the privacy management system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Privacy Protocol Generation Method, Apparatus, Device, and Medium Based on Call Chain Analysis Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a method, apparatus, device and medium for generating privacy protocols based on call chain analysis. Background Technology

[0002] With the deepening of digital transformation, industries such as fintech and healthcare / elderly care have become core pillars of social operation. The user information processed by these industries is highly sensitive (such as financial data, biometric information, health records, etc.), and therefore faces the most stringent privacy protection regulations globally. In this context, application privacy agreements have become the lifeline for compliant operation, and their accuracy and completeness are directly related to the company's legal risks and user trust.

[0003] In the fintech sector, business models are complex, typically involving multiple scenarios such as payments, credit, insurance, and wealth management, and deeply integrated with numerous third-party service providers. While these third-party components enhance business capabilities, they also introduce significant and hidden data flow risks. In the healthcare and elderly care sectors, data sensitivity is even higher, involving top-level privacy information such as personal health data, medical records, and geolocation (e.g., real-time location tracking of elderly individuals). Applications in this field often require connecting multiple IoT devices (such as smart bracelets and blood pressure monitors), processing real-time health data streams, and exchanging data with hospital information systems and elderly care facility management platforms. The complex technology stack and diverse data sources make it virtually impossible for humans to fully understand all data links.

[0004] However, in the aforementioned high-risk and heavily regulated business areas, the shortcomings of traditional, manual methods for drafting and revising privacy agreements are particularly prominent. Existing technologies primarily rely on the collaborative efforts of legal and technical personnel to manually analyze application call chains within the code, resulting in extremely low efficiency. Therefore, in business areas such as fintech and healthcare / elderly care, improving the efficiency of privacy management systems in generating application privacy agreements has become a pressing technical challenge. Summary of the Invention

[0005] This application provides a method, apparatus, device, and medium for generating privacy protocols based on call chain analysis, so as to improve the efficiency of privacy management systems in generating privacy protocols for applications.

[0006] In a first aspect, this application provides a privacy protocol generation method based on call chain analysis. The method includes: collecting permission call behaviors in the code of a target application and determining a target call chain relationship based on each permission call behavior; obtaining target privacy statement information that matches each permission call behavior from at least one heterogeneous data source and performing consistency verification on each target privacy statement information through a dynamic priority conflict detection algorithm to generate conflict warning information; and generating a target privacy protocol based on a preset privacy protocol template, the target call chain relationship, and the conflict warning information.

[0007] Secondly, this application also provides a privacy protocol generation device based on call chain analysis. The device includes: a target call chain relationship determination module, used to collect permission call behaviors in target application code and determine target call chain relationships based on each permission call behavior; a conflict warning information generation module, used to obtain target privacy statement information matching each permission call behavior from at least one heterogeneous data source, and perform consistency verification on each target privacy statement information through a dynamic priority conflict detection algorithm to generate conflict warning information; and a target privacy protocol generation module, used to generate a target privacy protocol based on a preset privacy protocol template, the target call chain relationships, and the conflict warning information.

[0008] Thirdly, this application also provides a computer device, the computer device including a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and, when executing the computer program, implement the privacy protocol generation method based on call chain analysis as described above.

[0009] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the privacy protocol generation method based on call chain analysis as described above.

[0010] This application discloses a method, apparatus, device, and medium for generating privacy protocols based on call chain analysis. The method includes collecting permission call behaviors from target application code and determining target call chain relationships based on each permission call behavior; obtaining target privacy statement information matching each permission call behavior from at least one heterogeneous data source, and performing consistency verification on the target privacy statement information using a dynamic priority conflict detection algorithm to generate conflict warning information; and generating a target privacy protocol based on a preset privacy protocol template, the target call chain relationships, and the conflict warning information. Through this method, this application replaces the inefficient manual line-by-line code review by collecting permission call behaviors and constructing call chain relationships. By obtaining and verifying privacy statement information from heterogeneous data sources and introducing a dynamic priority conflict detection algorithm, it automatically verifies the consistency of multi-source privacy statement information, detects and warns of conflicts, and generates a target privacy protocol. This improves the efficiency of privacy management systems in generating application privacy protocols in areas such as fintech and healthcare / elderly care. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 is a schematic flowchart of a privacy protocol generation method based on call chain analysis provided by an embodiment of this application; Figure 2 is a schematic block diagram of a privacy protocol generation device based on call chain analysis provided by an embodiment of this application; Figure 3 is a schematic block diagram of the structure of a computer device provided by an embodiment of this application. Detailed Implementation

[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0014] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0015] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0016] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0017] This application provides a method, apparatus, device, and medium for generating privacy protocols based on call chain analysis. The method can be applied to privacy management systems by collecting permission call behavior of code and constructing call chain relationships, replacing the inefficient manual line-by-line code review. By acquiring and verifying privacy statement information from heterogeneous data sources, and introducing a dynamic priority conflict detection algorithm, it automatically verifies the consistency of multi-source privacy statement information, detects and warns of conflicts, and generates the target privacy protocol. This improves the efficiency of privacy management systems in generating application privacy protocols in areas such as fintech and healthcare / elderly care.

[0018] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0019] Please refer to Figure 1, which is a schematic flowchart of a privacy protocol generation method based on call chain analysis provided in an embodiment of this application. This privacy protocol generation method based on call chain analysis can be applied in a privacy management system to improve the efficiency of the privacy management system in generating privacy protocols for applications.

[0020] As shown in Figure 1, the privacy protocol generation method based on call chain analysis specifically includes steps S10 to S30.

[0021] Step S10: Collect permission call behaviors in the target application code and determine the target call chain relationship based on each permission call behavior; specifically, permission call behaviors are collected through a combination of static code analysis and dynamic runtime monitoring. In the static analysis phase, a bytecode manipulation framework is used to scan and instrument the compiled bytecode of the target application, and lightweight logging code is implanted at all system API (Application Programming Interface) call points involving sensitive permissions or privacy data access.

[0022] In the dynamic monitoring phase, the instrumented application is run, and the probes will be triggered when the permission-related APIs are actually called, capturing in real time the call events and their context information, including the call method signature, call stack sequence, thread where the call occurs, timestamp, and a summary of the parameters passed. Based on the collected event sequence, a call graph model is constructed to determine the target call chain relationship. Starting from each permission call behavior, its complete call path is traced backward, and its possible downstream calls are analyzed forward to form a "directed call chain graph" centered around permissions or data operations and containing multiple call relationships. The structure of the directed call chain graph not only shows the direct call relationships between methods but also, by analyzing the control flow and data flow, can identify indirect call links across components and threads.

[0023] In the fintech application scenario, during the compilation or packaging phase of financial applications (such as mobile banking, payment, credit, and wealth management APPs), the bytecode instrumentation technique is used to systematically implant monitoring probes at the high-risk sensitive API call points unique to financial operations. These key nodes include not only general system permission APIs but also, more importantly, the dedicated SDKs (Software Development Kits) and APIs in the core link of financial operations. For example, in the credit investigation and risk control section, monitor the SDKs or services used for anti-fraud and credit assessment, and capture behaviors such as their calls to device fingerprint information, obtaining the list of installed applications, and accessing text messages (for automatic verification code filling or identifying credit-related text messages); in the biometric recognition and strong authentication section, monitor the calls to biometric collection SDKs such as face recognition and voiceprint recognition.

[0024] In the data sharing section, monitor the network requests and encryption behaviors for transmitting data to third parties such as credit investigation agencies, cooperative financial institutions, and big data service providers. The probe will record the complete context of each call, including the front-end business scenario that triggers the call (such as "loan application page", "face recognition payment process"), call parameters, return results, and an accurate timestamp.

[0025] In the medical, health, and elderly care application scenario, considering the characteristics of medical, health, and elderly care applications that handle highly sensitive and strongly regulated data such as medical records, health monitoring, real-time positioning, and emergency calls, precisely define and monitor the exclusive permissions and API key nodes related to medical and health. In addition to basic permissions, focus on implanting probes to monitor the following call nodes: accessing APIs or devices, calling relevant GATT protocols, continuously obtaining instructions for the guardianship of dementia patients or safety fences, accessing the medication reminder database, and calling the text message interface. At the same time, for the integrated medical SDKs (such as electronic medical record docking interfaces, remote diagnosis and treatment platforms, medical insurance payment components, intelligent nursing device communication libraries), their dedicated permission and data interface features will be loaded to ensure the identification of professional behaviors such as "uploading images" and "querying the medical insurance catalog".

[0026] When the application is running (especially in core scenarios such as health data synchronization, medication reminders, remote consultations, and fall alarms), it triggers data collection and is deeply bound to specific medical service scenarios. The probe not only records the call events, but also captures and associates the identifiers of the currently running clinical or care scenario (such as "daily diabetes management process", "postoperative rehabilitation monitoring", "24-hour anti-wandering monitoring"), as well as the sensitivity level and type of data involved in the behavior (such as "genetic sequence data", "real-time location trajectory", "mental health status record").

[0027] An enhanced target call chain relationship is constructed based on medical ethics and compliance principles (such as minimum necessity and specific purpose). Based on the generated call sequence and nesting relationship graph, in-depth analysis is performed: sensitive data lifecycle tracking, tracing the entire chain of calls and cross-system boundary transmission relationships of specific health data (such as a continuous electrocardiogram data segment) from local sensor collection, to preliminary processing by edge devices, to encryption and uploading to the cloud-based medical analysis platform, and finally back to the doctor's workstation.

[0028] The correlation analysis between monitoring scenarios and data collection identifies whether permission calls (such as continuous background location) are strictly limited to the "activation of the security fence monitoring period" or whether there is a risk of "scenario generalization" (such as collecting location data during non-monitoring periods) in order to assess its compliance.

[0029] The multimodal service collaborative call graph analyzes the data flow and permission dependencies between internal functional modules of medical applications (such as consultation, drug purchase, and appointment) and external third-party services (such as medical insurance settlement platforms and home care service providers), forming a complete integrated "medical-elderly care-nursing" service data call graph.

[0030] Step S20: Obtain target privacy statement information matching each of the aforementioned permission call behaviors from at least one heterogeneous data source, and perform consistency verification on each of the target privacy statement information using a dynamic priority conflict detection algorithm to generate conflict warning information; specifically, based on the unique identifier of the third-party SDK, library, or system component involved in the call chain, automatically initiate concurrent query requests to multiple preset heterogeneous data sources. These data sources include at least: the official developer website of the component (to obtain the latest privacy policy document), central repository, open-source code repository, and authoritative compliance database. After obtaining the raw text from each data source through crawlers and API interfaces, use natural language processing and keyword extraction technology to automatically locate and structurally extract privacy statement content directly related to the current permission call behavior (such as "read contacts"), forming a set of "target privacy statement information" from different sources.

[0031] The "Dynamic Priority Conflict Detection Algorithm" is invoked to perform consistency checks on the information set. A base weight is preset for each data source type (e.g., official documents have the highest weight), and the effective weight is dynamically fine-tuned during each check based on the authority of the data source, the timeliness of the information's publication, and the completeness of the claim content. The algorithm performs semantic comparisons on different claims describing the same permission behavior; when a substantial difference is detected, a conflict is identified. The system immediately calculates and compares the dynamic weights of each conflicting claim, automatically adopting the claim from the source with the highest weight as the benchmark suggestion. Finally, a "Conflict Warning Message" is generated. This warning is structured data that clearly lists the conflicting permission points, the contradictory content of each source claim and its weight, and evidence links pointing to the original document or code location.

[0032] Step S30: Generate a target privacy protocol based on the preset privacy protocol template, the target call chain relationship, and the conflict warning information.

[0033] Specifically, a pre-configured privacy agreement template is loaded. This template adopts a modular structure design, including legal framework clauses, a data processing activity declaration block, and variable fields for inserting specific technical details. Next, the target call chain relationship is parsed and classified to identify the business function scenario, internal modules, and external SDKs involved for each permission or data operation. Based on pre-defined mapping rules, this information is automatically filled into the corresponding variable fields of the template to form a preliminary clause description.

[0034] Conflict warnings are processed and converted into standardized annotations or highlighted pending clauses, precisely linked to the affected paragraphs in the draft agreement. During the generation process, the system executes built-in compliance logic rules, checks the logical consistency between clauses, and automatically supplements legally required procedural statements (such as user rights notices and complaint channel explanations).

[0035] Output a structured draft of the target privacy agreement, presented in a clear and visual format: verified and consistent clauses are displayed in regular text; conflicting or pending clauses requiring manual verification are highlighted (e.g., color highlighting, background marking), and detailed conflict analysis and multi-source evidence chains can be viewed directly interactively.

[0036] This application discloses a method, apparatus, device, and medium for generating privacy protocols based on call chain analysis. The method includes collecting permission call behaviors from target application code and determining target call chain relationships based on each permission call behavior; obtaining target privacy statement information matching each permission call behavior from at least one heterogeneous data source, and performing consistency verification on the target privacy statement information using a dynamic priority conflict detection algorithm to generate conflict warning information; and generating a target privacy protocol based on a preset privacy protocol template, the target call chain relationships, and the conflict warning information. Through this method, this application replaces the inefficient manual line-by-line code review by collecting permission call behaviors and constructing call chain relationships. By obtaining and verifying privacy statement information from heterogeneous data sources, introducing a dynamic priority conflict detection algorithm, and automating consistency verification of multi-source privacy statement information, conflicts are detected and warned of, improving the efficiency of privacy management systems in generating application privacy protocols in business areas such as fintech and healthcare / elderly care.

[0037] Based on the embodiment shown in Figure 1, in this implementation, step S10 includes: calling key nodes according to the target application code, determining the permission calling behavior according to the key nodes; determining the running state of the target application code according to the permission calling behavior, and determining the calling order and nesting relationship between each calling node according to the permission calling behavior and the running state; generating the target calling chain relationship according to the calling order and the nesting relationship.

[0038] Specifically, probes are implanted at predefined permission-related key nodes during the application code compilation or runtime phase using bytecode instrumentation or system-level hook functions. When the application runs, these probes can capture and record every access to the key nodes, thereby accurately determining the specific permission invocation behavior, including the invocation method, input parameters, and return results.

[0039] Through an integrated runtime monitoring framework, the system continuously tracks the application's runtime state, including currently active components, execution threads, and function call stacks. It correlates captured permission call behaviors with the current runtime state (such as the user's current interface and background service triggering conditions) for analysis. By parsing runtime stack information and component lifecycle events, the system can dynamically determine the temporal order and logical nesting relationships between various call nodes. For example, it can identify that a permission call is triggered by a button click event and is subsequently called layer by layer in an asynchronous task.

[0040] Using the call order and nesting relationships obtained from the above analysis as input, a structured directed call chain graph is constructed using graph theory algorithms. In this graph, nodes represent permission call behaviors or code modules, and directed edges represent call relationships. The attributes of the edges can include call timing, frequency, and context information. This graph is then visualized and rendered to generate a call chain heatmap that includes hotspot paths and risk weights.

[0041] In fintech business scenarios, based on the characteristics of financial business and compliance requirements, key nodes in the target application code are precisely defined and monitored. These key nodes not only include general system permission APIs but also focus on sensitive operation points specific to financial scenarios, such as: network requests when calling payment gateway interfaces, methods triggering biometric authentication (such as fingerprint or facial recognition payment), code segments accessing secure elements for key management and transaction signing, methods for reading and writing device unique identifiers, and core functional entry points for calling third-party SDKs. By injecting probes into these nodes during compilation or runtime, every permission call behavior closely related to financial operations and its intent can be accurately captured and identified.

[0042] Based on permission call behavior and the application's operational status in specific financial scenarios (such as currently in "credit card application process," "facial recognition payment verification," or "background transaction risk scanning"), deep contextual analysis is performed. The active component, background, and execution thread (such as an asynchronous thread for network requests) at the time of the call are recorded, along with related user interaction events (such as clicking the "confirm loan" button). Based on this permission call behavior and operational status, the precise call order and complex nested relationships between each call node are dynamically determined by analyzing the call stack, event queue, and inter-process communication logs. For example, the analysis reveals that a "get precise location" call is initiated by the "anti-fraud rule engine service" in an asynchronous thread, which in turn is triggered by the "large-amount transfer process," thus forming a nested chain with a clear business causal relationship.

[0043] In healthcare and elderly care scenarios, based on the unique data processing scenarios and stringent regulatory requirements of healthcare applications, key nodes in the target application code are precisely defined and monitored. These include regular permission APIs, but with a greater focus on sensitive operation points specific to healthcare, such as: accessing health data APIs (for reading and writing vital signs data such as heart rate, blood pressure, and blood sugar), calling relevant methods to connect to and read data from medical devices (such as electrocardiographs, blood glucose meters, and fall detectors), accessing medication reminder databases, and SMS sending interfaces related to triggering emergency call functions. By instrumenting these nodes during compilation or runtime, every permission call behavior directly related to healthcare services and its clinical or care intent can be accurately captured and determined (e.g., "Continuously obtaining background location is to activate the electronic fence to monitor whether patients with Alzheimer's disease have left the safe area").

[0044] Based on permission call behavior and the application's operational status within specific healthcare service processes (e.g., currently in "24-hour remote vital signs monitoring mode," "medication adherence reminder service," or "emergency alarm triggered state"), in-depth contextual and scenario-based analysis is performed. The system records the medical business component where the call occurs, the running background process, the execution thread model, and the associated clinical events (e.g., "patient manually triggers fall alarm," "sleep quality data is uploaded at regular intervals"). Based on this permission call behavior and operational status, the precise call order and complex nesting relationships between each calling node are dynamically determined by parsing the call stack, cross-process communication, and asynchronous task queues. For example, the analysis reveals that a call to "read continuous glucose meter data" is initiated by the "diabetes management module," undergoes initial processing by the local edge computing node, and then nests calls to the "data encryption service" and the "cloud electronic medical record upload interface," forming a processing chain that runs through the "end-edge-cloud" and complies with medical data security standards.

[0045] Based on this call order and nesting relationship, a deeply structured target call chain relationship diagram closely aligned with the medical service scenario is generated, clearly showing the interface call path at the technical level. More importantly, it strongly links each permission call with specific clinical diagnosis or health management scenarios, data lifecycle stages (such as collection, local preprocessing, anonymization, encrypted transmission, and clinical diagnostic applications), and compliance requirements (such as whether it complies with the "minimum necessity principle" and "specific purpose restriction"), forming a four-in-one chain diagram of "medical scenario - data flow - permission call - compliance basis".

[0046] Based on the embodiment shown in Figure 1, in this implementation, step S20 includes: determining a data source identifier according to each of the heterogeneous data sources; obtaining the target privacy statement information according to a preset mapping relationship and each of the data source identifiers; wherein, the preset mapping relationship is a mapping relationship between each preset permission call behavior and the preset privacy statement information.

[0047] Specifically, a unique and structured data source identifier is assigned to each accessed heterogeneous data source. This identifier not only indicates the data source type but also includes metadata such as version identification and interface address. Based on each permission call behavior, a query and match are performed in a pre-defined mapping database. This database is essentially a rule base or knowledge graph, systematically storing the relationships between various permissions and sensitive APIs and their corresponding standard and compliant privacy statement descriptions in various application scenarios. When the system actually accesses the corresponding data source based on the data source identifier, it uses this mapping relationship as a blueprint for retrieval and understanding, guiding the information capture and parsing process. For example, it automatically locates the section on "address book access" in official documentation or extracts clauses related to "data sharing" from open-source license files. In this way, target privacy statement information that matches the semantics of the current permission call behavior and can be directly used for protocol generation is efficiently and accurately obtained from heterogeneous, unstructured raw information, providing structured input for subsequent consistency verification and conflict handling.

[0048] In one embodiment, a structured, identifiable data source identifier is determined for each heterogeneous data source based on the data source types specific to the financial industry. This includes common technical sources, with a focus on sources related to financial business, such as: open platform API documentation sites of various commercial banks or payment institutions (e.g., UnionPay, NetsUnion), access specifications and data security statements of credit reporting agencies, official merchant service agreements and privacy policy pages of third-party payment SDKs, security compliance white papers of financial cloud service providers, and technical standards and data compliance guidelines issued by financial industry self-regulatory organizations (e.g., the National Internet Finance Association of China). Each data source identifier encodes metadata such as its type, affiliated financial institution / service provider, document version, and regional regulatory attributes.

[0049] Based on a deeply customized preset mapping relationship, combined with identifiers from various data sources, highly accurate target privacy statement information that conforms to the financial business context is obtained. The preset mapping relationship is a knowledge graph or rule base specifically built for fintech scenarios, which systematically establishes a multi-dimensional mapping between various preset permission call behaviors (financial related) and preset privacy statement information (financial compliance text fragments).

[0050] When a financial data source is actually accessed based on the data source identifier, this mapping relationship is used as a blueprint for intelligent retrieval and understanding. For example, when accessing "the official SDK documentation of a financial institution", the mapping relationship automatically locates the statement paragraph about "device information collection" in the "small-amount password-free payment" section; when accessing "the compliance page of an anti-fraud service provider", the applicable scope and retention period clauses regarding "geographical location data for transaction risk analysis" are accurately extracted.

[0051] In one embodiment, given the highly specialized, heavily regulated, and dispersed nature of the medical, health, and elderly care fields, a data source identifier with domain semantics is defined for each heterogeneous data source. The core of this identifier includes: official developer portals of various medical device and wearable device manufacturers, external interface specifications of hospital information platforms and regional medical platforms, APIs and service agreements of remote diagnosis and treatment platforms, and regulatory standard libraries such as data processing policies of elderly care service integrators. Each identifier encodes information such as data source type (device manufacturer / medical platform / regulatory agency), scope of application (e.g., "blood glucose monitoring", "electronic medical record query"), geographic attributes, and version.

[0052] Based on a pre-defined mapping relationship that deeply integrates medical ethics, clinical norms, and data security requirements, and combined with identifiers from various data sources, the system obtains target privacy statement information that precisely matches the healthcare scenario. This pre-defined mapping relationship is a domain knowledge graph specifically built for healthcare and elderly care, establishing a clinically interpretable mapping between pre-defined permission invocation behaviors and pre-defined privacy statement information.

[0053] When a specific healthcare data source is accessed based on its data source identifier, the mapping relationship driven by this graph is used for intelligent navigation and semantic extraction. For example, when accessing the "Interface Documentation of an Open Platform of a Top-Tier Hospital," the system automatically locates the section on "Patient Informed Consent and Data Scope" in the "Medical Record Access" interface description; when accessing the "Hospital Settlement System Integration Specifications," it can accurately extract the clauses on "Restrictions on the Use and Sharing of Medical Expense Details Data."

[0054] In a specific embodiment, step S20 includes: comparing the target privacy statement information corresponding to the same permission call originating from different heterogeneous data sources to generate a comparison result corresponding to each heterogeneous data source; and generating conflict warning information based on the dynamic priority conflict detection algorithm and each comparison result when there are differences between the comparison results.

[0055] Specifically, based on pre-established semantic parsing rules and key field extraction models, uniformly structured data items (such as collection purpose, data type, scope of use, storage period, etc.) are extracted from the declaration text obtained from various data sources. These structured information items are compared one by one, and detailed comparison results corresponding to each heterogeneous data source are automatically generated. The results are presented in the form of a structured table, clearly marking the specific declaration content of each data source on each data item.

[0056] When discrepancies are detected between comparison results, the dynamic priority conflict detection algorithm is triggered. This algorithm first sorts conflicting items according to a preset, dynamically adjustable data source priority order. It then comprehensively analyzes factors such as the credibility, timeliness, and regulatory effectiveness of each data source to assess and classify the conflicting content. Finally, it generates structured conflict warning messages. These messages include the following elements: the conflicting permissions or SDK behavior, the declaration content of each data source, the conflict type, a priority-based recommended adoption plan, and a complete chain of evidence directly traceable to the original data source. The generated conflict warning messages are tagged according to conflict level (e.g., "high-risk conflict," "recommendation for review") and integrated as key inputs into subsequent protocol generation processes.

[0057] In a specific embodiment, when there are differences among the comparison results, generating the conflict warning information based on the dynamic priority conflict detection algorithm and the comparison results includes: generating the initial warning information according to the preset static priority of each heterogeneous data source when the difference between the comparison results is less than a preset difference threshold; determining the historical confidence score, timeliness score, and risk score of each heterogeneous data source when the difference between the comparison results is greater than or equal to the preset difference threshold; and generating the target warning information based on the historical confidence score, the timeliness score, and the risk score using the dynamic priority conflict detection algorithm.

[0058] Specifically, based on a preset semantic similarity model and compliance key field comparison rules, the degree of difference between privacy statement information corresponding to the same permission provided by various heterogeneous data sources is evaluated. When the difference is less than a preset difference threshold (e.g., only the wording is different but the substance is the same), the statement from the highest priority source is directly selected as the benchmark according to the static priority set for each data source (e.g., official documentation > central repository > open source code repository), and an initial warning message is generated. This message mainly indicates the existence of non-substantial differences for reference.

[0059] When discrepancies reach or exceed preset thresholds (e.g., contradictions in key areas such as data usage or sharing scope), a dynamic evaluation mechanism is activated. This mechanism retrieves historical confidence scores (based on the accuracy statistics of previous conflict resolution results), timeliness scores (based on the interval between the information release time and the current time), and risk scores (based on the frequency of significant errors or misleading statements made by the data source in the past). A dynamic priority conflict detection algorithm is then invoked to comprehensively and weightedly calculate these three scores, dynamically generating a real-time priority ranking of each data source in the current conflict scenario. Based on this dynamic ranking and the specific discrepancies, detailed target warning information is generated, clearly indicating the conflict points, the content of each version of the statement, the corresponding dynamic priority assessment basis, and the source of the recommended statement, providing in-depth and quantitative decision support for subsequent manual adjudication.

[0060] Based on the embodiment shown in Figure 1, in this embodiment, step S30 includes: determining the type of each permission call behavior in the target call chain relationship to establish the preset privacy protocol template; filling the permission call behavior into the placeholders of the preset privacy protocol template according to the call frequency and call type of each permission call behavior to generate a draft of the protocol text; embedding the conflict warning information into the draft of the protocol text to generate the target privacy protocol.

[0061] Specifically, based on the type of each permission call behavior in the target call chain (such as location, contact access, camera access, etc.), a pre-defined privacy protocol template sub-module corresponding to that type is automatically matched and loaded. This privacy protocol template sub-module is pre-structured, containing legally mandated clauses and variable placeholders related to specific permission types. Combining the actual call frequency (e.g., high-frequency, low-frequency) and specific call type (e.g., direct call, indirect call via SDK) of each permission call behavior in the call chain, detailed information obtained from the analysis (including call purpose, involved data fields, usage scenarios, etc.) is intelligently filled into the corresponding placeholders in the template, initially generating a logically coherent and complete draft of the protocol clauses. Conflict warning information is embedded in the draft protocol clauses in a standardized interactive annotation format next to the relevant clauses. Through highlighting, collapsing, or linking, reviewers can intuitively view the conflict details and evidence, thus outputting a target privacy protocol draft that includes automatically generated clauses and clearly marks pending issues, completing the automated conversion from technical analysis to compliance text and the visualization of risks.

[0062] In a specific embodiment, embedding the conflict warning information into the initial draft of the protocol text to generate the target privacy protocol includes: converting the conflict warning information into structured annotation tags to generate structured warning tags; embedding the structured warning tags into the corresponding metadata fields in the initial draft of the protocol text to generate the target privacy protocol.

[0063] Specifically, the text-formatted conflict warning information is converted into a machine-readable and semantically clear data structure, namely a structured annotation label, according to preset rules. This structured label includes key fields such as conflict type (e.g., "declaration conflict" or "version mismatch"), affected data items, evidence summaries from each source, risk level assessed by the system, and priority-based processing recommendations.

[0064] The generated structured annotation tags are embedded as metadata into the corresponding structured locations in the initial draft of the agreement terms. Specifically, based on the permission invocation behavior or SDK name associated with the conflict warning information, the clause node describing that behavior is located in the document object model or corresponding data structure of the initial draft of the agreement terms. The structured annotation tags are then written as custom attributes or dedicated annotation fields for that node. For example, in a clause about "reading location information," its corresponding metadata field will embed a structured tag containing detailed information about the conflict between the official website statement and the source code detection behavior.

[0065] After the above embedding operations, the final output is a target privacy protocol containing structured metadata annotations. The target privacy protocol not only contains readable protocol text, but its underlying structure also carries a complete chain of conflict analysis evidence, which can be directly parsed and highlighted by downstream compliance review tools, or used by revision systems to provide intelligent suggestions, thereby achieving efficient and accurate connection between automated analysis results and manual review.

[0066] Please refer to Figure 2, which is a schematic block diagram of a privacy protocol generation apparatus based on call chain analysis according to an embodiment of this application. This privacy protocol generation apparatus based on call chain analysis is used to execute the aforementioned privacy protocol generation method based on call chain analysis. The privacy protocol generation apparatus based on call chain analysis can be configured on a server.

[0067] As shown in Figure 2, the privacy protocol generation device 400 based on call chain analysis includes: a target call chain relationship determination module 410, used to collect permission call behaviors in the target application code and determine the target call chain relationship based on each permission call behavior; a conflict warning information generation module 420, used to obtain target privacy statement information matching each permission call behavior from at least one heterogeneous data source, and perform consistency verification on each target privacy statement information through a dynamic priority conflict detection algorithm to generate conflict warning information; and a target privacy protocol generation module 430, used to generate a target privacy protocol based on a preset privacy protocol template, the target call chain relationship, and the conflict warning information.

[0068] Furthermore, the target call chain relationship determination module 410 includes: a permission call behavior determination unit, used to call key nodes according to the target application code, and determine the permission call behavior according to the key nodes; a node information determination unit, used to determine the running state of the target application code according to the permission call behavior, and determine the call order and nesting relationship between each call node according to the permission call behavior and the running state; and a call chain relationship generation unit, used to generate the target call chain relationship according to the call order and the nesting relationship.

[0069] Furthermore, the conflict warning information generation module 420 includes: a data source identifier determination unit, used to determine a data source identifier based on each of the heterogeneous data sources; and a target privacy statement information acquisition unit, used to acquire the target privacy statement information based on a preset mapping relationship and each of the data source identifiers; wherein the preset mapping relationship is a mapping relationship between each preset permission call behavior and the preset privacy statement information.

[0070] Furthermore, the conflict warning information generation module 420 includes: a comparison result generation unit, used to compare the target privacy statement information corresponding to the same permission call originating from different heterogeneous data sources, and generate a comparison result corresponding to each heterogeneous data source; and a conflict warning information generation unit, used to generate the conflict warning information based on the dynamic priority conflict detection algorithm and each comparison result when there are differences between the comparison results.

[0071] Furthermore, the conflict warning information generation unit includes: an initial warning information generation subunit, used to generate the initial warning information according to the preset static priority of each heterogeneous data source when the difference between each comparison result is less than a preset difference threshold; a scoring generation subunit, used to determine the historical confidence score, timeliness score, and risk score of each heterogeneous data source when the difference between each comparison result is greater than or equal to the preset difference threshold; and a target warning information generation subunit, used to generate the target warning information according to the historical confidence score, the timeliness score, and the risk score through the dynamic priority conflict detection algorithm.

[0072] Furthermore, the target privacy protocol generation module 430 includes: a preset privacy protocol template determination unit, used to determine the preset privacy protocol template based on the type of each permission call behavior in the target call chain relationship; a protocol clause draft generation unit, used to fill the permission call behavior into the placeholders of the preset privacy protocol template according to the call frequency and call type of each permission call behavior, and generate a protocol clause draft; and a target privacy protocol generation unit, used to embed the conflict warning information into the protocol clause draft, and generate the target privacy protocol.

[0073] Furthermore, the target privacy protocol generation unit includes: a structured warning label generation subunit, used to convert the conflict warning information into structured annotation labels to generate structured warning labels; and a target privacy protocol generation subunit, used to embed the structured warning labels into the corresponding metadata fields in the initial draft of the protocol stripes to generate the target privacy protocol.

[0074] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the above-described apparatus and modules can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0075] The aforementioned device can be implemented as a computer program that can run on the computer device shown in Figure 3.

[0076] Please refer to Figure 3, which is a schematic block diagram of a computer device provided in an embodiment of this application. This computer device may be a server.

[0077] Referring to Figure 3, the computer device includes a processor, memory, and network interface connected via a system bus, wherein the memory may include non-volatile storage media and internal memory.

[0078] Non-volatile storage media can store operating systems and computer programs. These computer programs include program instructions that, when executed, cause the processor to perform any privacy protocol generation method based on call chain analysis.

[0079] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0080] Internal memory provides an environment for the execution of computer programs in non-volatile storage media. When the computer program is executed by the processor, it enables the processor to execute any privacy protocol generation method based on call chain analysis.

[0081] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that the structure shown in Figure 3 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0082] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0083] In one embodiment, the processor is configured to run a computer program stored in a memory to perform the following steps: collecting permission call behaviors in the target application code and determining target call chain relationships based on each permission call behavior; obtaining target privacy statement information matching each permission call behavior from at least one heterogeneous data source, and performing consistency verification on each target privacy statement information using a dynamic priority conflict detection algorithm to generate conflict warning information; and generating a target privacy protocol based on a preset privacy protocol template, the target call chain relationships, and the conflict warning information.

[0084] In one embodiment, permission call behaviors in the target application code are collected, and a target call chain relationship is determined based on each permission call behavior. This is used to: call key nodes according to the target application code, and determine the permission call behaviors based on the key nodes; determine the running state of the target application code according to the permission call behaviors, and determine the call order and nesting relationship between each call node according to the permission call behaviors and the running state; and generate the target call chain relationship according to the call order and the nesting relationship.

[0085] In one embodiment, target privacy statement information matching each of the permission invocation behaviors is obtained from at least one heterogeneous data source, which is used to: determine a data source identifier based on each of the heterogeneous data sources; and obtain the target privacy statement information based on a preset mapping relationship and each of the data source identifiers; wherein the preset mapping relationship is a mapping relationship between each preset permission invocation behavior and the preset privacy statement information.

[0086] In one embodiment, a dynamic priority conflict detection algorithm is used to perform consistency verification on each of the target privacy statement information and generate conflict warning information. This is used to: compare the target privacy statement information corresponding to the same permission call originating from different heterogeneous data sources and generate comparison results corresponding to each heterogeneous data source; and generate the conflict warning information based on the dynamic priority conflict detection algorithm and each comparison result when there are differences between the comparison results.

[0087] In one embodiment, when there are differences among the comparison results, the conflict warning information is generated based on the dynamic priority conflict detection algorithm and the comparison results. This is used to: generate the initial warning information according to the preset static priority of each heterogeneous data source when the difference between the comparison results is less than a preset difference threshold; determine the historical confidence score, timeliness score, and risk score of each heterogeneous data source when the difference between the comparison results is greater than or equal to the preset difference threshold; and generate the target warning information based on the historical confidence score, the timeliness score, and the risk score using the dynamic priority conflict detection algorithm.

[0088] In one embodiment, a target privacy protocol is generated based on a preset privacy protocol template, the target call chain relationship, and the conflict warning information. This is used to: determine the preset privacy protocol template by the type of each permission call behavior in the target call chain relationship; fill the placeholders in the preset privacy protocol template with each permission call behavior according to the call frequency and call type to generate a draft of the protocol text; and embed the conflict warning information in the draft of the protocol text to generate the target privacy protocol.

[0089] In one embodiment, the conflict warning information is embedded in the initial draft of the protocol text to generate the target privacy protocol, which is used to: convert the conflict warning information into structured annotation tags to generate structured warning tags; and embed the structured warning tags into the corresponding metadata fields in the initial draft of the protocol text to generate the target privacy protocol.

[0090] The embodiments of this application also provide a computer-readable storage medium storing a computer program, the computer program including program instructions, and the processor executing the program instructions to implement any of the privacy protocol generation methods based on call chain analysis provided in the embodiments of this application.

[0091] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.

[0092] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for generating a privacy protocol based on call chain analysis, characterized in that, include: Collect permission call behaviors in the target application code, and determine the target call chain relationship based on each of the permission call behaviors; The system obtains target privacy statement information that matches each of the aforementioned permission call behaviors from at least one heterogeneous data source, performs consistency verification on each of the target privacy statement information using a dynamic priority conflict detection algorithm, and generates conflict warning information; and generates a target privacy protocol based on a preset privacy protocol template, the target call chain relationship, and the conflict warning information.

2. The privacy protocol generation method based on call chain analysis according to claim 1, characterized in that, The step of collecting permission call behaviors in the target application code and determining the target call chain relationship based on each permission call behavior includes: calling key nodes according to the target application code, and determining the permission call behavior based on the key nodes; determining the running state of the target application code according to the permission call behavior, and determining the call order and nesting relationship between each call node according to the permission call behavior and the running state; and generating the target call chain relationship according to the call order and the nesting relationship.

3. The privacy protocol generation method based on call chain analysis according to claim 1, characterized in that, The step of obtaining target privacy statement information matching each of the aforementioned permission invocation behaviors from at least one heterogeneous data source includes: determining a data source identifier based on each of the heterogeneous data sources; and obtaining the target privacy statement information based on a preset mapping relationship and each of the aforementioned data source identifiers; wherein the preset mapping relationship is a mapping relationship between each preset permission invocation behavior and the preset privacy statement information.

4. The privacy protocol generation method based on call chain analysis according to claim 3, characterized in that, The step of performing consistency verification on each of the target privacy statement information through a dynamic priority conflict detection algorithm and generating conflict warning information includes: comparing the target privacy statement information corresponding to the same permission call originating from different heterogeneous data sources, generating comparison results corresponding to each heterogeneous data source; and generating conflict warning information based on the dynamic priority conflict detection algorithm and each comparison result when there are differences between the comparison results.

5. The privacy protocol generation method based on call chain analysis according to claim 4, characterized in that, The conflict warning information includes initial warning information and target warning information. The step of generating the conflict warning information based on the dynamic priority conflict detection algorithm and the comparison results when there are differences among the comparison results includes: generating the initial warning information according to the preset static priority of each heterogeneous data source when the difference between the comparison results is less than a preset difference threshold; determining the historical confidence score, timeliness score, and risk score of each heterogeneous data source when the difference between the comparison results is greater than or equal to the preset difference threshold; and generating the target warning information based on the historical confidence score, the timeliness score, and the risk score using the dynamic priority conflict detection algorithm.

6. The privacy protocol generation method based on call chain analysis according to claim 1, characterized in that, The step of generating a target privacy protocol based on a preset privacy protocol template, the target call chain relationship, and the conflict warning information includes: determining the preset privacy protocol template by the type of each permission call behavior in the target call chain relationship; filling the permission call behavior into placeholders in the preset privacy protocol template according to the call frequency and call type of each permission call behavior to generate a draft of the protocol text; and embedding the conflict warning information into the draft of the protocol text to generate the target privacy protocol.

7. The privacy protocol generation method based on call chain analysis according to claim 6, characterized in that, The step of embedding the conflict warning information into the initial draft of the protocol text to generate the target privacy protocol includes: converting the conflict warning information into structured annotation tags to generate structured warning tags; and embedding the structured warning tags into the corresponding metadata fields in the initial draft of the protocol text to generate the target privacy protocol.

8. A privacy protocol generation device based on call chain analysis, characterized in that, include: The target call chain relationship determination module is used to collect permission call behaviors in the target application code and determine the target call chain relationship based on each permission call behavior. The conflict warning information generation module is used to obtain target privacy statement information that matches each of the permission call behaviors from at least one heterogeneous data source, and to perform consistency verification on each of the target privacy statement information through a dynamic priority conflict detection algorithm to generate conflict warning information; the target privacy protocol generation module is used to generate a target privacy protocol based on a preset privacy protocol template, the target call chain relationship and the conflict warning information.

9. A computer device, characterized in that, The computer device includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and, when executing the computer program, implement the privacy protocol generation method based on call chain analysis as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to implement the privacy protocol generation method based on call chain analysis as described in any one of claims 1 to 7.