A template-based method and apparatus for generating Chinese privacy policy summaries
By using a template-based method to generate Chinese privacy policy summaries and leveraging an important privacy clause identification and classification model, a clear and easy-to-understand Chinese privacy policy summary is generated. This solves the problem of lengthy and difficult-to-understand privacy policies in existing technologies and achieves the generation of clear and readable summaries.
Patent Information
- Application Number
- CN202310129571.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-17
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2043-02-17
AI Technical Summary
Existing methods for generating privacy policy summaries struggle to produce concise and easy-to-understand Chinese summaries, and existing technologies cannot effectively process complete privacy policy texts, making them difficult for users to understand and apply.
A template-based method for generating Chinese privacy policy summaries uses a model that identifies, categorizes, and interprets important privacy terms to produce easy-to-understand Chinese privacy policy summaries.
The generated summary has a clear structure and is easy to understand, helping users quickly read and comprehend privacy policies, identify potential data risks, and reduce the difficulty and risk of comprehension.
Smart Images

Figure CN116166792B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical fields of computer natural language processing and privacy policy summary generation, specifically to a template-based method and apparatus for generating Chinese privacy policy summaries. Background Technology
[0002] A privacy policy is a statement issued by an internet service provider regarding how it collects and uses personal information. It informs users what personal information is collected and how this information is collected, stored, used, disclosed, and managed. It is the most basic way for users to understand an app's data collection and usage behavior, and to protect their personal data security. Users must agree to abide by the privacy policy before using any service. However, because privacy policies are often lengthy and difficult to understand, users often agree to all the terms of a privacy policy without fully reading and understanding them, including those terms that are inconsistent with the law.
[0003] Privacy policy summarization is a text summarization technique that generates concise and easy-to-understand text summaries from lengthy and obscure privacy policies. It is of great significance for reducing reading time and understanding difficulty of privacy policies. It mainly involves text summarization methods based on extraction and generation. Early privacy policy summarization used extraction text summarization technology to summarize privacy policies, that is, extracting important privacy clauses (Tomuro N, Lytinen S, Hornsburg K. Automatic summarization of privacy policies using ensemble learning[C] / / Proceedings of the Sixth ACM Conference on Data and Application Security and Privacy.2016:133-135.) or privacy clauses with potential risks (Keymanesh M, Elsner M, Sarthasarathy S. Toward Domain-Guided Controllable Summarization of Privacy Policies[C] / / NLLP@KDD.2020:18-24.) from lengthy privacy policies. It effectively solved the problem of lengthy privacy policies, but the extracted privacy policies were still obscure and difficult to understand.
[0004] With the development of text generation technology, patent document CN112199727A discloses a summarization model that generates new text from a source privacy policy. It adopts a seq2seq architecture, taking a portion of the privacy policy paragraphs or sentences as input and summarizing them. However, this method cannot directly process the complete privacy policy. Furthermore, research (Cao Z, Li W, Li S, et al. Retrieve, rerank and rewrite: Soft template based neural summarization[C] / / Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics(Volume 1: Long Papers).2018:152-161.) shows that the performance of a seq2seq model that completely depends on the source text will rapidly deteriorate or even "get out of control" as the length of the generated text increases. Summary of the Invention
[0005] In view of the above, the purpose of this invention is to provide a template-based method and apparatus for generating Chinese privacy policy summaries, so as to generate easily understandable Chinese privacy policy summaries.
[0006] To achieve the above-mentioned objectives, an embodiment provides a template-based method for generating Chinese privacy policy summaries, comprising the following steps:
[0007] Obtain the Chinese privacy policy text and divide it into terms and conditions;
[0008] The important privacy clause identification model and the important privacy clause classification model are used to identify and classify the clause statements in order to obtain the important privacy clause statements and their corresponding categories;
[0009] Based on the category of important privacy clause statements, retrieve and match privacy clause interpretation templates for important privacy clause statements;
[0010] The translation of important privacy clause statements and their matching privacy clause interpretation templates is calculated using a privacy policy interpretation model to obtain the corresponding translations of the important privacy clause statements.
[0011] The translations of important privacy policy statements are compiled according to their categories to generate a privacy policy summary.
[0012] In an optional embodiment, the important privacy clause identification model is a binary classification model, which is used to identify clause statements, obtain a predicted probability value that the input clause statement is an important privacy clause statement, and obtain the important privacy clause statement based on the predicted probability value.
[0013] The important privacy clause identification model adopts a feedforward network with multiple fully connected layers as hidden layers. During training, a negative log-likelihood loss function is used, and Dropout is used to prevent the model from overfitting.
[0014] In an optional embodiment, the important privacy terms classification model is a multi-classification model, which is used to classify the terms and conditions into categories, obtain the predicted probability values of the input terms and conditions into multiple categories, and select the category corresponding to the highest probability value as the classification category of the terms and conditions.
[0015] The important privacy clause classification model uses a feedforward network with multiple fully connected layers as hidden layers. During training, a negative log-likelihood loss function is used, and Dropout is employed to prevent overfitting.
[0016] In an optional embodiment, the step of retrieving matching privacy clause interpretation templates for important privacy clause statements based on their categories includes:
[0017] Search for the top-K privacy policy interpretation templates belonging to the category of important privacy policy statements as a candidate template set for important privacy policy statements;
[0018] The similarity matching model is used to calculate the similarity between the important privacy policy statement and each privacy policy interpretation template in the candidate template set, and the privacy policy interpretation template with the highest similarity is selected as the privacy policy interpretation template for matching the important privacy policy statement.
[0019] In an optional embodiment, the step of searching for the Top-K privacy policy interpretation templates belonging to a category based on the category of important privacy policy statements includes:
[0020] Search for the Top-K privacy policy templates belonging to the category of important privacy policy statements, and then obtain the Top-K privacy policy interpretation templates based on the mapping relationship between the privacy policy templates and the privacy policy interpretation templates.
[0021] In an optional embodiment, the similarity matching model is constructed based on a bilinear network, matching template pairs for each important privacy clause statement. Each template pair includes a privacy clause template matching the important privacy clause statement, and a corresponding privacy clause interpretation template.
[0022] During training, important privacy policy statements and privacy policy interpretation templates are used as input data, and the relevance between the important privacy policy statements and privacy policy templates is used as supervision labels to supervise the training of the similarity matching model.
[0023] In an optional embodiment, the relevance of the important privacy policy statements to the privacy policy template is expressed using a Range value, denoted by rouge:
[0024]
[0025] Where, Count match (gram n ) represents the number of n-grams that appear simultaneously in both the important privacy policy statement and the privacy policy template. Count(gram) n ) indicates the number of n-grams in the important privacy clause statements.
[0026] In an optional embodiment, the privacy policy interpretation model is built based on the Transformer architecture, including an Encoder unit, a decoder unit, a linear layer, and an activation layer. The Encoder unit is used to encode the important privacy policy statement X and its matching privacy policy interpretation template T into encoding vectors Hx and Ht. The decoder unit is used to decode based on the encoding vectors Hx and Ht and the matrix vector of the historical translations to obtain the decoding vector. The linear layer is used to perform linear mapping on the decoding vector. The activation layer is used to perform activation mapping on the linear mapping result to output the prediction word for the next time step. This prediction word serves as the historical prediction word for the next time step, forming the historical translation, and participates in the decoding of the next time step.
[0027] In an optional embodiment, the Encoder unit and the decoder unit adopt a symmetrical structure. The decoder unit includes a masked multi-head attention layer, an add&Norm layer, a CoCon attention layer, an add&Norm layer, a multi-head attention layer, and an add&Norm layer connected in sequence. The matrix vector of the historical translation is calculated by the masked multi-head attention layer and the add&Norm layer in sequence, and then input into the CoCon attention layer together with the encoding vectors Hx and Ht. Then, it is calculated by the CoCon attention layer, the add&Norm layer, the multi-head attention layer, and the add&Norm layer in sequence, and the decoded vector is output.
[0028] Specifically, for the CoCon attention layer, the encoded vectors Hx and Ht are used as inputs to the K and V channels, respectively. The matrix vector of the historical translation is used as the output of the masked multi-head attention layer and the add&Norm layer for attention calculation.
[0029] To achieve the above-mentioned objectives, the embodiments also provide a template-based Chinese privacy policy summary generation device, including a text processing module, a recognition and classification module, a template filtering module, a paraphrasing module, and a summary extraction module.
[0030] The text processing module is used to obtain the Chinese privacy policy text and divide it into clause statements;
[0031] The identification and classification module is used to identify and classify the clause statements using the important privacy clause identification model and the important privacy clause classification model, so as to obtain the important privacy clause statements and their corresponding categories;
[0032] The template filtering module is used to retrieve and match privacy clause interpretation templates for important privacy clause statements based on their categories.
[0033] The paraphrasing module is used to perform translation calculations on important privacy clause statements and their matching privacy clause paraphrasing templates using a privacy policy interpretation model, so as to obtain the translations corresponding to the important privacy clause statements.
[0034] The summary extraction module is used to summarize the translations of important privacy clause statements according to their categories to generate a privacy policy summary.
[0035] Compared with the prior art, the beneficial effects of the present invention include at least the following:
[0036] Based on the important privacy clause identification model and the important privacy clause classification model, the system automatically extracts the important privacy clauses from lengthy and difficult-to-understand privacy policies. Then, it uses a privacy policy interpretation model to interpret the important clauses into concise and easy-to-read translations. Finally, it summarizes the interpreted important clauses to automatically generate a clear and easy-to-understand Chinese privacy policy summary text. This helps users quickly read and understand the privacy policy and is of great significance in helping users identify privacy clauses that are inconsistent with legal provisions or have potential data risks, thereby avoiding potential data risks. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart of a template-based Chinese privacy policy summary generation method provided in this embodiment;
[0039] Figure 2 A schematic diagram of the privacy policy interpretation model provided in the embodiment;
[0040] Figure 3 This is a sample summary of the privacy policy provided in the implementation example;
[0041] Figure 4 This is a schematic diagram of the template-based Chinese privacy policy summary generation device provided in the embodiment. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the scope of protection of this invention.
[0043] To address the issues of lengthy and obscure Chinese privacy policies, as well as the lack of full-text structural information and difficulty in guaranteeing semantic accuracy in existing summarization methods, this embodiment provides a template-based method and apparatus for generating Chinese privacy policy summaries, enabling the identification, interpretation, and summarization of important privacy clauses.
[0044] Figure 1 This is a flowchart of a template-based method for generating a Chinese privacy policy summary, as provided in this embodiment. Figure 1 As shown in the embodiment, the method for generating a template-based Chinese privacy policy summary includes the following steps:
[0045] Step 1: Obtain the Chinese privacy policy text and divide it into terms and conditions.
[0046] In this embodiment, the privacy policy text is derived from the privacy policies of various apps. Regular expressions are used to segment the Chinese privacy policy text into sentences, resulting in a new privacy policy text D = {S1, S2, ..., S...}. n}, where S n This is the nth privacy policy statement in the privacy policy.
[0047] Step 2: Use the important privacy clause identification model and the important privacy clause classification model to identify and classify the clause statements to obtain the important privacy clause statements and their corresponding categories.
[0048] In this embodiment, a privacy policy summary corpus is constructed by law graduate students using a privacy policy annotation scheme designed by domain experts. This corpus is then used to train a model for identifying important privacy terms, a model for classifying important privacy terms, and a model for interpreting privacy policies.
[0049] The privacy policy labeling strategy consists of three parts: "Important Terms," "Term Categories," and "Term Definitions." "Important Terms" is a label used to mark privacy terms that explicitly involve data violations or pose significant privacy risks. "Term Definitions" is a concise and easy-to-read explanation of the "Important Terms" in the privacy policy, providing a professional interpretation.
[0050] The "Terms and Categories" section describes the themes and categories of privacy practices in the privacy policy. This section consists of twelve tags: "Data collected by the application entity", "Collection, sharing, delegation, public disclosure, and transfer by third parties", "Use", "Storage", "Security measures", "Data and rights management", "Specific groups", "Contact information", "Authorization, modification, and revision of the privacy policy", "Cessation of operation", and "Potential privacy risks". Specifically, "Data collected by the application entity" refers to the privacy terms regarding data collected by the application entity for any purpose and motivation; "Third-party collection, sharing, entrustment, public disclosure, and transfer" refers to the privacy terms regarding data collected by or entrusted to a third party for processing, or publicly disclosed, transferred, or shared; "Use" refers to the privacy terms regarding how personal data is used; "Storage" refers to the privacy terms regarding how and where the collected personal data is stored; "Security measures" refers to the privacy terms describing how user personal data is protected and what measures are taken; "Data and rights management" refers to the privacy terms regarding how users can modify and how they can modify personal data; "Specific groups" refers to specific privacy terms regarding specific groups of people or specific geographical areas; "Contact information" refers to the customer service contact information for quickly contacting the data management entity to process, change, revoke authorization, or delete personal data; "Privacy Policy Authorization, Change, and Revision" refers to the scope of application of the privacy policy authorization, the content of the modifications, and whether continued authorization is required after authorization; "Cessation of Operation" refers to the data collection behavior after the application ceases operation; and "Potential privacy risks" refers to privacy terms that explicitly state that data collection, use, or other behaviors pose potential data security risks or violate relevant laws and regulations or are inconsistent with legal provisions.
[0051] In this embodiment, during annotation, law graduate students annotate each collected privacy policy according to the privacy policy annotation scheme and the privacy policy context. Important clauses are then manually interpreted to form explanatory texts, which are compiled to obtain a privacy policy summary corpus. In the privacy policy summary corpus, privacy policies consist of privacy clauses, where any privacy clause can be represented in the following form:
[0052] {"id":IdValue,"text":"Original Clause",label:["ClassName1","ClassName N"],"definition":"New Clause after Definition"}
[0053] In this embodiment, the important privacy clause identification model is a binary classification model used to identify clause statements and obtain a predicted probability value that the input clause statement is an important privacy clause statement. The important privacy clause statement is obtained based on the predicted probability value. The important privacy clause identification model adopts a feedforward network containing multiple fully connected layers as hidden layers. During training, a negative log-likelihood loss function is used, and Dropout is used to prevent the model from overfitting.
[0054] Specifically, during training, a pre-trained Chinese BERT model is first used to obtain the encoding Hb of any clause statement S in the privacy policy. Then, Hb is used as input to a feedforward network, with hidden layers consisting of three fully connected layers with 1024, 512, and 256 nodes respectively. The activation function is ReLU, and Dropout (with a masking rate of 0.2) is used to prevent overfitting. The negative log-likelihood loss function is used as the loss function to train the important privacy clause model. Finally, a predicted probability value reflecting the importance of the privacy clause is output through the sigmoid function.
[0055] In this embodiment, the important privacy clause classification model is a multi-classification model used to classify the clause statements into categories, obtaining predicted probability values for the input clause statements as multiple categories. The category corresponding to the highest probability value is then selected as the classification category of the clause statement. This classification category is used for quickly searching privacy clause interpretation templates and for summarizing and formatting. The important privacy clause classification model employs a feedforward network with multiple fully connected layers as hidden layers, uses a negative log-likelihood loss function during training, and employs Dropout to prevent overfitting.
[0056] Specifically, the important privacy clause statement X is encoded by training a BERT fine-tuning model to obtain its encoding vector Hx. This encoding vector Hx is then used as the input to a feedforward network, and the output of the sigmoid function is a vector L = [l1, ..., ln( ... 12 ], where vector L takes any value l i This represents the probability that the privacy policy belongs to the corresponding category.
[0057] Step 3: Based on the category of important privacy clause statements, retrieve and match privacy clause interpretation templates for the important privacy clause statements.
[0058] In this embodiment, based on the category of important privacy clause statements, a privacy clause interpretation template is retrieved and matched for the important privacy clause statements, including:
[0059] First, based on the category of important privacy clause statements, the top-K privacy clause interpretation templates belonging to that category are searched as a candidate template set for important privacy clause statements, specifically including:
[0060] Search for the Top-K privacy policy templates belonging to the category of important privacy policy statements, and then obtain the Top-K privacy policy interpretation templates based on the mapping relationship between the privacy policy templates and the privacy policy interpretation templates.
[0061] Top-K refers to selecting the top K privacy policy templates based on similarity. The value of K can be set according to needs, such as K=20. In specific searches, the Lucene search system can be used to search for privacy policy templates and then obtain privacy policy interpretation templates to build a candidate template set.
[0062] Secondly, a similarity matching model is used to calculate the similarity between the important privacy policy statement and each privacy policy interpretation template in the candidate template set, and the privacy policy interpretation template with the highest similarity is selected as the privacy policy interpretation template for matching the important privacy policy statement.
[0063] In this embodiment, the similarity matching model is built on a bilinear network and needs to be trained to optimize its parameters before application. The specific training includes:
[0064] Constructing sample data and labels: The Lucene retrieval system can be used to search for matching template pairs for each important privacy policy statement. The template pair includes a privacy policy template that matches the important privacy policy statement and a privacy policy interpretation template corresponding to the privacy policy template. The correlation between the important privacy policy statement and the privacy policy template is calculated. In this way, each important privacy policy statement and privacy policy interpretation template serves as sample data, and the correlation between the important privacy policy statement and the privacy policy template serves as the supervision label for the sample data.
[0065] Optionally, the relevance of important privacy policy statements to the privacy policy template is expressed using a Range value, denoted by rouge:
[0066]
[0067] Where, Count match (gram n ) represents the number of n-grams that appear simultaneously in both the important privacy policy statement and the privacy policy template. Count(gram) n ) indicates the number of n-grams in the important privacy clause statements.
[0068] Model Training: The similarity matching model is trained under supervised training using sample data as input and supervised by supervised labels. Specifically, firstly, a dual recurrent neural network (BiRNN) is used to encode the important privacy clause statement X and the privacy clause interpretation template T to obtain vectors Hx and Hx. T Then, vectors Hx and H T The input is fed into a similarity matching model, which uses a bilinear network to predict the similarity between the output important privacy policy statement X and the privacy policy interpretation template T.
[0069] In a bilinear network, firstly, two vectors Hx and H...T After performing the outer product, we obtain matrix b; then, we perform a summation pooling operation on b to obtain matrix ξ; next, we span matrix ξ into a vector, denoted as bilinear vector x; after performing normalization and L2 normalization operations on bilinear vector x, we obtain the fused feature Z; through the linear layer, we operate on feature Z to output the similarity between clause X and template T.
[0070] Step 4: Use the privacy policy interpretation model to translate important privacy policy statements and their matching privacy policy interpretation templates to obtain the translations of the important privacy policy statements.
[0071] In this embodiment, after obtaining the key privacy policy statements and their matching privacy policy interpretation templates, a translation calculation is performed using a privacy policy interpretation model to obtain the translations corresponding to the key privacy policy statements. The privacy policy interpretation model is built on a Transformer architecture, as shown below. Figure 2 As shown, it includes an Encoder unit, a decoder unit, a linear layer, and an activation layer. The Encoder unit encodes the important privacy clause statement X and its matching privacy clause interpretation template T into encoding vectors Hx and Ht. The decoder unit decodes the matrix vectors of the encoding vectors Hx and Ht and the historical translations to obtain the decoding vector. The linear layer performs a linear mapping on the decoding vector. The activation layer performs an activation mapping on the linear mapping result to output the prediction word for the next time step. This prediction word serves as the historical prediction word for the next time step, forming the historical translation, and participates in the decoding of the next time step.
[0072] In this embodiment, the Encoder unit and the decoder unit adopt a symmetrical structure, such as... Figure 2 As shown, the decoder unit consists of a mask multi-head attention layer, an add&norm layer, a CoCon attention layer, an add&norm layer, a multi-head attention layer, and an add&norm layer connected in sequence. The matrix vector E of the historical translations... P After passing through the mask multi-head attention layer and the add&Norm layer in sequence, the encoded vector Hx and Ht are input into the CoCon attention layer. Then, after passing through the CoCon attention layer, the add&Norm layer, the multi-head attention layer, and the add&Norm layer in sequence, the decoded vector is output.
[0073] Specifically, for the CoCon attention layer, the encoded vectors Hx and Ht are used as inputs to the K and V channels, respectively. The matrix vector of the historical translations is passed through a masked multi-head attention layer and an add&Norm layer to calculate the output H.p Attention is calculated using the Q-channel. Specifically, the CoCon Attention layer can be represented as follows:
[0074] CoCon(H p H x H t = Concat(head1,…,head) h W O h = 6
[0075]
[0076] Among them, head i This represents the i-th attention head, where i takes the value 6, and W i Q , Representing the Q channel and K respectively x K t V x V t Channel weight, K x K t Collectively referred to as K-channel, V x V t Collectively referred to as V channels, Attention() represents the attention mechanism operation, and Concat() represents the concatenation operation.
[0077] Figure 2 In the CoCon Attention diagram, concat represents matrix concatenation, matmul represents matrix multiplication, and Softmax maps the numerical input of any vector to a probability space (the degree of correlation or similarity between vectors in q and k). Scale is a scaling factor to prevent the dot product from becoming too large; here, the scale value is the square root of the dimension of the key vector (i.e., ...). ), where d k It is the dimension of the key vector; "mask (optional)" refers to a mask layer that can be selectively used in the self-attention mechanism to prevent the model from seeing future information.
[0078] Step 5: Summarize the translations of important privacy policy statements according to their categories to generate a privacy policy summary.
[0079] In this embodiment, after obtaining the translations of important privacy policy statements and determining the categories of interest, the translations of important privacy policy statements that match the categories of interest are filtered and summarized to generate a privacy policy summary.
[0080] Example
[0081] Implement steps 1-5 above on a machine configured with Ubuntu 22.04, an NVIDIA A100 Tensor Core GPU processor, and 128GB of memory. Using all the parameter values listed in the specific implementation, enter a privacy policy document to obtain the attached... Figure 3 The verification results are shown in the image. Figure 3 This section showcases an excerpt of the summary text generated for the privacy policy using this technology. The explanatory text of the privacy terms is categorized and grouped into corresponding sections. Each section is an easily understandable summary of the privacy policy, consisting of explanatory texts of relevant key clauses.
[0082] For including Figure 3 The privacy policy shown is summarized, and the results show that this method can effectively extract the important terms of the privacy policy. The explanatory text is logically correct and semantically clear, which can effectively improve reading efficiency and reduce the difficulty of understanding the privacy policy. The explanation of risk terms helps users identify and avoid data risks.
[0083] Based on the same inventive concept, this embodiment also provides a template-based Chinese privacy policy summary generation device, including a text processing module, an identification and classification module, a template filtering module, a paraphrasing module, and a summary extraction module. The text processing module acquires the Chinese privacy policy text and categorizes it into clause statements. The identification and classification module uses an important privacy clause identification model and an important privacy clause classification model to identify and classify the clause statements, obtaining important privacy clause statements and their corresponding categories. The template filtering module retrieves and matches privacy clause interpretation templates for important privacy clause statements based on their categories. The paraphrasing module uses a privacy policy interpretation model to perform translation calculations on the important privacy clause statements and their matching privacy clause interpretation templates, obtaining the translations corresponding to the important privacy clause statements. The summary extraction module summarizes the translations of the important privacy clause statements according to their categories to generate a privacy policy summary.
[0084] The template-based Chinese privacy policy summary generation device provided in the above embodiments should be illustrated using the above-described functional module division as an example when generating template-based Chinese privacy policy summaries. The functions can be assigned to different functional modules as needed, i.e., the internal structure of the terminal or server can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the template-based Chinese privacy policy summary generation device and the template-based Chinese privacy policy summary generation method embodiments belong to the same concept; their specific implementation process is detailed in the template-based Chinese privacy policy summary generation method embodiments, and will not be repeated here.
[0085] The specific embodiments described above illustrate the technical solution and beneficial effects of the present invention in detail. It should be understood that the above description is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, additions, and equivalent substitutions made within the scope of the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A template-based method for generating Chinese privacy policy summaries, characterized in that, Includes the following steps: Obtain the Chinese privacy policy text and divide it into terms and conditions; The important privacy clause identification model and the important privacy clause classification model are used to identify and classify the clause statements in order to obtain the important privacy clause statements and their corresponding categories; Based on the category of important privacy clause statements, retrieve and match privacy clause interpretation templates for important privacy clause statements; The translation of important privacy clause statements and their matching privacy clause interpretation templates is calculated using a privacy policy interpretation model to obtain the corresponding translations of the important privacy clause statements. The translations of important privacy policy statements are compiled according to their categories to generate a privacy policy summary.
2. The template-based Chinese privacy policy summary generation method according to claim 1, characterized in that, The important privacy clause identification model is a binary classification model, which is used to identify clause statements and obtain a predicted probability value that the input clause statement is an important privacy clause statement. The important privacy clause statement is obtained based on the predicted probability value. The important privacy clause identification model adopts a feedforward network with multiple fully connected layers as hidden layers. During training, a negative log-likelihood loss function is used, and Dropout is used to prevent the model from overfitting.
3. The method for generating a Chinese privacy policy summary based on a template according to claim 1, characterized in that, The important privacy terms classification model is a multi-classification model, which is used to classify the terms and sentences into categories, obtain the predicted probability values of the input terms and sentences into multiple categories, and select the category corresponding to the highest probability value as the classification category of the terms and sentences. The important privacy clause classification model uses a feedforward network with multiple fully connected layers as hidden layers. During training, a negative log-likelihood loss function is used, and Dropout is employed to prevent overfitting.
4. The method for generating a template-based Chinese privacy policy summary according to claim 1, characterized in that, The process of retrieving matching privacy clause interpretation templates for important privacy clause statements based on their categories includes: Search for the top-K privacy policy interpretation templates belonging to the category of important privacy policy statements as a candidate template set for important privacy policy statements; The similarity matching model is used to calculate the similarity between the important privacy policy statement and each privacy policy interpretation template in the candidate template set, and the privacy policy interpretation template with the highest similarity is selected as the privacy policy interpretation template for matching the important privacy policy statement.
5. The method for generating a template-based Chinese privacy policy summary according to claim 4, characterized in that, The search for the Top-K privacy policy interpretation templates belonging to the category of important privacy policy statements includes: Search for the Top-K privacy policy templates belonging to the category of important privacy policy statements, and then obtain the Top-K privacy policy interpretation templates based on the mapping relationship between the privacy policy templates and the privacy policy interpretation templates.
6. The template-based Chinese privacy policy summary generation method according to claim 4, characterized in that, The similarity matching model is constructed based on a bilinear network, matching template pairs for each important privacy clause statement. Each template pair includes a privacy clause template that matches the important privacy clause statement, and a corresponding privacy clause explanation template. During training, important privacy policy statements and privacy policy interpretation templates are used as input data, and the relevance between the important privacy policy statements and privacy policy templates is used as supervision labels to supervise the training of the similarity matching model.
7. The template-based Chinese privacy policy summary generation method according to claim 6, characterized in that, The relevance of the key privacy policy statements to the privacy policy template is expressed using a Range value, denoted by rouge: Where, Count match (gram n ) represents the number of n-grams that appear simultaneously in both the important privacy policy statement and the privacy policy template. Count(gram) n ) indicates the number of n-grams in the important privacy clause statements.
8. The method for generating a Chinese privacy policy summary based on a template according to claim 1, characterized in that, The privacy policy interpretation model is built on the Transformer architecture and includes an Encoder unit, a decoder unit, a linear layer, and an activation layer. The Encoder unit encodes important privacy policy statements X and their matching privacy policy interpretation templates T into encoding vectors Hx and Ht. The decoder unit decodes the encoded vectors Hx and Ht and the matrix vector of historical translations to obtain a decoded vector. The linear layer performs a linear mapping on the decoded vectors. The activation layer performs an activation mapping on the linear mapping result to output the predicted word for the next time step. This predicted word serves as the historical predicted word for the next time step, forming the historical translation, and participates in the decoding of the next time step.
9. The method for generating a template-based Chinese privacy policy summary according to claim 8, characterized in that, The Encoder and decoder units adopt a symmetrical structure. The decoder unit includes a masked multi-head attention layer, an add&Norm layer, a CoCon attention layer, an add&Norm layer, a multi-head attention layer, and an add&Norm layer connected in sequence. The matrix vector of the historical translation is calculated by the masked multi-head attention layer and the add&Norm layer in sequence, and then input into the CoCon attention layer together with the encoding vectors Hx and Ht. Then, it is calculated by the CoCon attention layer, the add&Norm layer, the multi-head attention layer, and the add&Norm layer in sequence, and the decoded vector is output. Specifically, for the CoCon attention layer, the encoded vectors Hx and Ht are used as inputs to the K and V channels, respectively. The matrix vector of the historical translation is used as the output of the masked multi-head attention layer and the add&Norm layer for attention calculation.
10. A template-based Chinese privacy policy summary generation device, characterized in that, It includes a text processing module, a recognition and classification module, a template filtering module, a paraphrasing module, and a summary extraction module. The text processing module is used to obtain the Chinese privacy policy text and divide it into clause statements; The identification and classification module is used to identify and classify the clause statements using the important privacy clause identification model and the important privacy clause classification model, so as to obtain the important privacy clause statements and their corresponding categories; The template filtering module is used to retrieve and match privacy clause interpretation templates for important privacy clause statements based on their categories. The paraphrasing module is used to perform translation calculations on important privacy clause statements and their matching privacy clause paraphrasing templates using a privacy policy interpretation model, so as to obtain the translations corresponding to the important privacy clause statements. The summary extraction module is used to summarize the translations of important privacy clause statements according to their categories to generate a privacy policy summary.
Citation Information
Patent Citations
Privacy policy abstracting method based on natural language processing
CN112199727A
Judgment document abstract generation method and device, electronic equipment and readable storage medium
CN112182224A
Policy text abstract generation method and device, electronic equipment and storage medium
CN114756673A