Text privacy detection method and device, computing device, and computer storage medium

By segmenting and dependency analysis of free text, a predicate knowledge set is constructed, and predicate matching rules are used to detect privacy information in the proposed open text. This solves the problems of inconsistent logical knowledge and lack of dynamic reasoning in existing technologies, and achieves broader and more accurate detection of privacy information.

CN116263829BActive Publication Date: 2026-01-27CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211433338.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-16
Publication Date
2026-01-27
Estimated Expiration
2042-11-16

AI Technical Summary

Technical Problem

Existing technologies for extracting logical knowledge from free text suffer from problems such as inconsistent logical knowledge and a lack of dynamic reasoning analysis, which limits their applicability.

Method used

By performing word segmentation and dependency analysis on the first and second texts, a predicate knowledge set is constructed. Privacy information is detected using predicate matching rules, including word vector cosine similarity and common word matching. The relevance between named entities and predicates is determined, candidate predicates are constructed and filtered, and privacy information in the text to be opened is detected.

Benefits of technology

It enables the effective detection of privacy information in texts intended for public release without requiring logical consistency, thus broadening the scope of application and improving the accuracy and fault tolerance of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116263829B_ABST
    Figure CN116263829B_ABST
Patent Text Reader

Abstract

The application discloses a text privacy detection method and device, a computing device and a computer storage medium, and comprises the following steps: performing word segmentation processing and dependency relation analysis on a first text and a second text respectively to obtain a first phrase set and a second phrase set; performing predicate knowledge construction on the first phrase set and the second phrase set to obtain a corresponding first predicate expression set and a second predicate expression set; wherein the first predicate expression set comprises each named entity in the first text and a first predicate set corresponding to each named entity, and the second predicate expression set comprises a second predicate set overlapping with the confidential information and a third predicate set not overlapping with the confidential information; performing predicate matching on the second predicate expression set and the first predicate expression set to detect the private information in the second text. The application converts free text into a predicate formula, and detects the private information in the open text according to a predicate semantic matching rule.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing, specifically to a text privacy detection method and apparatus, a computing device, and a computer storage medium. Background Technology

[0002] Text privacy detection technologies typically require extracting logical knowledge from free text. Among existing technologies for extracting logical knowledge from free text, non-patent literature 1 (Gyawali, B., Shimorina, A., Garden, C., Cruz-Lara, S. and Mahfoudh, M., 2017, May. Mapping natural language to description logic. In European Semantic Web Conference (pp. 273-288)) proposes a scheme to convert free text into description logic knowledge. This scheme uses natural language processing techniques to construct a dependency tree for each phrase within a free text sentence and designs several rules to convert the phrase text into description logic knowledge based on the characteristics of the dependency tree. For example... Figure 3 The diagram shown illustrates the construction of description logic using a dependency tree. The text with a gray background represents free text statements. Above the free text statements are the dependency tree markers and dependency relationship lines. The statements below the free text statements that contain Li (such as L6 and L5) are description logic statements built in the intermediate process. The bottom line of statements represents the description logic knowledge derived from the above description logic statements.

[0003] Non-patent literature 2 (Petrucci, G., Rospocher, M. and Ghidini, C., 2018. Expressive ontology learning as neural machine translation. Journal of Web Semantics, 52, pp. 66-82.) proposes converting free text information into ontology knowledge (OWL DL), using neural networks to convert free text with defined concept types into ontology knowledge. For example... Figure 4 As shown, the bottom box contains free text statements (statements defining types), and the top layer contains the descriptive logic knowledge derived from those free text statements.

[0004] The above-mentioned techniques for extracting logical knowledge from free text have the following problems: First, extracting logical knowledge from free text usually requires that the logical knowledge in the free text be self-consistent as a whole and free from internal contradictions, which limits the scope of application of the scheme; second, the techniques for extracting logical knowledge from free text remain at the stage of static extraction of knowledge and lack reasoning analysis between knowledge. Summary of the Invention

[0005] In view of the above problems, the present invention is proposed to provide a text privacy detection method, apparatus, computing device and computer storage medium that overcomes the problem of logical knowledge inconsistency in the aforementioned limitation of free text.

[0006] According to one aspect of the present invention, a text privacy detection method is provided, comprising:

[0007] The first and second texts are segmented and dependency analysis is performed respectively to obtain the first phrase set and the second phrase set;

[0008] Based on the first phrase set and the second phrase set, predicate knowledge is constructed to obtain the first predicate expression set corresponding to the first text and the second predicate expression set corresponding to the second text; wherein, the first predicate expression set includes each named entity in the first text and the first predicate set corresponding to each named entity, and the second predicate expression set includes the second predicate set that overlaps with the confidential information and the third predicate set that does not overlap with the confidential information;

[0009] Predicate matching is performed between the second set of predicate expressions and the first set of predicate expressions to detect privacy information in the second text.

[0010] In an optional approach, the step of constructing predicate knowledge based on the first phrase set and the second phrase set to obtain a first predicate expression set corresponding to the first text and a second predicate expression set corresponding to the second text further includes:

[0011] For the first and second phrase sets respectively, based on the dependency analysis results, multiple phrases on the direct dependency path are concatenated in reverse order to obtain the first candidate predicate set and the second candidate predicate set respectively;

[0012] For the first text containing named entities, predicate filtering is performed on the first candidate predicate set to obtain the first predicate set, and a correspondence between each named entity and the first predicate set is established.

[0013] For the second text that does not contain named entities, the second candidate predicate set is matched with the confidential information to obtain a second predicate set that overlaps with the confidential information and a third predicate set that does not overlap with the confidential information.

[0014] In an alternative approach, the step of predicate filtering the first candidate predicate set to obtain the first predicate set further includes:

[0015] If the candidate predicates in the first candidate predicate set contain named entities, then the named entities are removed from the candidate predicates to obtain the first predicate set corresponding to the named entities.

[0016] In an alternative approach, the predicate matching between the second set of predicate expressions and the first set of predicate expressions further includes:

[0017] Perform predicate matching between each predicate in the third predicate set and the first predicate set corresponding to each named entity;

[0018] Based on the matching results, determine hit(e,C) and cause(e,C), where e is a named entity, C is the third predicate set, hit(e,C) is the number of fourth predicates in C that match the first predicate set corresponding to the named entity e, and cause(e,C) is the set of fourth predicates in C that match the first predicate set corresponding to the named entity e.

[0019] In an alternative approach, the predicate matching of each predicate in the third predicate set with the first predicate set corresponding to each named entity further includes:

[0020] Calculate the cosine similarity of word vectors between each predicate in the third predicate set and each predicate in the first predicate set corresponding to each named entity, and determine whether a match exists based on the word vector cosine similarity; and / or,

[0021] Determine whether each predicate in the third predicate set has at least one common word with each predicate in the first predicate set corresponding to each named entity. If so, the determination result is a match.

[0022] In an alternative approach, detecting the privacy information in the second text further includes:

[0023] Select named entities e where hit(e,C)>0 and form a set sat(C);

[0024] For named entities in sat(C), given an integer threshold k, k>1, we can obtain private_sat(C,k) by counting, where private_sat(C,k) is the set of named entities where hit(e,C)≥k;

[0025] If private_sat(C,k) contains only a single named entity, then all fourth predicates contained in cause(e,C) will be considered private information.

[0026] In one alternative approach, the named entity is a personal name entity.

[0027] According to another aspect of the present invention, a text privacy detection device is provided, comprising:

[0028] The data text analysis module is used to perform word segmentation and dependency analysis on the first text and the second text respectively, to obtain the first phrase set and the second phrase set;

[0029] The predicate knowledge construction module is used to construct predicate knowledge based on the first phrase set and the second phrase set to obtain a first predicate expression set corresponding to the first text and a second predicate expression set corresponding to the second text; wherein, the first predicate expression set includes each named entity in the first text and a first predicate set corresponding to each named entity, and the second predicate expression set includes a second predicate set that overlaps with the confidential information and a third predicate set that does not overlap with the confidential information;

[0030] The privacy text detection module is used to perform predicate matching between the second set of predicate expressions and the first set of predicate expressions to detect privacy information in the second text.

[0031] According to another aspect of the present invention, a computing device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0032] The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the above-described text privacy detection method.

[0033] According to another aspect of the present invention, a computer storage medium is provided, the storage medium storing at least one executable instruction that causes a processor to perform an operation corresponding to the above-described text privacy detection method.

[0034] According to the solution provided by this invention, word segmentation and dependency analysis are performed on the first text and the second text respectively to obtain a first phrase set and a second phrase set. Based on the first phrase set and the second phrase set, predicate knowledge is constructed to obtain a first predicate expression set corresponding to the first text and a second predicate expression set corresponding to the second text. The first predicate expression set includes each named entity in the first text and the first predicate set corresponding to each named entity; the second predicate expression set includes a second predicate set that overlaps with confidential information and a third predicate set that does not overlap with confidential information. Predicate matching is performed between the second predicate expression set and the first predicate expression set to detect the privacy information in the second text. This invention converts free text into a set of predicate expressions and further detects privacy information in the text to be opened based on predicate matching between the expression sets. This invention does not require the logical knowledge of the free text to be contradictory, thus broadening the applicability of the solution.

[0035] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0036] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0037] Figure 1 A flowchart illustrating the text privacy detection method according to an embodiment of the present invention is shown;

[0038] Figure 2 A flowchart illustrating another embodiment of the text privacy detection method of the present invention is shown;

[0039] Figure 3 A schematic diagram illustrating the use of dependency trees to construct description logic in the prior art is shown;

[0040] Figure 4 A schematic diagram illustrating the use of ontology knowledge to construct descriptive logic in existing technologies is shown.

[0041] Figure 5 This diagram illustrates a free text dependency tree in the publicly available data of an embodiment of the present invention.

[0042] Figure 6 This diagram illustrates a dependency tree of a free text in the proposed open text data according to an embodiment of the present invention.

[0043] Figure 7 A schematic diagram of the structure of a text privacy detection device according to an embodiment of the present invention is shown;

[0044] Figure 8 A schematic diagram of the structure of a computing device according to an embodiment of the present invention is shown. Detailed Implementation

[0045] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the invention and to fully convey the scope of the invention to those skilled in the art.

[0046] Before implementing the embodiments of the present invention, the technical terms used below are uniformly explained as follows:

[0047] Electronic text: Textual information stored in a computer.

[0048] Character: Characters defined according to the language standards of electronic text.

[0049] Word: A series of consecutive characters that exist in language norms.

[0050] Phrases: a series of consecutive words.

[0051] Dependency tree of text statement: Natural language processing technology is used to identify the dependency relationships between phrases in the text statement. These relationships include subject-verb relationships, verb-object relationships, and modifier relationships.

[0052] Identity privacy text: In structured text (such as a database table), fields such as name, ID number, and insurance number that can directly identify a person are generally referred to as identity privacy text.

[0053] Quasi-identity privacy text: In structured text (such as database tables), fields such as address, postal code, and gender are generally referred to as quasi-identity information.

[0054] Confidential information text: In a structured text (such as a database table) structure, information such as illness or possessions that is in the same record as a person's name is called confidential information.

[0055] Unstructured text: Electronic text formed from human language, also known as free text, such as: Li Si lives in Beijing. In this paper, both open text and proposed open text are considered free text.

[0056] Predicate logic: In artificial intelligence theory, predicate logic is a logical framework that uses P(x) to represent basic knowledge and logical AND, OR, and NOT connection symbols to connect basic knowledge and express complex knowledge. Here, P represents a predicate, x is a variable symbol or a constant, and P(x) means that an individual x has property P or x is an instance of concept P. Functions in predicate logic are not discussed in this paper.

[0057] Figure 1 This diagram illustrates a flowchart of a text privacy detection method according to an embodiment of the present invention. The method performs natural language processing on publicly available text data and text data intended for public release to obtain a phrase set and a dependency tree set. Based on the phrase set and dependency tree set, predicate knowledge is constructed to obtain a first predicate expression set and a second predicate expression set corresponding to the publicly available text data and the text data intended for public release, respectively. According to predicate matching rules, the second predicate expression set is matched with the first predicate expression set to detect privacy information in the text data intended for public release. Specifically, as shown... Figure 1 As shown, it includes the following steps:

[0058] Step S101: Perform word segmentation and dependency analysis on the first text and the second text respectively to obtain the first phrase set and the second phrase set.

[0059] Existing public cloud services store massive amounts of unstructured text data from users, helping data owners identify whether their data contains privacy-involving text, and can provide value-added services or products to customers.

[0060] For example, suppose we have the following free text data:

[0061] First text (public text data): Mr. Wang Wu is 68 years old this year.

[0062] Second text (text data that the data owner intends to release): A 68-year-old man suffers from Parkinson's disease.

[0063] The confidential information is: Parkinson's disease.

[0064] The technical problem to be solved is: by comprehensively analyzing the first text, to detect the text "68 years old" and "male" in the second text as quasi-identity privacy information, so as to remind the data owner to pay attention to protecting the above privacy information.

[0065] In this embodiment, in order to detect free text containing quasi-identity privacy information (such as age, gender, etc.), based on the predicate logic knowledge obtained from the conversion of free text, the privacy information in the proposed open text data is detected according to the predicate matching rules.

[0066] To construct predicate logic knowledge (or predicate knowledge), natural language processing and analysis of free text are required. For example, techniques such as word segmentation, dependency analysis, and named entity recognition of natural language are used to obtain a phrase set and a dependency tree corresponding to a free text sentence.

[0067] In an optional manner, word segmentation processing and dependency relationship analysis are respectively performed on the publicly disclosed text data and the text data that the data owner intends to open, to obtain a first phrase set and a second phrase set.

[0068] Specifically, word segmentation processing and dependency relationship analysis are respectively performed on the first text and the second text by using techniques of word segmentation and part-of-speech tagging (Part-Of-Speech tagging, abbreviated as POStagging or POS) analysis of natural language, to obtain the first phrase set and the second phrase set of the first text and the second text. For example, HanLP (HanLP is an NLP toolkit composed of a series of models and algorithms, and its main functions include word segmentation, part-of-speech tagging, keyword extraction, automatic summarization, dependency syntactic analysis, named entity recognition, phrase extraction, pinyin conversion, simplified and traditional Chinese conversion, etc., and the website is: https: / / github.com / hankcs / HanLP) is used to obtain the phrase set and the dependency tree (Dependency Tree, the dependency tree is used to express the dependency relationship between words in a sentence) of each free text sentence S.

[0069] For example, the dependency tree obtained by HanLP analysis of the free text "Mr. Wang Wu is 68 years old this year." (publicly disclosed text data) is as Figure 5 shown. Among them, pointing from one phrase a to another phrase b is called a depending on b. For example, "Mr." depends on "Wang Wu"; optionally, the first phrase set includes information indicating the position of the phrase in the sentence, word part-of-speech information, and / or information indicating the dependency relationship between phrases.

[0070] The dependency tree obtained by HanLP analysis of the free text "A 68-year-old male has Parkinson's disease." (intended to be opened text data) is as Figure 6 shown. In the dependency tree, the child nodes on the relationship path depend on the parent node. For example, "has" depends on "male", and nummod, nsubj, dobj, etc. represent the dependency relationship between words. For example: nsubj represents the noun subject, nummod represents the numerical modifier, CD, DEG, NN, NR, etc. represent the word part-of-speech. For example: CD represents the cardinal number, NN represents the noun. The dependency tree (also called the dependency structure tree) obtained by parsing the sentence through HanLP is represented as follows:

[0071] nummod(bit, one)

[0072] nsubj(has, male)

[0073] root (root, suffering)

[0074] In this context, the second word in parentheses depends on the first word, and the identifiers before the parentheses, such as "nsubj", indicate the dependency relationship between the words.

[0075] The phrases composed of words with dependency relationships, such as "male patient", "one", "Parkinson's disease", etc., constitute the second phrase set. Optionally, the second phrase set includes information indicating the position of the phrases in the sentence, word part-of-speech information, and / or information indicating the dependency relationships between phrases.

[0076] In one alternative approach, named entity recognition is performed on the first text and the second text respectively to obtain the set of personal name entities corresponding to the first text and the set of personal name entities corresponding to the second text respectively.

[0077] For example, named entity recognition is performed on each statement in the first text to obtain the set of personal name entities H(S) corresponding to statement S.

[0078] Step S102: Based on the first phrase set and the second phrase set, predicate knowledge is constructed to obtain the first predicate expression set corresponding to the first text and the second predicate expression set corresponding to the second text; wherein, the first predicate expression set includes each named entity in the first text and the first predicate set corresponding to each named entity, and the second predicate expression set includes the second predicate set that overlaps with the confidential information and the third predicate set that does not overlap with the confidential information.

[0079] The free text is converted into a predicate knowledge representation, where predicate knowledge refers to a set of predicate expressions. Specifically, predicate knowledge is constructed based on a first phrase set and a second phrase set, resulting in a first set of predicate expressions corresponding to the first text and a second set of predicate expressions corresponding to the second text. The first set of predicate expressions includes each named entity in the first text and the corresponding first predicate set, for example, such as... Figure 5 The predicate expression shown is:

[0080] Predicate knowledge 1: Mr. (Wang Wu)

[0081] Predicate knowledge 2: 68 years old (Wang Wu)

[0082] Predicate knowledge 3: This year (Wang Wu)

[0083] Among them, predicate knowledge 1 is a predicate expression composed of the personal entity "Wang Wu" and the predicate "Mr." (i.e., the first predicate), and the first predicate expression set is composed of predicate knowledge 1, predicate knowledge 2, and other predicate expressions.

[0084] The second set of predicate expressions includes a second set of predicates that overlap with the confidential information and a third set of predicates that do not overlap with the confidential information. The predicate knowledge that overlaps with the confidential information is used as the logical consequent, and the conjunction of other predicate knowledge is used as the logical antecedent to generate the predicate expression, for example, such as... Figure 6 The predicate expression C shown is:

[0085] A 68-year-old male has Parkinson's disease.

[0086] The predicate expression or formula described above is called confidential information logical knowledge, where: a 68-year-old male (x) suffering from (x) is the antecedent of the predicate expression C, and Parkinson's disease (x) is the consequent of the predicate expression C; for example, "male" represents the predicate, x is a variable symbol or constant, and male (x) means that individual x has the property of male, or x is an instance of the concept of male. Optionally, the predicate expression uses logical AND, OR, and NOT connectors to express the logical knowledge of complex knowledge.

[0087] Step S103: Perform predicate matching between the second set of predicate expressions and the first set of predicate expressions to detect privacy information in the second text.

[0088] Based on the predicate matching rules, the predicate knowledge derived from each statement in the publicly available text data is matched with the logical antecedent of each logical knowledge in the proposed publicly available text data to detect the privacy information in the proposed publicly available text data.

[0089] In one alternative approach, predicate matching between each predicate in the third predicate set and the first predicate set corresponding to each named entity further includes:

[0090] Calculate the cosine similarity of word vectors between each predicate in the third predicate set and each predicate in the first predicate set corresponding to each named entity, and determine whether they match based on the cosine similarity of word vectors.

[0091] In this embodiment, the specific rule for determining whether two predicates P and Q match based on the cosine similarity of word vectors is as follows:

[0092] If the cosine similarity (v(P), v(Q)) between the word vector v(P) of P and the word vector v(Q) of Q is greater than α, then P and Q are considered a match. Here, α is a real number between 0.0 and 1.0, and the hyperparameter α can be set empirically. The distance between the word vectors of the predicate text P and the predicate text Q is calculated using Word2Vec (Word2Vec converts words into word vectors and uses word vectors to measure the relationship between words; the address is: https: / / github.com / Embedding / Chinese-Word-Vectors). The formula for calculating the cosine similarity between two real vectors A and B is as follows:

[0093]

[0094] In one alternative approach, predicate matching between each predicate in the third predicate set and the first predicate set corresponding to each named entity further includes:

[0095] Determine whether each predicate in the third predicate set has at least one common word with each predicate in the first predicate set corresponding to each named entity. If so, the result is a match. For example, for two predicates P and Q, if P and Q have more than one common word in the text, then P and Q are considered a match.

[0096] The solution provided in the above embodiments of the present invention performs word segmentation and dependency analysis on a first text and a second text respectively to obtain a first phrase set and a second phrase set; based on the first phrase set and the second phrase set, predicate knowledge is constructed to obtain a first predicate expression set corresponding to the first text and a second predicate expression set corresponding to the second text; wherein, the first predicate expression set includes each named entity in the first text and the first predicate set corresponding to each named entity, and the second predicate expression set includes a second predicate set that overlaps with confidential information and a third predicate set that does not overlap with confidential information; predicate matching is performed between the second predicate expression set and the first predicate expression set to detect privacy information in the second text. The present invention converts free text into predicate logic knowledge, and designs matching rules between logical knowledge by combining semantic distance matching technology in the natural language domain, and detects privacy information in the text to be opened according to the matching rules.

[0097] Figure 2A flowchart illustrating another embodiment of the text privacy detection method of the present invention is shown. This method constructs candidate predicates and performs predicate filtering before converting free text into predicate knowledge; and constructs predicate knowledge by determining whether the free text contains personal name entities, and further performs text privacy detection by determining the number of times a set of entities related to confidential information matches. Specifically, as... Figure 2 As shown, it includes the following steps:

[0098] Step S201: Perform word segmentation and dependency analysis on the first text and the second text respectively to obtain the first phrase set and the second phrase set.

[0099] Several publicly available text data (first text) and several text data that are to be made publicly available (second text) are processed by word segmentation and dependency analysis to obtain a first phrase set and a second phrase set.

[0100] Step S202: For the first phrase set and the second phrase set respectively, based on the dependency analysis results, multiple phrases on the direct dependency path are concatenated in reverse order to obtain the first candidate predicate set and the second candidate predicate set respectively; for the first text with named entities, the first candidate predicate set is filtered to obtain the first predicate set, and the correspondence between each named entity and the first predicate set is established; for the second text without named entities, the second candidate predicate set is matched with the confidential information to obtain the second predicate set that overlaps with the confidential information and the third predicate set that does not overlap with the confidential information.

[0101] In one alternative approach, before converting free text into predicate knowledge, candidate predicates are constructed. Specifically, for the first and second phrase sets respectively, based on the dependency analysis results, multiple phrases on the direct dependency path are concatenated in reverse order to obtain the first and second candidate predicate sets respectively.

[0102] For example, performing dependency analysis on the first phrase set corresponding to the first text "Mr. Wang Wu is 68 years old this year.", we can reverse the order of multiple phrases on the direct dependency path (where no edge points to two or more phrases) in the dependency tree and concatenate them into a single phrase t. The direct dependency path starts from a phrase without incoming edges in the dependency tree and proceeds along the next phrase pointed to by its outgoing edges, continuing until a phrase without outgoing edges is encountered. Let T(S) be the set of all phrases corresponding to a statement S, and let t be one of the phrases within it. For example... Figure 5As shown, the phrase "Mr." has no incoming edges. Starting from it, following the outgoing edges, it points to the phrase "Wang Wu". Since "Wang Wu" has no outgoing edges, this direct dependency path is obtained. Concatenating it in reverse order gives "Wang Wu Mr." (the first candidate predicate). For the set T(S), concatenating in reverse order respectively gives the first candidate predicate set. In a similar way as above, perform dependency analysis and reverse concatenation on the second phrase set corresponding to the second text to obtain the second candidate predicate set.

[0103] In an optional manner, perform predicate screening on the candidate predicates. Specifically, if the candidate predicates in the first candidate predicate set contain named entities, then delete the named entities from the candidate predicates to obtain the first predicate set corresponding to the named entities.

[0104] For each phrase t in the set T(S) (the first candidate predicate set) composed of all phrases corresponding to the statement S, if its text H(S) contains a person name entity e, denoted as e ∈ H(S), then delete the text e from the text of the phrase t, so as to screen T(S) to obtain the set T’(S) (the first predicate set). For example, in the candidate predicate "Wang Wu Mr." in T(S), it contains the person name entity "Wang Wu", then this predicate is modified to "Mr." and added to the set T’(S).

[0105] In this embodiment, person name entities belong to the category of named entities (named entities include entities such as person names, place names, and organization names). Some free texts include person name entities representing personal identities or person names, while some free texts do not include person name entities. For example, the free text "Mr. Wang Wu is 68 years old this year." includes the person name entities "Wang Wu" and "Mr." (predicate terms also belong to person name entities); the free text "A 68-year-old male has Parkinson's disease." does not include person name entities. By judging whether the free text contains person name entities to construct predicate knowledge, while improving the logic of the predicate knowledge, the accuracy of private text detection is further improved.

[0106] Specifically, for the first text with named entities, perform predicate screening on the first candidate predicate set to obtain the first predicate set, and establish the corresponding relationship between each named entity and the first predicate set.

[0107] For example, if the statement S contains a person name entity e, then generate a predicate expression with the predicate set T’(S) as the predicate name and e as the parameter, and obtain the Figure 5 predicate expressions as shown:

[0108] Predicate knowledge 1: Mr.(Wang Wu)

[0109] Predicate knowledge 2: 68 years old(Wang Wu)

[0110] Predicate knowledge 3: this year(Wang Wu)

[0111] For the second text that does not contain named entities, the second candidate predicate set is matched with the confidential information to obtain a second predicate set that overlaps with the confidential information and a third predicate set that does not overlap with the confidential information.

[0112] If statement S does not contain the person entity e, then for each predicate phrase in the predicate set T'(S), with the reserved symbol x as a parameter, predicate knowledge that overlaps with the confidential information as a logical consequent, and the conjunction of other predicate knowledge as a logical antecedent, a predicate expression C is generated, which yields the following: Figure 6 The predicate expression C shown is:

[0113] A 68-year-old male has Parkinson's disease. This formula is called confidential information logic knowledge, where: a 68-year-old male has Parkinson's disease is the antecedent of formula C, and Parkinson's disease is the consequent of formula C.

[0114] Step S203: Perform predicate matching between each predicate in the third predicate set and the first predicate set corresponding to each named entity; based on the matching results, determine hit(e,C) and cause(e,C), where e is a named entity, C is the third predicate set, hit(e,C) is the number of fourth predicates in C that match the first predicate set corresponding to the named entity e, and cause(e,C) is the set of fourth predicates in C that match the first predicate set corresponding to the named entity e, thereby detecting privacy information in the second text.

[0115] In this embodiment, text privacy detection is performed by determining the number of times the entity set related to confidential information is matched. Specifically, each predicate in the third predicate set is matched with the first predicate set corresponding to each named entity. Based on the matching results, hit(e,C) and cause(e,C) are determined, where e is a named entity, C is the third predicate set, hit(e,C) is the number of fourth predicates in C that match the first predicate set corresponding to the named entity e, and cause(e,C) is the set of fourth predicates in C that match the first predicate set corresponding to the named entity e. Privacy information in the second text is detected.

[0116] If the predicate knowledge F(e) of entity e in the publicly available text data is successfully matched with the predicate of an antecedent of the logical knowledge C in the proposed publicly available text data according to the aforementioned predicate matching rules, then the count hit(e,C) is incremented by 1. The set of predicate formulas that contain the text of entity e and cause hit(e,C) to be incremented is denoted as cause(e,C).

[0117] For example, "Mr. (Wang Wu)" is predicate knowledge containing the personal name entity "Wang Wu". If we determine whether "Mr." matches the information to be disclosed (such as...) Figure 6 The logical knowledge C shown is: if the "male" in (x)∧68-year-old (x)∧male (x)∧suffering from (x)→Parkinson's disease (x) matches, then hit(Wang Wu, C)=1, and cause(e,C)={male (Wang Wu)}. Similarly, if 68-year-old (Wang Wu) matches "68 years old" in 68-year-old (x), the count is updated to hit(Wang Wu, C)=2, and cause(e,C)={male (Wang Wu), 68-year-old (Wang Wu)}.

[0118] In one alternative approach, detecting privacy information in the second text further includes:

[0119] Select named entities e where hit(e,C)>0 and form a set sat(C);

[0120] For named entities in sat(C), given an integer threshold k, k>1, we can obtain private_sat(C,k) by counting, where private_sat(C,k) is the set of named entities where hit(e,C)≥k;

[0121] If private_sat(C,k) contains only a single named entity, then all fourth predicates contained in cause(e,C) will be considered private information.

[0122] In this embodiment, for an entity e in the publicly available data text, each logical knowledge C in the proposed publicly available data text, and entities e that have a predicate matching count hit(e,C)>0 with the antecedent of C, form a set sat(C) = {entity e | e is in the publicly available data and hit(e,C)>0}. For entities in sat(C), and given an integer threshold k (k>1), define private_sat(C,k) = {e | e∈sat(C) and hit(e,C)≥k}. If private_sat(C,k) contains only one (single) entity e, then the text contained in the predicate knowledge in cause(e,C) is determined to be private text.

[0123] For example, setting k=2, or setting the hyperparameter k based on experience, for the text entity e=Wang Wu, as we know from the above, hit(Wang Wu, C)>0, so sat(C)={Wang Wu}, private_sat(C,k=2)={“Wang Wu”}. Since private_sat(C,k=2) only contains one entity “Wang Wu” (a single entity), the “male” and “68 years old” in cause(e,C)={male (Wang Wu), 68 years old (Wang Wu)} corresponding to entity e=“Wang Wu” are detected and judged as private text, and the data owner is prompted to protect the “male” and “68 years old” in the text before opening “A 68-year-old male suffers from Parkinson’s disease” (such as through desensitization).

[0124] In one alternative approach, named entities are personal name entities.

[0125] The solution provided in the above embodiments of the present invention further improves the accuracy of privacy text detection by determining whether free text contains predicate knowledge constructed from personal name entities. Before converting free text into predicate knowledge, candidate predicates are constructed and predicates are screened, without requiring the logical knowledge of the free text to be contradictory, thus broadening the applicability of the solution. Text privacy detection is further improved by judging the number of times a set of entities related to confidential information matches. The correct knowledge conclusion is inferred by combining the matching rules between logical knowledge, and privacy information in the text to be opened is detected based on this knowledge conclusion, further enhancing the interpretability of text privacy detection.

[0126] It should be noted that the present invention differs from non-patent literature 1 and non-patent literature 2 as follows:

[0127] (1) This invention proposes a semantic matching rule for predicate names, which can be used for reasoning about predicate knowledge corresponding to text.

[0128] (2) This invention does not require the logical knowledge corresponding to each text to be self-consistent. It can infer the text that may reveal privacy by analyzing the number of antecedents in free text statements.

[0129] Figure 7 A schematic diagram of the structure of a text privacy detection device according to an embodiment of the present invention is shown. The text privacy detection device 700 includes: a data text analysis module 710, a predicate knowledge construction module 720, and a privacy text detection module 730.

[0130] The data text analysis module 710 is used to perform word segmentation and dependency relationship analysis on the first text and the second text respectively to obtain the first phrase set and the second phrase set.

[0131] The predicate knowledge construction module 720 is used to construct predicate knowledge based on the first phrase set and the second phrase set to obtain a first predicate expression set corresponding to the first text and a second predicate expression set corresponding to the second text; wherein, the first predicate expression set includes each named entity in the first text and a first predicate set corresponding to each named entity, and the second predicate expression set includes a second predicate set that overlaps with the confidential information and a third predicate set that does not overlap with the confidential information;

[0132] The privacy text detection module 730 is used to perform predicate matching between the second predicate expression set and the first predicate expression set to detect privacy information in the second text.

[0133] In an alternative embodiment, the predicate knowledge construction module 720 is further configured to:

[0134] For the first and second phrase sets respectively, based on the dependency analysis results, multiple phrases on the direct dependency path are concatenated in reverse order to obtain the first candidate predicate set and the second candidate predicate set respectively;

[0135] For the first text containing named entities, predicate filtering is performed on the first candidate predicate set to obtain the first predicate set, and a correspondence between each named entity and the first predicate set is established.

[0136] For the second text that does not contain named entities, the second candidate predicate set is matched with the confidential information to obtain a second predicate set that overlaps with the confidential information and a third predicate set that does not overlap with the confidential information.

[0137] In an alternative embodiment, the predicate knowledge construction module 720 is further configured to:

[0138] If the candidate predicates in the first candidate predicate set contain named entities, then the named entities are removed from the candidate predicates to obtain the first predicate set corresponding to the named entities.

[0139] In an alternative embodiment, the privacy text detection module 730 is further configured to:

[0140] Perform predicate matching between each predicate in the third predicate set and the first predicate set corresponding to each named entity;

[0141] Based on the matching results, determine hit(e,C) and cause(e,C), where e is a named entity, C is the third predicate set, hit(e,C) is the number of fourth predicates in C that match the first predicate set corresponding to the named entity e, and cause(e,C) is the set of fourth predicates in C that match the first predicate set corresponding to the named entity e.

[0142] In an alternative embodiment, the privacy text detection module 730 is further configured to:

[0143] Calculate the cosine similarity of word vectors between each predicate in the third predicate set and each predicate in the first predicate set corresponding to each named entity, and determine whether a match exists based on the word vector cosine similarity; and / or,

[0144] Determine whether each predicate in the third predicate set has at least one common word with each predicate in the first predicate set corresponding to each named entity. If so, the determination result is a match.

[0145] In an alternative embodiment, the privacy text detection module 730 is further configured to:

[0146] Select named entities e where hit(e,C)>0 and form a set sat(C);

[0147] For named entities in sat(C), given an integer threshold k, k>1, we can obtain private_sat(C,k) by counting, where private_sat(C,k) is the set of named entities where hit(e,C)≥k;

[0148] If private_sat(C,k) contains only a single named entity, then all fourth predicates contained in cause(e,C) will be considered private information.

[0149] In one alternative approach, the named entity is a personal name entity.

[0150] The solution provided in the above embodiments of the present invention performs word segmentation and dependency analysis on a first text and a second text respectively to obtain a first phrase set and a second phrase set; based on the first phrase set and the second phrase set, predicate knowledge is constructed to obtain a first predicate expression set corresponding to the first text and a second predicate expression set corresponding to the second text; wherein, the first predicate expression set includes each named entity in the first text and the first predicate set corresponding to each named entity, and the second predicate expression set includes a second predicate set that overlaps with confidential information and a third predicate set that does not overlap with confidential information; predicate matching is performed between the second predicate expression set and the first predicate expression set to detect privacy information in the second text. The present invention converts free text into predicate logic knowledge, and designs matching rules between logical knowledge by combining semantic distance matching technology in the natural language domain, and detects privacy information in the text to be opened according to the matching rules.

[0151] Figure 8 The diagram shows a structural schematic of an embodiment of the computing device of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the computing device.

[0152] like Figure 8 As shown, the computing device may include: a processor 802, a communications interface 804, a memory 806, and a communications bus 808.

[0153] The processor 802, communication interface 804, and memory 806 communicate with each other via communication bus 808. Communication interface 804 is used to communicate with other network elements such as clients or other servers. Processor 802 executes program 810, specifically performing the relevant steps in the above-described text privacy detection method embodiment.

[0154] Specifically, program 810 may include program code that includes computer operation instructions.

[0155] The processor 802 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The computing device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0156] Memory 806 is used to store program 810. Memory 806 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0157] Specifically, program 810 can be used to cause processor 802 to perform the following operations:

[0158] The first and second texts are segmented and dependency analysis is performed respectively to obtain the first phrase set and the second phrase set;

[0159] Based on the first phrase set and the second phrase set, predicate knowledge is constructed to obtain the first predicate expression set corresponding to the first text and the second predicate expression set corresponding to the second text; wherein, the first predicate expression set includes each named entity in the first text and the first predicate set corresponding to each named entity, and the second predicate expression set includes the second predicate set that overlaps with the confidential information and the third predicate set that does not overlap with the confidential information;

[0160] Predicate matching is performed between the second set of predicate expressions and the first set of predicate expressions to detect privacy information in the second text.

[0161] In an alternative manner, the program 810 causes the processor to perform the following operations:

[0162] For the first and second phrase sets respectively, based on the dependency analysis results, multiple phrases on the direct dependency path are concatenated in reverse order to obtain the first candidate predicate set and the second candidate predicate set respectively;

[0163] For the first text containing named entities, predicate filtering is performed on the first candidate predicate set to obtain the first predicate set, and a correspondence between each named entity and the first predicate set is established.

[0164] For the second text that does not contain named entities, the second candidate predicate set is matched with the confidential information to obtain a second predicate set that overlaps with the confidential information and a third predicate set that does not overlap with the confidential information.

[0165] In an alternative manner, the program 810 causes the processor to perform the following operations:

[0166] If the candidate predicates in the first candidate predicate set contain named entities, then the named entities are removed from the candidate predicates to obtain the first predicate set corresponding to the named entities.

[0167] In an alternative manner, the program 810 causes the processor to perform the following operations:

[0168] Perform predicate matching between each predicate in the third predicate set and the first predicate set corresponding to each named entity;

[0169] Based on the matching results, determine hit(e,C) and cause(e,C), where e is a named entity, C is the third predicate set, hit(e,C) is the number of fourth predicates in C that match the first predicate set corresponding to the named entity e, and cause(e,C) is the set of fourth predicates in C that match the first predicate set corresponding to the named entity e.

[0170] In an alternative manner, the program 810 causes the processor to perform the following operations:

[0171] Calculate the cosine similarity of word vectors between each predicate in the third predicate set and each predicate in the first predicate set corresponding to each named entity, and determine whether a match exists based on the word vector cosine similarity; and / or,

[0172] Determine whether each predicate in the third predicate set has at least one common word with each predicate in the first predicate set corresponding to each named entity. If so, the determination result is a match.

[0173] In an alternative manner, the program 810 causes the processor to perform the following operations:

[0174] Select named entities e where hit(e,C)>0 and form a set sat(C);

[0175] For named entities in sat(C), given an integer threshold k, k>1, we can obtain private_sat(C,k) by counting, where private_sat(C,k) is the set of named entities where hit(e,C)≥k;

[0176] If private_sat(C,k) contains only a single named entity, then all fourth predicates contained in cause(e,C) will be considered private information.

[0177] In one alternative approach, the named entity is a personal name entity.

[0178] The solution provided in the above embodiments of the present invention performs word segmentation and dependency analysis on a first text and a second text respectively to obtain a first phrase set and a second phrase set; based on the first phrase set and the second phrase set, predicate knowledge is constructed to obtain a first predicate expression set corresponding to the first text and a second predicate expression set corresponding to the second text; wherein, the first predicate expression set includes each named entity in the first text and the first predicate set corresponding to each named entity, and the second predicate expression set includes a second predicate set that overlaps with confidential information and a third predicate set that does not overlap with confidential information; predicate matching is performed between the second predicate expression set and the first predicate expression set to detect privacy information in the second text. The present invention converts free text into predicate logic knowledge, and designs matching rules between logical knowledge by combining semantic distance matching technology in the natural language domain, and detects privacy information in the text to be opened according to the matching rules.

[0179] This invention provides a non-volatile computer storage medium storing at least one executable instruction that can execute the text privacy detection method in any of the above method embodiments.

[0180] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0181] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0182] Similarly, it should be understood that, in order to simplify the invention and aid in understanding one or more of the various inventive aspects, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.

[0183] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0184] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0185] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components according to the embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0186] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

Claims

1. A text privacy detection method, characterized in that, The method includes: The first and second texts are segmented and dependency analysis is performed respectively to obtain the first phrase set and the second phrase set; Based on the first phrase set and the second phrase set, predicate knowledge is constructed to obtain the first predicate expression set corresponding to the first text and the second predicate expression set corresponding to the second text; wherein, the first predicate expression set includes each named entity in the first text and the first predicate set corresponding to each named entity, and the second predicate expression set includes the second predicate set that overlaps with the confidential information and the third predicate set that does not overlap with the confidential information; Predicate matching is performed between the second predicate expression set and the first predicate expression set to detect privacy information in the second text; wherein, each predicate in the third predicate set is matched with the first predicate set corresponding to each named entity; based on the matching result, hit(e,C) and cause(e,C) are determined, where e is a named entity, C is the third predicate set, hit(e,C) is the number of fourth predicates in C that match the first predicate set corresponding to the named entity e, and cause(e,C) is the number of fourth predicates in C that match the first predicate set corresponding to the named entity e. The set of fourth predicates that match the first predicate set corresponding to named entity e; select named entities e where hit(e,C)>0 to form a set sat(C); for named entities in sat(C), given an integer threshold k, k>1, obtain private_sat(C,k), where private_sat(C,k) is the set of named entities where hit(e,C)≥k; if private_sat(C,k) contains only a single named entity, then all fourth predicates contained in cause(e,C) are determined to be private information.

2. The method according to claim 1, characterized in that, The step of constructing predicate knowledge based on the first phrase set and the second phrase set to obtain the first predicate expression set corresponding to the first text and the second predicate expression set corresponding to the second text further includes: For the first and second phrase sets respectively, based on the dependency analysis results, multiple phrases on the direct dependency path are concatenated in reverse order to obtain the first candidate predicate set and the second candidate predicate set respectively; For the first text containing named entities, predicate filtering is performed on the first candidate predicate set to obtain the first predicate set, and a correspondence between each named entity and the first predicate set is established. For the second text that does not contain named entities, the second candidate predicate set is matched with the confidential information to obtain a second predicate set that overlaps with the confidential information and a third predicate set that does not overlap with the confidential information.

3. The method according to claim 2, characterized in that, The step of predicate filtering of the first candidate predicate set to obtain the first predicate set further includes: If the candidate predicates in the first candidate predicate set contain named entities, then the named entities are removed from the candidate predicates to obtain the first predicate set corresponding to the named entities.

4. The method according to claim 1, characterized in that, The step of performing predicate matching between each predicate in the third predicate set and the first predicate set corresponding to each named entity further includes: Calculate the cosine similarity of word vectors between each predicate in the third predicate set and each predicate in the first predicate set corresponding to each named entity, and determine whether a match exists based on the word vector cosine similarity; and / or, Determine whether each predicate in the third predicate set has at least one common word with each predicate in the first predicate set corresponding to each named entity. If so, the determination result is a match.

5. The method according to claim 1, characterized in that, The named entity is a personal name entity.

6. A text privacy detection device, characterized in that, The device includes: The data text analysis module is used to perform word segmentation and dependency analysis on the first text and the second text respectively, to obtain the first phrase set and the second phrase set; The predicate knowledge construction module is used to construct predicate knowledge based on the first phrase set and the second phrase set to obtain a first predicate expression set corresponding to the first text and a second predicate expression set corresponding to the second text; wherein, the first predicate expression set includes each named entity in the first text and a first predicate set corresponding to each named entity, and the second predicate expression set includes a second predicate set that overlaps with the confidential information and a third predicate set that does not overlap with the confidential information; The privacy text detection module is used to perform predicate matching between the second predicate expression set and the first predicate expression set to detect privacy information in the second text; wherein, each predicate in the third predicate set is matched with the first predicate set corresponding to each named entity; based on the matching result, hit(e,C) and cause(e,C) are determined, where e is a named entity, C is the third predicate set, hit(e,C) is the number of fourth predicates in C that match the first predicate set corresponding to the named entity e, and cause(e,C) is the number of fourth predicates in C that match the first predicate set corresponding to the named entity e. The set of fourth predicates that match the set of first predicates corresponding to named entity e; select named entities e where hit(e,C)>0 to form a set sat(C); for named entities in sat(C), given an integer threshold k, k>1, obtain private_sat(C,k), where private_sat(C,k) is the set of named entities where hit(e,C)≥k; if private_sat(C,k) contains only a single named entity, then all fourth predicates contained in cause(e,C) are determined to be private information.

7. A computing device, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the text privacy detection method as described in any one of claims 1-5.

8. A computer storage medium storing at least one executable instruction that causes a processor to perform an operation corresponding to the text privacy detection method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Dialogue emotion analysis method based on heterogeneous bipartite graph

    CN111966827A

  • Pseudo-fuzzy detection method in privacy policy document

    CN113723085A