Application authorization protocol parsing method, computer device, medium, and product

By capturing permission requests in real time and analyzing user protocols using AI models, it solves the problem that users find it difficult to understand the complexity of user protocols in mobile application permission management, and achieves efficient and accurate protocol analysis and risk assessment, improving user experience and data security.

CN120234798BActive Publication Date: 2025-08-22BEIJING ELECTRONIC DIGITAL INTELLIGENCE TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510699405.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-08-22
Estimated Expiration
2045-05-28

AI Technical Summary

Technical Problem

In the existing mobile application permission management, the terms of the user agreement are lengthy and the professional terms are complex, making it difficult for users to understand the scope of data use and potential risks, and cannot know the specific details of the use of permissions when authorized, which affects the security and privacy protection of personal data.

Method used

By capturing permission requests initiated by the application in real time, identifying permission types and obtaining associated user agreements, using multi-source text information in the target field to build preset legal text, training the target AI model, identifying named entities, legal terms and risk levels, and displaying agreement analysis information to users in a multi-layer display system.

Benefits of technology

Improve the accuracy and efficiency of protocol analysis, so that users can clearly understand the permissions and potential risks of the application, make wise authorization decisions, reduce illegal operations, protect users' legitimate rights and interests, and promote the healthy development of the application market.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120234798B_ABST
    Figure CN120234798B_ABST
Patent Text Reader

Abstract

The present application discloses a method, computer device, medium, and product for parsing an application authorization agreement. The method includes: capturing permission requests initiated by an application in real time, identifying the permission type corresponding to the permission request, and obtaining the associated user agreement of the permission type; constructing a preset legal text based on multi-source text information in the target domain, and using the text to train the target AI model, using the trained model as the target domain fine-tuning model, analyzing the associated user agreement through the model, obtaining the named entities in the associated user agreement, the legal clauses involved, and the predicted risk level corresponding to each legal clause, and then synthesizing this information to generate protocol parsing information, and presenting it to the user in a multi-layer display system. This method can automatically and accurately parse complex agreement content and can present what the user needs in different display systems, lowering the threshold for understanding the agreement and reducing the risk of privacy leakage caused by blind authorization. It is simple, efficient, and safe.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of mobile terminal security technology, and in particular to an application authorization protocol parsing method, computer device, medium, and product. Background Art

[0002] In existing mobile application permission management technology, when an application requests permissions from users (such as camera, photo album, location, etc.), it usually only simply prompts the user with the permission type, for example, only informing the user to "access the photo album". There is a lack of effective display and connection with the specific terms in the user agreement associated with these permissions. These specific terms include key information such as the location of data storage, the scope of data sharing with third parties, and the length of time the data is retained.

[0003] At the same time, the user agreement itself has lengthy clauses and complex professional terminology, which makes it difficult for users to quickly understand the actual scope of use of their data after it is acquired by the application and the potential risks they may face. Users can only manually click to authorize, but cannot clearly know the data usage details behind the relevant permissions during the authorization process. This brings great trouble to users in protecting personal data security and privacy. Summary of the Invention

[0004] In view of this, the embodiments of the present disclosure provide an application authorization agreement parsing method, computer device, medium, and product, which can solve the problems existing in the prior art that when an application applies for permission, it only simply prompts the permission type, lacks effective display and association of the specific terms of the associated user agreement, and the user agreement terms are lengthy and the terminology is complex, which makes it difficult for users to quickly understand the scope of data usage and potential risks, and they are unable to know the details of data usage at the time of authorization, causing great trouble to personal data security and privacy protection.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for parsing an application authorization protocol, comprising:

[0006] Capture permission requests initiated by applications in real time, identify the permission type corresponding to the permission request, and obtain the user agreement associated with the permission type;

[0007] Constructing a preset legal text based on multi-source text information in the target domain, and using the preset legal text to train the target AI model, and using the trained target AI model as the target domain fine-tuning model;

[0008] Inputting the associated user agreement into the target domain fine-tuning model to obtain the named entities in the associated user agreement, the legal clauses involved, and the predicted risk level corresponding to each of the legal clauses;

[0009] Generate agreement parsing information based on the named entities in the associated user agreement, the legal clauses involved, and the predicted risk level corresponding to each legal clause;

[0010] The protocol parsing information is presented to the user in a multi-layer presentation system.

[0011] Optionally, the step of constructing a preset legal text based on multi-source text information in the target field includes:

[0012] Constructing a basic corpus; the basic corpus includes one or more of global privacy policies, mobile application user agreements, and judicial interpretations on data abuse in court cases;

[0013] Dynamically masking the legal terms in the basic corpus to obtain a first text set;

[0014] Data enhancement processing is performed on the first text set, and the processed first text set is used as a preset legal text.

[0015] Optionally, the method for constructing the target AI model includes:

[0016] Determine a pre-trained language model, wherein the pre-trained language model includes Lawformer, MultiLegalPile, or Qianwen AI large model;

[0017] The pre-trained language model is trained using preset texts in the target domain, and the trained pre-trained language model is used as an underlying shared encoder;

[0018] Building a named entity recognition task-specific head, an attention-based classification task-specific head, and a risk prediction task-specific head on top of the underlying shared encoder;

[0019] The named entity recognition task-specific header uses a conditional random field layer to extract named entities in the associated user agreement;

[0020] The classification task-specific header is used to output the category of terms,

[0021] The risk prediction task-specific header is used to output the predicted risk level of the corresponding clause;

[0022] Configure the weighted loss function;

[0023] The weighted loss function is: ,in, , α is the weight of identifying named entities, β is the weight of term classification, and γ is the weight of risk prediction. is the named entity loss value, is the clause classification loss value; is the risk prediction loss value;

[0024] The target AI model includes the underlying shared encoder, the named entity recognition task-specific head, the classification task-specific head, the risk prediction task-specific head and the loss function.

[0025] Optionally, the method for obtaining the named entity in the associated user agreement includes:

[0026] Inputting the associated user agreement into the underlying shared encoder to obtain a universal semantic representation of the associated user agreement;

[0027] The general semantic representation is input into the named entity recognition task-specific header for processing to identify the named entities in the associated user protocol.

[0028] Optionally, the method for obtaining the legal terms involved includes:

[0029] Inputting the associated user agreement into the underlying shared encoder to obtain a universal semantic representation of the associated user agreement;

[0030] The general semantic representation is input into a classification task-specific head based on an attention mechanism to obtain the involved legal terms.

[0031] Optionally, the method for obtaining the predicted risk level corresponding to each legal provision includes:

[0032] Inputting the associated user agreement into the underlying shared encoder to obtain a universal semantic representation of the associated user agreement;

[0033] Obtain information on standard rules based on legal provisions or industry standards;

[0034] The standard rule information and the general semantic representation are jointly trained through the risk prediction task-specific header, and the risks involved in each legal clause are predicted based on the training results to determine the predicted risk level corresponding to each legal clause.

[0035] Optionally, the multi-layer display system includes a summary layer, a detail layer, and an original text layer;

[0036] Presenting the protocol parsing information to the user in a multi-layer presentation system includes:

[0037] Parsing the information according to the protocol, generating a summary in natural language, and displaying the summary on a summary layer; the summary includes key information and risk level information, the key information including one or more of data usage information, shared object information, and storage location information;

[0038] Obtaining semantic similarity between the permission request and the legal clauses involved, and displaying the legal clauses whose semantic similarity is greater than a preset threshold on a detail layer according to a preset visualization configuration;

[0039] Identifying professional legal terms in the protocol parsing information and obtaining popular explanations of the professional legal terms;

[0040] Locate the professional legal terms in the original text layer, highlight and suspend the corresponding popular explanations;

[0041] Obtaining agreement clauses in the agreement parsing information that conflict with the General Data Protection Regulation and marking them as non-compliant clauses;

[0042] Locate non-compliant clauses in the original text layer and configure warning signs.

[0043] Optionally, before generating the protocol parsing information, the method further includes:

[0044] Determine whether the predicted risk level corresponding to each legal clause is consistent with the preset risk rule base. If not, use the result in the preset risk rule base as the predicted risk level of the corresponding legal clause;

[0045] The preset risk rule library stores a number of legal clauses and their corresponding preset risk levels.

[0046] In a second aspect, the embodiments of the present disclosure further provide an application authorization protocol parsing system, including:

[0047] A monitoring module is used to capture permission requests initiated by applications in real time, identify the permission type corresponding to the permission request, and obtain the user agreement associated with the permission type;

[0048] A model training module is used to construct a preset legal text based on multi-source text information in the target domain, and use the preset legal text to train the target AI model, and use the trained target AI model as the target domain fine-tuning model;

[0049] a parsing module, configured to input the associated user agreement into the target domain fine-tuning model, and obtain the named entities, the legal clauses involved, and the predicted risk level corresponding to each of the legal clauses in the associated user agreement;

[0050] The interactive module is used to generate agreement parsing information based on the named entities in the associated user agreement, the legal terms involved, and the predicted risk level corresponding to each legal term, and to display the agreement parsing information to the user in a multi-layer display system.

[0051] In a third aspect, the embodiments of the present disclosure further provide a computer device that adopts the following technical solution:

[0052] The computer device comprises:

[0053] at least one processor; and,

[0054] a memory communicatively connected to the at least one processor; wherein,

[0055] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any of the above-mentioned application authorization protocol parsing methods.

[0056] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the above-mentioned application authorization protocol parsing methods.

[0057] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, comprising a computer program / instruction, which implements the steps of any of the above methods when executed by a processor.

[0058] The application authorization agreement parsing method disclosed in the present application includes: capturing the permission request initiated by the application in real time, identifying the permission type corresponding to the permission request, and obtaining the associated user agreement of the permission type; constructing a preset legal text based on multi-source text information of the target domain, and using the preset legal text to train the target AI model, using the trained target AI model as the target domain fine-tuning model, inputting the associated user agreement into the target domain fine-tuning model, obtaining the named entities in the associated user agreement, the legal clauses involved, and the predicted risk level corresponding to each legal clause, generating protocol parsing information based on the named entities in the associated user agreement, the legal clauses involved, and the predicted risk level corresponding to each legal clause, and displaying the protocol parsing information to the user in a multi-layer display system; by capturing permission requests and parsing associated user agreements in real time, it is possible to clearly understand the permissions that the application wants to obtain and the legal clauses and risks involved in the agreement, so as to make more informed authorization decisions, and through the target domain fine-tuning model Multi-task execution based on the model can solve the problem of general models misjudging legal terminology, avoid misjudgment of agreement terms due to misunderstanding of terminology, and thus more accurately identify named entities in related user agreements, the legal terms involved, and predict risk levels, greatly improving the accuracy of protocol parsing. It can complete multiple tasks at one time without the need to reason for each task separately like traditional methods, thereby significantly shortening the time for protocol parsing, improving overall parsing efficiency, and quickly providing users with protocol parsing results; protocol parsing based on laws and regulations can help application developers discover possible legal issues in the agreement, prompting them to comply with relevant laws and regulations and protect the legitimate rights and interests of users; the information display method of the multi-layer display system allows users to obtain information of different levels of detail according to their needs, improving the efficiency and convenience of information acquisition, thereby enhancing user experience. This solution helps to standardize the authorization behavior of applications, reduce illegal operations, and promote the healthy and orderly development of the application market.

[0059] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the following specifically cites preferred embodiments and describes them in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0061] Figure 1A flowchart of a method for parsing an application authorization protocol provided in an embodiment of the present disclosure.

[0062] Figure 2 A flowchart of a method for constructing a preset legal text provided in an embodiment of the present disclosure.

[0063] Figure 3 A flowchart of a method for constructing a target AI model provided in an embodiment of the present disclosure.

[0064] Figure 4 A flowchart of a method for obtaining named entities in an associated user agreement provided in an embodiment of the present disclosure.

[0065] Figure 5 A flowchart of a method for obtaining legal terms involved in an embodiment of the present disclosure is provided.

[0066] Figure 6 A flowchart of a method for obtaining the predicted risk level corresponding to each legal clause provided in an embodiment of the present disclosure.

[0067] Figure 7 A flowchart of a method for presenting protocol parsing information to a user in a multi-layer presentation system is provided in an embodiment of the present disclosure.

[0068] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0069] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0070] It should be clear that the following embodiments of the present disclosure are described through specific concrete examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.

[0071] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on this disclosure, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.

[0072] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The illustrations only show components related to the present disclosure and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.

[0073] Additionally, in the following description, specific details are provided to provide a thorough understanding of the examples. However, one skilled in the art will appreciate that the aspects described can be practiced without these specific details.

[0074] Reference Figure 1 In a first aspect, the present application discloses a method for parsing an application authorization protocol, comprising:

[0075] S100 , capturing permission requests initiated by applications in real time, identifying the permission type corresponding to the permission request, and obtaining the user agreement associated with the permission type.

[0076] The permission types include one or more of registration, camera usage, microphone usage, and album access.

[0077] This step allows you to promptly discover the app's permission requests, letting users know which permissions the app is attempting to obtain. Accurately identifying the permission type helps with subsequent targeted analysis of related protocols, improving the accuracy and efficiency of parsing. Obtaining the associated user agreement provides basic data for subsequent protocol parsing.

[0078] Specifically, the underlying interfaces of the application system can be monitored, and the permission request information (such as CAMERA, READ_CONTACTS) initiated by the application can be captured through system-level Hook technology (Android Binder / iOS XPC). The corresponding part in the application's privacy policy or user agreement text can be found according to the permission type. For example, the current permission can be dynamically associated with the application's privacy policy or user agreement text to identify the permission request format and characteristics under different operating systems (such as Android, iOS, etc.). This dynamic association allows users to promptly understand the specific provisions of the permission in the application's privacy policy or user agreement when the application requests the permission; it can clearly know how the application will use the relevant data after obtaining the permission, so as to more comprehensively evaluate whether to grant the permission and enhance the user's right to know and control the use of application data.

[0079] Furthermore, a permission type mapping table can be established to associate common permission requests with corresponding permission types. For example, a request for camera access corresponds to "hardware device access permission", and a request for address book access corresponds to "personal information access permission". When a permission request is captured, the corresponding permission type is identified by querying the mapping table. Each application will have a corresponding user agreement during development, and these agreements are usually stored in the application's server or local storage; when the permission type is identified, the user agreement related to the permission type is obtained from the application's server or local storage according to preset rules. For example, if the permission type is "personal information access permission", the part of the agreement regarding the collection, use and sharing of personal information is obtained.

[0080] S200, construct a preset legal text based on multi-source text information in the target field, use the preset legal text to train the target AI model, and use the trained target AI model as the target field fine-tuning model.

[0081] The preset legal text constructed based on multi-source text information can cover comprehensive information in the target field and provide rich data for model training; through fine-tuning training, the target AI model can better adapt to the specific tasks in the target field and improve the ability to identify and analyze legal terms in application authorization agreements.

[0082] S300: Input the associated user agreement into the target domain fine-tuning model to obtain the named entities in the associated user agreement, the legal clauses involved, and the predicted risk level corresponding to each legal clause.

[0083] Among them, the named entity includes one or more of the data subject, purpose, third party, and storage location; the predicted risk level corresponding to each legal clause refers to the predicted risk level corresponding to each legal clause involved.

[0084] Accurately identifying named entities helps clarify the subjects and objects in the agreement, providing a clear basis for subsequent analysis; identifying the legal terms involved allows users to understand whether the agreement complies with the requirements of laws and regulations; predicting risk levels allows users to intuitively understand the degree of risk that the agreement may bring, facilitating decision-making.

[0085] S400: Generate agreement parsing information based on named entities in the associated user agreement, the legal clauses involved, and the predicted risk level corresponding to each legal clause.

[0086] The generated protocol parsing information integrates scattered information, allowing users to fully and clearly understand the content and risks of the protocol; the explanation section can help users better understand the protocol parsing information and improve their decision-making ability.

[0087] S500: The protocol parsing information is displayed to the user in a multi-layer display system.

[0088] Among them, the multi-layer display system includes summary layer, detail layer and original text layer.

[0089] The multi-layer display system can meet the needs of different users. For users who only need to understand the general situation, they can obtain information at the overview layer; for users who need a deeper understanding, they can obtain more comprehensive information through the detailed layer and in-depth layer. This display method improves the readability and ease of use of information, allowing users to more conveniently obtain and understand protocol parsing information.

[0090] The application authorization agreement parsing method disclosed in the present application is applicable to user privacy protection scenarios in mobile operating system environments such as Android and iOS. It captures permission requests initiated by applications in real time, identifies the permission type corresponding to the permission request, and obtains the associated user agreement of the permission type; constructs a preset legal text based on multi-source text information in the target domain, and uses the preset legal text to train the target AI model. The trained target AI model is used as the target domain fine-tuning model, and the associated user agreement is input into the target domain fine-tuning model to obtain the named entities in the associated user agreement, the legal terms involved, and the predicted risk level corresponding to each legal term. According to the named entities in the associated user agreement, the legal terms involved, and the predicted risk level corresponding to each legal term, the protocol parsing information is generated, and the protocol parsing information is displayed to the user in a multi-layer display system; by capturing permission requests and parsing associated user agreements in real time, it is possible to clearly understand the permissions that the application wants to obtain and the legal terms and risks involved in the agreement, so as to make more informed authorization decisions. By fine-tuning the target domain model Multi-task execution based on the model can solve the problem of general models misjudging legal terminology, avoid misjudgment of agreement terms due to misunderstanding of terminology, and thus more accurately identify named entities in related user agreements, the legal terms involved, and predict risk levels, greatly improving the accuracy of protocol parsing. It can complete multiple tasks at one time without the need to reason for each task separately like traditional methods, thereby significantly shortening the protocol parsing time, improving the overall parsing efficiency, and quickly providing users with protocol parsing results; protocol parsing based on laws and regulations can help application developers discover possible legal issues in the agreement, prompting them to comply with relevant laws and regulations and protect the legitimate rights and interests of users; the information display method of the multi-layer display system allows users to obtain information of different levels of detail according to their needs, improving the efficiency and convenience of information acquisition, thereby enhancing user experience. This solution helps to standardize the authorization behavior of applications, reduce illegal operations, promote the healthy and orderly development of the application market, lower the threshold for understanding agreements, and reduce the risk of privacy leakage caused by blind authorization. It is simple, efficient and secure.

[0091] Reference Figure 2 The method of “constructing a preset legal text based on multi-source text information in the target domain” in S200, i.e., the method of constructing the preset legal text, specifically includes:

[0092] S201, construct a basic corpus; the basic corpus includes one or more of global privacy policies, mobile application user agreements, and judicial interpretations on data abuse in court cases.

[0093] Global privacy policies include compliance documents such as GDPR, CCPA, and the Personal Information Protection Act. For example, web crawlers can be used to collect privacy policy texts from companies of varying sizes and industries worldwide, from the official websites of major internet companies and privacy policy databases. For example, privacy policies from companies like Google, Apple, and Alibaba can be collected, detailing their rules for collecting, using, and protecting user personal information.

[0094] Mobile application user agreements include those covering mainstream sectors such as social networking, e-commerce, and finance. For example, you can download a large number of popular apps from app stores (such as the Apple App Store and the Android App Store) and extract the user agreements contained therein. For example, user agreements for social apps (WeChat, Facebook) and shopping apps (Taobao, Amazon) contain agreements between the app operator and the user regarding service usage, permission granting, and other aspects.

[0095] Judicial interpretations of data abuse in court cases can be found by accessing legal databases (such as Peking University Law Firm and Wolters Kluwer), searching for court precedents on data abuse, and collating the judicial interpretations within them. For example, judicial interpretations of cases involving personal information leaks and illegal data trading will explain the application and interpretation of relevant legal provisions.

[0096] This step covers a variety of text types, which can reflect the legal information in the target field from different perspectives, making subsequent analysis and processing more comprehensive. For example, privacy policies focus on the rules for data collection and use, while court precedents provide interpretations and judgment criteria for legal applications in practical applications. The texts from these sources are highly authoritative and provide a reliable basis for subsequent model training and legal analysis.

[0097] S202: Dynamically mask the legal terms in the basic corpus to obtain a first text set.

[0098] Specifically, masked legal entity prediction (MLEP) can be used to dynamically mask legal terms in the basic corpus. Masked legal entity prediction (MLEP) is a technology or method specifically used to process legal text data. "Masking" is a common technical means in natural language processing, and "legal entity prediction" clarifies the application scenarios and goals of this technology, namely, to predict and identify various entities in the legal field.

[0099] The legal field has its own specific professional terms, such as "data controller" and "anonymization". These terms have precise legal definitions and specific meanings, which are different from everyday language and are crucial for accurately understanding and processing legal texts.

[0100] Traditional masking strategies may be static, that is, certain words or parts of the text are fixedly masked; while dynamic masking strategies are more flexible, and they dynamically select the parts that need to be masked based on different contexts, task requirements, and the characteristics of legal terminology.

[0101] For legal terms like "data controller" and "anonymization," dynamic masking strategies mask portions of these terms based on specific circumstances. For example, in the sentence "The data controller is responsible for the collection and management of data," the "controller" in "data controller" might be masked, leaving the model to predict the masked portion. This approach allows the model to more deeply learn the structure, semantics, and usage of legal terms.

[0102] Suppose we have a legal text: "According to relevant regulations, the data controller must anonymize the collected personal information." When using a dynamic masking strategy, the "controller" in "data controller" may be masked to "[MASK]", and the "anonymization" in "anonymization processing" may be masked to "[MASK]", resulting in "According to relevant regulations, data [MASK] must perform [MASK] processing on the collected personal information." Then, the model is asked to predict these two masked parts. Through a large amount of such training, the model can gradually learn the characteristics and meanings of legal terms such as "data controller" and "anonymization processing", thereby strengthening its understanding of professional terms.

[0103] Through masking, the model needs to learn to predict masked legal terms based on the context during training, thereby improving its understanding and adaptability to different text contexts and enhancing its generalization capabilities. In actual legal text analysis, some unprecedented legal terms or incomplete expressions may be encountered. Dynamic masking can simulate this situation, allowing the model to better deal with practical problems.

[0104] S203: Perform data enhancement processing on the first text set, and use the processed first text set as the preset legal text.

[0105] Specifically, the key entities in the first text set can be replaced, and the multilingual agreements (such as Chinese and English bilingual clauses) in the first text set after the replacement process can be aligned and trained, and the trained first text set can be used as the preset legal text.

[0106] Furthermore, some words in the first text set can be replaced with synonyms, for example, "data collection" can be replaced with "data acquisition", "privacy protection" can be replaced with "personal information security protection", etc.; the structure of the sentences can also be adjusted, for example, active sentences can be changed to passive sentences, and "the application collects the user's personal information" can be changed to "the user's personal information is collected by the application"; the size of the corpus can also be increased by copying, splicing, etc., for example, some similar sentences can be spliced ​​to form longer sentences, or some sentences can be copied to increase the amount of corpus.

[0107] Data augmentation processing can generate more different forms of text, making the corpus richer and more diverse, which helps the model learn more language patterns and semantic information and improves the performance of the model. Faced with different input texts, the model trained with data augmentation can perform analysis and prediction more stably, reducing overfitting problems caused by insufficient data or uneven data distribution.

[0108] Furthermore, adversarial samples can be generated by replacing key entities (such as changing "shared to a third party" to "partner"), and the original samples and the generated adversarial samples can be mixed together as preset legal texts.

[0109] Specifically, for the identified key entities, synonyms, near-synonyms, or similar expressions are used to replace them. For example, to replace "shared with a third party" with "shared with partners" or "shared with collaborators," a synonym library can be established and the replacement operation can be performed based on the library. To avoid the generated adversarial samples being too different from the original samples, the replacement ratio of key entities needs to be controlled. A replacement ratio threshold can be set, for example, each replacement does not exceed 30% of the total number of key entities in the text. For the same agreement text, multiple different replacement operations can be performed to generate multiple different adversarial samples to increase sample diversity.

[0110] The method for constructing preset legal texts disclosed in S201-S203 provides rich, diverse and high-quality data for model training by building a comprehensive basic corpus, performing dynamic masking and data enhancement processing, which helps to improve the model's understanding and analysis capabilities of legal texts, enabling it to more accurately identify legal clauses and analyze risks in practical applications; the solution takes into account a variety of practical scenarios and possible problems, such as unprecedented legal terminology and different ways of expression, so that the model can better adapt to the complex and changing legal text environment and improve its applicability and reliability in different situations; the preset legal texts provide a solid foundation for legal analysis based on artificial intelligence, which can promote the automation and intelligent development of legal analysis work, improve work efficiency and reduce labor costs.

[0111] Reference Figure 3, the method for constructing the target AI model in S200 includes:

[0112] A100 determines the pre-trained language model, which includes Lawformer, MultiLegalPile, or Qianwen AI large model.

[0113] A200 trains the pre-trained language model using preset text in the target domain and uses the trained pre-trained language model as the underlying shared encoder.

[0114] The pre-trained language model has been trained on large-scale general texts and has a certain level of language comprehension capabilities. Further training with preset texts in the target domain can transfer general knowledge to the target domain, reducing the training time and data requirements of the model in the target domain. Training on the target domain can make the model better adapt to the language characteristics and task requirements of the target domain, thereby improving the model's performance in the target domain, such as the ability to understand and analyze legal texts.

[0115] A300 builds a named entity recognition task-specific head, an attention-based classification task-specific head, and a risk prediction task-specific head on top of the underlying shared encoder.

[0116] The named entity recognition (NER) task-specific header uses a conditional random field (CRF) layer to determine whether each word in the associated user agreement belongs to an entity and the location of the entity boundaries based on the contextual relationships between elements in the sequence. It also identifies nested entities in the associated user agreement, extracts and annotates each independent entity, and thus extracts the named entities in the associated user agreement. The construction of the named entity recognition task-specific header involves adding a conditional random field (CRF) layer on top of the output of the underlying shared encoder. For example, for a user agreement text such as "This application will collect personal information such as the user's name, phone number, and address," the CRF layer determines whether each word belongs to an entity (e.g., "name," "phone number," and "address" belong to the "personal information" entity) based on the contextual relationships between each word in the sequence, and determines the location of the entity boundaries. It also identifies nested entities. For example, in more complex text, such as "the name (real name) provided by the user during registration," the CRF layer can accurately identify nested entities such as "name" and "real name," extracting and annotating them.

[0117] The classification task-specific header is used to output the clause category; specifically, the construction of the classification task-specific header includes: calculating a classification task-specific header based on the attention mechanism, which will classify the clauses in the user agreement according to the output of the underlying shared encoder; for example, the clauses are divided into different categories such as "data collection terms", "data usage terms", and "data sharing terms". The attention mechanism can help the model focus on the key information in the text and improve the accuracy of classification.

[0118] The risk prediction task-specific header outputs the predicted risk level of the corresponding clause. For example, for a clause stating "This application may share users' personal information with third-party partners," this header predicts the risk level of the clause, such as "low risk," "medium risk," or "high risk," based on the clause's content and the output of the underlying shared encoder.

[0119] Each task-specific head is designed for a specific task and can complete its respective task more effectively; for example, the CRF layer can make full use of contextual information in named entity recognition to improve the accuracy of entity recognition; the classification head based on the attention mechanism can better process complex information in the text and improve the classification performance; all task-specific heads are based on the underlying shared encoder, which means that they can share the common language knowledge and features learned by the underlying encoder, reducing the number of model parameters and training costs, while also improving the overall efficiency of the model.

[0120] A400, configure weighted loss function;

[0121] The target AI model includes an underlying shared encoder, a named entity recognition task-specific head, a classification task-specific head, a risk prediction task-specific head, and a loss function.

[0122] Specifically, the weighted loss function is: , , ensuring that the magnitude of gradient updates is controllable.

[0123] Among them, α is the weight of identifying named entities, β is the weight of term classification, and γ is the weight of risk prediction. is the named entity loss value, is the clause classification loss value; is the risk prediction loss value, where α is used to control the loss weight of the NER task to ensure that the model prioritizes optimizing the accuracy of entity extraction (such as “data usage” and “shared objects”); β is used to adjust the weight of the term classification task to assist the model in distinguishing the term types (such as “data collection” or “data sharing”); γ is used to control the weight of the risk prediction task to avoid excessive interference of the secondary task with the main task (NER and classification).

[0124] Among them, the named entity loss, term classification loss, and risk prediction loss can be calculated using common loss functions (such as the cross-entropy loss function). For example, in the named entity recognition task, the cross-entropy loss function is used to calculate the difference between the entity label predicted by the model and the true label to obtain the named entity loss value.

[0125] For example, if the accuracy of named entity recognition is crucial to subsequent analysis in the current task, α can be set to a higher value, such as 0.5; while the importance of term classification and risk prediction is relatively low, β and γ can be set to 0.3 and 0.2 respectively.

[0126] The weighted loss function can weight the loss according to the importance of different tasks, ensuring that the model can focus on multiple tasks simultaneously during training, and avoiding the model optimizing only one task while ignoring other tasks; by reasonably configuring the weights, the model can achieve better performance on each task, improving the overall effect and practicality of the model.

[0127] The target AI model constructed using the publicly available target AI model construction method of A100-A400 integrates multiple tasks such as named entity recognition, clause classification, and risk prediction. It can comprehensively analyze legal texts (such as user agreements) and provide users with richer information and deeper insights. The architecture of the underlying shared encoder and task-specific header, as well as the training method of the weighted loss function, reduces the number of model parameters and training costs, and improves the model's training efficiency and inference speed. Through training on preset text in the target domain and the targeted design of task-specific headers, the model can better adapt to the characteristics and needs of the target domain, improving the accuracy and reliability of each task. This solution has good scalability, and more task-specific headers can be added as needed to support more tasks, such as compliance checks of legal terms.

[0128] Furthermore, in this embodiment, within the multi-task learning model architecture, task-specific headers are model components specifically designed for specific tasks. After obtaining a general semantic representation using the underlying shared encoder (such as Legal-BERT), different tasks require different processing methods to output task-related results. Task-specific headers fulfill this function. Each header focuses on a specific task and further processes the features output by the shared encoder to complete the corresponding task.

[0129] The task-specific header for named entity recognition (NER) is used to identify entities with specific meanings from text, such as names of people, places, organizations, and legal terms. In legal text processing scenarios, the role of the NER header is to accurately identify various entities in legal texts.

[0130] The NER task-specific header uses a Conditional Random Field (CRF) layer. CRF is a commonly used sequence tagging model that considers the contextual relationships between elements in a sequence. In NER tasks, using a CRF layer can better handle the identification of entity boundaries because it comprehensively considers contextual information to determine whether each word belongs to a specific entity and the location of the entity boundary.

[0131] The NER task-specific header in this embodiment supports nested entities. Specifically, in legal texts, there are many nested entities. For example, in "third-party advertisers", "third party" and "advertiser" are both entities, and "advertiser" is nested in the larger entity "third-party advertiser". The NER header must be able to recognize this nested relationship and accurately label each entity.

[0132] The main task of the classification task-specific head is to classify legal terms, such as classifying the terms into different business types. Introducing the attention mechanism in the classification task-specific head allows the model to dynamically focus on the important parts of the terms when processing the terms. In legal terms, there are some keywords that can reflect the degree of risk, such as "permanent retention" and "unencrypted". Through the attention mechanism, these keywords can be automatically paid attention to, so as to more accurately judge the category of the terms. The attention mechanism will calculate the weight of each word based on the input text of the terms. The higher the weight, the more important the word is in the classification task.

[0133] The goal of the risk prediction task-specific head is to predict the risks involved in legal clauses, such as whether there are risks of non-compliance or data leakage during data processing. Specifically, rule features and semantic features can be jointly trained. Rule features are some clear rules based on legal provisions or industry standards, such as whether the data retention period exceeds the standard. Semantic features are semantic information extracted from the text through the underlying shared encoder; the risk prediction task-specific head combines these two features for training, taking advantage of the certainty of rule features on the one hand and the flexibility of semantic features on the other hand, thereby improving the accuracy of risk prediction. For example, when judging the risk of a data processing clause, both whether the data retention period complies with the regulations (rule features) and the overall semantics of the clause text (semantic features) are considered.

[0134] Furthermore, this application also includes: constructing a privacy protection domain terminology library (such as "data subject," "processor," and "anonymization"), adding term embedding vectors corresponding to the privacy protection domain terminology library to the input layer of the target AI model to enhance semantic differentiation. It can also convert terms such as GDPR / CCPA / Personal Information Protection Law into logical rules (such as "data retention period ≤ 6 months") and use them as features to input into the risk prediction task-specific header.

[0135] Reference Figure 4 The method for obtaining the named entity in the associated user agreement in S300 includes:

[0136] S311 , inputting the associated user agreement into the underlying shared encoder to obtain a universal semantic representation of the associated user agreement.

[0137] Specifically, suppose we have a mobile app's associated user agreement. This agreement may include terms and conditions such as user registration, data collection, privacy protection, and service usage rules. This text agreement can be preprocessed, for example by removing extra spaces and special characters, to prepare it for input into the encoder. The preprocessed agreement is then fed into a previously trained underlying shared encoder. For example, the Lawformer pre-trained language model can be used as the underlying shared encoder. This encoder encodes each word in the text, taking into account the contextual relationships between words. Through a multi-layer neural network architecture, it abstracts and transforms the text information. Finally, after processing by the encoder, a vector representation is output. This vector is the general semantic representation of the agreement. This representation incorporates lexical, syntactic, and semantic information from the agreement text. For example, it captures key concepts such as "user information," "data collection methods," and "privacy policy," as well as the relationships between them.

[0138] In this step, the underlying shared encoder has been previously trained using preset texts from the target domain and has accumulated rich legal domain knowledge and language comprehension capabilities. By inputting the associated user agreement into it, it can leverage this prior knowledge to quickly and accurately extract the semantic information of the agreement text, avoiding learning language features from scratch and improving processing efficiency. The universal semantic representation provides a unified, high-quality input for subsequent named entity recognition tasks. Regardless of how the length, structure, and expression of the agreement text change, it can be converted into a fixed-dimensional vector, facilitating processing by subsequent task-specific headers.

[0139] S312: Input the general semantic representation into a named entity recognition task-specific header for processing to identify named entities in the associated user protocol.

[0140] Specifically, the named entity recognition (NER) task-specific head receives the general semantic representation from the underlying shared encoder. The head uses a conditional random field (CRF) layer, which takes into account the contextual relationship between each element in the sequence; for example, for the sentence "This application will collect the user's ID number and mobile phone number" in the agreement text, the CRF layer will analyze the semantic and grammatical information of "ID number" and "mobile phone number" in the context. The CRF layer determines whether each word in the agreement belongs to an entity and the boundary position of the entity based on predefined entity categories (such as "personal information" and "data type", etc.). For the above example, it will recognize that "ID number" and "mobile phone number" belong to the "personal information" entity and label them; at the same time, it can also handle nested entity situations, such as accurately identifying nested structures such as "user's sensitive personal information (such as ID number)" in more complex expressions.

[0141] The named entity recognition (NER) task-specific head is specially designed for the named entity recognition task. It can fully utilize the universal semantic representation output by the underlying shared encoder, combined with its own CRF layer and other structures, to focus on identifying named entities in the agreement, improving the accuracy and efficiency of entity recognition. The CRF layer can consider the contextual relationship between words, which is crucial for accurately identifying named entities. In legal texts, the meaning and boundaries of many entities need to be determined based on the context. The CRF layer can effectively capture this information and avoid errors caused by identifying individual words in isolation.

[0142] In this embodiment, through the collaborative work of the underlying shared encoder and the named entity recognition task-specific header, named entities can be efficiently and accurately identified from associated user agreements, which is of great significance for legal text analysis, compliance inspection and other tasks, and can help relevant personnel quickly locate and extract key information; the underlying shared encoder can provide a common semantic representation for multiple tasks, while the named entity recognition task-specific header can be adjusted and optimized according to different needs. This architecture has good scalability and reusability, and is convenient for application in different legal text processing scenarios; the use of pre-trained underlying shared encoders and specially designed task-specific headers avoids training the model from scratch for each new named entity recognition task, reduces computational and time costs, and improves overall work efficiency.

[0143] Reference Figure 5 The method for obtaining the legal terms involved in S300 includes:

[0144] S321 : Input the associated user agreement into the underlying shared encoder to obtain a universal semantic representation of the associated user agreement.

[0145] S322, the general semantic representation is input into the classification task-specific head based on the attention mechanism to obtain the legal terms involved.

[0146] The classification task-specific header receives the general semantic representation from the underlying shared encoder. The attention mechanism automatically analyzes various parts of the agreement text, assigning different weights to different words or phrases. For example, when processing the "Privacy Policy" section of the agreement, the attention mechanism will pay more attention to keywords such as "Personal Information Collection" and "Data Sharing," assigning higher weights to these words to highlight their importance. Based on the weights assigned by the attention mechanism, the classification task-specific header classifies the agreement and determines the legal terms involved. Assuming pre-defined categories such as "User Registration Terms," ​​"Privacy Protection Terms," ​​and "Transaction Rules Terms," ​​the header will classify the agreement into the corresponding category based on the semantic information of the agreement. For example, if the agreement primarily concerns the information provided and identity verification requirements during user registration, it will be classified into the "User Registration Terms" category.

[0147] The attention mechanism helps the model focus on key information in the agreement text and ignore irrelevant noise. By assigning different weights to different parts, the model can more accurately understand the core content of the agreement, thereby improving the accuracy of clause classification. Legal clauses often have complex semantics and structures, and different clauses may overlap and overlap. The classification task-specific head based on the attention mechanism can better handle this complexity. By dynamically adjusting attention weights, it captures the nuances in the text and accurately identifies the relevant legal clauses.

[0148] Reference Figure 6 The method for obtaining the predicted risk level corresponding to each legal clause in S300 includes:

[0149] S331 , inputting the associated user agreement into the underlying shared encoder to obtain a universal semantic representation of the associated user agreement.

[0150] S332, obtaining standard rule information based on legal provisions or industry standards.

[0151] Standard rule information based on legal provisions and industry standards is authoritative and normative, providing a reliable reference for risk prediction, ensuring that the prediction results comply with legal requirements and industry norms, and improving the credibility of the prediction; standard rule information clarifies the boundaries of legality and compliance, so that when conducting risk prediction, it is possible to accurately judge whether there are risks in the terms of the agreement, as well as the nature and extent of the risks.

[0152] S333, jointly trains standard rule information and general semantic representation through the risk prediction task-specific head, and predicts the risks involved in each legal clause based on the training results to determine the predicted risk level corresponding to each legal clause.

[0153] Among them, the risk level includes one or more of the risk of violation in the data processing process and the risk of data leakage.

[0154] The risk prediction task-specific header receives standard rule information and general semantic representations as input. During training, the model learns the mapping relationship between standard rule information and the semantics of agreement clauses. For example, when an agreement clause states that "the platform may freely use users' personal information," the model learns that this clause may pose a high risk based on the standard rule's provisions on user privacy protection. After training, the model predicts the risk of each legal clause in the agreement and categorizes the risk level into low, medium, and high based on the prediction results. For example, if a clause only slightly violates some recommended provisions of the industry standard, it may be judged as low risk; if a clause violates important legal provisions, it may be judged as high risk.

[0155] Through joint training, the model can comprehensively consider the semantics of standard rule information and agreement clauses to conduct more accurate risk assessments, avoid the limitations of assessments based solely on rules or semantics, and improve the accuracy of risk predictions. This step automates risk prediction and can quickly determine the corresponding risk level for each legal clause, providing decision-making support for legal professionals, corporate managers, etc., helping them to promptly identify and deal with potential legal risks.

[0156] Reference Figure 7 The method for S500 to display the protocol parsing information to the user in a multi-layer display system includes:

[0157] S510 , generating a summary in natural language according to the protocol parsing information, and displaying the summary on the summary layer.

[0158] The summary includes key information and risk level information, and the key information includes one or more of data usage information, shared object information, and storage location information.

[0159] The summary layer mainly provides users with a concise and clear summary of key information in the form of natural language. Users do not need to read the lengthy original text of the agreement. Through the summary, they can quickly grasp the key information and risk situation of the agreement, thereby improving the efficiency of information acquisition; especially those important information closely related to their own rights and interests, privacy, etc., helping users to quickly grasp the general situation when browsing and decide whether they need to further understand the details.

[0160] When users do not have enough time or energy to read an app's privacy policy, data usage agreement, and other documents in detail, the summary layer can quickly provide them with key information to help them make preliminary judgments, such as whether to continue using the app or whether they need to learn more details.

[0161] Specifically, using controllable generation technology and the CTRL (Conditional Transformer Language Model) model, a summary is generated based on key information and risk level information using control codes (such as [RISK_HIGH]), avoiding deviations from core risk points. For example, when the control code is [DATA_PHOTO][USE_AD][SHARE_3RD][STORAGE_US][RISK_HIGH], the generated text is "This app will use your photo album data for advertising recommendations and share it with third-party partners. The data is stored in the United States (high risk)." This summary allows users to quickly perceive potential privacy and data security issues that may arise from using the app.

[0162] S520: Obtain the semantic similarity between the permission request and the legal clauses involved, and display the legal clauses with semantic similarity greater than a preset threshold in the detail layer according to a preset visualization configuration.

[0163] Specifically, Sentence-BERT is used to calculate the semantic similarity between permission descriptions (such as "access the photo album") and terms, and only terms with a correlation > 0.7 (preset threshold) are displayed.

[0164] Further visualization enhancements can be implemented to add animated warnings to high-risk fields (such as flashing red borders) and support user-defined filtering conditions (such as "only show high-risk terms").

[0165] Specifically, animated warnings are added to high-risk fields, such as flashing red borders. This visual approach can attract users' attention and help them more intuitively identify high-risk content. Users can also customize filtering conditions based on their needs, such as "show only high-risk terms." This allows users to flexibly filter information based on their specific needs, improving information acquisition efficiency.

[0166] Furthermore, the details layer can display key fields in the form of structured tables, such as purpose, shared objects, risk level, etc. This display method can systematically organize and clearly present complex information, making it easier for users to compare and analyze, and gain an in-depth understanding of the specific circumstances of each key factor, thereby more comprehensively assessing related risks.

[0167] When users need to learn more about the information in the summary layer, the details layer can provide them with more detailed and specific information to help them make more in-depth decisions, such as comparing and choosing between multiple applications, or serving as an important reference when deciding whether to agree to data sharing.

[0168] S530, identifying professional legal terms in the protocol parsing information and obtaining popular explanations of the professional legal terms;

[0169] Locate professional legal terms in the original text, highlight and suspend the corresponding popular explanations.

[0170] For users who are not legal professionals, professional legal terms are often difficult to understand. Popular explanations can help them better understand the content of the agreement and eliminate misunderstandings caused by terminology barriers. Through the interactive methods of highlighting and floating explanations, users are provided with a convenient way to consult, making the process of reading the agreement smoother and more comfortable.

[0171] S540, obtaining agreement clauses that conflict with the General Data Protection Regulation from the agreement parsing information and recording them as non-compliant clauses;

[0172] Locate non-compliant clauses in the original text layer and configure warning signs.

[0173] If a clause in the agreement parsing information states that "the platform can collect user data at will without explicitly disclosing the purpose," this clause conflicts with the General Data Protection Regulation and is marked as non-compliant. This non-compliant clause is then located in the original text and marked with a prominent warning sign (such as a red exclamation mark) to alert users. This step helps users quickly identify clauses in the agreement that may infringe on their data rights, enabling them to make fully informed decisions and enhancing the protection of user data security and privacy. For platforms, this display method also encourages them to promptly identify and modify non-compliant agreement clauses, thereby improving the compliance level of the agreement.

[0174] S510-S540 discloses a method of presenting protocol parsing information to users in a multi-layer display system. Through the multi-layer display system, from summary to details, and then to special treatment of professional terms and non-compliant clauses, users are provided with comprehensive, clear and easy-to-understand agreement information, allowing users to understand the content of the agreement more easily and improving the reading experience; this solution clearly presents the key information, legal basis, professional terminology explanations and compliance status in the agreement to users, increasing the transparency of the platform, helping to build user trust in the platform and promoting a good cooperative relationship between users and the platform; for the platform, it can promptly discover non-compliant clauses in the agreement and make rectifications, thereby improving the compliance of the agreement; for users, it can better understand potential risks, take corresponding preventive measures, and reduce legal risks and data security risks.

[0175] Furthermore, the original text layer mainly provides the location of the original text of the agreement and the explanation of related terms. Its purpose is to enable users to view the most original agreement content and avoid misunderstandings or omissions during the information transmission process. At the same time, through the explanation of professional terms, it reduces the difficulty of users understanding the agreement and enhances users' accurate grasp of the agreement content.

[0176] When users have questions about the details layer or need to confirm the precise meaning of specific clauses, the original text layer provides the most authoritative basis. Furthermore, users with a strong legal awareness and a strong focus on protecting their rights may prefer to directly view the original text of the agreement, a need that the original text layer can satisfy.

[0177] The three-level display system can meet the needs of different users in different scenarios. From the summary layer for quickly understanding key information, to the detail layer for in-depth analysis of detailed situations, to the original text layer for consulting original agreements and term explanations, it provides users with a gradually in-depth and well-structured information acquisition path, which helps to improve users' understanding and cognition of relevant agreements and data usage, and enhance users' decision-making ability when faced with complex information.

[0178] Furthermore, legal agreements usually contain a large number of professional terms, which are difficult for ordinary users to understand. The role of the term interpretation model is to fine-tune the model so that it can convert these professional legal terms into easy-to-understand explanations.

[0179] The method of "obtaining layman's explanations of professional legal terms" can be based on a pre-trained language model. This model can be further trained using a dataset containing professional legal terms and their layman's explanations. The model's parameters are adjusted so that it learns the mapping relationship between professional terms and layman's explanations. When a user encounters professional terms while reviewing the original text of a legal agreement, the model will convert the professional terms into layman's explanations based on the previously learned mapping relationship. For example, if the user inputs "anonymization processing," the model outputs "the data has been processed so that it cannot be associated with a specific individual." This method can effectively lower the threshold for users to understand legal agreements, allowing ordinary users to understand the meaning of key terms in the agreement without having to possess professional legal knowledge, thereby more accurately understanding the content of the agreement.

[0180] Among them, GDPR (General Data Protection Regulation) is a strict data protection regulation. Many agreements involving data processing must comply with its requirements. The compliance comparison prompt function compares the terms of the agreement with the requirements of GDPR. If any conflict is found between the terms of the agreement and the regulatory requirements, a corresponding prompt will be given at the original text level.

[0181] Regarding "obtaining agreement clauses in agreement parsing information that conflict with the General Data Protection Regulation," the system can analyze each clause in the agreement and compare them one by one with the various requirements stipulated in the GDPR to identify clauses in the agreement that do not comply with the regulations. Once a conflicting clause is found, a warning sign will be added to the original text of the agreement at the location of the clause. This warning sign can be a special icon, color code, etc. to attract the user's attention. At the same time, the warning sign will be linked to the relevant requirements in the original GDPR regulations. When the user clicks the warning sign, they can directly view the specific content of the regulations and understand the specific circumstances of the conflict between the agreement terms and the regulations.

[0182] This method can help users quickly identify parts of the agreement that do not comply with regulatory requirements, improve their understanding of the agreement's compliance, and also facilitate users to further review the original text of the regulations to understand the detailed regulatory requirements. Overall, the original text-level interpretation generation improves users' understanding and grasp of legal agreements through terminology explanations and compliance prompts, and enhances users' ability to judge the compliance of the agreement.

[0183] Furthermore, before generating the protocol parsing information at step S400, the application authorization protocol parsing method disclosed herein further includes determining whether the predicted risk level corresponding to each legal clause is consistent with a preset risk rule library. If not, using the result in the preset risk rule library as the predicted risk level for the corresponding legal clause. By comparing the predicted results with the preset risk rule library, any prediction bias can be corrected, ensuring that the final risk level is more consistent with actual conditions and historical experience.

[0184] The preset risk rule library stores several legal clauses and their corresponding preset risk levels. These legal clauses are common and representative in application licensing agreements. Preset risk levels can be set manually based on historical experience. That is, legal experts or relevant practitioners, drawing on their experience with similar agreements, combined with laws, regulations, and industry standards, predetermine reasonable risk levels for different legal clauses. For example, for a clause such as "applications can collect users' sensitive personal information without restriction," the preset risk level is typically set to "high," based on experience.

[0185] After predicting the risk level for each legal clause, the predicted risk level is compared with the preset risk level for the corresponding clause in the preset risk rule base. For example, a legal clause was predicted as "low risk" by the previous prediction model, but the preset risk rule base lists the corresponding risk level as "high risk," creating an inconsistency. If the predicted risk level is inconsistent with the preset risk rule base, the result in the preset risk rule base will be used as the predicted risk level for the corresponding legal clause. Continuing with the above example, the final predicted risk level for the legal clause will be adjusted to "high risk."

[0186] The prediction model may be affected by factors such as data quality and algorithm limitations, resulting in deviations in the prediction results. The preset risk rule library is based on historical experience and professional judgment and can provide a relatively accurate reference standard. The accuracy of risk level prediction can be improved through calibration. Different prediction models or different analysts may come up with different prediction results. The preset risk rule library provides a unified standard for determining risk levels, ensuring consistency in risk assessment of the same legal terms in different situations. The preset risk levels set based on historical experience and laws and regulations reflect the general understanding of legal term risks in the industry. Calibration in accordance with the preset risk rule library helps ensure that the risk assessment of the application licensing agreement complies with industry standards and legal and regulatory requirements.

[0187] Example 1. Take "a social app requesting photo album permissions" as an example. The specific operational process is as follows: 1) Monitoring trigger: The system captures the READ_EXTERNAL_STORAGE request and links it to the app's privacy policy; 2) Protocol parsing: AI extracts key information: "Photo album data is used for personalized advertising recommendations and is stored on overseas servers"; 3) User interface: A pop-up window displays "Photo album access request," summarizing the data usage and risks, and providing a link to "View terms and conditions"; 4) User decision: The user can authorize or deny the request with a single click, or access the agreement details page for review.

[0188] Example 2. Take "Requesting Contacts Access for a Financial App" as an example. The specific process is as follows: 1) Protocol Parsing: NER Extraction: "Contacts data → Used for credit risk assessment → Shared with partner banks → Stored locally → Retained for 2 years"; 2) Risk Assessment: Based on the rule base, "Financial data sharing + unclear user revocation rights" is marked as high risk. 3) Three-level presentation: Summary level: "XX Finance will collect your contact information for credit assessment and share it with partner banks (high risk)."

[0189] Table 1 Detailed layer display table

[0190]

[0191] The original text layer can display: Click "User Rights" to jump to Section 6.3 of the agreement, highlight the missing clauses, and prompt "According to the Personal Information Protection Law, you have the right to request deletion of data."

[0192] The application authorization agreement parsing method disclosed in this application focuses on multiple key areas. Through advanced technical means and unique design concepts, it has made significant progress in improving AI model performance, optimizing information display methods, and ensuring compliance. Specifically, to address the shortcomings of general models in understanding legal terminology, an innovative method of "legal text pre-training + multi-task fine-tuning" is adopted. General models often misjudge legal terminology such as "data anonymization" and "cross-border transmission." By pre-training on a large amount of legal text and then performing multi-task fine-tuning on this basis, the model can deeply learn the semantics and logic of the legal field, effectively solving the problem of terminology misjudgment and greatly improving the accuracy and reliability of the model in legal-related tasks. The solution innovatively combines named entity recognition, classification, and risk prediction tasks. In traditional methods, these tasks often require multiple independent model inferences, resulting in high computational overhead. By jointly processing these tasks, this solution reduces the process of multiple model inferences, significantly reduces computational costs, improves the model's operating efficiency, and enables the system to process complex legal data and tasks more quickly.

[0193] In this application, the protocol parsing information is presented to users in a multi-layer display system. A hybrid mode of "rule template + generation model" is adopted at the summary layer. The rule template can ensure the accuracy of information extraction and ensure that key information is not missed; while the generation model gives the summary stronger readability and makes the summary content more fluent and natural. This hybrid mode fully combines the advantages of both. While providing accurate information, it also facilitates users to quickly understand the core content.

[0194] At the detail level, relevance filtering technology can be used to screen and filter large amounts of information, displaying only content related to user needs. This effectively reduces the problem of information overload, allowing users to focus more on key information, avoiding being overwhelmed by a large amount of irrelevant information, and reducing the problem of information overload.

[0195] At the original text layer, the precise positioning function is realized. When users need to review specific content, they can quickly locate the relevant position in the original text, greatly improving the review efficiency and saving users' time and energy.

[0196] In this application, the constructed risk rule library supports dynamic updates and can adapt to changing policy and regulatory requirements in a timely manner. As laws and regulations are revised and updated, the system can quickly adjust risk assessment rules to ensure that the system always meets the latest compliance standards and provide reliable compliance protection for enterprises and users. In order to ensure the user's right to know and compliance requirements, statutory disclosure content such as data retention period and third-party list can be forcibly displayed. This information is important content that must be disclosed to users according to regulations. Through forced display, users can clearly understand the use and sharing of data, enhance user trust in the system, and avoid compliance risks that may be caused by insufficient information disclosure.

[0197] The application authorization agreement parsing method disclosed in this application captures permission requests initiated by the application in real time, identifies the permission type and obtains the associated user agreement. This breaks the situation in the existing technology that only simply prompts the permission type but lacks effective display and association of the specific terms of the associated user agreement. When facing the application's permission application, the user no longer just sees a single prompt such as "access the album", but can obtain the complete user agreement content related to it, so as to understand the detailed provisions on data usage behind the permission.

[0198] By obtaining and parsing the associated user agreements, users can clearly understand key information such as the location of data storage, the scope of data sharing with third parties, and the length of time the data is retained. In the process of authorizing applications to obtain permissions, users have a clearer understanding of the flow and usage of their own data, and are no longer in a state of information opacity, which greatly enhances users' sense of control over their personal data.

[0199] Based on multi-source text information from the target domain, a fine-tuning model for the target domain is constructed based on pre-set legal text training. This model can accurately parse related user agreements, identifying the named entities in the agreement, the legal clauses involved, and the predicted risk level corresponding to each legal clause. This effectively addresses the problem of lengthy user agreement clauses and complex professional terminology, converting complex agreement content into clear and organized parsed information, reducing the difficulty for users to understand the agreement. The agreement parsed information is presented to users in a multi-layer display system to meet the needs of different users in different scenarios. For users who want to quickly understand the key points of the agreement, the hybrid mode of "rule template + generation model" in the summary layer can present the core information in an accurate and readable manner; for users who need to have a deeper understanding of specific terms, the relevance filtering of the details layer can reduce the interference of irrelevant information. The precise positioning of the original text layer makes it easy for users to quickly access the original text, thereby helping users quickly understand the actual scope of use of their data after it is acquired by the application and the potential risks they may face.

[0200] By predicting the risk level corresponding to each legal provision, users can clearly understand the potential risks associated with each permission during the authorization process. This provides users with an important decision-making basis, allowing them to decide whether to authorize an application to obtain the corresponding permission based on the degree of risk, thereby better protecting personal data security and privacy. This solution uses rules aligned with the regulations of the target domain for model training and protocol parsing, ensuring that the application's authorization protocol complies with relevant laws and regulations. This reduces the risk of user data security and privacy violations caused by protocol non-compliance at the source, providing users with more reliable protection.

[0201] In a second aspect, the present application discloses an application authorization protocol parsing system, which is used to execute the application authorization protocol parsing method disclosed in the first aspect of the present application, including:

[0202] The monitoring module is used to capture permission requests initiated by applications in real time, identify the permission type corresponding to the permission request, and obtain the associated user agreement of the permission type;

[0203] A model training module is used to construct a preset legal text based on multi-source text information in the target domain, and use the preset legal text to train the target AI model, and use the trained target AI model as the target domain fine-tuning model;

[0204] The parsing module is used to input the associated user agreement into the target domain fine-tuning model to obtain the named entities in the associated user agreement, the legal clauses involved, and the predicted risk level corresponding to each legal clause;

[0205] The interactive module is used to generate agreement parsing information based on the named entities in the associated user agreement, the legal terms involved, and the predicted risk level corresponding to each legal term, and present the agreement parsing information to the user in a multi-layer display system.

[0206] A computer device according to an embodiment of the present disclosure includes a memory and a processor. The memory is used to store non-transitory computer-readable instructions. Specifically, the memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), a hard disk, flash memory, etc.

[0207] The processor can be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and can control other components in the computer device to perform desired functions. In one embodiment of the present disclosure, the processor is used to execute the computer-readable instructions stored in the memory, causing the computer device to perform all or part of the steps of the application authorization protocol parsing method described in the various embodiments of the present disclosure.

[0208] Those skilled in the art should understand that in order to solve the technical problem of how to obtain a good user experience, this embodiment may also include well-known structures such as a communication bus and an interface, and these well-known structures should also be included in the scope of protection of this disclosure.

[0209] like Figure 8 The present invention provides a schematic diagram of the structure of a computer device according to an embodiment of the present invention. Figure 8 The computer device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0210] like Figure 8 As shown, a computer device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) or programs loaded from a storage device into a random access memory (RAM). The RAM also stores various programs and data required for the operation of the computer device. The processor, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0211] Typically, the following devices can be connected to the I / O interface: input devices such as sensors or visual information acquisition devices; output devices such as display screens; storage devices such as tapes and hard disks; and communication devices. The communication device can allow the computer device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Figure 8 A computer device having various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0212] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of the application authorization protocol parsing method of the embodiment of the present disclosure are executed.

[0213] For detailed description of this embodiment, please refer to the corresponding description in the aforementioned embodiments, which will not be repeated here.

[0214] According to the computer-readable storage medium of the embodiment of the present disclosure, non-transitory computer-readable instructions are stored thereon. When the non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the application authorization protocol parsing method of each embodiment of the present disclosure are executed.

[0215] The above-mentioned computer-readable storage media include, but are not limited to, optical storage media (e.g., CD-ROMs and DVDs), magneto-optical storage media (e.g., MOs), magnetic storage media (e.g., magnetic tapes or mobile hard disks), media with built-in rewritable non-volatile memory (e.g., memory cards), and media with built-in ROM (e.g., ROM cartridges).

[0216] For detailed description of this embodiment, please refer to the corresponding description in the aforementioned embodiments, which will not be repeated here.

[0217] The basic principles of the present disclosure have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, and effects mentioned in this disclosure are merely illustrative and not restrictive, and should not be construed as necessarily possessed by each embodiment of the present disclosure. Furthermore, the specific details disclosed above are provided for illustrative purposes and to facilitate understanding, rather than as limitations. These details do not limit the present disclosure to necessarily being implemented using these specific details.

[0218] In the present disclosure, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, or configured in any manner. Words such as "including," "comprising," "having," and the like are open-ended words, meaning "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or" and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.

[0219] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.

[0220] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0221] Various changes, substitutions, and modifications may be made to the technology described herein without departing from the teachings defined by the appended claims. Moreover, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of things, means, methods, and actions described above. Currently existing or later developed processes, machines, manufactures, compositions of things, means, methods, or actions that perform substantially the same function or achieve substantially the same results as the corresponding aspects described herein may be utilized. Accordingly, the appended claims include within their scope such processes, machines, manufactures, compositions of things, means, methods, or actions.

[0222] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0223] The above description has been provided for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. A method for parsing an application authorization protocol, characterized in that: include: Capture permission requests initiated by applications in real time, identify the permission type corresponding to the permission request, and obtain the user agreement associated with the permission type; Constructing a preset legal text based on multi-source text information in the target domain, and using the preset legal text to train the target AI model, and using the trained target AI model as the target domain fine-tuning model; Inputting the associated user agreement into the target domain fine-tuning model to obtain the named entities in the associated user agreement, the legal clauses involved, and the predicted risk level corresponding to each of the legal clauses; Generate agreement parsing information based on the named entities in the associated user agreement, the legal clauses involved, and the predicted risk level corresponding to each legal clause; Presenting the protocol parsing information to the user in a multi-layer presentation system; The method for constructing the target AI model includes: Determine a pre-trained language model, wherein the pre-trained language model includes Lawformer, MultiLegalPile, or Qianwen AI large model; The pre-trained language model is trained using preset texts in the target domain, and the trained pre-trained language model is used as an underlying shared encoder; Building a named entity recognition task-specific head, an attention-based classification task-specific head, and a risk prediction task-specific head on top of the underlying shared encoder; The named entity recognition task-specific header uses a conditional random field layer to extract named entities in the associated user agreement; The classification task-specific header is used to output the term category; The risk prediction task-specific header is used to output the predicted risk level of the corresponding clause; Configure the weighted loss function; The weighted loss function is: ,in, , α is the weight of identifying named entities, β is the weight of term classification, and γ is the weight of risk prediction. is the named entity loss value, is the clause classification loss value; is the risk prediction loss value; The target AI model includes the underlying shared encoder, the named entity recognition task-specific head, the classification task-specific head, the risk prediction task-specific head and the loss function.

2. The application authorization protocol parsing method according to claim 1, characterized in that: The method of constructing a preset legal text based on multi-source text information in the target field includes: Constructing a basic corpus; the basic corpus includes one or more of global privacy policies, mobile application user agreements, and judicial interpretations on data abuse in court cases; Dynamically masking the legal terms in the basic corpus to obtain a first text set; Data enhancement processing is performed on the first text set, and the processed first text set is used as a preset legal text.

3. The application authorization protocol parsing method according to claim 1, characterized in that: The method for obtaining the named entity in the associated user agreement includes: Inputting the associated user agreement into the underlying shared encoder to obtain a universal semantic representation of the associated user agreement; The general semantic representation is input into the named entity recognition task-specific header for processing to identify the named entities in the associated user protocol.

4. The application authorization protocol parsing method according to claim 1, characterized in that: The method for obtaining the legal terms involved includes: Inputting the associated user agreement into the underlying shared encoder to obtain a universal semantic representation of the associated user agreement; The general semantic representation is input into a classification task-specific head based on an attention mechanism to obtain the involved legal terms.

5. The application authorization protocol parsing method according to claim 4, characterized in that: The method for obtaining the predicted risk level corresponding to each of the legal provisions includes: Inputting the associated user agreement into the underlying shared encoder to obtain a universal semantic representation of the associated user agreement; Obtain information on standard rules based on legal provisions or industry standards; The standard rule information and the general semantic representation are jointly trained through the risk prediction task-specific header, and the risks involved in each legal clause are predicted based on the training results to determine the predicted risk level corresponding to each legal clause.

6. The application authorization protocol parsing method according to claim 1, characterized in that: The multi-layer display system includes a summary layer, a detail layer and an original text layer; Presenting the protocol parsing information to the user in a multi-layer presentation system includes: Parsing the information according to the protocol, generating a summary in natural language, and displaying the summary on a summary layer; the summary includes key information and risk level information, the key information including one or more of data usage information, shared object information, and storage location information; Obtaining semantic similarity between the permission request and the legal clauses involved, and displaying the legal clauses whose semantic similarity is greater than a preset threshold on a detail layer according to a preset visualization configuration; Identifying professional legal terms in the protocol parsing information and obtaining popular explanations of the professional legal terms; Locate the professional legal terms in the original text layer, highlight and suspend the corresponding popular explanations; Obtaining agreement clauses in the agreement parsing information that conflict with the General Data Protection Regulation and marking them as non-compliant clauses; Locate non-compliant clauses in the original text layer and configure warning signs.

7. The application authorization protocol parsing method according to claim 1, characterized in that: Before generating protocol parsing information, it also includes: Determine whether the predicted risk level corresponding to each legal clause is consistent with the preset risk rule base. If not, use the result in the preset risk rule base as the predicted risk level of the corresponding legal clause; The preset risk rule library stores a number of legal clauses and their corresponding preset risk levels.

8. A computer device, characterized in that: The computer device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the application authorization protocol parsing method described in any one of claims 1-7.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the application authorization protocol parsing method according to any one of claims 1 to 7.

10. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Application privacy protocol detection method and system, terminal and storage medium

    CN115795441A

  • Legal element analysis method and system based on large language model and knowledge graph

    CN119046476A